commandbar 1.8.7 → 1.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. package/build/{internal/src/client → commandbar/src/shared/services/analytics}/EventHandler.d.ts +51 -15
  2. package/build/commandbar/src/shared/services/analytics/types.d.ts +77 -0
  3. package/build/commandbar-js/src/index.d.ts +2 -2
  4. package/build/commandbar-js/src/index.js +1 -1
  5. package/build/internal/src/client/AddContextOptions.d.ts +8 -0
  6. package/build/internal/src/client/CommandBarClientSDK.d.ts +70 -19
  7. package/build/internal/src/client/CommandBarProxySDK.d.ts +3 -3
  8. package/build/internal/src/client/CommandBarSDK.d.ts +34 -18
  9. package/build/internal/src/client/SDKConfig.d.ts +3 -2
  10. package/build/internal/src/client/globals.d.ts +6 -0
  11. package/build/internal/src/client/symbols.d.ts +13 -6
  12. package/build/internal/src/middleware/CommandFromClientV.d.ts +88 -18
  13. package/build/internal/src/middleware/IRecordSettings.d.ts +3 -0
  14. package/build/internal/src/middleware/OrganizationV.d.ts +320 -22
  15. package/build/internal/src/middleware/{ResourceSettingsV.d.ts → RecordSettingsV.d.ts} +2 -2
  16. package/build/internal/src/middleware/additionalResource.d.ts +270 -27
  17. package/build/internal/src/middleware/billing.d.ts +31 -0
  18. package/build/internal/src/middleware/chat.d.ts +12933 -0
  19. package/build/internal/src/middleware/checklist.d.ts +589 -70
  20. package/build/internal/src/middleware/command.d.ts +5433 -677
  21. package/build/internal/src/middleware/detailPreview.d.ts +12 -1
  22. package/build/internal/src/middleware/endUser.d.ts +132 -0
  23. package/build/internal/src/middleware/entityChanges.d.ts +17 -0
  24. package/build/internal/src/middleware/experienceTemplate.d.ts +59 -0
  25. package/build/internal/src/middleware/experiencesSearch.d.ts +3579 -0
  26. package/build/internal/src/middleware/flags.d.ts +20 -0
  27. package/build/internal/src/middleware/generics.d.ts +12 -11
  28. package/build/internal/src/middleware/helpDocsIntegration.d.ts +63 -8
  29. package/build/internal/src/middleware/helpDocsSearch.d.ts +2540 -0
  30. package/build/internal/src/middleware/helpHub.d.ts +26 -0
  31. package/build/internal/src/middleware/helpers/actions.d.ts +174 -16
  32. package/build/internal/src/middleware/helpers/commandTemplate.d.ts +144 -2
  33. package/build/internal/src/middleware/helpers/copilotPersonality.d.ts +12 -0
  34. package/build/internal/src/middleware/helpers/goals.d.ts +4 -2
  35. package/build/internal/src/middleware/helpers/pushTrigger.d.ts +28 -0
  36. package/build/internal/src/middleware/helpers/rules.d.ts +318 -50
  37. package/build/internal/src/middleware/network.d.ts +27 -3
  38. package/build/internal/src/middleware/nudge.d.ts +2220 -91
  39. package/build/internal/src/middleware/organization.d.ts +2289 -152
  40. package/build/internal/src/middleware/organizationSettings.d.ts +435 -20
  41. package/build/internal/src/middleware/profile.d.ts +2 -0
  42. package/build/internal/src/middleware/recommendationSet.d.ts +489 -1007
  43. package/build/internal/src/middleware/releases.d.ts +1 -1
  44. package/build/internal/src/middleware/theme.d.ts +425 -0
  45. package/build/internal/src/middleware/types.d.ts +88 -34
  46. package/build/internal/src/middleware/user.d.ts +1 -0
  47. package/build/internal/src/util/dispatchCustomEvent.d.ts +5 -3
  48. package/build/internal/src/util/operatingSystem.d.ts +11 -0
  49. package/build/internal/src/util/sentry.d.ts +23 -0
  50. package/package.json +3 -3
  51. package/src/index.ts +2 -2
  52. package/src/init.ts +11 -6
  53. package/src/snippet.ts +2 -2
  54. package/build/internal/src/client/AnalyticsEventTypes.d.ts +0 -1
  55. package/build/internal/src/client/SentryReporter.d.ts +0 -63
  56. package/build/internal/src/middleware/IResourceSettings.d.ts +0 -3
  57. package/build/internal/src/middleware/chatAnalytics.d.ts +0 -2601
  58. package/build/internal/src/middleware/dashboardFlags.d.ts +0 -9
  59. package/build/internal/src/middleware/helpers/endUser.d.ts +0 -11
  60. package/build/internal/src/middleware/qaPair.d.ts +0 -676
  61. package/build/internal/src/util/integrations.d.ts +0 -1
