commandbar 1.8.7 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{internal/src/client → commandbar/src/shared/services/analytics}/EventHandler.d.ts +51 -15
- package/build/commandbar/src/shared/services/analytics/types.d.ts +77 -0
- package/build/commandbar-js/src/index.d.ts +2 -2
- package/build/commandbar-js/src/index.js +1 -1
- package/build/internal/src/client/AddContextOptions.d.ts +8 -0
- package/build/internal/src/client/CommandBarClientSDK.d.ts +70 -19
- package/build/internal/src/client/CommandBarProxySDK.d.ts +3 -3
- package/build/internal/src/client/CommandBarSDK.d.ts +34 -18
- package/build/internal/src/client/SDKConfig.d.ts +3 -2
- package/build/internal/src/client/globals.d.ts +6 -0
- package/build/internal/src/client/symbols.d.ts +13 -6
- package/build/internal/src/middleware/CommandFromClientV.d.ts +88 -18
- package/build/internal/src/middleware/IRecordSettings.d.ts +3 -0
- package/build/internal/src/middleware/OrganizationV.d.ts +320 -22
- package/build/internal/src/middleware/{ResourceSettingsV.d.ts → RecordSettingsV.d.ts} +2 -2
- package/build/internal/src/middleware/additionalResource.d.ts +270 -27
- package/build/internal/src/middleware/billing.d.ts +31 -0
- package/build/internal/src/middleware/chat.d.ts +12933 -0
- package/build/internal/src/middleware/checklist.d.ts +589 -70
- package/build/internal/src/middleware/command.d.ts +5433 -677
- package/build/internal/src/middleware/detailPreview.d.ts +12 -1
- package/build/internal/src/middleware/endUser.d.ts +132 -0
- package/build/internal/src/middleware/entityChanges.d.ts +17 -0
- package/build/internal/src/middleware/experienceTemplate.d.ts +59 -0
- package/build/internal/src/middleware/experiencesSearch.d.ts +3579 -0
- package/build/internal/src/middleware/flags.d.ts +20 -0
- package/build/internal/src/middleware/generics.d.ts +12 -11
- package/build/internal/src/middleware/helpDocsIntegration.d.ts +63 -8
- package/build/internal/src/middleware/helpDocsSearch.d.ts +2540 -0
- package/build/internal/src/middleware/helpHub.d.ts +26 -0
- package/build/internal/src/middleware/helpers/actions.d.ts +174 -16
- package/build/internal/src/middleware/helpers/commandTemplate.d.ts +144 -2
- package/build/internal/src/middleware/helpers/copilotPersonality.d.ts +12 -0
- package/build/internal/src/middleware/helpers/goals.d.ts +4 -2
- package/build/internal/src/middleware/helpers/pushTrigger.d.ts +28 -0
- package/build/internal/src/middleware/helpers/rules.d.ts +318 -50
- package/build/internal/src/middleware/network.d.ts +27 -3
- package/build/internal/src/middleware/nudge.d.ts +2220 -91
- package/build/internal/src/middleware/organization.d.ts +2289 -152
- package/build/internal/src/middleware/organizationSettings.d.ts +435 -20
- package/build/internal/src/middleware/profile.d.ts +2 -0
- package/build/internal/src/middleware/recommendationSet.d.ts +489 -1007
- package/build/internal/src/middleware/releases.d.ts +1 -1
- package/build/internal/src/middleware/theme.d.ts +425 -0
- package/build/internal/src/middleware/types.d.ts +88 -34
- package/build/internal/src/middleware/user.d.ts +1 -0
- package/build/internal/src/util/dispatchCustomEvent.d.ts +5 -3
- package/build/internal/src/util/operatingSystem.d.ts +11 -0
- package/build/internal/src/util/sentry.d.ts +23 -0
- package/package.json +3 -3
- package/src/index.ts +2 -2
- package/src/init.ts +11 -6
- package/src/snippet.ts +2 -2
- package/build/internal/src/client/AnalyticsEventTypes.d.ts +0 -1
- package/build/internal/src/client/SentryReporter.d.ts +0 -63
- package/build/internal/src/middleware/IResourceSettings.d.ts +0 -3
- package/build/internal/src/middleware/chatAnalytics.d.ts +0 -2601
- package/build/internal/src/middleware/dashboardFlags.d.ts +0 -9
- package/build/internal/src/middleware/helpers/endUser.d.ts +0 -11
- package/build/internal/src/middleware/qaPair.d.ts +0 -676
- package/build/internal/src/util/integrations.d.ts +0 -1
@@ -20,7 +20,9 @@ export declare const ConditionsMetGoal: t.TypeC<{
|
|
20
20
|
export declare const CTAClickedGoal: t.TypeC<{
|
21
21
|
type: t.LiteralC<"cta_clicked">;
|
22
22
|
}>;
|
23
|
-
export declare const EventTrackedGoal: t.TypeC<{
|
23
|
+
export declare const EventTrackedGoal: t.IntersectionC<[t.TypeC<{
|
24
24
|
type: t.LiteralC<"event_tracked">;
|
25
25
|
event: t.StringC;
|
26
|
-
}
|
26
|
+
}>, t.PartialC<{
|
27
|
+
condition_group: t.UnionC<[t.Type<import("./rules").RuleExpression, import("./rules").RuleExpression, unknown>, t.NullC, t.UndefinedC]>;
|
28
|
+
}>]>;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import * as t from 'io-ts';
|
2
|
+
import { IChecklist, INudgeType } from '../types';
|
2
3
|
export declare const PushTriggerV: t.UnionC<[t.TypeC<{
|
3
4
|
type: t.LiteralC<"when_conditions_pass">;
|
4
5
|
}>, t.TypeC<{
|
@@ -15,12 +16,39 @@ export declare const PushTriggerV: t.UnionC<[t.TypeC<{
|
|
15
16
|
type: t.LiteralC<"on_event">;
|
16
17
|
meta: t.TypeC<{
|
17
18
|
event: t.StringC;
|
19
|
+
condition_group: t.UnionC<[t.Type<import("./rules").RuleExpression, import("./rules").RuleExpression, unknown>, t.NullC, t.UndefinedC]>;
|
18
20
|
}>;
|
19
21
|
}>, t.TypeC<{
|
20
22
|
type: t.LiteralC<"when_element_appears">;
|
21
23
|
meta: t.TypeC<{
|
22
24
|
selector: t.StringC;
|
23
25
|
}>;
|
26
|
+
}>, t.TypeC<{
|
27
|
+
type: t.LiteralC<"on_user_confusion">;
|
28
|
+
}>, t.TypeC<{
|
29
|
+
type: t.LiteralC<"on_rage_click">;
|
30
|
+
}>, t.TypeC<{
|
31
|
+
type: t.LiteralC<"smart_delay">;
|
32
|
+
}>, t.TypeC<{
|
33
|
+
type: t.LiteralC<"after_time">;
|
34
|
+
meta: t.TypeC<{
|
35
|
+
unit: t.UnionC<[t.LiteralC<"minute">, t.LiteralC<"second">]>;
|
36
|
+
value: t.NumberC;
|
37
|
+
}>;
|
24
38
|
}>, t.TypeC<{
|
25
39
|
type: t.LiteralC<"when_share_link_viewed">;
|
40
|
+
}>, t.TypeC<{
|
41
|
+
type: t.LiteralC<"scheduled">;
|
42
|
+
meta: t.TypeC<{
|
43
|
+
interval: t.UnionC<[t.LiteralC<"day">, t.LiteralC<"week">, t.LiteralC<"month">]>;
|
44
|
+
value: t.NumberC;
|
45
|
+
}>;
|
26
46
|
}>]>;
|
47
|
+
export type TriggerableEntity = INudgeType | IChecklist;
|
48
|
+
export declare enum TriggerableEntityType {
|
49
|
+
NUDGE = "nudge",
|
50
|
+
CHECKLIST = "checklist"
|
51
|
+
}
|
52
|
+
export declare const isNudge: (triggerable: TriggerableEntity) => triggerable is INudgeType;
|
53
|
+
export type TriggerableEntityId = `${TriggerableEntityType}-${INudgeType['id'] | IChecklist['id']}`;
|
54
|
+
export declare const generateTriggerableEntityId: (triggerableEntity: TriggerableEntity) => TriggerableEntityId;
|
@@ -1,21 +1,19 @@
|
|
1
1
|
import * as t from 'io-ts';
|
2
|
-
|
3
|
-
declare const
|
2
|
+
import { IRecommendationSet } from '../types';
|
3
|
+
export declare const listOperators: readonly ["includes", "doesNotInclude"];
|
4
|
+
export declare const equalityOperators: readonly ["is", "isNot"];
|
5
|
+
export declare const numericOperators: readonly ["isGreaterThan", "isLessThan"];
|
6
|
+
export declare const operators: readonly ["isTrue", "isFalse", "isTruthy", "isFalsy", "startsWith", "endsWith", "matchesRegex", "isDefined", "isNotDefined", "classnameOnPage", "idOnPage", "selectorOnPage", "classnameNotOnPage", "idNotOnPage", "selectorNotOnPage", "includes", "doesNotInclude", "is", "isNot", "isGreaterThan", "isLessThan"];
|
7
|
+
export declare const OperatorV: t.KeyofC<{
|
4
8
|
includes: null;
|
5
9
|
endsWith: null;
|
6
10
|
startsWith: null;
|
7
11
|
is: null;
|
8
|
-
isNot: null;
|
9
12
|
isTrue: null;
|
10
13
|
isFalse: null;
|
11
14
|
isTruthy: null;
|
12
15
|
isFalsy: null;
|
13
|
-
doesNotInclude: null;
|
14
16
|
matchesRegex: null;
|
15
|
-
isGreaterThan: null;
|
16
|
-
isLessThan: null;
|
17
|
-
isBefore: null;
|
18
|
-
isAfter: null;
|
19
17
|
isDefined: null;
|
20
18
|
isNotDefined: null;
|
21
19
|
classnameOnPage: null;
|
@@ -24,25 +22,127 @@ declare const OperatorV: t.KeyofC<{
|
|
24
22
|
classnameNotOnPage: null;
|
25
23
|
idNotOnPage: null;
|
26
24
|
selectorNotOnPage: null;
|
25
|
+
doesNotInclude: null;
|
26
|
+
isNot: null;
|
27
|
+
isGreaterThan: null;
|
28
|
+
isLessThan: null;
|
27
29
|
}>;
|
28
|
-
export declare const
|
29
|
-
type: t.
|
30
|
+
export declare const NudgeInteractionConditionV: t.IntersectionC<[t.TypeC<{
|
31
|
+
type: t.LiteralC<"nudge_interaction">;
|
32
|
+
operator: t.KeyofC<{
|
33
|
+
is: null;
|
34
|
+
isNot: null;
|
35
|
+
}>;
|
36
|
+
value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
|
37
|
+
nudge_id: t.NumberC;
|
38
|
+
}>, t.PartialC<{
|
39
|
+
reason: t.StringC;
|
40
|
+
}>]>;
|
41
|
+
export declare const QuestlistInteractionConditionV: t.IntersectionC<[t.TypeC<{
|
42
|
+
type: t.LiteralC<"questlist_interaction">;
|
43
|
+
operator: t.KeyofC<{
|
44
|
+
is: null;
|
45
|
+
isNot: null;
|
46
|
+
}>;
|
47
|
+
value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
|
48
|
+
questlist_id: t.NumberC;
|
49
|
+
}>, t.PartialC<{
|
50
|
+
reason: t.StringC;
|
51
|
+
}>]>;
|
52
|
+
export declare const InteractionConditionV: t.UnionC<[t.IntersectionC<[t.TypeC<{
|
53
|
+
type: t.LiteralC<"nudge_interaction">;
|
54
|
+
operator: t.KeyofC<{
|
55
|
+
is: null;
|
56
|
+
isNot: null;
|
57
|
+
}>;
|
58
|
+
value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
|
59
|
+
nudge_id: t.NumberC;
|
60
|
+
}>, t.PartialC<{
|
61
|
+
reason: t.StringC;
|
62
|
+
}>]>, t.IntersectionC<[t.TypeC<{
|
63
|
+
type: t.LiteralC<"questlist_interaction">;
|
64
|
+
operator: t.KeyofC<{
|
65
|
+
is: null;
|
66
|
+
isNot: null;
|
67
|
+
}>;
|
68
|
+
value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
|
69
|
+
questlist_id: t.NumberC;
|
70
|
+
}>, t.PartialC<{
|
71
|
+
reason: t.StringC;
|
72
|
+
}>]>]>;
|
73
|
+
declare const MultiValueConditionV: t.IntersectionC<[t.TypeC<{
|
74
|
+
type: t.UnionC<[t.LiteralC<"browser">, t.LiteralC<"os">, t.LiteralC<"language">]>;
|
75
|
+
operator: t.KeyofC<{
|
76
|
+
includes: null;
|
77
|
+
doesNotInclude: null;
|
78
|
+
}>;
|
79
|
+
values: t.ArrayC<t.StringC>;
|
80
|
+
}>, t.PartialC<{
|
81
|
+
reason: t.StringC;
|
82
|
+
}>]>;
|
83
|
+
export declare const SingleValueConditionV: t.UnionC<[t.IntersectionC<[t.TypeC<{
|
84
|
+
type: t.UnionC<[t.LiteralC<"user_property">, t.LiteralC<"event_property">, t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"hostname">, t.LiteralC<"element">, t.LiteralC<"executions">, t.LiteralC<"shortcuts">, t.LiteralC<"last_seen">, t.LiteralC<"first_seen">, t.LiteralC<"sessions">, t.LiteralC<"opens">, t.LiteralC<"deadends">, t.LiteralC<"heap">, t.LiteralC<"hubspot">, t.LiteralC<"device_type">, t.LiteralC<"ab_test">, t.LiteralC<"intent">, t.LiteralC<"help_doc_interaction">, t.LiteralC<"video_interaction">, t.LiteralC<"survey_response">]>;
|
30
85
|
operator: t.KeyofC<{
|
31
86
|
includes: null;
|
32
87
|
endsWith: null;
|
33
88
|
startsWith: null;
|
34
89
|
is: null;
|
35
|
-
isNot: null;
|
36
90
|
isTrue: null;
|
37
91
|
isFalse: null;
|
38
92
|
isTruthy: null;
|
39
93
|
isFalsy: null;
|
40
|
-
doesNotInclude: null;
|
41
94
|
matchesRegex: null;
|
95
|
+
isDefined: null;
|
96
|
+
isNotDefined: null;
|
97
|
+
classnameOnPage: null;
|
98
|
+
idOnPage: null;
|
99
|
+
selectorOnPage: null;
|
100
|
+
classnameNotOnPage: null;
|
101
|
+
idNotOnPage: null;
|
102
|
+
selectorNotOnPage: null;
|
103
|
+
doesNotInclude: null;
|
104
|
+
isNot: null;
|
42
105
|
isGreaterThan: null;
|
43
106
|
isLessThan: null;
|
44
|
-
|
45
|
-
|
107
|
+
}>;
|
108
|
+
}>, t.PartialC<{
|
109
|
+
field: t.StringC;
|
110
|
+
value: t.StringC;
|
111
|
+
reason: t.StringC;
|
112
|
+
rule_id: t.UnionC<[t.NumberC, t.StringC]>;
|
113
|
+
}>]>, t.UnionC<[t.IntersectionC<[t.TypeC<{
|
114
|
+
type: t.LiteralC<"nudge_interaction">;
|
115
|
+
operator: t.KeyofC<{
|
116
|
+
is: null;
|
117
|
+
isNot: null;
|
118
|
+
}>;
|
119
|
+
value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
|
120
|
+
nudge_id: t.NumberC;
|
121
|
+
}>, t.PartialC<{
|
122
|
+
reason: t.StringC;
|
123
|
+
}>]>, t.IntersectionC<[t.TypeC<{
|
124
|
+
type: t.LiteralC<"questlist_interaction">;
|
125
|
+
operator: t.KeyofC<{
|
126
|
+
is: null;
|
127
|
+
isNot: null;
|
128
|
+
}>;
|
129
|
+
value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
|
130
|
+
questlist_id: t.NumberC;
|
131
|
+
}>, t.PartialC<{
|
132
|
+
reason: t.StringC;
|
133
|
+
}>]>]>]>;
|
134
|
+
export declare const ConditionV: t.UnionC<[t.UnionC<[t.IntersectionC<[t.TypeC<{
|
135
|
+
type: t.UnionC<[t.LiteralC<"user_property">, t.LiteralC<"event_property">, t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"hostname">, t.LiteralC<"element">, t.LiteralC<"executions">, t.LiteralC<"shortcuts">, t.LiteralC<"last_seen">, t.LiteralC<"first_seen">, t.LiteralC<"sessions">, t.LiteralC<"opens">, t.LiteralC<"deadends">, t.LiteralC<"heap">, t.LiteralC<"hubspot">, t.LiteralC<"device_type">, t.LiteralC<"ab_test">, t.LiteralC<"intent">, t.LiteralC<"help_doc_interaction">, t.LiteralC<"video_interaction">, t.LiteralC<"survey_response">]>;
|
136
|
+
operator: t.KeyofC<{
|
137
|
+
includes: null;
|
138
|
+
endsWith: null;
|
139
|
+
startsWith: null;
|
140
|
+
is: null;
|
141
|
+
isTrue: null;
|
142
|
+
isFalse: null;
|
143
|
+
isTruthy: null;
|
144
|
+
isFalsy: null;
|
145
|
+
matchesRegex: null;
|
46
146
|
isDefined: null;
|
47
147
|
isNotDefined: null;
|
48
148
|
classnameOnPage: null;
|
@@ -51,13 +151,46 @@ export declare const ConditionV: t.IntersectionC<[t.TypeC<{
|
|
51
151
|
classnameNotOnPage: null;
|
52
152
|
idNotOnPage: null;
|
53
153
|
selectorNotOnPage: null;
|
154
|
+
doesNotInclude: null;
|
155
|
+
isNot: null;
|
156
|
+
isGreaterThan: null;
|
157
|
+
isLessThan: null;
|
54
158
|
}>;
|
55
159
|
}>, t.PartialC<{
|
56
160
|
field: t.StringC;
|
57
161
|
value: t.StringC;
|
58
162
|
reason: t.StringC;
|
59
163
|
rule_id: t.UnionC<[t.NumberC, t.StringC]>;
|
60
|
-
}>]
|
164
|
+
}>]>, t.UnionC<[t.IntersectionC<[t.TypeC<{
|
165
|
+
type: t.LiteralC<"nudge_interaction">;
|
166
|
+
operator: t.KeyofC<{
|
167
|
+
is: null;
|
168
|
+
isNot: null;
|
169
|
+
}>;
|
170
|
+
value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
|
171
|
+
nudge_id: t.NumberC;
|
172
|
+
}>, t.PartialC<{
|
173
|
+
reason: t.StringC;
|
174
|
+
}>]>, t.IntersectionC<[t.TypeC<{
|
175
|
+
type: t.LiteralC<"questlist_interaction">;
|
176
|
+
operator: t.KeyofC<{
|
177
|
+
is: null;
|
178
|
+
isNot: null;
|
179
|
+
}>;
|
180
|
+
value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
|
181
|
+
questlist_id: t.NumberC;
|
182
|
+
}>, t.PartialC<{
|
183
|
+
reason: t.StringC;
|
184
|
+
}>]>]>]>, t.IntersectionC<[t.TypeC<{
|
185
|
+
type: t.UnionC<[t.LiteralC<"browser">, t.LiteralC<"os">, t.LiteralC<"language">]>;
|
186
|
+
operator: t.KeyofC<{
|
187
|
+
includes: null;
|
188
|
+
doesNotInclude: null;
|
189
|
+
}>;
|
190
|
+
values: t.ArrayC<t.StringC>;
|
191
|
+
}>, t.PartialC<{
|
192
|
+
reason: t.StringC;
|
193
|
+
}>]>]>;
|
61
194
|
export declare const getConditions: (expr: RuleExpression) => ExpressionCondition[];
|
62
195
|
export declare const canonicalize: (expr: RuleExpression) => RuleExpression;
|
63
196
|
export declare function isCompoundExpression(expr: RuleExpression): expr is RuleExpressionAnd | RuleExpressionOr;
|
@@ -101,24 +234,18 @@ export declare const RecommendationRuleAlwaysV: t.IntersectionC<[t.TypeC<{
|
|
101
234
|
reason: t.UnionC<[t.UndefinedC, t.NullC]>;
|
102
235
|
rule_id: t.UnionC<[t.NumberC, t.StringC]>;
|
103
236
|
}>]>;
|
104
|
-
export declare const AvailabilityRuleV: t.IntersectionC<[t.TypeC<{
|
105
|
-
type: t.UnionC<[t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"element">, t.LiteralC<"executions">, t.LiteralC<"shortcuts">, t.LiteralC<"last_seen">, t.LiteralC<"first_seen">, t.LiteralC<"sessions">, t.LiteralC<"opens">, t.LiteralC<"deadends">, t.LiteralC<"heap">]>;
|
237
|
+
export declare const AvailabilityRuleV: t.UnionC<[t.UnionC<[t.IntersectionC<[t.TypeC<{
|
238
|
+
type: t.UnionC<[t.LiteralC<"user_property">, t.LiteralC<"event_property">, t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"hostname">, t.LiteralC<"element">, t.LiteralC<"executions">, t.LiteralC<"shortcuts">, t.LiteralC<"last_seen">, t.LiteralC<"first_seen">, t.LiteralC<"sessions">, t.LiteralC<"opens">, t.LiteralC<"deadends">, t.LiteralC<"heap">, t.LiteralC<"hubspot">, t.LiteralC<"device_type">, t.LiteralC<"ab_test">, t.LiteralC<"intent">, t.LiteralC<"help_doc_interaction">, t.LiteralC<"video_interaction">, t.LiteralC<"survey_response">]>;
|
106
239
|
operator: t.KeyofC<{
|
107
240
|
includes: null;
|
108
241
|
endsWith: null;
|
109
242
|
startsWith: null;
|
110
243
|
is: null;
|
111
|
-
isNot: null;
|
112
244
|
isTrue: null;
|
113
245
|
isFalse: null;
|
114
246
|
isTruthy: null;
|
115
247
|
isFalsy: null;
|
116
|
-
doesNotInclude: null;
|
117
248
|
matchesRegex: null;
|
118
|
-
isGreaterThan: null;
|
119
|
-
isLessThan: null;
|
120
|
-
isBefore: null;
|
121
|
-
isAfter: null;
|
122
249
|
isDefined: null;
|
123
250
|
isNotDefined: null;
|
124
251
|
classnameOnPage: null;
|
@@ -127,13 +254,46 @@ export declare const AvailabilityRuleV: t.IntersectionC<[t.TypeC<{
|
|
127
254
|
classnameNotOnPage: null;
|
128
255
|
idNotOnPage: null;
|
129
256
|
selectorNotOnPage: null;
|
257
|
+
doesNotInclude: null;
|
258
|
+
isNot: null;
|
259
|
+
isGreaterThan: null;
|
260
|
+
isLessThan: null;
|
130
261
|
}>;
|
131
262
|
}>, t.PartialC<{
|
132
263
|
field: t.StringC;
|
133
264
|
value: t.StringC;
|
134
265
|
reason: t.StringC;
|
135
266
|
rule_id: t.UnionC<[t.NumberC, t.StringC]>;
|
136
|
-
}>]
|
267
|
+
}>]>, t.UnionC<[t.IntersectionC<[t.TypeC<{
|
268
|
+
type: t.LiteralC<"nudge_interaction">;
|
269
|
+
operator: t.KeyofC<{
|
270
|
+
is: null;
|
271
|
+
isNot: null;
|
272
|
+
}>;
|
273
|
+
value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
|
274
|
+
nudge_id: t.NumberC;
|
275
|
+
}>, t.PartialC<{
|
276
|
+
reason: t.StringC;
|
277
|
+
}>]>, t.IntersectionC<[t.TypeC<{
|
278
|
+
type: t.LiteralC<"questlist_interaction">;
|
279
|
+
operator: t.KeyofC<{
|
280
|
+
is: null;
|
281
|
+
isNot: null;
|
282
|
+
}>;
|
283
|
+
value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
|
284
|
+
questlist_id: t.NumberC;
|
285
|
+
}>, t.PartialC<{
|
286
|
+
reason: t.StringC;
|
287
|
+
}>]>]>]>, t.IntersectionC<[t.TypeC<{
|
288
|
+
type: t.UnionC<[t.LiteralC<"browser">, t.LiteralC<"os">, t.LiteralC<"language">]>;
|
289
|
+
operator: t.KeyofC<{
|
290
|
+
includes: null;
|
291
|
+
doesNotInclude: null;
|
292
|
+
}>;
|
293
|
+
values: t.ArrayC<t.StringC>;
|
294
|
+
}>, t.PartialC<{
|
295
|
+
reason: t.StringC;
|
296
|
+
}>]>]>;
|
137
297
|
export declare const RecommendationRuleV: t.UnionC<[t.IntersectionC<[t.TypeC<{
|
138
298
|
type: t.LiteralC<"always">;
|
139
299
|
}>, t.PartialC<{
|
@@ -142,24 +302,18 @@ export declare const RecommendationRuleV: t.UnionC<[t.IntersectionC<[t.TypeC<{
|
|
142
302
|
value: t.UnionC<[t.UndefinedC, t.NullC]>;
|
143
303
|
reason: t.UnionC<[t.UndefinedC, t.NullC]>;
|
144
304
|
rule_id: t.UnionC<[t.NumberC, t.StringC]>;
|
145
|
-
}>]>, t.IntersectionC<[t.TypeC<{
|
146
|
-
type: t.UnionC<[t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"element">, t.LiteralC<"executions">, t.LiteralC<"shortcuts">, t.LiteralC<"last_seen">, t.LiteralC<"first_seen">, t.LiteralC<"sessions">, t.LiteralC<"opens">, t.LiteralC<"deadends">, t.LiteralC<"heap">]>;
|
305
|
+
}>]>, t.UnionC<[t.UnionC<[t.IntersectionC<[t.TypeC<{
|
306
|
+
type: t.UnionC<[t.LiteralC<"user_property">, t.LiteralC<"event_property">, t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"hostname">, t.LiteralC<"element">, t.LiteralC<"executions">, t.LiteralC<"shortcuts">, t.LiteralC<"last_seen">, t.LiteralC<"first_seen">, t.LiteralC<"sessions">, t.LiteralC<"opens">, t.LiteralC<"deadends">, t.LiteralC<"heap">, t.LiteralC<"hubspot">, t.LiteralC<"device_type">, t.LiteralC<"ab_test">, t.LiteralC<"intent">, t.LiteralC<"help_doc_interaction">, t.LiteralC<"video_interaction">, t.LiteralC<"survey_response">]>;
|
147
307
|
operator: t.KeyofC<{
|
148
308
|
includes: null;
|
149
309
|
endsWith: null;
|
150
310
|
startsWith: null;
|
151
311
|
is: null;
|
152
|
-
isNot: null;
|
153
312
|
isTrue: null;
|
154
313
|
isFalse: null;
|
155
314
|
isTruthy: null;
|
156
315
|
isFalsy: null;
|
157
|
-
doesNotInclude: null;
|
158
316
|
matchesRegex: null;
|
159
|
-
isGreaterThan: null;
|
160
|
-
isLessThan: null;
|
161
|
-
isBefore: null;
|
162
|
-
isAfter: null;
|
163
317
|
isDefined: null;
|
164
318
|
isNotDefined: null;
|
165
319
|
classnameOnPage: null;
|
@@ -168,31 +322,58 @@ export declare const RecommendationRuleV: t.UnionC<[t.IntersectionC<[t.TypeC<{
|
|
168
322
|
classnameNotOnPage: null;
|
169
323
|
idNotOnPage: null;
|
170
324
|
selectorNotOnPage: null;
|
325
|
+
doesNotInclude: null;
|
326
|
+
isNot: null;
|
327
|
+
isGreaterThan: null;
|
328
|
+
isLessThan: null;
|
171
329
|
}>;
|
172
330
|
}>, t.PartialC<{
|
173
331
|
field: t.StringC;
|
174
332
|
value: t.StringC;
|
175
333
|
reason: t.StringC;
|
176
334
|
rule_id: t.UnionC<[t.NumberC, t.StringC]>;
|
177
|
-
}>]
|
178
|
-
|
179
|
-
|
335
|
+
}>]>, t.UnionC<[t.IntersectionC<[t.TypeC<{
|
336
|
+
type: t.LiteralC<"nudge_interaction">;
|
337
|
+
operator: t.KeyofC<{
|
338
|
+
is: null;
|
339
|
+
isNot: null;
|
340
|
+
}>;
|
341
|
+
value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
|
342
|
+
nudge_id: t.NumberC;
|
343
|
+
}>, t.PartialC<{
|
344
|
+
reason: t.StringC;
|
345
|
+
}>]>, t.IntersectionC<[t.TypeC<{
|
346
|
+
type: t.LiteralC<"questlist_interaction">;
|
347
|
+
operator: t.KeyofC<{
|
348
|
+
is: null;
|
349
|
+
isNot: null;
|
350
|
+
}>;
|
351
|
+
value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
|
352
|
+
questlist_id: t.NumberC;
|
353
|
+
}>, t.PartialC<{
|
354
|
+
reason: t.StringC;
|
355
|
+
}>]>]>]>, t.IntersectionC<[t.TypeC<{
|
356
|
+
type: t.UnionC<[t.LiteralC<"browser">, t.LiteralC<"os">, t.LiteralC<"language">]>;
|
357
|
+
operator: t.KeyofC<{
|
358
|
+
includes: null;
|
359
|
+
doesNotInclude: null;
|
360
|
+
}>;
|
361
|
+
values: t.ArrayC<t.StringC>;
|
362
|
+
}>, t.PartialC<{
|
363
|
+
reason: t.StringC;
|
364
|
+
}>]>]>]>;
|
365
|
+
export declare const EditorAvailabilityRuleV: t.UnionC<[t.UnionC<[t.UnionC<[t.IntersectionC<[t.TypeC<{
|
366
|
+
type: t.UnionC<[t.LiteralC<"user_property">, t.LiteralC<"event_property">, t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"hostname">, t.LiteralC<"element">, t.LiteralC<"executions">, t.LiteralC<"shortcuts">, t.LiteralC<"last_seen">, t.LiteralC<"first_seen">, t.LiteralC<"sessions">, t.LiteralC<"opens">, t.LiteralC<"deadends">, t.LiteralC<"heap">, t.LiteralC<"hubspot">, t.LiteralC<"device_type">, t.LiteralC<"ab_test">, t.LiteralC<"intent">, t.LiteralC<"help_doc_interaction">, t.LiteralC<"video_interaction">, t.LiteralC<"survey_response">]>;
|
180
367
|
operator: t.KeyofC<{
|
181
368
|
includes: null;
|
182
369
|
endsWith: null;
|
183
370
|
startsWith: null;
|
184
371
|
is: null;
|
185
|
-
isNot: null;
|
186
372
|
isTrue: null;
|
187
373
|
isFalse: null;
|
188
374
|
isTruthy: null;
|
189
375
|
isFalsy: null;
|
190
|
-
doesNotInclude: null;
|
191
376
|
matchesRegex: null;
|
192
|
-
isGreaterThan: null;
|
193
|
-
isLessThan: null;
|
194
|
-
isBefore: null;
|
195
|
-
isAfter: null;
|
196
377
|
isDefined: null;
|
197
378
|
isNotDefined: null;
|
198
379
|
classnameOnPage: null;
|
@@ -201,13 +382,46 @@ export declare const EditorAvailabilityRuleV: t.UnionC<[t.IntersectionC<[t.TypeC
|
|
201
382
|
classnameNotOnPage: null;
|
202
383
|
idNotOnPage: null;
|
203
384
|
selectorNotOnPage: null;
|
385
|
+
doesNotInclude: null;
|
386
|
+
isNot: null;
|
387
|
+
isGreaterThan: null;
|
388
|
+
isLessThan: null;
|
204
389
|
}>;
|
205
390
|
}>, t.PartialC<{
|
206
391
|
field: t.StringC;
|
207
392
|
value: t.StringC;
|
208
393
|
reason: t.StringC;
|
209
394
|
rule_id: t.UnionC<[t.NumberC, t.StringC]>;
|
395
|
+
}>]>, t.UnionC<[t.IntersectionC<[t.TypeC<{
|
396
|
+
type: t.LiteralC<"nudge_interaction">;
|
397
|
+
operator: t.KeyofC<{
|
398
|
+
is: null;
|
399
|
+
isNot: null;
|
400
|
+
}>;
|
401
|
+
value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
|
402
|
+
nudge_id: t.NumberC;
|
403
|
+
}>, t.PartialC<{
|
404
|
+
reason: t.StringC;
|
210
405
|
}>]>, t.IntersectionC<[t.TypeC<{
|
406
|
+
type: t.LiteralC<"questlist_interaction">;
|
407
|
+
operator: t.KeyofC<{
|
408
|
+
is: null;
|
409
|
+
isNot: null;
|
410
|
+
}>;
|
411
|
+
value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
|
412
|
+
questlist_id: t.NumberC;
|
413
|
+
}>, t.PartialC<{
|
414
|
+
reason: t.StringC;
|
415
|
+
}>]>]>]>, t.IntersectionC<[t.TypeC<{
|
416
|
+
type: t.UnionC<[t.LiteralC<"browser">, t.LiteralC<"os">, t.LiteralC<"language">]>;
|
417
|
+
operator: t.KeyofC<{
|
418
|
+
includes: null;
|
419
|
+
doesNotInclude: null;
|
420
|
+
}>;
|
421
|
+
values: t.ArrayC<t.StringC>;
|
422
|
+
}>, t.PartialC<{
|
423
|
+
reason: t.StringC;
|
424
|
+
}>]>]>, t.IntersectionC<[t.TypeC<{
|
211
425
|
type: t.LiteralC<"named_rule">;
|
212
426
|
rule_id: t.UnionC<[t.NumberC, t.StringC]>;
|
213
427
|
}>, t.PartialC<{
|
@@ -221,24 +435,18 @@ export declare const EditorRecommendationRuleV: t.UnionC<[t.UnionC<[t.Intersecti
|
|
221
435
|
value: t.UnionC<[t.UndefinedC, t.NullC]>;
|
222
436
|
reason: t.UnionC<[t.UndefinedC, t.NullC]>;
|
223
437
|
rule_id: t.UnionC<[t.NumberC, t.StringC]>;
|
224
|
-
}>]>, t.IntersectionC<[t.TypeC<{
|
225
|
-
type: t.UnionC<[t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"element">, t.LiteralC<"executions">, t.LiteralC<"shortcuts">, t.LiteralC<"last_seen">, t.LiteralC<"first_seen">, t.LiteralC<"sessions">, t.LiteralC<"opens">, t.LiteralC<"deadends">, t.LiteralC<"heap">]>;
|
438
|
+
}>]>, t.UnionC<[t.UnionC<[t.IntersectionC<[t.TypeC<{
|
439
|
+
type: t.UnionC<[t.LiteralC<"user_property">, t.LiteralC<"event_property">, t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"hostname">, t.LiteralC<"element">, t.LiteralC<"executions">, t.LiteralC<"shortcuts">, t.LiteralC<"last_seen">, t.LiteralC<"first_seen">, t.LiteralC<"sessions">, t.LiteralC<"opens">, t.LiteralC<"deadends">, t.LiteralC<"heap">, t.LiteralC<"hubspot">, t.LiteralC<"device_type">, t.LiteralC<"ab_test">, t.LiteralC<"intent">, t.LiteralC<"help_doc_interaction">, t.LiteralC<"video_interaction">, t.LiteralC<"survey_response">]>;
|
226
440
|
operator: t.KeyofC<{
|
227
441
|
includes: null;
|
228
442
|
endsWith: null;
|
229
443
|
startsWith: null;
|
230
444
|
is: null;
|
231
|
-
isNot: null;
|
232
445
|
isTrue: null;
|
233
446
|
isFalse: null;
|
234
447
|
isTruthy: null;
|
235
448
|
isFalsy: null;
|
236
|
-
doesNotInclude: null;
|
237
449
|
matchesRegex: null;
|
238
|
-
isGreaterThan: null;
|
239
|
-
isLessThan: null;
|
240
|
-
isBefore: null;
|
241
|
-
isAfter: null;
|
242
450
|
isDefined: null;
|
243
451
|
isNotDefined: null;
|
244
452
|
classnameOnPage: null;
|
@@ -247,13 +455,46 @@ export declare const EditorRecommendationRuleV: t.UnionC<[t.UnionC<[t.Intersecti
|
|
247
455
|
classnameNotOnPage: null;
|
248
456
|
idNotOnPage: null;
|
249
457
|
selectorNotOnPage: null;
|
458
|
+
doesNotInclude: null;
|
459
|
+
isNot: null;
|
460
|
+
isGreaterThan: null;
|
461
|
+
isLessThan: null;
|
250
462
|
}>;
|
251
463
|
}>, t.PartialC<{
|
252
464
|
field: t.StringC;
|
253
465
|
value: t.StringC;
|
254
466
|
reason: t.StringC;
|
255
467
|
rule_id: t.UnionC<[t.NumberC, t.StringC]>;
|
256
|
-
}>]
|
468
|
+
}>]>, t.UnionC<[t.IntersectionC<[t.TypeC<{
|
469
|
+
type: t.LiteralC<"nudge_interaction">;
|
470
|
+
operator: t.KeyofC<{
|
471
|
+
is: null;
|
472
|
+
isNot: null;
|
473
|
+
}>;
|
474
|
+
value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
|
475
|
+
nudge_id: t.NumberC;
|
476
|
+
}>, t.PartialC<{
|
477
|
+
reason: t.StringC;
|
478
|
+
}>]>, t.IntersectionC<[t.TypeC<{
|
479
|
+
type: t.LiteralC<"questlist_interaction">;
|
480
|
+
operator: t.KeyofC<{
|
481
|
+
is: null;
|
482
|
+
isNot: null;
|
483
|
+
}>;
|
484
|
+
value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
|
485
|
+
questlist_id: t.NumberC;
|
486
|
+
}>, t.PartialC<{
|
487
|
+
reason: t.StringC;
|
488
|
+
}>]>]>]>, t.IntersectionC<[t.TypeC<{
|
489
|
+
type: t.UnionC<[t.LiteralC<"browser">, t.LiteralC<"os">, t.LiteralC<"language">]>;
|
490
|
+
operator: t.KeyofC<{
|
491
|
+
includes: null;
|
492
|
+
doesNotInclude: null;
|
493
|
+
}>;
|
494
|
+
values: t.ArrayC<t.StringC>;
|
495
|
+
}>, t.PartialC<{
|
496
|
+
reason: t.StringC;
|
497
|
+
}>]>]>]>, t.IntersectionC<[t.TypeC<{
|
257
498
|
type: t.LiteralC<"named_rule">;
|
258
499
|
rule_id: t.UnionC<[t.NumberC, t.StringC]>;
|
259
500
|
}>, t.PartialC<{
|
@@ -280,10 +521,37 @@ export type IAvailabilityRule = t.TypeOf<typeof AvailabilityRuleV>;
|
|
280
521
|
export type IEditorAvailabilityRule = t.TypeOf<typeof EditorAvailabilityRuleV>;
|
281
522
|
export type IRecommendationRule = t.TypeOf<typeof RecommendationRuleV>;
|
282
523
|
export type IEditorRecommendationRule = t.TypeOf<typeof EditorRecommendationRuleV>;
|
524
|
+
export type ISingleValueCondition = t.TypeOf<typeof SingleValueConditionV>;
|
525
|
+
export type IMultiValueCondition = t.TypeOf<typeof MultiValueConditionV>;
|
283
526
|
export type ICondition = t.TypeOf<typeof ConditionV>;
|
527
|
+
export type IInteractionCondition = t.TypeOf<typeof InteractionConditionV>;
|
284
528
|
export type IAvailabilityRuleType = IAvailabilityRule['type'];
|
285
529
|
export type IRecommendationRuleType = IRecommendationRule['type'];
|
286
530
|
export type IRule = IAvailabilityRule | IRecommendationRule;
|
287
531
|
export type IEditorRule = IEditorAvailabilityRule | IEditorRecommendationRule;
|
288
532
|
export type INamedRule = t.TypeOf<typeof NamedRuleV>;
|
533
|
+
export declare function isMultiValueRule(rule: IEditorRule | IRule): rule is IMultiValueCondition;
|
534
|
+
export declare function isMultiValueRuleType(type: IRule['type']): type is IMultiValueCondition['type'];
|
535
|
+
export declare function isInteractionCondition(condition: IEditorRule): condition is IInteractionCondition;
|
536
|
+
export declare function isInteractionConditionType(type: IEditorRule['type']): type is IInteractionCondition['type'];
|
537
|
+
export type ABTestCondition = ExpressionCondition & {
|
538
|
+
type: 'ab_test';
|
539
|
+
field: string;
|
540
|
+
value: string;
|
541
|
+
};
|
542
|
+
export declare const isABTestCondition: (condition: ExpressionCondition) => condition is {
|
543
|
+
type: "url" | "element" | "context" | "hubspot" | "device_type" | "sessions" | "survey_response" | "user_property" | "event_property" | "hostname" | "executions" | "shortcuts" | "last_seen" | "first_seen" | "opens" | "deadends" | "heap" | "ab_test" | "intent" | "help_doc_interaction" | "video_interaction";
|
544
|
+
operator: "includes" | "endsWith" | "startsWith" | "is" | "isTrue" | "isFalse" | "isTruthy" | "isFalsy" | "matchesRegex" | "isDefined" | "isNotDefined" | "classnameOnPage" | "idOnPage" | "selectorOnPage" | "classnameNotOnPage" | "idNotOnPage" | "selectorNotOnPage" | "doesNotInclude" | "isNot" | "isGreaterThan" | "isLessThan";
|
545
|
+
} & {
|
546
|
+
field?: string | undefined;
|
547
|
+
value?: string | undefined;
|
548
|
+
reason?: string | undefined;
|
549
|
+
rule_id?: string | number | undefined;
|
550
|
+
} & {
|
551
|
+
type: 'ab_test';
|
552
|
+
field: string;
|
553
|
+
value: string;
|
554
|
+
};
|
555
|
+
export type SurveyType = 'list' | 'rating' | 'text';
|
556
|
+
export declare const scoreRecommendationSet: (recommendationSet: IRecommendationSet) => number;
|
289
557
|
export {};
|
@@ -1,3 +1,27 @@
|
|
1
|
-
export declare const
|
2
|
-
declare const
|
3
|
-
export
|
1
|
+
export declare const setBaseURL: (url: string | undefined) => void;
|
2
|
+
export declare const getBaseURL: () => string;
|
3
|
+
export type FetchOptions = {
|
4
|
+
signal?: AbortSignal;
|
5
|
+
headers?: Record<string, string>;
|
6
|
+
credentials?: RequestCredentials;
|
7
|
+
keepalive?: boolean;
|
8
|
+
};
|
9
|
+
export type Response<T> = {
|
10
|
+
data: T;
|
11
|
+
status: number;
|
12
|
+
statusText: string;
|
13
|
+
headers: Record<string, string>;
|
14
|
+
};
|
15
|
+
export declare const put: <T = any>(url: string, data?: string | object | undefined, options?: FetchOptions) => Promise<Response<T>>;
|
16
|
+
export declare const post: <T = any>(url: string, data?: string | object | undefined, options?: FetchOptions) => Promise<Response<T>>;
|
17
|
+
export declare const get: <T = any>(url: string, options?: FetchOptions) => Promise<Response<T>>;
|
18
|
+
export declare const patch: <T = any>(url: string, data?: string | object | undefined, options?: FetchOptions) => Promise<Response<T>>;
|
19
|
+
export declare const del: <T = any>(url: string, data?: string | object | undefined, options?: FetchOptions) => Promise<Response<T>>;
|
20
|
+
export declare const getFetchHeaders: () => {
|
21
|
+
'X-CSRFToken': string;
|
22
|
+
'X-cb-release'?: string | undefined;
|
23
|
+
'X-cb-proj'?: string | undefined;
|
24
|
+
'X-cb-lc'?: string | undefined;
|
25
|
+
'Content-Type': string;
|
26
|
+
accept: string;
|
27
|
+
};
|