@15gifts/sdk 0.11.5 → 0.11.6
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 +398 -46
- package/dist/index.d.ts +398 -46
- 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
|
@@ -857,10 +857,20 @@ interface paths {
|
|
|
857
857
|
"application/json": {
|
|
858
858
|
/** @description The customer that the event occurred on */
|
|
859
859
|
customerId: string;
|
|
860
|
-
/**
|
|
860
|
+
/**
|
|
861
|
+
* @description A 36 character hash, 5 segments, separated by dashes that uniquely identifies a session
|
|
862
|
+
* @example 1a1a1a1a-1a1a-1a1a-1a1a-1a1a1a1a1a1a
|
|
863
|
+
*/
|
|
861
864
|
sessionId?: string;
|
|
862
|
-
/**
|
|
865
|
+
/**
|
|
866
|
+
* @description A 36 character hash, 5 segments, separated by dashes that uniquely identifies a user
|
|
867
|
+
* @example 1a1a1a1a-1a1a-1a1a-1a1a-1a1a1a1a1a1a
|
|
868
|
+
*/
|
|
863
869
|
userId?: string;
|
|
870
|
+
/** @description The page url at the time the event is fired */
|
|
871
|
+
url?: string;
|
|
872
|
+
/** @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" */
|
|
873
|
+
userAgent?: string;
|
|
864
874
|
};
|
|
865
875
|
};
|
|
866
876
|
};
|
|
@@ -872,11 +882,20 @@ interface paths {
|
|
|
872
882
|
};
|
|
873
883
|
content: {
|
|
874
884
|
"application/json": {
|
|
875
|
-
/**
|
|
885
|
+
/**
|
|
886
|
+
* @description A 36 character hash, 5 segments, separated by dashes that uniquely identifies a page view (page-shown event)
|
|
887
|
+
* @example 1a1a1a1a-1a1a-1a1a-1a1a-1a1a1a1a1a1a
|
|
888
|
+
*/
|
|
876
889
|
pageviewId: string;
|
|
877
|
-
/**
|
|
890
|
+
/**
|
|
891
|
+
* @description A 36 character hash, 5 segments, separated by dashes that uniquely identifies a session
|
|
892
|
+
* @example 1a1a1a1a-1a1a-1a1a-1a1a-1a1a1a1a1a1a
|
|
893
|
+
*/
|
|
878
894
|
sessionId: string;
|
|
879
|
-
/**
|
|
895
|
+
/**
|
|
896
|
+
* @description A 36 character hash, 5 segments, separated by dashes that uniquely identifies a user
|
|
897
|
+
* @example 1a1a1a1a-1a1a-1a1a-1a1a-1a1a1a1a1a1a
|
|
898
|
+
*/
|
|
880
899
|
userId: string;
|
|
881
900
|
/** @description JSON Web Token (JWT) */
|
|
882
901
|
token: string;
|
|
@@ -914,9 +933,21 @@ interface paths {
|
|
|
914
933
|
requestBody?: {
|
|
915
934
|
content: {
|
|
916
935
|
"application/json": {
|
|
917
|
-
/** @description A
|
|
918
|
-
|
|
919
|
-
|
|
936
|
+
/** @description A 36 character alphanumeric hash that uniquely identifies a session.
|
|
937
|
+
*
|
|
938
|
+
*
|
|
939
|
+
* This should match the UUID V4 as specified in RFC 9652:
|
|
940
|
+
* https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
|
|
941
|
+
*
|
|
942
|
+
* e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
|
|
943
|
+
sessionId?: string | null;
|
|
944
|
+
/** @description A 36 character alphanumeric hash that uniquely identifies a user.
|
|
945
|
+
*
|
|
946
|
+
*
|
|
947
|
+
* This should match the UUID V4 as specified in RFC 9652:
|
|
948
|
+
* https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
|
|
949
|
+
*
|
|
950
|
+
* e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
|
|
920
951
|
userId?: string;
|
|
921
952
|
/** @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\" */
|
|
922
953
|
eventAt?: string;
|
|
@@ -928,15 +959,27 @@ interface paths {
|
|
|
928
959
|
customerId: string;
|
|
929
960
|
/** @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\" */
|
|
930
961
|
userAgent?: string;
|
|
931
|
-
/** @description A
|
|
962
|
+
/** @description A 36 character alphanumeric hash that uniquely identifies a tracking event
|
|
963
|
+
*
|
|
964
|
+
* This should match the UUID V4 as specified in RFC 9652:
|
|
965
|
+
* https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
|
|
966
|
+
*
|
|
967
|
+
* e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
|
|
932
968
|
eventId?: string;
|
|
933
969
|
/**
|
|
934
970
|
* @description The name of an event
|
|
935
971
|
* @enum {string}
|
|
936
972
|
*/
|
|
937
973
|
eventName?: "sale-completed";
|
|
938
|
-
/** @description A
|
|
939
|
-
|
|
974
|
+
/** @description A 36 character alphanumeric hash that uniquely identifies a page view (page-shown event)
|
|
975
|
+
*
|
|
976
|
+
* This should match the UUID V4 as specified in RFC 9652:
|
|
977
|
+
* https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
|
|
978
|
+
*
|
|
979
|
+
* e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
|
|
980
|
+
pageviewId?: string | null;
|
|
981
|
+
/** @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. */
|
|
982
|
+
webAnalyticsPlatformUserId?: string | null;
|
|
940
983
|
/** @description The device screen width in pixels - window.screen.width in JS. This is a user level property that should never change. */
|
|
941
984
|
screenWidth?: number;
|
|
942
985
|
/** @description The device screen height in pixels - window.screen.height in JS. This is a user level property that should never change. */
|
|
@@ -951,35 +994,51 @@ interface paths {
|
|
|
951
994
|
* @enum {string}
|
|
952
995
|
*/
|
|
953
996
|
screenSize?: "large" | "mobile";
|
|
954
|
-
/** @description The ID for the sale, a unique value we can correlate with customer records. */
|
|
997
|
+
/** @description The ID for the sale, a unique, non-empty value we can correlate with customer records. */
|
|
955
998
|
saleId: string;
|
|
956
999
|
/**
|
|
957
1000
|
* @description The type of user, for example, existing or prospect.
|
|
958
1001
|
* @enum {string}
|
|
959
1002
|
*/
|
|
960
1003
|
userType: "existing" | "prospect";
|
|
961
|
-
/**
|
|
962
|
-
|
|
1004
|
+
/**
|
|
1005
|
+
* @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.
|
|
1006
|
+
* @enum {string}
|
|
1007
|
+
*/
|
|
1008
|
+
currencyCode?: "AUD" | "CAD" | "EUR" | "GBP" | "MXN" | "USD";
|
|
963
1009
|
/** @description The full basket value of the sale, inclusive of any offers. */
|
|
964
1010
|
saleTotalValue?: number;
|
|
965
1011
|
/** @description A list containing separate line items for each product sold. */
|
|
966
1012
|
productsSold: {
|
|
967
1013
|
/** @description The ID or SKU of a product that is provided by the customer */
|
|
968
|
-
siteProductId
|
|
1014
|
+
siteProductId: string;
|
|
969
1015
|
/** @description The name of the product */
|
|
970
|
-
siteProductName
|
|
1016
|
+
siteProductName: string;
|
|
971
1017
|
/** @description The category of products the product belongs to. */
|
|
972
|
-
siteProductType
|
|
1018
|
+
siteProductType: string;
|
|
973
1019
|
/** @description The upfront price the user has to pay for the product. */
|
|
974
|
-
productPriceUpfront
|
|
1020
|
+
productPriceUpfront: number;
|
|
975
1021
|
}[];
|
|
976
|
-
/**
|
|
977
|
-
|
|
1022
|
+
/**
|
|
1023
|
+
* @description The language of the part of the site the sales data is coming from in ISO 639-1 format e.g. 'en', 'es' etc.
|
|
1024
|
+
* @enum {string}
|
|
1025
|
+
*/
|
|
1026
|
+
language?: "de" | "en" | "es" | "fr" | "it";
|
|
1027
|
+
/** @description This property is intended to replace session_id, but is being used in the meantime so that developers can switch over to using browser_session_id without different services needing to all update in sync.
|
|
1028
|
+
*
|
|
1029
|
+
* A 36 character alphanumeric hash that uniquely identifies a session.
|
|
1030
|
+
*
|
|
1031
|
+
*
|
|
1032
|
+
* This should match the UUID V4 as specified in RFC 9652:
|
|
1033
|
+
* https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
|
|
1034
|
+
*
|
|
1035
|
+
* e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
|
|
1036
|
+
browserSessionId?: string | null;
|
|
978
1037
|
/**
|
|
979
1038
|
* @description The name of the system/service that the event originates from
|
|
980
1039
|
* @enum {string}
|
|
981
1040
|
*/
|
|
982
|
-
service?: "frontend" | "
|
|
1041
|
+
service?: "frontend" | "salesTrackingApi";
|
|
983
1042
|
/** @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. */
|
|
984
1043
|
serviceVersions?: {
|
|
985
1044
|
/** @description The version number for the frontend service */
|
|
@@ -996,20 +1055,22 @@ interface paths {
|
|
|
996
1055
|
productConfigurationVersion?: string | null;
|
|
997
1056
|
/** @description The version number for the sales tracking api service. *in the short term this is technically just the frontend so will match that */
|
|
998
1057
|
salesTrackingApiVersion?: string | null;
|
|
1058
|
+
/** @description The version number for the recommender service */
|
|
1059
|
+
recommenderVersion?: string | null;
|
|
999
1060
|
};
|
|
1000
1061
|
/**
|
|
1001
1062
|
* @description The environment the event originated from (production/development/testing/staging/local/uat/ephemeral)
|
|
1002
1063
|
* @enum {string}
|
|
1003
1064
|
*/
|
|
1004
1065
|
environment?: "development" | "ephemeral" | "local" | "production" | "staging" | "test" | "uat";
|
|
1005
|
-
/** @description JWT
|
|
1066
|
+
/** @description A JWT used to identify the user in the system, can be obtained from the identity endpoint */
|
|
1006
1067
|
identityToken: string;
|
|
1007
1068
|
} | {
|
|
1008
1069
|
/**
|
|
1009
1070
|
* @description The customer that the event occurred on
|
|
1010
1071
|
* @enum {string}
|
|
1011
1072
|
*/
|
|
1012
|
-
customerId: "spectrum";
|
|
1073
|
+
customerId: "spectrum-us-media-consumer-en";
|
|
1013
1074
|
/** @description The timestamp describing the time the event occurred. This should conform to ISO 8601 standards and be in UTC */
|
|
1014
1075
|
eventAt?: string;
|
|
1015
1076
|
/** @description A JWT used to identify the user in the system, can be obtained from the identity endpoint */
|
|
@@ -1050,9 +1111,9 @@ interface paths {
|
|
|
1050
1111
|
/** @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
1112
|
language?: string;
|
|
1052
1113
|
/** @description The recurring payment due per payment period */
|
|
1053
|
-
priceRecurring
|
|
1114
|
+
priceRecurring: number;
|
|
1054
1115
|
/** @description An ISO-8601 duration that represents the period of time that the priceRecurring payment recurs over */
|
|
1055
|
-
priceRecurringPeriod
|
|
1116
|
+
priceRecurringPeriod: string;
|
|
1056
1117
|
/** @description The upfront price the user has to pay for the product. */
|
|
1057
1118
|
priceUpfront?: number;
|
|
1058
1119
|
/** @description The full basket value of the sale, inclusive of any offers. */
|
|
@@ -1129,9 +1190,9 @@ interface paths {
|
|
|
1129
1190
|
/** @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
1191
|
language?: string;
|
|
1131
1192
|
/** @description The recurring payment due per payment period */
|
|
1132
|
-
priceRecurring
|
|
1193
|
+
priceRecurring: number;
|
|
1133
1194
|
/** @description An ISO-8601 duration that represents the period of time that the priceRecurring payment recurs over */
|
|
1134
|
-
priceRecurringPeriod
|
|
1195
|
+
priceRecurringPeriod: string;
|
|
1135
1196
|
/** @description The upfront price the user has to pay for the product. */
|
|
1136
1197
|
priceUpfront?: number;
|
|
1137
1198
|
/** @description The full basket value of the sale, inclusive of any offers. */
|
|
@@ -1162,6 +1223,165 @@ interface paths {
|
|
|
1162
1223
|
/** @description The ID or SKU of a bundle that the product (and other products being purchased at the same time) are part of */
|
|
1163
1224
|
bundleId?: string;
|
|
1164
1225
|
}[];
|
|
1226
|
+
} | {
|
|
1227
|
+
/** @description A 36 character alphanumeric hash that uniquely identifies a session.
|
|
1228
|
+
*
|
|
1229
|
+
*
|
|
1230
|
+
* This should match the UUID V4 as specified in RFC 9652:
|
|
1231
|
+
* https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
|
|
1232
|
+
*
|
|
1233
|
+
* e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
|
|
1234
|
+
sessionId?: string | null;
|
|
1235
|
+
/** @description A 36 character alphanumeric hash that uniquely identifies a user.
|
|
1236
|
+
*
|
|
1237
|
+
*
|
|
1238
|
+
* This should match the UUID V4 as specified in RFC 9652:
|
|
1239
|
+
* https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
|
|
1240
|
+
*
|
|
1241
|
+
* e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
|
|
1242
|
+
userId?: string;
|
|
1243
|
+
/** @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\" */
|
|
1244
|
+
eventAt?: string;
|
|
1245
|
+
/** @description The page url at the time the event is fired */
|
|
1246
|
+
url?: string;
|
|
1247
|
+
/** @description What web browser the user is using e.g. chrome/firefox/safari etc. */
|
|
1248
|
+
browser?: string;
|
|
1249
|
+
/**
|
|
1250
|
+
* @description The customer that the event occurred on
|
|
1251
|
+
* @enum {string}
|
|
1252
|
+
*/
|
|
1253
|
+
customerId: "spectrum-us-media-consumer-en";
|
|
1254
|
+
/** @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\" */
|
|
1255
|
+
userAgent?: string;
|
|
1256
|
+
/** @description A 36 character alphanumeric hash that uniquely identifies a tracking event
|
|
1257
|
+
*
|
|
1258
|
+
* This should match the UUID V4 as specified in RFC 9652:
|
|
1259
|
+
* https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
|
|
1260
|
+
*
|
|
1261
|
+
* e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
|
|
1262
|
+
eventId?: string;
|
|
1263
|
+
/**
|
|
1264
|
+
* @description The name of an event
|
|
1265
|
+
* @enum {string}
|
|
1266
|
+
*/
|
|
1267
|
+
eventName?: "sale-completed";
|
|
1268
|
+
/** @description A 36 character alphanumeric hash that uniquely identifies a page view (page-shown event)
|
|
1269
|
+
*
|
|
1270
|
+
* This should match the UUID V4 as specified in RFC 9652:
|
|
1271
|
+
* https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
|
|
1272
|
+
*
|
|
1273
|
+
* e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
|
|
1274
|
+
pageviewId?: string | null;
|
|
1275
|
+
/** @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. */
|
|
1276
|
+
webAnalyticsPlatformUserId?: string | null;
|
|
1277
|
+
/** @description The device screen width in pixels - window.screen.width in JS. This is a user level property that should never change. */
|
|
1278
|
+
screenWidth?: number;
|
|
1279
|
+
/** @description The device screen height in pixels - window.screen.height in JS. This is a user level property that should never change. */
|
|
1280
|
+
screenHeight?: number;
|
|
1281
|
+
/**
|
|
1282
|
+
* @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.
|
|
1283
|
+
*
|
|
1284
|
+
* Based off https://15gifts.atlassian.net/wiki/spaces/AI/pages/3981443139/Breakpoints+for+mobile+desktop
|
|
1285
|
+
*
|
|
1286
|
+
* screen_width <= 480px = 'mobile'
|
|
1287
|
+
* screen_width > 480px = 'large'
|
|
1288
|
+
* @enum {string}
|
|
1289
|
+
*/
|
|
1290
|
+
screenSize?: "large" | "mobile";
|
|
1291
|
+
/** @description The ID for the sale, a unique, non-empty value we can correlate with customer records. */
|
|
1292
|
+
saleId: string;
|
|
1293
|
+
/**
|
|
1294
|
+
* @description The type of user, for example, existing or prospect.
|
|
1295
|
+
* @enum {string}
|
|
1296
|
+
*/
|
|
1297
|
+
userType: "existing" | "prospect";
|
|
1298
|
+
/**
|
|
1299
|
+
* @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.
|
|
1300
|
+
* @enum {string}
|
|
1301
|
+
*/
|
|
1302
|
+
currencyCode?: "AUD" | "CAD" | "EUR" | "GBP" | "MXN" | "USD";
|
|
1303
|
+
/** @description The full basket value of the sale, inclusive of any offers. */
|
|
1304
|
+
saleTotalValue?: number;
|
|
1305
|
+
/** @description A list containing separate line items for each product sold. */
|
|
1306
|
+
productsSold: {
|
|
1307
|
+
/** @description The ID or SKU of a product that is provided by the customer */
|
|
1308
|
+
siteProductId: string;
|
|
1309
|
+
/** @description The name of the product */
|
|
1310
|
+
siteProductName: string;
|
|
1311
|
+
/** @description The category of products the product belongs to. */
|
|
1312
|
+
siteProductType: string;
|
|
1313
|
+
/** @description The upfront price the user has to pay for the product. */
|
|
1314
|
+
productPriceUpfront: number;
|
|
1315
|
+
}[];
|
|
1316
|
+
/**
|
|
1317
|
+
* @description The language of the part of the site the sales data is coming from in ISO 639-1 format e.g. 'en', 'es' etc.
|
|
1318
|
+
* @enum {string}
|
|
1319
|
+
*/
|
|
1320
|
+
language?: "de" | "en" | "es" | "fr" | "it";
|
|
1321
|
+
/** @description This property is intended to replace session_id, but is being used in the meantime so that developers can switch over to using browser_session_id without different services needing to all update in sync.
|
|
1322
|
+
*
|
|
1323
|
+
* A 36 character alphanumeric hash that uniquely identifies a session.
|
|
1324
|
+
*
|
|
1325
|
+
*
|
|
1326
|
+
* This should match the UUID V4 as specified in RFC 9652:
|
|
1327
|
+
* https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
|
|
1328
|
+
*
|
|
1329
|
+
* e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
|
|
1330
|
+
browserSessionId?: string | null;
|
|
1331
|
+
/** @description A list of product items with properties that are specific to Spectrum */
|
|
1332
|
+
productsSoldSpectrum?: {
|
|
1333
|
+
/** @description The ID or SKU of a product that is provided by the customer */
|
|
1334
|
+
siteProductId: string;
|
|
1335
|
+
/** @description The ID of the bundle that a product is part of (if it's in one) */
|
|
1336
|
+
bundleId: string;
|
|
1337
|
+
}[];
|
|
1338
|
+
/** @description Properties at the sale level (not product item level) specifically required from media customers */
|
|
1339
|
+
saleCustomPropertiesMedia?: {
|
|
1340
|
+
/** @description The total monthly cost at the sale level */
|
|
1341
|
+
priceMonthly: number;
|
|
1342
|
+
};
|
|
1343
|
+
/** @description A list of product item objects specific to media customers */
|
|
1344
|
+
productsSoldMedia?: {
|
|
1345
|
+
/** @description The ID or SKU of a product that is provided by the customer */
|
|
1346
|
+
siteProductId: string;
|
|
1347
|
+
/** @description The recurring payment per payment period */
|
|
1348
|
+
productPricePerPeriod: number;
|
|
1349
|
+
/** @description An ISO-8601 duration that represents the period of time that the product_price_per_period payment recurs over */
|
|
1350
|
+
productRecurringPaymentPeriod: string;
|
|
1351
|
+
/** @description An ISO-8601 duration that represents the contract length */
|
|
1352
|
+
productContractLength: string;
|
|
1353
|
+
}[];
|
|
1354
|
+
/**
|
|
1355
|
+
* @description The name of the system/service that the event originates from
|
|
1356
|
+
* @enum {string}
|
|
1357
|
+
*/
|
|
1358
|
+
service?: "frontend" | "salesTrackingApi";
|
|
1359
|
+
/** @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. */
|
|
1360
|
+
serviceVersions?: {
|
|
1361
|
+
/** @description The version number for the frontend service */
|
|
1362
|
+
frontendVersion?: string | null;
|
|
1363
|
+
/** @description The version number for the frontend api service */
|
|
1364
|
+
frontendApiVersion?: string | null;
|
|
1365
|
+
/** @description The version number for the conversation api service */
|
|
1366
|
+
conversationApiVersion?: string | null;
|
|
1367
|
+
/** @description The version number for the customer configuration service */
|
|
1368
|
+
customerConfigurationVersion?: string | null;
|
|
1369
|
+
/** @description The version number for the client library our customers are using */
|
|
1370
|
+
sdkVersion?: string | null;
|
|
1371
|
+
/** @description The version number for the product configuration data */
|
|
1372
|
+
productConfigurationVersion?: string | null;
|
|
1373
|
+
/** @description The version number for the sales tracking api service. *in the short term this is technically just the frontend so will match that */
|
|
1374
|
+
salesTrackingApiVersion?: string | null;
|
|
1375
|
+
/** @description The version number for the recommender service */
|
|
1376
|
+
recommenderVersion?: string | null;
|
|
1377
|
+
};
|
|
1378
|
+
/**
|
|
1379
|
+
* @description The environment the event originated from (production/development/testing/staging/local/uat/ephemeral)
|
|
1380
|
+
* @enum {string}
|
|
1381
|
+
*/
|
|
1382
|
+
environment?: "development" | "ephemeral" | "local" | "production" | "staging" | "test" | "uat";
|
|
1383
|
+
/** @description A JWT used to identify the user in the system, can be obtained from the identity endpoint */
|
|
1384
|
+
identityToken: string;
|
|
1165
1385
|
};
|
|
1166
1386
|
};
|
|
1167
1387
|
};
|
|
@@ -1173,12 +1393,81 @@ interface paths {
|
|
|
1173
1393
|
};
|
|
1174
1394
|
content?: never;
|
|
1175
1395
|
};
|
|
1176
|
-
/** @description
|
|
1396
|
+
/** @description Error response */
|
|
1397
|
+
400: {
|
|
1398
|
+
headers: {
|
|
1399
|
+
[name: string]: unknown;
|
|
1400
|
+
};
|
|
1401
|
+
content: {
|
|
1402
|
+
"application/json": {
|
|
1403
|
+
/** @description The error message */
|
|
1404
|
+
message?: string;
|
|
1405
|
+
};
|
|
1406
|
+
};
|
|
1407
|
+
};
|
|
1408
|
+
/** @description Error response */
|
|
1409
|
+
401: {
|
|
1410
|
+
headers: {
|
|
1411
|
+
[name: string]: unknown;
|
|
1412
|
+
};
|
|
1413
|
+
content: {
|
|
1414
|
+
"application/json": {
|
|
1415
|
+
/** @description The error message */
|
|
1416
|
+
message?: string;
|
|
1417
|
+
};
|
|
1418
|
+
};
|
|
1419
|
+
};
|
|
1420
|
+
/** @description Error response */
|
|
1421
|
+
403: {
|
|
1422
|
+
headers: {
|
|
1423
|
+
[name: string]: unknown;
|
|
1424
|
+
};
|
|
1425
|
+
content: {
|
|
1426
|
+
"application/json": {
|
|
1427
|
+
/** @description The error message */
|
|
1428
|
+
message?: string;
|
|
1429
|
+
};
|
|
1430
|
+
};
|
|
1431
|
+
};
|
|
1432
|
+
/** @description Error response */
|
|
1177
1433
|
404: {
|
|
1178
1434
|
headers: {
|
|
1179
1435
|
[name: string]: unknown;
|
|
1180
1436
|
};
|
|
1181
|
-
content
|
|
1437
|
+
content: {
|
|
1438
|
+
"application/json": {
|
|
1439
|
+
/** @description The error message */
|
|
1440
|
+
message?: string;
|
|
1441
|
+
};
|
|
1442
|
+
};
|
|
1443
|
+
};
|
|
1444
|
+
/** @description Validation error response */
|
|
1445
|
+
422: {
|
|
1446
|
+
headers: {
|
|
1447
|
+
[name: string]: unknown;
|
|
1448
|
+
};
|
|
1449
|
+
content: {
|
|
1450
|
+
"application/json": {
|
|
1451
|
+
/** @description The path to the field that caused the error */
|
|
1452
|
+
instancePath?: string;
|
|
1453
|
+
/** @description The error message */
|
|
1454
|
+
message?: string;
|
|
1455
|
+
/** @description The path to the schema that caused the error */
|
|
1456
|
+
schemaPath?: string;
|
|
1457
|
+
/** @description The keyword that caused the error */
|
|
1458
|
+
keyword?: string;
|
|
1459
|
+
params?: {
|
|
1460
|
+
/** @description The name of the missing property */
|
|
1461
|
+
missingProperty?: string;
|
|
1462
|
+
/** @description The pattern that caused the error */
|
|
1463
|
+
pattern?: string;
|
|
1464
|
+
/** @description The name of the additional property that caused the error */
|
|
1465
|
+
additionalProperty?: string;
|
|
1466
|
+
/** @description The comparison that caused the error */
|
|
1467
|
+
comparison?: string;
|
|
1468
|
+
};
|
|
1469
|
+
}[];
|
|
1470
|
+
};
|
|
1182
1471
|
};
|
|
1183
1472
|
};
|
|
1184
1473
|
};
|
|
@@ -1223,9 +1512,21 @@ interface paths {
|
|
|
1223
1512
|
* } */
|
|
1224
1513
|
"application/json": {
|
|
1225
1514
|
additionalProperties?: {
|
|
1226
|
-
/** @description A
|
|
1227
|
-
|
|
1228
|
-
|
|
1515
|
+
/** @description A 36 character alphanumeric hash that uniquely identifies a session.
|
|
1516
|
+
*
|
|
1517
|
+
*
|
|
1518
|
+
* This should match the UUID V4 as specified in RFC 9652:
|
|
1519
|
+
* https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
|
|
1520
|
+
*
|
|
1521
|
+
* e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
|
|
1522
|
+
session_id?: string | null;
|
|
1523
|
+
/** @description A 36 character alphanumeric hash that uniquely identifies a user.
|
|
1524
|
+
*
|
|
1525
|
+
*
|
|
1526
|
+
* This should match the UUID V4 as specified in RFC 9652:
|
|
1527
|
+
* https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
|
|
1528
|
+
*
|
|
1529
|
+
* e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
|
|
1229
1530
|
user_id?: string;
|
|
1230
1531
|
/** @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\" */
|
|
1231
1532
|
event_at?: string;
|
|
@@ -1237,12 +1538,24 @@ interface paths {
|
|
|
1237
1538
|
customer_id?: string;
|
|
1238
1539
|
/** @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\" */
|
|
1239
1540
|
user_agent?: string;
|
|
1240
|
-
/** @description A
|
|
1541
|
+
/** @description A 36 character alphanumeric hash that uniquely identifies a tracking event
|
|
1542
|
+
*
|
|
1543
|
+
* This should match the UUID V4 as specified in RFC 9652:
|
|
1544
|
+
* https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
|
|
1545
|
+
*
|
|
1546
|
+
* e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
|
|
1241
1547
|
event_id?: string;
|
|
1242
1548
|
/** @description The name of an event */
|
|
1243
1549
|
event_name?: string;
|
|
1244
|
-
/** @description A
|
|
1550
|
+
/** @description A 36 character alphanumeric hash that uniquely identifies a page view (page-shown event)
|
|
1551
|
+
*
|
|
1552
|
+
* This should match the UUID V4 as specified in RFC 9652:
|
|
1553
|
+
* https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
|
|
1554
|
+
*
|
|
1555
|
+
* e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
|
|
1245
1556
|
pageview_id?: string;
|
|
1557
|
+
/** @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. */
|
|
1558
|
+
web_analytics_platform_user_id?: string | null;
|
|
1246
1559
|
/** @description The device screen width in pixels - window.screen.width in JS. This is a user level property that should never change. */
|
|
1247
1560
|
screen_width?: number;
|
|
1248
1561
|
/** @description The device screen height in pixels - window.screen.height in JS. This is a user level property that should never change. */
|
|
@@ -1254,6 +1567,16 @@ interface paths {
|
|
|
1254
1567
|
* screen_width <= 480px = 'mobile'
|
|
1255
1568
|
* screen_width > 480px = 'large' */
|
|
1256
1569
|
screen_size?: string;
|
|
1570
|
+
/** @description This property is intended to replace session_id, but is being used in the meantime so that developers can switch over to using browser_session_id without different services needing to all update in sync.
|
|
1571
|
+
*
|
|
1572
|
+
* A 36 character alphanumeric hash that uniquely identifies a session.
|
|
1573
|
+
*
|
|
1574
|
+
*
|
|
1575
|
+
* This should match the UUID V4 as specified in RFC 9652:
|
|
1576
|
+
* https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
|
|
1577
|
+
*
|
|
1578
|
+
* e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
|
|
1579
|
+
browser_session_id?: string | null;
|
|
1257
1580
|
/** @description The name of the system/service that the event originates from */
|
|
1258
1581
|
service?: string;
|
|
1259
1582
|
/** @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. */
|
|
@@ -1262,21 +1585,31 @@ interface paths {
|
|
|
1262
1585
|
environment?: string;
|
|
1263
1586
|
/** @description The associated text based on the answer provided by the user at the end of the conversation when they are asked to provide feedback by clicking on one of the emojis */
|
|
1264
1587
|
feedback_score_text?: string;
|
|
1265
|
-
/** @description A
|
|
1588
|
+
/** @description A 36 character alphanumeric hash that uniquely identifies a conversation.
|
|
1589
|
+
*
|
|
1590
|
+
* This should match the UUID V4 as specified in RFC 9652:
|
|
1591
|
+
* https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
|
|
1592
|
+
*
|
|
1593
|
+
* e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
|
|
1266
1594
|
conversation_id?: string;
|
|
1267
1595
|
/** @description An integer representing the rank of the corresponding feedback score. It should always start at 0, even if the number of options changes. */
|
|
1268
1596
|
feedback_score_num?: number;
|
|
1269
1597
|
/** @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
1598
|
tool_ui_closed_reason?: string;
|
|
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
|
|
1599
|
+
/** @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 1. Then the first message a user sends would have a message_turn of 2. The first actual response the assistant sends would have a message_turn of 2.
|
|
1272
1600
|
*
|
|
1273
|
-
* All message_turn values except for
|
|
1601
|
+
* All message_turn values except for 1 (the opening message if it exists) should be expected to come in pairs.
|
|
1274
1602
|
*
|
|
1275
1603
|
* Here's an example sequence of message_turn values where the user is provided with an opening message at the beginning of a conversation, and then sends 5 separate messages themselves with 5 corresponding assistant responses:
|
|
1276
1604
|
*
|
|
1277
|
-
*
|
|
1605
|
+
* 1,2,2,3,3,4,4,5,5,6,6 */
|
|
1278
1606
|
conversation_turn_num?: number;
|
|
1279
|
-
/** @description An alphanumeric hash that uniquely identifies a turn in a conversation
|
|
1607
|
+
/** @description An alphanumeric hash that uniquely identifies a turn in a conversation
|
|
1608
|
+
*
|
|
1609
|
+
* This should match the UUID V4 as specified in RFC 9652:
|
|
1610
|
+
* https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
|
|
1611
|
+
*
|
|
1612
|
+
* e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
|
|
1280
1613
|
conversation_turn_id?: string;
|
|
1281
1614
|
/** @description Describes the type of message e.g. text, single select, multi select etc */
|
|
1282
1615
|
message_type?: string;
|
|
@@ -1290,6 +1623,8 @@ interface paths {
|
|
|
1290
1623
|
guardrails?: unknown[];
|
|
1291
1624
|
/** @description True if assistant_message-submitted event is one that is associated with a message chunk before the conversation api checks the llm response against guardrails. False if it's the final message chunk sent to the frontend. See event level description for assistant_message-submitted for more detail. */
|
|
1292
1625
|
is_pre_output_guardrail_checks?: boolean;
|
|
1626
|
+
/** @description Describes the stage that the conversation is currently at. A conversation stage is triggered in response to each user message, and according to the stage, the main LLM prompt is tweaked to apply specific instructions and steer the conversation. */
|
|
1627
|
+
conversation_stage?: string | null;
|
|
1293
1628
|
/** @description A list of products sent in a conversation api message, typically initially in a recommendation message, but then could also be in an exit_to_purchase message. */
|
|
1294
1629
|
recommendation_products?: unknown[];
|
|
1295
1630
|
/** @description Contains the fallback text provided by the conversation api to a frontend that non 'text' (single_select/multi_select etc) messages could revert to if they needed to. Described in the conversation api docs as: \"What should a client render if they do not have a native renderer for this message type?\". */
|
|
@@ -1298,7 +1633,7 @@ interface paths {
|
|
|
1298
1633
|
is_allow_free_text_message?: boolean;
|
|
1299
1634
|
/** @description The reason an exit to chat response was provided by the conversation api */
|
|
1300
1635
|
exit_to_chat_reason?: string;
|
|
1301
|
-
/** @description The ID for the sale, a unique value we can correlate with customer records. */
|
|
1636
|
+
/** @description The ID for the sale, a unique, non-empty value we can correlate with customer records. */
|
|
1302
1637
|
sale_id?: string;
|
|
1303
1638
|
/** @description The type of user, for example, existing or prospect. */
|
|
1304
1639
|
user_type?: string;
|
|
@@ -1308,7 +1643,7 @@ interface paths {
|
|
|
1308
1643
|
sale_total_value?: number;
|
|
1309
1644
|
/** @description A list containing separate line items for each product sold. */
|
|
1310
1645
|
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
|
|
1646
|
+
/** @description The language of the part of the site the sales data is coming from in ISO 639-1 format e.g. 'en', 'es' etc. */
|
|
1312
1647
|
language?: string;
|
|
1313
1648
|
/** @description A list of product items with properties that are specific to Spectrum */
|
|
1314
1649
|
products_sold_spectrum?: unknown[];
|
|
@@ -1340,19 +1675,31 @@ interface paths {
|
|
|
1340
1675
|
experiment_variation_id?: string;
|
|
1341
1676
|
/** @description The human readable name for the variation as defined in Growthbook */
|
|
1342
1677
|
experiment_variation_name?: string;
|
|
1678
|
+
/** @description A list of structured information extracted from the conversation that can inform the recommender and the discovery. A single slot would provide a key piece of information such as the users broadband usages (gaming/streaming/working from home).
|
|
1679
|
+
*
|
|
1680
|
+
* https://backoffice.15gifts.com/product/recommender/slots */
|
|
1681
|
+
slots?: unknown[];
|
|
1343
1682
|
/** @description The type of entry point the event refers to (tab, engagement bubble etc) */
|
|
1344
1683
|
entry_point_type?: string;
|
|
1345
1684
|
/** @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
1685
|
entry_point_closed_reason?: string;
|
|
1686
|
+
/** @description The type of destination the user will be sent to as a result of exiting to chat. E.g 'phone','chat','email' etc */
|
|
1687
|
+
exit_destination_type?: string;
|
|
1347
1688
|
};
|
|
1348
|
-
/**
|
|
1689
|
+
/**
|
|
1690
|
+
* @description A 36 character hash, 5 segments, separated by dashes that uniquely identifies a conversation
|
|
1691
|
+
* @example 1a1a1a1a-1a1a-1a1a-1a1a-1a1a1a1a1a1a
|
|
1692
|
+
*/
|
|
1349
1693
|
conversationId?: string;
|
|
1350
1694
|
/**
|
|
1351
1695
|
* @description Event Name
|
|
1352
1696
|
* @enum {string}
|
|
1353
1697
|
*/
|
|
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
|
-
/**
|
|
1698
|
+
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" | "sale-completed spectrum-us-media-consumer-en" | "entry_point-clicked" | "tool_close-clicked" | "exit_to_chat-completed" | "exit_to_purchase-completed" | "conversation-started" | "user_qualification-identified" | "experiment_variation-assigned" | "slot_filling-completed" | "entry_point-closed" | "entry_point-suppressed" | "exit_to_human-completed" | "user-created";
|
|
1699
|
+
/**
|
|
1700
|
+
* @description A 36 character hash, 5 segments, separated by dashes that uniquely identifies a page view (page-shown event)
|
|
1701
|
+
* @example 1a1a1a1a-1a1a-1a1a-1a1a-1a1a1a1a1a1a
|
|
1702
|
+
*/
|
|
1356
1703
|
pageviewId: string;
|
|
1357
1704
|
/** @description The device screen height in pixels - window.screen.height in JS. This is a user level property that should never change. */
|
|
1358
1705
|
screenHeight?: number;
|
|
@@ -1624,7 +1971,7 @@ declare class Client {
|
|
|
1624
1971
|
content: {
|
|
1625
1972
|
"application/json": {
|
|
1626
1973
|
additionalProperties?: {
|
|
1627
|
-
session_id?: string;
|
|
1974
|
+
session_id?: string | null;
|
|
1628
1975
|
user_id?: string;
|
|
1629
1976
|
event_at?: string;
|
|
1630
1977
|
url?: string;
|
|
@@ -1634,9 +1981,11 @@ declare class Client {
|
|
|
1634
1981
|
event_id?: string;
|
|
1635
1982
|
event_name?: string;
|
|
1636
1983
|
pageview_id?: string;
|
|
1984
|
+
web_analytics_platform_user_id?: string | null;
|
|
1637
1985
|
screen_width?: number;
|
|
1638
1986
|
screen_height?: number;
|
|
1639
1987
|
screen_size?: string;
|
|
1988
|
+
browser_session_id?: string | null;
|
|
1640
1989
|
service?: string;
|
|
1641
1990
|
service_versions?: Record<string, never>;
|
|
1642
1991
|
environment?: string;
|
|
@@ -1652,6 +2001,7 @@ declare class Client {
|
|
|
1652
2001
|
is_user_message_guardrailed?: boolean;
|
|
1653
2002
|
guardrails?: unknown[];
|
|
1654
2003
|
is_pre_output_guardrail_checks?: boolean;
|
|
2004
|
+
conversation_stage?: string | null;
|
|
1655
2005
|
recommendation_products?: unknown[];
|
|
1656
2006
|
fallback_text?: string;
|
|
1657
2007
|
is_allow_free_text_message?: boolean;
|
|
@@ -1673,11 +2023,13 @@ declare class Client {
|
|
|
1673
2023
|
experiment_id?: string;
|
|
1674
2024
|
experiment_variation_id?: string;
|
|
1675
2025
|
experiment_variation_name?: string;
|
|
2026
|
+
slots?: unknown[];
|
|
1676
2027
|
entry_point_type?: string;
|
|
1677
2028
|
entry_point_closed_reason?: string;
|
|
2029
|
+
exit_destination_type?: string;
|
|
1678
2030
|
};
|
|
1679
2031
|
conversationId?: string;
|
|
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";
|
|
2032
|
+
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" | "sale-completed spectrum-us-media-consumer-en" | "entry_point-clicked" | "tool_close-clicked" | "exit_to_chat-completed" | "exit_to_purchase-completed" | "conversation-started" | "user_qualification-identified" | "experiment_variation-assigned" | "slot_filling-completed" | "entry_point-closed" | "entry_point-suppressed" | "exit_to_human-completed" | "user-created";
|
|
1681
2033
|
pageviewId: string;
|
|
1682
2034
|
screenHeight?: number;
|
|
1683
2035
|
screenSize?: "mobile" | "large";
|