@atlaskit/smart-card 21.3.0 → 22.1.1
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/CHANGELOG.md +56 -0
- package/dist/cjs/extractors/block/index.js +6 -7
- package/dist/cjs/extractors/common/actions/extractPreviewAction.js +16 -19
- package/dist/cjs/state/actions/index.js +54 -10
- package/dist/cjs/state/analytics/types.js +5 -0
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +429 -109
- package/dist/cjs/state/hooks-external/useSmartLinkActions.js +5 -3
- package/dist/cjs/utils/analytics/analytics.js +241 -74
- package/dist/cjs/utils/analytics/index.js +32 -5
- package/dist/cjs/utils/mocks.js +28 -2
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/BlockCard/actions/PreviewAction.js +2 -2
- package/dist/cjs/view/BlockCard/index.js +6 -5
- package/dist/cjs/view/CardWithUrl/component.js +27 -5
- package/dist/cjs/view/CardWithUrl/loader.js +6 -1
- package/dist/cjs/view/EmbedCard/index.js +3 -2
- package/dist/cjs/view/EmbedModal/components/analytics/index.js +100 -0
- package/dist/cjs/view/EmbedModal/components/analytics/types.js +5 -0
- package/dist/cjs/view/EmbedModal/components/size-experiment/index.js +5 -10
- package/dist/cjs/view/EmbedModal/index.js +54 -15
- package/dist/cjs/view/EmbedModal/types.js +9 -1
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +11 -3
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +15 -4
- package/dist/cjs/view/HoverCard/index.js +6 -1
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +2 -2
- package/dist/cjs/view/common/Modal.js +29 -4
- package/dist/cjs/view/common/ModalHeader.js +3 -2
- package/dist/es2019/extractors/block/index.js +6 -7
- package/dist/es2019/extractors/common/actions/extractPreviewAction.js +16 -10
- package/dist/es2019/state/actions/index.js +54 -10
- package/dist/es2019/state/analytics/types.js +1 -0
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +424 -41
- package/dist/es2019/state/hooks-external/useSmartLinkActions.js +5 -3
- package/dist/es2019/utils/analytics/analytics.js +254 -79
- package/dist/es2019/utils/analytics/index.js +32 -4
- package/dist/es2019/utils/mocks.js +26 -1
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/BlockCard/actions/PreviewAction.js +3 -3
- package/dist/es2019/view/BlockCard/index.js +5 -4
- package/dist/es2019/view/CardWithUrl/component.js +27 -5
- package/dist/es2019/view/CardWithUrl/loader.js +6 -1
- package/dist/es2019/view/EmbedCard/index.js +3 -2
- package/dist/es2019/view/EmbedModal/components/analytics/index.js +80 -0
- package/dist/es2019/view/EmbedModal/components/analytics/types.js +1 -0
- package/dist/es2019/view/EmbedModal/components/size-experiment/index.js +5 -9
- package/dist/es2019/view/EmbedModal/index.js +46 -13
- package/dist/es2019/view/EmbedModal/types.js +6 -1
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +11 -3
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +15 -4
- package/dist/es2019/view/HoverCard/index.js +6 -1
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.js +0 -2
- package/dist/es2019/view/common/Modal.js +27 -6
- package/dist/es2019/view/common/ModalHeader.js +3 -2
- package/dist/esm/extractors/block/index.js +6 -7
- package/dist/esm/extractors/common/actions/extractPreviewAction.js +17 -19
- package/dist/esm/state/actions/index.js +54 -10
- package/dist/esm/state/analytics/types.js +1 -0
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +428 -111
- package/dist/esm/state/hooks-external/useSmartLinkActions.js +5 -3
- package/dist/esm/utils/analytics/analytics.js +241 -74
- package/dist/esm/utils/analytics/index.js +31 -4
- package/dist/esm/utils/mocks.js +25 -0
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/BlockCard/actions/PreviewAction.js +3 -3
- package/dist/esm/view/BlockCard/index.js +5 -4
- package/dist/esm/view/CardWithUrl/component.js +27 -5
- package/dist/esm/view/CardWithUrl/loader.js +6 -1
- package/dist/esm/view/EmbedCard/index.js +3 -2
- package/dist/esm/view/EmbedModal/components/analytics/index.js +82 -0
- package/dist/esm/view/EmbedModal/components/analytics/types.js +1 -0
- package/dist/esm/view/EmbedModal/components/size-experiment/index.js +5 -10
- package/dist/esm/view/EmbedModal/index.js +52 -15
- package/dist/esm/view/EmbedModal/types.js +6 -1
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +11 -3
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +15 -4
- package/dist/esm/view/HoverCard/index.js +6 -1
- package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.js +2 -2
- package/dist/esm/view/common/Modal.js +28 -6
- package/dist/esm/view/common/ModalHeader.js +3 -2
- package/dist/types/extractors/block/types.d.ts +4 -2
- package/dist/types/extractors/common/actions/extractPreviewAction.d.ts +7 -5
- package/dist/types/state/analytics/types.d.ts +9 -0
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +41 -24
- package/dist/types/state/hooks/useSmartLink.d.ts +26 -18
- package/dist/types/state/hooks-external/useSmartLinkActions.d.ts +6 -2
- package/dist/types/utils/analytics/analytics.d.ts +19 -21
- package/dist/types/utils/analytics/index.d.ts +2 -2
- package/dist/types/utils/analytics/types.d.ts +91 -0
- package/dist/types/utils/mocks.d.ts +48 -0
- package/dist/types/utils/types.d.ts +3 -1
- package/dist/types/view/BlockCard/actions/PreviewAction.d.ts +4 -0
- package/dist/types/view/BlockCard/index.d.ts +2 -2
- package/dist/types/view/BlockCard/types.d.ts +4 -4
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/EmbedCard/types.d.ts +2 -2
- package/dist/types/view/EmbedModal/components/analytics/index.d.ts +5 -0
- package/dist/types/view/EmbedModal/components/analytics/types.d.ts +6 -0
- package/dist/types/view/EmbedModal/components/size-experiment/index.d.ts +4 -3
- package/dist/types/view/EmbedModal/index.d.ts +3 -1
- package/dist/types/view/EmbedModal/types.d.ts +14 -4
- package/dist/types/view/common/Modal.d.ts +6 -8
- package/package.json +17 -17
- package/report.api.md +302 -107
package/report.api.md
CHANGED
|
@@ -115,12 +115,16 @@ export declare type AnalyticsActionSubject =
|
|
|
115
115
|
| 'applicationAccount'
|
|
116
116
|
| 'button'
|
|
117
117
|
| 'consentModal'
|
|
118
|
-
| 'hoverCard'
|
|
118
|
+
| 'hoverCard'
|
|
119
|
+
| 'modal'
|
|
120
|
+
| 'embedPreviewModal';
|
|
119
121
|
|
|
120
122
|
declare type AnalyticsFacade = ReturnType<typeof useSmartLinkAnalytics>;
|
|
121
123
|
|
|
122
124
|
export declare type AnalyticsHandler = (event: AnalyticsPayload) => void;
|
|
123
125
|
|
|
126
|
+
declare type AnalyticsName = 'embedPreviewModal';
|
|
127
|
+
|
|
124
128
|
export declare type AnalyticsPayload = GasPayload & {
|
|
125
129
|
action?: AnalyticsAction;
|
|
126
130
|
actionSubject: AnalyticsActionSubject;
|
|
@@ -278,8 +282,8 @@ export declare const Card: React_2.ForwardRefExoticComponent<
|
|
|
278
282
|
| 'key'
|
|
279
283
|
| 'url'
|
|
280
284
|
| 'ui'
|
|
281
|
-
| 'showHoverPreview'
|
|
282
285
|
| 'showActions'
|
|
286
|
+
| 'showHoverPreview'
|
|
283
287
|
| 'onResolve'
|
|
284
288
|
| 'platform'
|
|
285
289
|
| 'isFrameVisible'
|
|
@@ -348,6 +352,25 @@ declare type CommentCount = {
|
|
|
348
352
|
name: ElementName.CommentCount;
|
|
349
353
|
};
|
|
350
354
|
|
|
355
|
+
declare interface CommonEventProps {
|
|
356
|
+
id?: string;
|
|
357
|
+
definitionId?: string;
|
|
358
|
+
extensionKey?: string;
|
|
359
|
+
resourceType?: string;
|
|
360
|
+
destinationSubproduct?: DestinationSubproduct | string;
|
|
361
|
+
destinationProduct?: DestinationProduct | string;
|
|
362
|
+
location?: string;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
declare type ConnectFailedEventProps = CommonEventProps & {
|
|
366
|
+
id?: string;
|
|
367
|
+
reason?: string;
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
declare type ConnectSucceededEventProps = CommonEventProps & {
|
|
371
|
+
id?: string;
|
|
372
|
+
};
|
|
373
|
+
|
|
351
374
|
export declare const contentFooterClassName = 'smart-link-content-footer';
|
|
352
375
|
|
|
353
376
|
/**
|
|
@@ -569,6 +592,25 @@ declare type InlinePreloaderStyle =
|
|
|
569
592
|
| 'on-left-with-skeleton'
|
|
570
593
|
| 'on-right-without-skeleton';
|
|
571
594
|
|
|
595
|
+
declare type InstrumentEventProps = CommonEventProps & {
|
|
596
|
+
error?: APIError;
|
|
597
|
+
status: CardType;
|
|
598
|
+
id: string;
|
|
599
|
+
};
|
|
600
|
+
|
|
601
|
+
declare type InvokeFailedEventProps = CommonEventProps & {
|
|
602
|
+
id: string;
|
|
603
|
+
actionType: string;
|
|
604
|
+
display: CardInnerAppearance;
|
|
605
|
+
reason: string;
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
declare type InvokeSucceededEventProps = CommonEventProps & {
|
|
609
|
+
id: string;
|
|
610
|
+
actionType: string;
|
|
611
|
+
display: CardInnerAppearance;
|
|
612
|
+
};
|
|
613
|
+
|
|
572
614
|
declare type InvokeType = 'server' | 'client';
|
|
573
615
|
|
|
574
616
|
/**
|
|
@@ -760,6 +802,8 @@ declare type RetryOptions = {
|
|
|
760
802
|
values?: Record<string, string>;
|
|
761
803
|
};
|
|
762
804
|
|
|
805
|
+
declare type ScreenAuthPopupEventProps = CommonEventProps;
|
|
806
|
+
|
|
763
807
|
export { SmartCardContext as Context };
|
|
764
808
|
export { SmartCardContext };
|
|
765
809
|
|
|
@@ -983,6 +1027,62 @@ declare type TitleBlockProps = {
|
|
|
983
1027
|
theme?: SmartLinkTheme;
|
|
984
1028
|
} & BlockProps;
|
|
985
1029
|
|
|
1030
|
+
declare type TrackAppAccountConnectedProps = CommonEventProps;
|
|
1031
|
+
|
|
1032
|
+
declare type UiActionClickedEventProps = CommonEventProps & {
|
|
1033
|
+
id: string;
|
|
1034
|
+
display: CardInnerAppearance;
|
|
1035
|
+
actionType: string;
|
|
1036
|
+
invokeType?: InvokeType;
|
|
1037
|
+
};
|
|
1038
|
+
|
|
1039
|
+
declare type UiAuthAlternateAccountEventProps = CommonEventProps & {
|
|
1040
|
+
display: CardInnerAppearance;
|
|
1041
|
+
};
|
|
1042
|
+
|
|
1043
|
+
declare type UiAuthEventProps = CommonEventProps & {
|
|
1044
|
+
display: CardInnerAppearance;
|
|
1045
|
+
};
|
|
1046
|
+
|
|
1047
|
+
declare type UiCardClickedEventProps = CommonEventProps & {
|
|
1048
|
+
id: string;
|
|
1049
|
+
display: CardInnerAppearance;
|
|
1050
|
+
status: CardType;
|
|
1051
|
+
isModifierKeyPressed?: boolean;
|
|
1052
|
+
actionSubjectId?: string;
|
|
1053
|
+
};
|
|
1054
|
+
|
|
1055
|
+
declare type UiClosedAuthEventProps = CommonEventProps & {
|
|
1056
|
+
display: CardInnerAppearance;
|
|
1057
|
+
};
|
|
1058
|
+
|
|
1059
|
+
declare type UiHoverCardDismissedEventProps = CommonEventProps & {
|
|
1060
|
+
previewDisplay: PreviewDisplay;
|
|
1061
|
+
hoverTime: number;
|
|
1062
|
+
previewInvokeMethod?: PreviewInvokeMethod;
|
|
1063
|
+
};
|
|
1064
|
+
|
|
1065
|
+
declare type UiHoverCardOpenLinkClickedEventProps = CommonEventProps & {
|
|
1066
|
+
previewDisplay: PreviewDisplay;
|
|
1067
|
+
previewInvokeMethod?: PreviewInvokeMethod;
|
|
1068
|
+
};
|
|
1069
|
+
|
|
1070
|
+
declare type UiHoverCardViewedEventProps = CommonEventProps & {
|
|
1071
|
+
previewDisplay: PreviewDisplay;
|
|
1072
|
+
previewInvokeMethod?: PreviewInvokeMethod;
|
|
1073
|
+
};
|
|
1074
|
+
|
|
1075
|
+
declare type UiRenderFailedEventProps = CommonEventProps & {
|
|
1076
|
+
display: CardInnerAppearance;
|
|
1077
|
+
error: Error;
|
|
1078
|
+
errorInfo: ErrorInfo;
|
|
1079
|
+
};
|
|
1080
|
+
|
|
1081
|
+
declare type UiRenderSuccessEventProps = CommonEventProps & {
|
|
1082
|
+
display: CardInnerAppearance;
|
|
1083
|
+
status: CardType;
|
|
1084
|
+
};
|
|
1085
|
+
|
|
986
1086
|
/**
|
|
987
1087
|
* This hook provides usage of Smart Link analytics outside of the Card component.
|
|
988
1088
|
* Can be provided to Card via the analyticsEvents prop to change the analytics events.
|
|
@@ -1007,11 +1107,15 @@ export declare const useSmartLinkAnalytics: (
|
|
|
1007
1107
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
1008
1108
|
* @returns
|
|
1009
1109
|
*/
|
|
1010
|
-
authEvent: (
|
|
1011
|
-
display
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1110
|
+
authEvent: ({
|
|
1111
|
+
display,
|
|
1112
|
+
extensionKey,
|
|
1113
|
+
definitionId,
|
|
1114
|
+
resourceType,
|
|
1115
|
+
destinationProduct,
|
|
1116
|
+
destinationSubproduct,
|
|
1117
|
+
location,
|
|
1118
|
+
}: UiAuthEventProps) => void;
|
|
1015
1119
|
/**
|
|
1016
1120
|
* This fires an event that represents when a user clicks on the authentication
|
|
1017
1121
|
* call to action with a forbidden authenticated account. (i.e. Try another account).
|
|
@@ -1020,10 +1124,24 @@ export declare const useSmartLinkAnalytics: (
|
|
|
1020
1124
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
1021
1125
|
* @returns
|
|
1022
1126
|
*/
|
|
1023
|
-
authAlternateAccountEvent: (
|
|
1024
|
-
display
|
|
1025
|
-
|
|
1026
|
-
|
|
1127
|
+
authAlternateAccountEvent: ({
|
|
1128
|
+
display,
|
|
1129
|
+
extensionKey,
|
|
1130
|
+
definitionId,
|
|
1131
|
+
resourceType,
|
|
1132
|
+
destinationProduct,
|
|
1133
|
+
destinationSubproduct,
|
|
1134
|
+
location,
|
|
1135
|
+
}: UiAuthAlternateAccountEventProps) => void;
|
|
1136
|
+
/**
|
|
1137
|
+
* This fires an event that represents when a user
|
|
1138
|
+
* click a button.
|
|
1139
|
+
* @param data A partial analytics event payload
|
|
1140
|
+
*/
|
|
1141
|
+
buttonClickedEvent: (
|
|
1142
|
+
data: Partial<AnalyticsPayload> & {
|
|
1143
|
+
actionSubjectId: Required<string>;
|
|
1144
|
+
},
|
|
1027
1145
|
) => void;
|
|
1028
1146
|
/**
|
|
1029
1147
|
* This fires an event that represents when a user clicks on a Smart Link.
|
|
@@ -1037,18 +1155,18 @@ export declare const useSmartLinkAnalytics: (
|
|
|
1037
1155
|
* @param destinationProduct The product the Smart Link is linked to.
|
|
1038
1156
|
* @returns
|
|
1039
1157
|
*/
|
|
1040
|
-
cardClickedEvent: (
|
|
1041
|
-
id
|
|
1042
|
-
display
|
|
1043
|
-
status
|
|
1044
|
-
definitionId
|
|
1045
|
-
extensionKey
|
|
1046
|
-
isModifierKeyPressed
|
|
1047
|
-
location
|
|
1048
|
-
destinationProduct
|
|
1049
|
-
destinationSubproduct
|
|
1050
|
-
actionSubjectId
|
|
1051
|
-
) => void;
|
|
1158
|
+
cardClickedEvent: ({
|
|
1159
|
+
id,
|
|
1160
|
+
display,
|
|
1161
|
+
status,
|
|
1162
|
+
definitionId,
|
|
1163
|
+
extensionKey,
|
|
1164
|
+
isModifierKeyPressed,
|
|
1165
|
+
location,
|
|
1166
|
+
destinationProduct,
|
|
1167
|
+
destinationSubproduct,
|
|
1168
|
+
actionSubjectId,
|
|
1169
|
+
}: UiCardClickedEventProps) => void;
|
|
1052
1170
|
/**
|
|
1053
1171
|
* This fires an event that represents when a user clicks on a Smart Link action.
|
|
1054
1172
|
* Note: This also starts the UFO smart-link-action-invocation experience.
|
|
@@ -1059,13 +1177,18 @@ export declare const useSmartLinkAnalytics: (
|
|
|
1059
1177
|
* @param invokeType Whether the action invoked made a call to a server.
|
|
1060
1178
|
* @returns
|
|
1061
1179
|
*/
|
|
1062
|
-
actionClickedEvent: (
|
|
1063
|
-
id
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1180
|
+
actionClickedEvent: ({
|
|
1181
|
+
id,
|
|
1182
|
+
actionType,
|
|
1183
|
+
display,
|
|
1184
|
+
invokeType,
|
|
1185
|
+
extensionKey,
|
|
1186
|
+
definitionId,
|
|
1187
|
+
resourceType,
|
|
1188
|
+
destinationProduct,
|
|
1189
|
+
destinationSubproduct,
|
|
1190
|
+
location,
|
|
1191
|
+
}: UiActionClickedEventProps) => void;
|
|
1069
1192
|
/**
|
|
1070
1193
|
* This fires an event that represents when a user clicks on a hover preview's "navigate to link" button.
|
|
1071
1194
|
* https://product-fabric.atlassian.net/wiki/spaces/EM/pages/3206743323/Analytics+Metrics+-+Hover+Previews
|
|
@@ -1074,12 +1197,15 @@ export declare const useSmartLinkAnalytics: (
|
|
|
1074
1197
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
1075
1198
|
* @param previewInvokeMethod How the preview was triggered.
|
|
1076
1199
|
*/
|
|
1077
|
-
hoverCardOpenLinkClickedEvent: (
|
|
1078
|
-
previewDisplay
|
|
1079
|
-
definitionId
|
|
1080
|
-
extensionKey
|
|
1081
|
-
|
|
1082
|
-
|
|
1200
|
+
hoverCardOpenLinkClickedEvent: ({
|
|
1201
|
+
previewDisplay,
|
|
1202
|
+
definitionId,
|
|
1203
|
+
extensionKey,
|
|
1204
|
+
destinationProduct,
|
|
1205
|
+
destinationSubproduct,
|
|
1206
|
+
location,
|
|
1207
|
+
previewInvokeMethod,
|
|
1208
|
+
}: UiHoverCardOpenLinkClickedEventProps) => void;
|
|
1083
1209
|
/**
|
|
1084
1210
|
* This fires an event that represents when a user closed the authentication window without authenticating after opening it.
|
|
1085
1211
|
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
@@ -1087,10 +1213,23 @@ export declare const useSmartLinkAnalytics: (
|
|
|
1087
1213
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
1088
1214
|
* @returns
|
|
1089
1215
|
*/
|
|
1090
|
-
closedAuthEvent: (
|
|
1091
|
-
display
|
|
1092
|
-
|
|
1093
|
-
|
|
1216
|
+
closedAuthEvent: ({
|
|
1217
|
+
display,
|
|
1218
|
+
extensionKey,
|
|
1219
|
+
definitionId,
|
|
1220
|
+
resourceType,
|
|
1221
|
+
destinationProduct,
|
|
1222
|
+
destinationSubproduct,
|
|
1223
|
+
location,
|
|
1224
|
+
}: UiClosedAuthEventProps) => void;
|
|
1225
|
+
/**
|
|
1226
|
+
* This fires an event that represents when a user close a modal.
|
|
1227
|
+
* @param data A partial analytics event payload
|
|
1228
|
+
*/
|
|
1229
|
+
modalClosedEvent: (
|
|
1230
|
+
data: Partial<AnalyticsPayload> & {
|
|
1231
|
+
actionSubjectId: Required<string>;
|
|
1232
|
+
},
|
|
1094
1233
|
) => void;
|
|
1095
1234
|
/**
|
|
1096
1235
|
* This fires an event that represents when a Smart Link was rendered successfully.
|
|
@@ -1100,13 +1239,17 @@ export declare const useSmartLinkAnalytics: (
|
|
|
1100
1239
|
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
1101
1240
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
1102
1241
|
*/
|
|
1103
|
-
renderSuccessEvent: (
|
|
1104
|
-
display
|
|
1105
|
-
status
|
|
1106
|
-
id
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1242
|
+
renderSuccessEvent: ({
|
|
1243
|
+
display,
|
|
1244
|
+
status,
|
|
1245
|
+
id,
|
|
1246
|
+
extensionKey,
|
|
1247
|
+
definitionId,
|
|
1248
|
+
resourceType,
|
|
1249
|
+
destinationProduct,
|
|
1250
|
+
destinationSubproduct,
|
|
1251
|
+
location,
|
|
1252
|
+
}: UiRenderSuccessEventProps) => void;
|
|
1110
1253
|
/**
|
|
1111
1254
|
* This fires an event that represents when a Smart Link renders unsuccessfuly.
|
|
1112
1255
|
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
@@ -1114,12 +1257,18 @@ export declare const useSmartLinkAnalytics: (
|
|
|
1114
1257
|
* @param error: An error representing why the Smart Link render failed.
|
|
1115
1258
|
* @param errorInfo: Additional details about the error including the stack trace.
|
|
1116
1259
|
*/
|
|
1117
|
-
renderFailedEvent: (
|
|
1118
|
-
display
|
|
1119
|
-
id
|
|
1120
|
-
error
|
|
1121
|
-
errorInfo
|
|
1122
|
-
|
|
1260
|
+
renderFailedEvent: ({
|
|
1261
|
+
display,
|
|
1262
|
+
id,
|
|
1263
|
+
error,
|
|
1264
|
+
errorInfo,
|
|
1265
|
+
extensionKey,
|
|
1266
|
+
definitionId,
|
|
1267
|
+
resourceType,
|
|
1268
|
+
destinationProduct,
|
|
1269
|
+
destinationSubproduct,
|
|
1270
|
+
location,
|
|
1271
|
+
}: UiRenderFailedEventProps) => void;
|
|
1123
1272
|
/**
|
|
1124
1273
|
* This fires an event that represents a hover preview being opened.
|
|
1125
1274
|
* @param hoverDisplay Whether the hover preview was displayed as a card or embed.
|
|
@@ -1128,13 +1277,17 @@ export declare const useSmartLinkAnalytics: (
|
|
|
1128
1277
|
* @param previewInvokeMethod How the preview was triggered.
|
|
1129
1278
|
* @returns
|
|
1130
1279
|
*/
|
|
1131
|
-
hoverCardViewedEvent: (
|
|
1132
|
-
previewDisplay
|
|
1133
|
-
previewInvokeMethod
|
|
1134
|
-
id
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1280
|
+
hoverCardViewedEvent: ({
|
|
1281
|
+
previewDisplay,
|
|
1282
|
+
previewInvokeMethod,
|
|
1283
|
+
id,
|
|
1284
|
+
extensionKey,
|
|
1285
|
+
definitionId,
|
|
1286
|
+
resourceType,
|
|
1287
|
+
destinationProduct,
|
|
1288
|
+
destinationSubproduct,
|
|
1289
|
+
location,
|
|
1290
|
+
}: UiHoverCardViewedEventProps) => void;
|
|
1138
1291
|
/**
|
|
1139
1292
|
* This fires an event that represents a hover preview being dismissed.
|
|
1140
1293
|
* @param hoverDisplay Whether the hover preview was displayed as a card or embed.
|
|
@@ -1144,14 +1297,18 @@ export declare const useSmartLinkAnalytics: (
|
|
|
1144
1297
|
* @param previewInvokeMethod How the preview was triggered.
|
|
1145
1298
|
* @returns
|
|
1146
1299
|
*/
|
|
1147
|
-
hoverCardDismissedEvent: (
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1300
|
+
hoverCardDismissedEvent: ({
|
|
1301
|
+
id,
|
|
1302
|
+
previewDisplay,
|
|
1303
|
+
hoverTime,
|
|
1304
|
+
previewInvokeMethod,
|
|
1305
|
+
extensionKey,
|
|
1306
|
+
definitionId,
|
|
1307
|
+
resourceType,
|
|
1308
|
+
destinationProduct,
|
|
1309
|
+
destinationSubproduct,
|
|
1310
|
+
location,
|
|
1311
|
+
}: UiHoverCardDismissedEventProps) => void;
|
|
1155
1312
|
};
|
|
1156
1313
|
operational: {
|
|
1157
1314
|
/**
|
|
@@ -1161,12 +1318,17 @@ export declare const useSmartLinkAnalytics: (
|
|
|
1161
1318
|
* @param actionType The type of action invoked, e.g. PreviewAction
|
|
1162
1319
|
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
1163
1320
|
*/
|
|
1164
|
-
invokeSucceededEvent: (
|
|
1165
|
-
id
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1321
|
+
invokeSucceededEvent: ({
|
|
1322
|
+
id,
|
|
1323
|
+
actionType,
|
|
1324
|
+
display,
|
|
1325
|
+
extensionKey,
|
|
1326
|
+
definitionId,
|
|
1327
|
+
resourceType,
|
|
1328
|
+
destinationProduct,
|
|
1329
|
+
destinationSubproduct,
|
|
1330
|
+
location,
|
|
1331
|
+
}: InvokeSucceededEventProps) => void;
|
|
1170
1332
|
/**
|
|
1171
1333
|
* This fires an event that represents an action being unsuccessfully invoked.
|
|
1172
1334
|
* @param id The unique ID for this Smart Link.
|
|
@@ -1175,24 +1337,33 @@ export declare const useSmartLinkAnalytics: (
|
|
|
1175
1337
|
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
1176
1338
|
* @param reason The reason the invocation failed.
|
|
1177
1339
|
*/
|
|
1178
|
-
invokeFailedEvent: (
|
|
1179
|
-
id
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1340
|
+
invokeFailedEvent: ({
|
|
1341
|
+
id,
|
|
1342
|
+
actionType,
|
|
1343
|
+
display,
|
|
1344
|
+
reason,
|
|
1345
|
+
extensionKey,
|
|
1346
|
+
definitionId,
|
|
1347
|
+
resourceType,
|
|
1348
|
+
destinationProduct,
|
|
1349
|
+
destinationSubproduct,
|
|
1350
|
+
location,
|
|
1351
|
+
}: InvokeFailedEventProps) => void;
|
|
1185
1352
|
/**
|
|
1186
1353
|
* This fires an event that represents an account successfully being connected via a Smart Link.
|
|
1187
1354
|
* @param id The unique ID for this Smart Link.
|
|
1188
1355
|
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
1189
1356
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
1190
1357
|
*/
|
|
1191
|
-
connectSucceededEvent: (
|
|
1192
|
-
id
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1358
|
+
connectSucceededEvent: ({
|
|
1359
|
+
id,
|
|
1360
|
+
extensionKey,
|
|
1361
|
+
definitionId,
|
|
1362
|
+
resourceType,
|
|
1363
|
+
destinationProduct,
|
|
1364
|
+
destinationSubproduct,
|
|
1365
|
+
location,
|
|
1366
|
+
}: ConnectSucceededEventProps) => void;
|
|
1196
1367
|
/**
|
|
1197
1368
|
* This fires an event that represents an account unsuccessfully being connected.
|
|
1198
1369
|
* @param id The unique ID for this Smart Link.
|
|
@@ -1200,12 +1371,16 @@ export declare const useSmartLinkAnalytics: (
|
|
|
1200
1371
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
1201
1372
|
* @param reason The reason why the Smart Link connect account failed.
|
|
1202
1373
|
*/
|
|
1203
|
-
connectFailedEvent: (
|
|
1204
|
-
id
|
|
1205
|
-
|
|
1206
|
-
extensionKey
|
|
1207
|
-
|
|
1208
|
-
|
|
1374
|
+
connectFailedEvent: ({
|
|
1375
|
+
id,
|
|
1376
|
+
reason,
|
|
1377
|
+
extensionKey,
|
|
1378
|
+
definitionId,
|
|
1379
|
+
resourceType,
|
|
1380
|
+
destinationProduct,
|
|
1381
|
+
destinationSubproduct,
|
|
1382
|
+
location,
|
|
1383
|
+
}: ConnectFailedEventProps) => void;
|
|
1209
1384
|
/**
|
|
1210
1385
|
* This fires an event which represents a Smart Link request succeeding or failing based on the status.
|
|
1211
1386
|
* @param id The unique ID for this Smart Link.
|
|
@@ -1215,14 +1390,17 @@ export declare const useSmartLinkAnalytics: (
|
|
|
1215
1390
|
* @param resourceType The type of resource that was invoked. This is provider specific (e.g. File, PullRequest).
|
|
1216
1391
|
* @param error An error representing why the Smart Link request failed.
|
|
1217
1392
|
*/
|
|
1218
|
-
instrument: (
|
|
1219
|
-
id
|
|
1220
|
-
status
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
resourceType
|
|
1224
|
-
|
|
1225
|
-
|
|
1393
|
+
instrument: ({
|
|
1394
|
+
id,
|
|
1395
|
+
status,
|
|
1396
|
+
extensionKey,
|
|
1397
|
+
definitionId,
|
|
1398
|
+
resourceType,
|
|
1399
|
+
destinationProduct,
|
|
1400
|
+
destinationSubproduct,
|
|
1401
|
+
location,
|
|
1402
|
+
error,
|
|
1403
|
+
}: InstrumentEventProps) => void;
|
|
1226
1404
|
};
|
|
1227
1405
|
track: {
|
|
1228
1406
|
/**
|
|
@@ -1231,10 +1409,14 @@ export declare const useSmartLinkAnalytics: (
|
|
|
1231
1409
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
1232
1410
|
* @returns
|
|
1233
1411
|
*/
|
|
1234
|
-
appAccountConnected: (
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1412
|
+
appAccountConnected: ({
|
|
1413
|
+
extensionKey,
|
|
1414
|
+
definitionId,
|
|
1415
|
+
resourceType,
|
|
1416
|
+
destinationProduct,
|
|
1417
|
+
destinationSubproduct,
|
|
1418
|
+
location,
|
|
1419
|
+
}: TrackAppAccountConnectedProps) => void;
|
|
1238
1420
|
};
|
|
1239
1421
|
screen: {
|
|
1240
1422
|
/**
|
|
@@ -1243,9 +1425,22 @@ export declare const useSmartLinkAnalytics: (
|
|
|
1243
1425
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
1244
1426
|
* @returns
|
|
1245
1427
|
*/
|
|
1246
|
-
authPopupEvent: (
|
|
1247
|
-
|
|
1248
|
-
|
|
1428
|
+
authPopupEvent: ({
|
|
1429
|
+
extensionKey,
|
|
1430
|
+
definitionId,
|
|
1431
|
+
resourceType,
|
|
1432
|
+
destinationProduct,
|
|
1433
|
+
destinationSubproduct,
|
|
1434
|
+
location,
|
|
1435
|
+
}: ScreenAuthPopupEventProps) => void;
|
|
1436
|
+
/**
|
|
1437
|
+
* This fires an event that represents when a user view a modal.
|
|
1438
|
+
* @param data A partial analytics event payload
|
|
1439
|
+
*/
|
|
1440
|
+
modalViewedEvent: (
|
|
1441
|
+
data: Partial<AnalyticsPayload> & {
|
|
1442
|
+
name: Extract<AnalyticsName, 'embedPreviewModal'>;
|
|
1443
|
+
},
|
|
1249
1444
|
) => void;
|
|
1250
1445
|
};
|
|
1251
1446
|
};
|