@@ -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,132 @@
1
+ import * as t from 'io-ts';
2
+ import { UserProperties } from '../client/CommandBarClientSDK';
3
+ import { IDecideResponseType, IEndUserType } from './types';
4
+ export declare const ChecklistInteractionStateV: 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
+ stepIndexStack: t.ArrayC<t.NumberC>;
25
+ }>]>;
26
+ export declare const ChecklistInteractionsV: t.RecordC<t.NumberC, t.IntersectionC<[t.PartialC<{
27
+ isSkipped: t.BooleanC;
28
+ isCompleted: t.BooleanC;
29
+ isExpanded: t.BooleanC;
30
+ isSeen: t.BooleanC;
31
+ items: t.RecordC<t.StringC, t.TypeC<{
32
+ completedTS: t.StringC;
33
+ }>>;
34
+ }>, t.PartialC<{}>]>>;
35
+ export declare const NudgeInteractionsV: t.RecordC<t.NumberC, t.IntersectionC<[t.PartialC<{
36
+ currentStep: t.NumberC;
37
+ nudgeSeen: t.BooleanC;
38
+ nudgeInteracted: t.BooleanC;
39
+ seenTs: t.ArrayC<t.NumberC>;
40
+ snoozedUntilTs: t.NumberC;
41
+ nudgeDismissed: t.BooleanC;
42
+ nudgeCompleted: t.BooleanC;
43
+ nudgeDismissedTs: t.ArrayC<t.NumberC>;
44
+ nudgeCompletedTs: t.ArrayC<t.NumberC>;
45
+ }>, t.PartialC<{
46
+ stepIndexStack: t.ArrayC<t.NumberC>;
47
+ }>]>>;
48
+ export declare const UserRemotePropertiesV: t.RecordC<t.StringC, t.AnyC>;
49
+ export declare const EndUserStoreDataV: t.TypeC<{
50
+ hotkeys: t.AnyC;
51
+ checklist_interactions: t.PartialC<{
52
+ activeChecklistId: t.UnionC<[t.NumberC, t.NullC]>;
53
+ checklists: t.RecordC<t.NumberC, t.IntersectionC<[t.PartialC<{
54
+ isSkipped: t.BooleanC;
55
+ isCompleted: t.BooleanC;
56
+ isExpanded: t.BooleanC;
57
+ isSeen: t.BooleanC;
58
+ items: t.RecordC<t.StringC, t.TypeC<{
59
+ completedTS: t.StringC;
60
+ }>>;
61
+ }>, t.PartialC<{}>]>>;
62
+ }>;
63
+ nudges_interactions: t.UnionC<[t.RecordC<t.NumberC, t.IntersectionC<[t.PartialC<{
64
+ currentStep: t.NumberC;
65
+ nudgeSeen: t.BooleanC;
66
+ nudgeInteracted: t.BooleanC;
67
+ seenTs: t.ArrayC<t.NumberC>;
68
+ snoozedUntilTs: t.NumberC;
69
+ nudgeDismissed: t.BooleanC;
70
+ nudgeCompleted: t.BooleanC;
71
+ nudgeDismissedTs: t.ArrayC<t.NumberC>;
72
+ nudgeCompletedTs: t.ArrayC<t.NumberC>;
73
+ }>, t.PartialC<{
74
+ stepIndexStack: t.ArrayC<t.NumberC>;
75
+ }>]>>, t.UndefinedC]>;
76
+ analytics: t.UnionC<[t.TypeC<{
77
+ num_command_executions: t.NumberC;
78
+ num_shortcut_command_executions: t.NumberC;
79
+ num_sessions: t.NumberC;
80
+ num_opens: t.NumberC;
81
+ num_deadends: t.NumberC;
82
+ first_seen_at: t.StringC;
83
+ last_seen_at: t.StringC;
84
+ }>, t.UndefinedC, t.NullC]>;
85
+ properties: t.RecordC<t.StringC, t.AnyC>;
86
+ }>;
87
+ export declare const EndUserV: t.TypeC<{
88
+ username: t.StringC;
89
+ slug: t.StringC;
90
+ organization: t.StringC;
91
+ has_access: t.BooleanC;
92
+ has_opened: t.BooleanC;
93
+ hotkeys_debug: t.BooleanC;
94
+ hmac: t.UnionC<[t.StringC, t.UndefinedC]>;
95
+ identifier: t.StringC;
96
+ }>;
97
+ 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]>>;
98
+ export declare const DecideResponseV: t.UnionC<[t.TypeC<{
99
+ user_property_targeting: t.UnionC<[t.BooleanC, t.UndefinedC, t.NullC]>;
100
+ 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]>;
101
+ 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]>;
102
+ recommendation_sets: 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]>;
103
+ }>, t.UndefinedC, t.NullC]>;
104
+ export declare const EndUser: {
105
+ preferences: (_identifier: string | null | undefined, _hmac: string) => Promise<never>;
106
+ decide: (orgId: string | number, distinctId: string | null | undefined, options: {
107
+ properties?: UserProperties;
108
+ envOverride: {
109
+ env: string;
110
+ } | {
111
+ version: string;
112
+ } | null;
113
+ env: string | null;
114
+ version?: string;
115
+ }) => Promise<IDecideResponseType | null>;
116
+ identify: (orgId: string | number, distinctId: string, options: {
117
+ properties?: UserProperties;
118
+ }, hmac?: string) => Promise<IEndUserType | null>;
119
+ };
120
+ export declare function getEnvOrVersion({ envOverride, env, version, }: {
121
+ envOverride?: {
122
+ env: string;
123
+ } | {
124
+ version: string;
125
+ } | null;
126
+ env?: string | null;
127
+ version?: string | null;
128
+ }): {
129
+ env: string;
130
+ } | {
131
+ version: string;
132
+ };
@@ -0,0 +1,17 @@
1
+ import * as t from 'io-ts';
2
+ export declare const EntityChangeV: t.IntersectionC<[t.TypeC<{
3
+ id: t.NumberC;
4
+ organization: t.StringC;
5
+ description: t.StringC;
6
+ }>, t.PartialC<{
7
+ changed_by: t.StringC;
8
+ created: t.StringC;
9
+ }>]>;
10
+ export declare const listEntityChanges: (onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<({
11
+ id: number;
12
+ organization: string;
13
+ description: string;
14
+ } & {
15
+ changed_by?: string | undefined;
16
+ created?: string | undefined;
17
+ })[]>;
@@ -0,0 +1,59 @@
1
+ import * as t from 'io-ts';
2
+ export declare const ExperienceTemplateV: t.TypeC<{
3
+ id: t.NumberC;
4
+ type: t.UnionC<[t.LiteralC<"announcement">, t.LiteralC<"product_tour">, t.LiteralC<"survey">]>;
5
+ data: t.RecordC<t.StringC, t.AnyC>;
6
+ }>;
7
+ export declare class ExperienceTemplate {
8
+ static decode: (data: any) => {
9
+ id: number;
10
+ type: "announcement" | "product_tour" | "survey";
11
+ data: {
12
+ [x: string]: any;
13
+ };
14
+ };
15
+ static create: (object: {
16
+ id: number;
17
+ type: "announcement" | "product_tour" | "survey";
18
+ data: {
19
+ [x: string]: any;
20
+ };
21
+ }, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
22
+ id: number;
23
+ type: "announcement" | "product_tour" | "survey";
24
+ data: {
25
+ [x: string]: any;
26
+ };
27
+ }>;
28
+ static update: (object: {
29
+ id: number;
30
+ type: "announcement" | "product_tour" | "survey";
31
+ data: {
32
+ [x: string]: any;
33
+ };
34
+ }, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
35
+ id: number;
36
+ type: "announcement" | "product_tour" | "survey";
37
+ data: {
38
+ [x: string]: any;
39
+ };
40
+ }>;
41
+ static delete: (id: string | number, params?: Record<string, string> | undefined, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<void>;
42
+ static list: (onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
43
+ id: number;
44
+ type: "announcement" | "product_tour" | "survey";
45
+ data: {
46
+ [x: string]: any;
47
+ };
48
+ }[]>;
49
+ static read: (arg0: string, params?: Record<string, string> | undefined, callbacks?: {
50
+ onSuccess?: (() => void) | undefined;
51
+ onError?: ((err: string) => void) | undefined;
52
+ } | undefined) => Promise<{
53
+ id: number;
54
+ type: "announcement" | "product_tour" | "survey";
55
+ data: {
56
+ [x: string]: any;
57
+ };
58
+ }>;
59
+ }