@15gifts/sdk 0.11.3 → 0.11.5
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/dist/index.d.mts +248 -65
- package/dist/index.d.ts +248 -65
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -855,11 +855,11 @@ interface paths {
|
|
|
855
855
|
requestBody: {
|
|
856
856
|
content: {
|
|
857
857
|
"application/json": {
|
|
858
|
-
/** @description
|
|
858
|
+
/** @description The customer that the event occurred on */
|
|
859
859
|
customerId: string;
|
|
860
|
-
/** @description
|
|
860
|
+
/** @description A 32 character alphanumeric hash that uniquely identifies a session */
|
|
861
861
|
sessionId?: string;
|
|
862
|
-
/** @description
|
|
862
|
+
/** @description A 32 character alphanumeric hash that uniquely identifies a user */
|
|
863
863
|
userId?: string;
|
|
864
864
|
};
|
|
865
865
|
};
|
|
@@ -872,11 +872,11 @@ interface paths {
|
|
|
872
872
|
};
|
|
873
873
|
content: {
|
|
874
874
|
"application/json": {
|
|
875
|
-
/** @description
|
|
875
|
+
/** @description A 32 character alphanumeric hash that uniquely identifies a page view (page-shown event) */
|
|
876
876
|
pageviewId: string;
|
|
877
|
-
/** @description
|
|
877
|
+
/** @description A 32 character alphanumeric hash that uniquely identifies a session */
|
|
878
878
|
sessionId: string;
|
|
879
|
-
/** @description
|
|
879
|
+
/** @description A 32 character alphanumeric hash that uniquely identifies a user */
|
|
880
880
|
userId: string;
|
|
881
881
|
/** @description JSON Web Token (JWT) */
|
|
882
882
|
token: string;
|
|
@@ -911,39 +911,36 @@ interface paths {
|
|
|
911
911
|
path?: never;
|
|
912
912
|
cookie?: never;
|
|
913
913
|
};
|
|
914
|
-
|
|
915
|
-
requestBody: {
|
|
914
|
+
requestBody?: {
|
|
916
915
|
content: {
|
|
917
916
|
"application/json": {
|
|
918
917
|
/** @description A 32 character alphanumeric hash that uniquely identifies a session */
|
|
919
|
-
|
|
918
|
+
sessionId?: string;
|
|
920
919
|
/** @description A 32 character alphanumeric hash that uniquely identifies a user */
|
|
921
|
-
|
|
920
|
+
userId?: string;
|
|
922
921
|
/** @description A timestamp describing the time the event occurred. This should conform to ISO 8601 standards and be in UTC. Example: \"2024-07-17T10:11:16.591Z\" */
|
|
923
|
-
|
|
922
|
+
eventAt?: string;
|
|
924
923
|
/** @description The page url at the time the event is fired */
|
|
925
|
-
url
|
|
924
|
+
url?: string;
|
|
926
925
|
/** @description What web browser the user is using e.g. chrome/firefox/safari etc. */
|
|
927
|
-
browser
|
|
926
|
+
browser?: string;
|
|
928
927
|
/** @description The customer that the event occurred on */
|
|
929
|
-
|
|
928
|
+
customerId: string;
|
|
930
929
|
/** @description The user agent string e.g. \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36\" */
|
|
931
|
-
|
|
930
|
+
userAgent?: string;
|
|
932
931
|
/** @description A 32 character alphanumeric hash that uniquely identifies a tracking event */
|
|
933
|
-
|
|
932
|
+
eventId?: string;
|
|
934
933
|
/**
|
|
935
934
|
* @description The name of an event
|
|
936
935
|
* @enum {string}
|
|
937
936
|
*/
|
|
938
|
-
|
|
937
|
+
eventName?: "sale-completed";
|
|
939
938
|
/** @description A 32 character alphanumeric hash that uniquely identifies a page view (page-shown event) */
|
|
940
|
-
|
|
941
|
-
/** @description A unique user id native to our customers web analytics platforms (adobe, google analytics etc). Helps us & our customers align our data with what customers see in their platforms. */
|
|
942
|
-
web_analytics_platform_user_id?: string | null;
|
|
939
|
+
pageviewId?: string;
|
|
943
940
|
/** @description The device screen width in pixels - window.screen.width in JS. This is a user level property that should never change. */
|
|
944
|
-
|
|
941
|
+
screenWidth?: number;
|
|
945
942
|
/** @description The device screen height in pixels - window.screen.height in JS. This is a user level property that should never change. */
|
|
946
|
-
|
|
943
|
+
screenHeight?: number;
|
|
947
944
|
/**
|
|
948
945
|
* @description The size of the device's screen, based off the actual user experience it will generate, assuming the browser window takes up the whole screen.
|
|
949
946
|
*
|
|
@@ -953,49 +950,218 @@ interface paths {
|
|
|
953
950
|
* screen_width > 480px = 'large'
|
|
954
951
|
* @enum {string}
|
|
955
952
|
*/
|
|
956
|
-
|
|
953
|
+
screenSize?: "large" | "mobile";
|
|
957
954
|
/** @description The ID for the sale, a unique value we can correlate with customer records. */
|
|
958
|
-
|
|
955
|
+
saleId: string;
|
|
959
956
|
/**
|
|
960
957
|
* @description The type of user, for example, existing or prospect.
|
|
961
958
|
* @enum {string}
|
|
962
959
|
*/
|
|
963
|
-
|
|
960
|
+
userType: "existing" | "prospect";
|
|
964
961
|
/** @description A code that represents what currency the product price is listed in e.g. USD, GBP. This should match the ISO 4217 standard - see https://www.iban.com/currency-codes. */
|
|
965
|
-
|
|
962
|
+
currencyCode?: string;
|
|
966
963
|
/** @description The full basket value of the sale, inclusive of any offers. */
|
|
967
|
-
|
|
964
|
+
saleTotalValue?: number;
|
|
968
965
|
/** @description A list containing separate line items for each product sold. */
|
|
969
|
-
|
|
966
|
+
productsSold: {
|
|
967
|
+
/** @description The ID or SKU of a product that is provided by the customer */
|
|
968
|
+
siteProductId?: string;
|
|
969
|
+
/** @description The name of the product */
|
|
970
|
+
siteProductName?: string;
|
|
971
|
+
/** @description The category of products the product belongs to. */
|
|
972
|
+
siteProductType?: string;
|
|
973
|
+
/** @description The upfront price the user has to pay for the product. */
|
|
974
|
+
productPriceUpfront?: number;
|
|
975
|
+
}[];
|
|
976
|
+
/** @description The language of the part of the site the sales data is coming from in ISO 639-1 format e.g. 'en-us', 'es-us' etc. */
|
|
977
|
+
language?: string;
|
|
970
978
|
/**
|
|
971
979
|
* @description The name of the system/service that the event originates from
|
|
972
980
|
* @enum {string}
|
|
973
981
|
*/
|
|
974
|
-
service
|
|
982
|
+
service?: "frontend" | "sales_tracking_api";
|
|
975
983
|
/** @description A JSON object containing the different versions of services directly used by the service that tracks an event. The version of the service that is firing any tracking event should ALWAYS be included, for example if the conversation_api is firing an event, service_versions should include conversation_api_version. It should also ideally include the version numbers of any other services used in the generation of the event that is being tracked. */
|
|
976
|
-
|
|
984
|
+
serviceVersions?: {
|
|
977
985
|
/** @description The version number for the frontend service */
|
|
978
|
-
|
|
986
|
+
frontendVersion?: string | null;
|
|
979
987
|
/** @description The version number for the frontend api service */
|
|
980
|
-
|
|
988
|
+
frontendApiVersion?: string | null;
|
|
981
989
|
/** @description The version number for the conversation api service */
|
|
982
|
-
|
|
990
|
+
conversationApiVersion?: string | null;
|
|
983
991
|
/** @description The version number for the customer configuration service */
|
|
984
|
-
|
|
992
|
+
customerConfigurationVersion?: string | null;
|
|
985
993
|
/** @description The version number for the client library our customers are using */
|
|
986
|
-
|
|
994
|
+
sdkVersion?: string | null;
|
|
987
995
|
/** @description The version number for the product configuration data */
|
|
988
|
-
|
|
996
|
+
productConfigurationVersion?: string | null;
|
|
989
997
|
/** @description The version number for the sales tracking api service. *in the short term this is technically just the frontend so will match that */
|
|
990
|
-
|
|
998
|
+
salesTrackingApiVersion?: string | null;
|
|
991
999
|
};
|
|
992
1000
|
/**
|
|
993
1001
|
* @description The environment the event originated from (production/development/testing/staging/local/uat/ephemeral)
|
|
994
1002
|
* @enum {string}
|
|
995
1003
|
*/
|
|
996
|
-
environment
|
|
1004
|
+
environment?: "development" | "ephemeral" | "local" | "production" | "staging" | "test" | "uat";
|
|
997
1005
|
/** @description JWT token containing the user's identity */
|
|
998
|
-
identityToken
|
|
1006
|
+
identityToken: string;
|
|
1007
|
+
} | {
|
|
1008
|
+
/**
|
|
1009
|
+
* @description The customer that the event occurred on
|
|
1010
|
+
* @enum {string}
|
|
1011
|
+
*/
|
|
1012
|
+
customerId: "spectrum";
|
|
1013
|
+
/** @description The timestamp describing the time the event occurred. This should conform to ISO 8601 standards and be in UTC */
|
|
1014
|
+
eventAt?: string;
|
|
1015
|
+
/** @description A JWT used to identify the user in the system, can be obtained from the identity endpoint */
|
|
1016
|
+
identityToken: string;
|
|
1017
|
+
/** @description The ID for the sale, a unique value we can correlate with customer records. */
|
|
1018
|
+
saleId: string;
|
|
1019
|
+
/**
|
|
1020
|
+
* @description The type of user, for example, existing or prospect.
|
|
1021
|
+
* @enum {string}
|
|
1022
|
+
*/
|
|
1023
|
+
userType: "existing" | "prospect";
|
|
1024
|
+
/** @description The browser the user is using, e.g. Chrome, Firefox, Safari, etc. */
|
|
1025
|
+
browser?: string;
|
|
1026
|
+
/** @description The user agent string e.g. "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36" */
|
|
1027
|
+
userAgent?: string;
|
|
1028
|
+
/** @description The device screen width in pixels - window.screen.width in JS. This is a user level property that should never change. */
|
|
1029
|
+
screenWidth?: number;
|
|
1030
|
+
/** @description The device screen height in pixels - window.screen.height in JS. This is a user level property that should never change. */
|
|
1031
|
+
screenHeight?: number;
|
|
1032
|
+
/**
|
|
1033
|
+
* @description The size of the device's screen, based off the actual user experience it will generate, assuming the browser window takes up the whole screen.
|
|
1034
|
+
*
|
|
1035
|
+
* Based off https://15gifts.atlassian.net/wiki/spaces/AI/pages/3981443139/Breakpoints+for+mobile+desktop
|
|
1036
|
+
*
|
|
1037
|
+
* screen_width <= 480px = 'mobile'
|
|
1038
|
+
* screen_width > 480px = 'large'
|
|
1039
|
+
* @enum {string}
|
|
1040
|
+
*/
|
|
1041
|
+
screenSize?: "mobile" | "large";
|
|
1042
|
+
/** @description "A code that represents what currency the product price is listed in e.g. USD, GBP. This should match the ISO 4217 standard - see https://www.iban.com/currency-codes. */
|
|
1043
|
+
currencyCode?: string;
|
|
1044
|
+
/** @description The host/domain of the URL at the time the event is fired */
|
|
1045
|
+
siteHost: string;
|
|
1046
|
+
/** @description The path of the URL (including an initial `/`) at the time the event is fired */
|
|
1047
|
+
sitePath?: string;
|
|
1048
|
+
/** @description The query string of the URL (including an initial `?`) at the time the event is fired */
|
|
1049
|
+
siteQueryString?: string;
|
|
1050
|
+
/** @description The language of the part of the site the sales data is coming from in ISO 639-1 format e.g. 'en-us', 'es-us' etc. */
|
|
1051
|
+
language?: string;
|
|
1052
|
+
/** @description The recurring payment due per payment period */
|
|
1053
|
+
priceRecurring?: number;
|
|
1054
|
+
/** @description An ISO-8601 duration that represents the period of time that the priceRecurring payment recurs over */
|
|
1055
|
+
priceRecurringPeriod?: string;
|
|
1056
|
+
/** @description The upfront price the user has to pay for the product. */
|
|
1057
|
+
priceUpfront?: number;
|
|
1058
|
+
/** @description The full basket value of the sale, inclusive of any offers. */
|
|
1059
|
+
totalValueOfSale?: number;
|
|
1060
|
+
/** @description The taxes the user has to pay relating to the priceUpfront of the product(s) */
|
|
1061
|
+
totalUpfrontTax?: number;
|
|
1062
|
+
/** @description The taxes the user has to pay relating to the priceRecurring of the product(s), due per payment period */
|
|
1063
|
+
totalRecurringTax?: number;
|
|
1064
|
+
totalTaxOnSale?: number;
|
|
1065
|
+
/** @description A list containing separate line items for each product sold. */
|
|
1066
|
+
productsSold: {
|
|
1067
|
+
/** @description The ID or SKU of a product that is provided by the customer */
|
|
1068
|
+
siteProductId: string;
|
|
1069
|
+
/** @description The name of the product */
|
|
1070
|
+
siteProductName: string;
|
|
1071
|
+
/** @description The category of products the product belongs to. */
|
|
1072
|
+
siteProductType: string;
|
|
1073
|
+
/** @description An ISO-8601 duration that represents the contract length */
|
|
1074
|
+
productContractLength: string;
|
|
1075
|
+
/** @description An integer representing how many of this particular product the user is purchasing */
|
|
1076
|
+
quantity: number;
|
|
1077
|
+
/** @description The upfront price the user has to pay for the product. */
|
|
1078
|
+
productPriceUpfront: number;
|
|
1079
|
+
/** @description The recurring payment per payment period for the product */
|
|
1080
|
+
productPricePerPeriod: number;
|
|
1081
|
+
/** @description An ISO-8601 duration that represents the period of time that the productPricePerPeriod payment recurs over */
|
|
1082
|
+
productRecurringPaymentPeriod: string;
|
|
1083
|
+
/** @description The ID or SKU of a bundle that the product (and other products being purchased at the same time) are part of */
|
|
1084
|
+
bundleId?: string;
|
|
1085
|
+
}[];
|
|
1086
|
+
} | {
|
|
1087
|
+
/**
|
|
1088
|
+
* @description The customer that the event occurred on
|
|
1089
|
+
* @enum {string}
|
|
1090
|
+
*/
|
|
1091
|
+
customerId: "aidem";
|
|
1092
|
+
/** @description The timestamp describing the time the event occurred. This should conform to ISO 8601 standards and be in UTC */
|
|
1093
|
+
eventAt?: string;
|
|
1094
|
+
/** @description A JWT used to identify the user in the system, can be obtained from the identity endpoint */
|
|
1095
|
+
identityToken: string;
|
|
1096
|
+
/** @description The ID for the sale, a unique value we can correlate with customer records. */
|
|
1097
|
+
saleId: string;
|
|
1098
|
+
/**
|
|
1099
|
+
* @description The type of user, for example, existing or prospect.
|
|
1100
|
+
* @enum {string}
|
|
1101
|
+
*/
|
|
1102
|
+
userType: "existing" | "prospect";
|
|
1103
|
+
/** @description The browser the user is using, e.g. Chrome, Firefox, Safari, etc. */
|
|
1104
|
+
browser?: string;
|
|
1105
|
+
/** @description The user agent string e.g. "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36" */
|
|
1106
|
+
userAgent?: string;
|
|
1107
|
+
/** @description The device screen width in pixels - window.screen.width in JS. This is a user level property that should never change. */
|
|
1108
|
+
screenWidth?: number;
|
|
1109
|
+
/** @description The device screen height in pixels - window.screen.height in JS. This is a user level property that should never change. */
|
|
1110
|
+
screenHeight?: number;
|
|
1111
|
+
/**
|
|
1112
|
+
* @description The size of the device's screen, based off the actual user experience it will generate, assuming the browser window takes up the whole screen.
|
|
1113
|
+
*
|
|
1114
|
+
* Based off https://15gifts.atlassian.net/wiki/spaces/AI/pages/3981443139/Breakpoints+for+mobile+desktop
|
|
1115
|
+
*
|
|
1116
|
+
* screen_width <= 480px = 'mobile'
|
|
1117
|
+
* screen_width > 480px = 'large'
|
|
1118
|
+
* @enum {string}
|
|
1119
|
+
*/
|
|
1120
|
+
screenSize?: "mobile" | "large";
|
|
1121
|
+
/** @description "A code that represents what currency the product price is listed in e.g. USD, GBP. This should match the ISO 4217 standard - see https://www.iban.com/currency-codes. */
|
|
1122
|
+
currencyCode?: string;
|
|
1123
|
+
/** @description The host/domain of the URL at the time the event is fired */
|
|
1124
|
+
siteHost: string;
|
|
1125
|
+
/** @description The path of the URL (including an initial `/`) at the time the event is fired */
|
|
1126
|
+
sitePath?: string;
|
|
1127
|
+
/** @description The query string of the URL (including an initial `?`) at the time the event is fired */
|
|
1128
|
+
siteQueryString?: string;
|
|
1129
|
+
/** @description The language of the part of the site the sales data is coming from in ISO 639-1 format e.g. 'en-us', 'es-us' etc. */
|
|
1130
|
+
language?: string;
|
|
1131
|
+
/** @description The recurring payment due per payment period */
|
|
1132
|
+
priceRecurring?: number;
|
|
1133
|
+
/** @description An ISO-8601 duration that represents the period of time that the priceRecurring payment recurs over */
|
|
1134
|
+
priceRecurringPeriod?: string;
|
|
1135
|
+
/** @description The upfront price the user has to pay for the product. */
|
|
1136
|
+
priceUpfront?: number;
|
|
1137
|
+
/** @description The full basket value of the sale, inclusive of any offers. */
|
|
1138
|
+
totalValueOfSale?: number;
|
|
1139
|
+
/** @description The taxes the user has to pay relating to the priceUpfront of the product(s) */
|
|
1140
|
+
totalUpfrontTax?: number;
|
|
1141
|
+
/** @description The taxes the user has to pay relating to the priceRecurring of the product(s), due per payment period */
|
|
1142
|
+
totalRecurringTax?: number;
|
|
1143
|
+
totalTaxOnSale?: number;
|
|
1144
|
+
/** @description A list containing separate line items for each product sold. */
|
|
1145
|
+
productsSold: {
|
|
1146
|
+
/** @description The ID or SKU of a product that is provided by the customer */
|
|
1147
|
+
siteProductId: string;
|
|
1148
|
+
/** @description The name of the product */
|
|
1149
|
+
siteProductName: string;
|
|
1150
|
+
/** @description The category of products the product belongs to. */
|
|
1151
|
+
siteProductType: string;
|
|
1152
|
+
/** @description An ISO-8601 duration that represents the contract length */
|
|
1153
|
+
productContractLength: string;
|
|
1154
|
+
/** @description An integer representing how many of this particular product the user is purchasing */
|
|
1155
|
+
quantity: number;
|
|
1156
|
+
/** @description The upfront price the user has to pay for the product. */
|
|
1157
|
+
productPriceUpfront: number;
|
|
1158
|
+
/** @description The recurring payment per payment period for the product */
|
|
1159
|
+
productPricePerPeriod: number;
|
|
1160
|
+
/** @description An ISO-8601 duration that represents the period of time that the productPricePerPeriod payment recurs over */
|
|
1161
|
+
productRecurringPaymentPeriod: string;
|
|
1162
|
+
/** @description The ID or SKU of a bundle that the product (and other products being purchased at the same time) are part of */
|
|
1163
|
+
bundleId?: string;
|
|
1164
|
+
}[];
|
|
999
1165
|
};
|
|
1000
1166
|
};
|
|
1001
1167
|
};
|
|
@@ -1077,8 +1243,6 @@ interface paths {
|
|
|
1077
1243
|
event_name?: string;
|
|
1078
1244
|
/** @description A 32 character alphanumeric hash that uniquely identifies a page view (page-shown event) */
|
|
1079
1245
|
pageview_id?: string;
|
|
1080
|
-
/** @description A unique user id native to our customers web analytics platforms (adobe, google analytics etc). Helps us & our customers align our data with what customers see in their platforms. */
|
|
1081
|
-
web_analytics_platform_user_id?: string | null;
|
|
1082
1246
|
/** @description The device screen width in pixels - window.screen.width in JS. This is a user level property that should never change. */
|
|
1083
1247
|
screen_width?: number;
|
|
1084
1248
|
/** @description The device screen height in pixels - window.screen.height in JS. This is a user level property that should never change. */
|
|
@@ -1102,6 +1266,8 @@ interface paths {
|
|
|
1102
1266
|
conversation_id?: string;
|
|
1103
1267
|
/** @description An integer representing the rank of the corresponding feedback score. It should always start at 0, even if the number of options changes. */
|
|
1104
1268
|
feedback_score_num?: number;
|
|
1269
|
+
/** @description Describes the reason the tool ui was closed. When the value is 'customer_triggered' it's because it's been programmatically closed by the customer (by running window.axiom.integrations.hide() or window.axiom.integrations.minimise()). When it's 'user_close_click' it's because the actual end user has closed it manually by clicking. */
|
|
1270
|
+
tool_ui_closed_reason?: string;
|
|
1105
1271
|
/** @description The turn number in the conversation. This links each user message to a corresponding assistant response. If there is an opening message from the assistant, this would have a message_turn of 0. Then the first message a user sends would have a message_turn of 1. The first actual response the assistant sends would have a message_turn of 1.
|
|
1106
1272
|
*
|
|
1107
1273
|
* All message_turn values except for 0 (the opening message if it exists) should be expected to come in pairs.
|
|
@@ -1139,17 +1305,21 @@ interface paths {
|
|
|
1139
1305
|
/** @description A code that represents what currency the product price is listed in e.g. USD, GBP. This should match the ISO 4217 standard - see https://www.iban.com/currency-codes. */
|
|
1140
1306
|
currency_code?: string;
|
|
1141
1307
|
/** @description The full basket value of the sale, inclusive of any offers. */
|
|
1142
|
-
|
|
1308
|
+
sale_total_value?: number;
|
|
1143
1309
|
/** @description A list containing separate line items for each product sold. */
|
|
1144
|
-
|
|
1310
|
+
products_sold?: unknown[];
|
|
1311
|
+
/** @description The language of the part of the site the sales data is coming from in ISO 639-1 format e.g. 'en-us', 'es-us' etc. */
|
|
1312
|
+
language?: string;
|
|
1313
|
+
/** @description A list of product items with properties that are specific to Spectrum */
|
|
1314
|
+
products_sold_spectrum?: unknown[];
|
|
1145
1315
|
/** @description Properties at the sale level (not product item level) specifically required from media customers */
|
|
1146
|
-
|
|
1316
|
+
sale_custom_properties_media?: Record<string, never>;
|
|
1147
1317
|
/** @description A list of product item objects specific to media customers */
|
|
1148
|
-
|
|
1318
|
+
products_sold_media?: unknown[];
|
|
1149
1319
|
/** @description Properties at the sale level (not product item level) specifically required from Aidem */
|
|
1150
|
-
|
|
1151
|
-
/** @description A list of product items that are specific to
|
|
1152
|
-
|
|
1320
|
+
sale_custom_properties_aidem?: Record<string, never>;
|
|
1321
|
+
/** @description A list of product items with properties that are specific to Aidem */
|
|
1322
|
+
products_sold_aidem?: unknown[];
|
|
1153
1323
|
/** @description True if user has qualified for using the 15gifts sales advisor (except on customers with no qualification process where this will always be True) */
|
|
1154
1324
|
is_qualified?: boolean;
|
|
1155
1325
|
/** @description The stage on the particular customer's site that a user would be expected to qualify at. Should be NULL for customer sites that don't have a qualification process.
|
|
@@ -1170,28 +1340,37 @@ interface paths {
|
|
|
1170
1340
|
experiment_variation_id?: string;
|
|
1171
1341
|
/** @description The human readable name for the variation as defined in Growthbook */
|
|
1172
1342
|
experiment_variation_name?: string;
|
|
1343
|
+
/** @description The type of entry point the event refers to (tab, engagement bubble etc) */
|
|
1344
|
+
entry_point_type?: string;
|
|
1345
|
+
/** @description Describes the reason the entry point was closed. When the value is 'customer_triggered' it's because it's been programmatically closed by the customer (by running window.axiom.integrations.hide()). When it's 'user_close_click' it's because the actual end user has closed it manually by clicking. */
|
|
1346
|
+
entry_point_closed_reason?: string;
|
|
1173
1347
|
};
|
|
1174
|
-
/** @description
|
|
1348
|
+
/** @description A 32 character alphanumeric hash that uniquely identifies a conversation */
|
|
1175
1349
|
conversationId?: string;
|
|
1176
1350
|
/**
|
|
1177
1351
|
* @description Event Name
|
|
1178
1352
|
* @enum {string}
|
|
1179
1353
|
*/
|
|
1180
|
-
eventName: "entry_point-shown" | "feedback_submit-clicked" | "page-shown" | "tool_ui-closed" | "user_message-submitted" | "user_message-submitted message" | "user_message-submitted single_select" | "user_message-submitted multi_select" | "assistant_message-submitted" | "assistant_message-submitted recommendation" | "assistant_message-submitted message" | "assistant_message-submitted single_select" | "assistant_message-submitted multi_select" | "assistant_message-submitted exit_to_chat" | "assistant_message-submitted exit_to_purchase" | "feedback-shown" | "feedback_skip-clicked" | "sale-completed" | "sale-completed spectrum" | "sale-completed aidem" | "entry_point-clicked" | "tool_close-clicked" | "exit_to_chat-completed" | "exit_to_purchase-completed" | "conversation-started" | "user_qualification-identified" | "experiment_variation-assigned";
|
|
1181
|
-
/** @description
|
|
1354
|
+
eventName: "entry_point-shown" | "feedback_submit-clicked" | "page-shown" | "tool_ui-closed" | "user_message-submitted" | "user_message-submitted message" | "user_message-submitted single_select" | "user_message-submitted multi_select" | "assistant_message-submitted" | "assistant_message-submitted recommendation" | "assistant_message-submitted message" | "assistant_message-submitted single_select" | "assistant_message-submitted multi_select" | "assistant_message-submitted exit_to_chat" | "assistant_message-submitted exit_to_purchase" | "feedback-shown" | "feedback_skip-clicked" | "sale-completed" | "sale-completed spectrum" | "sale-completed aidem" | "entry_point-clicked" | "tool_close-clicked" | "exit_to_chat-completed" | "exit_to_purchase-completed" | "conversation-started" | "user_qualification-identified" | "experiment_variation-assigned" | "entry_point-closed" | "entry_point-suppressed";
|
|
1355
|
+
/** @description A 32 character alphanumeric hash that uniquely identifies a page view (page-shown event) */
|
|
1182
1356
|
pageviewId: string;
|
|
1183
|
-
/** @description
|
|
1357
|
+
/** @description The device screen height in pixels - window.screen.height in JS. This is a user level property that should never change. */
|
|
1184
1358
|
screenHeight?: number;
|
|
1185
1359
|
/**
|
|
1186
|
-
* @description
|
|
1360
|
+
* @description The size of the device's screen, based off the actual user experience it will generate, assuming the browser window takes up the whole screen.
|
|
1361
|
+
*
|
|
1362
|
+
* Based off https://15gifts.atlassian.net/wiki/spaces/AI/pages/3981443139/Breakpoints+for+mobile+desktop
|
|
1363
|
+
*
|
|
1364
|
+
* screen_width <= 480px = 'mobile'
|
|
1365
|
+
* screen_width > 480px = 'large'
|
|
1187
1366
|
* @enum {string}
|
|
1188
1367
|
*/
|
|
1189
1368
|
screenSize?: "mobile" | "large";
|
|
1190
|
-
/** @description
|
|
1369
|
+
/** @description The device screen width in pixels - window.screen.width in JS. This is a user level property that should never change. */
|
|
1191
1370
|
screenWidth?: number;
|
|
1192
|
-
/** @description
|
|
1371
|
+
/** @description The page url at the time the event is fired */
|
|
1193
1372
|
url: string;
|
|
1194
|
-
/** @description
|
|
1373
|
+
/** @description The user agent string e.g. "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36" */
|
|
1195
1374
|
userAgent: string;
|
|
1196
1375
|
};
|
|
1197
1376
|
};
|
|
@@ -1455,7 +1634,6 @@ declare class Client {
|
|
|
1455
1634
|
event_id?: string;
|
|
1456
1635
|
event_name?: string;
|
|
1457
1636
|
pageview_id?: string;
|
|
1458
|
-
web_analytics_platform_user_id?: string | null;
|
|
1459
1637
|
screen_width?: number;
|
|
1460
1638
|
screen_height?: number;
|
|
1461
1639
|
screen_size?: string;
|
|
@@ -1465,6 +1643,7 @@ declare class Client {
|
|
|
1465
1643
|
feedback_score_text?: string;
|
|
1466
1644
|
conversation_id?: string;
|
|
1467
1645
|
feedback_score_num?: number;
|
|
1646
|
+
tool_ui_closed_reason?: string;
|
|
1468
1647
|
conversation_turn_num?: number;
|
|
1469
1648
|
conversation_turn_id?: string;
|
|
1470
1649
|
message_type?: string;
|
|
@@ -1480,21 +1659,25 @@ declare class Client {
|
|
|
1480
1659
|
sale_id?: string;
|
|
1481
1660
|
user_type?: string;
|
|
1482
1661
|
currency_code?: string;
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1662
|
+
sale_total_value?: number;
|
|
1663
|
+
products_sold?: unknown[];
|
|
1664
|
+
language?: string;
|
|
1665
|
+
products_sold_spectrum?: unknown[];
|
|
1666
|
+
sale_custom_properties_media?: Record<string, never>;
|
|
1667
|
+
products_sold_media?: unknown[];
|
|
1668
|
+
sale_custom_properties_aidem?: Record<string, never>;
|
|
1669
|
+
products_sold_aidem?: unknown[];
|
|
1489
1670
|
is_qualified?: boolean;
|
|
1490
1671
|
qualification_stage?: string;
|
|
1491
1672
|
is_main_uplift_experiment?: boolean;
|
|
1492
1673
|
experiment_id?: string;
|
|
1493
1674
|
experiment_variation_id?: string;
|
|
1494
1675
|
experiment_variation_name?: string;
|
|
1676
|
+
entry_point_type?: string;
|
|
1677
|
+
entry_point_closed_reason?: string;
|
|
1495
1678
|
};
|
|
1496
1679
|
conversationId?: string;
|
|
1497
|
-
eventName: "entry_point-shown" | "feedback_submit-clicked" | "page-shown" | "tool_ui-closed" | "user_message-submitted" | "user_message-submitted message" | "user_message-submitted single_select" | "user_message-submitted multi_select" | "assistant_message-submitted" | "assistant_message-submitted recommendation" | "assistant_message-submitted message" | "assistant_message-submitted single_select" | "assistant_message-submitted multi_select" | "assistant_message-submitted exit_to_chat" | "assistant_message-submitted exit_to_purchase" | "feedback-shown" | "feedback_skip-clicked" | "sale-completed" | "sale-completed spectrum" | "sale-completed aidem" | "entry_point-clicked" | "tool_close-clicked" | "exit_to_chat-completed" | "exit_to_purchase-completed" | "conversation-started" | "user_qualification-identified" | "experiment_variation-assigned";
|
|
1680
|
+
eventName: "entry_point-shown" | "feedback_submit-clicked" | "page-shown" | "tool_ui-closed" | "user_message-submitted" | "user_message-submitted message" | "user_message-submitted single_select" | "user_message-submitted multi_select" | "assistant_message-submitted" | "assistant_message-submitted recommendation" | "assistant_message-submitted message" | "assistant_message-submitted single_select" | "assistant_message-submitted multi_select" | "assistant_message-submitted exit_to_chat" | "assistant_message-submitted exit_to_purchase" | "feedback-shown" | "feedback_skip-clicked" | "sale-completed" | "sale-completed spectrum" | "sale-completed aidem" | "entry_point-clicked" | "tool_close-clicked" | "exit_to_chat-completed" | "exit_to_purchase-completed" | "conversation-started" | "user_qualification-identified" | "experiment_variation-assigned" | "entry_point-closed" | "entry_point-suppressed";
|
|
1498
1681
|
pageviewId: string;
|
|
1499
1682
|
screenHeight?: number;
|
|
1500
1683
|
screenSize?: "mobile" | "large";
|
|
@@ -1645,7 +1828,7 @@ declare const USER_ID = "__15gifts_user_id";
|
|
|
1645
1828
|
*/
|
|
1646
1829
|
declare const TTL: number;
|
|
1647
1830
|
/**
|
|
1648
|
-
* Retrieves the user ID from `localStorage
|
|
1831
|
+
* Retrieves the user ID from `localStorage` and updates its expiry time.
|
|
1649
1832
|
*
|
|
1650
1833
|
* @example
|
|
1651
1834
|
* ```ts
|