@15gifts/sdk 0.11.5 → 0.11.7

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 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
- /** @description A 32 character alphanumeric hash that uniquely identifies a session */
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
- /** @description A 32 character alphanumeric hash that uniquely identifies a user */
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
- /** @description A 32 character alphanumeric hash that uniquely identifies a page view (page-shown event) */
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
- /** @description A 32 character alphanumeric hash that uniquely identifies a session */
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
- /** @description A 32 character alphanumeric hash that uniquely identifies a user */
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 32 character alphanumeric hash that uniquely identifies a session */
918
- sessionId?: string;
919
- /** @description A 32 character alphanumeric hash that uniquely identifies a user */
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 32 character alphanumeric hash that uniquely identifies a tracking event */
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 32 character alphanumeric hash that uniquely identifies a page view (page-shown event) */
939
- pageviewId?: string;
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
- /** @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. */
962
- currencyCode?: string;
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?: string;
1014
+ siteProductId: string;
969
1015
  /** @description The name of the product */
970
- siteProductName?: string;
1016
+ siteProductName: string;
971
1017
  /** @description The category of products the product belongs to. */
972
- siteProductType?: string;
1018
+ siteProductType: string;
973
1019
  /** @description The upfront price the user has to pay for the product. */
974
- productPriceUpfront?: number;
1020
+ productPriceUpfront: number;
975
1021
  }[];
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;
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" | "sales_tracking_api";
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,13 +1055,15 @@ 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 token containing the user's identity */
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
  /**
@@ -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?: number;
1114
+ priceRecurring: number;
1054
1115
  /** @description An ISO-8601 duration that represents the period of time that the priceRecurring payment recurs over */
1055
- priceRecurringPeriod?: string;
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,88 @@ 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?: number;
1193
+ priceRecurring: number;
1133
1194
  /** @description An ISO-8601 duration that represents the period of time that the priceRecurring payment recurs over */
1134
- priceRecurringPeriod?: string;
1195
+ priceRecurringPeriod: string;
1196
+ /** @description The upfront price the user has to pay for the product. */
1197
+ priceUpfront?: number;
1198
+ /** @description The full basket value of the sale, inclusive of any offers. */
1199
+ totalValueOfSale?: number;
1200
+ /** @description The taxes the user has to pay relating to the priceUpfront of the product(s) */
1201
+ totalUpfrontTax?: number;
1202
+ /** @description The taxes the user has to pay relating to the priceRecurring of the product(s), due per payment period */
1203
+ totalRecurringTax?: number;
1204
+ totalTaxOnSale?: number;
1205
+ /** @description A list containing separate line items for each product sold. */
1206
+ productsSold: {
1207
+ /** @description The ID or SKU of a product that is provided by the customer */
1208
+ siteProductId: string;
1209
+ /** @description The name of the product */
1210
+ siteProductName: string;
1211
+ /** @description The category of products the product belongs to. */
1212
+ siteProductType: string;
1213
+ /** @description An ISO-8601 duration that represents the contract length */
1214
+ productContractLength: string;
1215
+ /** @description An integer representing how many of this particular product the user is purchasing */
1216
+ quantity: number;
1217
+ /** @description The upfront price the user has to pay for the product. */
1218
+ productPriceUpfront: number;
1219
+ /** @description The recurring payment per payment period for the product */
1220
+ productPricePerPeriod: number;
1221
+ /** @description An ISO-8601 duration that represents the period of time that the productPricePerPeriod payment recurs over */
1222
+ productRecurringPaymentPeriod: string;
1223
+ /** @description The ID or SKU of a bundle that the product (and other products being purchased at the same time) are part of */
1224
+ bundleId?: string;
1225
+ }[];
1226
+ } | {
1227
+ /**
1228
+ * @description The customer that the event occurred on
1229
+ * @enum {string}
1230
+ */
1231
+ customerId: "spectrum-us-media-consumer-en";
1232
+ /** @description The timestamp describing the time the event occurred. This should conform to ISO 8601 standards and be in UTC */
1233
+ eventAt?: string;
1234
+ /** @description A JWT used to identify the user in the system, can be obtained from the identity endpoint */
1235
+ identityToken: string;
1236
+ /** @description The ID for the sale, a unique value we can correlate with customer records. */
1237
+ saleId: string;
1238
+ /**
1239
+ * @description The type of user, for example, existing or prospect.
1240
+ * @enum {string}
1241
+ */
1242
+ userType: "existing" | "prospect";
1243
+ /** @description The browser the user is using, e.g. Chrome, Firefox, Safari, etc. */
1244
+ browser?: string;
1245
+ /** @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" */
1246
+ userAgent?: string;
1247
+ /** @description The device screen width in pixels - window.screen.width in JS. This is a user level property that should never change. */
1248
+ screenWidth?: number;
1249
+ /** @description The device screen height in pixels - window.screen.height in JS. This is a user level property that should never change. */
1250
+ screenHeight?: number;
1251
+ /**
1252
+ * @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.
1253
+ *
1254
+ * Based off https://15gifts.atlassian.net/wiki/spaces/AI/pages/3981443139/Breakpoints+for+mobile+desktop
1255
+ *
1256
+ * screen_width <= 480px = 'mobile'
1257
+ * screen_width > 480px = 'large'
1258
+ * @enum {string}
1259
+ */
1260
+ screenSize?: "mobile" | "large";
1261
+ /** @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. */
1262
+ currencyCode?: string;
1263
+ /** @description The host/domain of the URL at the time the event is fired */
1264
+ siteHost: string;
1265
+ /** @description The path of the URL (including an initial `/`) at the time the event is fired */
1266
+ sitePath?: string;
1267
+ /** @description The query string of the URL (including an initial `?`) at the time the event is fired */
1268
+ siteQueryString?: string;
1269
+ /** @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. */
1270
+ language?: string;
1271
+ /** @description The recurring payment due per payment period */
1272
+ priceRecurring: number;
1273
+ /** @description An ISO-8601 duration that represents the period of time that the priceRecurring payment recurs over */
1274
+ priceRecurringPeriod: string;
1135
1275
  /** @description The upfront price the user has to pay for the product. */
1136
1276
  priceUpfront?: number;
1137
1277
  /** @description The full basket value of the sale, inclusive of any offers. */
@@ -1173,12 +1313,81 @@ interface paths {
1173
1313
  };
1174
1314
  content?: never;
1175
1315
  };
1176
- /** @description Default Response */
1316
+ /** @description Error response */
1317
+ 400: {
1318
+ headers: {
1319
+ [name: string]: unknown;
1320
+ };
1321
+ content: {
1322
+ "application/json": {
1323
+ /** @description The error message */
1324
+ message?: string;
1325
+ };
1326
+ };
1327
+ };
1328
+ /** @description Error response */
1329
+ 401: {
1330
+ headers: {
1331
+ [name: string]: unknown;
1332
+ };
1333
+ content: {
1334
+ "application/json": {
1335
+ /** @description The error message */
1336
+ message?: string;
1337
+ };
1338
+ };
1339
+ };
1340
+ /** @description Error response */
1341
+ 403: {
1342
+ headers: {
1343
+ [name: string]: unknown;
1344
+ };
1345
+ content: {
1346
+ "application/json": {
1347
+ /** @description The error message */
1348
+ message?: string;
1349
+ };
1350
+ };
1351
+ };
1352
+ /** @description Error response */
1177
1353
  404: {
1178
1354
  headers: {
1179
1355
  [name: string]: unknown;
1180
1356
  };
1181
- content?: never;
1357
+ content: {
1358
+ "application/json": {
1359
+ /** @description The error message */
1360
+ message?: string;
1361
+ };
1362
+ };
1363
+ };
1364
+ /** @description Validation error response */
1365
+ 422: {
1366
+ headers: {
1367
+ [name: string]: unknown;
1368
+ };
1369
+ content: {
1370
+ "application/json": {
1371
+ /** @description The path to the field that caused the error */
1372
+ instancePath?: string;
1373
+ /** @description The error message */
1374
+ message?: string;
1375
+ /** @description The path to the schema that caused the error */
1376
+ schemaPath?: string;
1377
+ /** @description The keyword that caused the error */
1378
+ keyword?: string;
1379
+ params?: {
1380
+ /** @description The name of the missing property */
1381
+ missingProperty?: string;
1382
+ /** @description The pattern that caused the error */
1383
+ pattern?: string;
1384
+ /** @description The name of the additional property that caused the error */
1385
+ additionalProperty?: string;
1386
+ /** @description The comparison that caused the error */
1387
+ comparison?: string;
1388
+ };
1389
+ }[];
1390
+ };
1182
1391
  };
1183
1392
  };
1184
1393
  };
@@ -1223,9 +1432,21 @@ interface paths {
1223
1432
  * } */
1224
1433
  "application/json": {
1225
1434
  additionalProperties?: {
1226
- /** @description A 32 character alphanumeric hash that uniquely identifies a session */
1227
- session_id?: string;
1228
- /** @description A 32 character alphanumeric hash that uniquely identifies a user */
1435
+ /** @description A 36 character alphanumeric hash that uniquely identifies a session.
1436
+ *
1437
+ *
1438
+ * This should match the UUID V4 as specified in RFC 9652:
1439
+ * https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
1440
+ *
1441
+ * e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
1442
+ session_id?: string | null;
1443
+ /** @description A 36 character alphanumeric hash that uniquely identifies a user.
1444
+ *
1445
+ *
1446
+ * This should match the UUID V4 as specified in RFC 9652:
1447
+ * https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
1448
+ *
1449
+ * e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
1229
1450
  user_id?: string;
1230
1451
  /** @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
1452
  event_at?: string;
@@ -1237,12 +1458,24 @@ interface paths {
1237
1458
  customer_id?: string;
1238
1459
  /** @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
1460
  user_agent?: string;
1240
- /** @description A 32 character alphanumeric hash that uniquely identifies a tracking event */
1461
+ /** @description A 36 character alphanumeric hash that uniquely identifies a tracking event
1462
+ *
1463
+ * This should match the UUID V4 as specified in RFC 9652:
1464
+ * https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
1465
+ *
1466
+ * e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
1241
1467
  event_id?: string;
1242
1468
  /** @description The name of an event */
1243
1469
  event_name?: string;
1244
- /** @description A 32 character alphanumeric hash that uniquely identifies a page view (page-shown event) */
1470
+ /** @description A 36 character alphanumeric hash that uniquely identifies a page view (page-shown event)
1471
+ *
1472
+ * This should match the UUID V4 as specified in RFC 9652:
1473
+ * https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
1474
+ *
1475
+ * e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
1245
1476
  pageview_id?: string;
1477
+ /** @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. */
1478
+ web_analytics_platform_user_id?: string | null;
1246
1479
  /** @description The device screen width in pixels - window.screen.width in JS. This is a user level property that should never change. */
1247
1480
  screen_width?: number;
1248
1481
  /** @description The device screen height in pixels - window.screen.height in JS. This is a user level property that should never change. */
@@ -1254,6 +1487,18 @@ interface paths {
1254
1487
  * screen_width <= 480px = 'mobile'
1255
1488
  * screen_width > 480px = 'large' */
1256
1489
  screen_size?: string;
1490
+ /** @description The type of entry point the event refers to (tab, engagement bubble etc) */
1491
+ entry_point_type?: string;
1492
+ /** @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.
1493
+ *
1494
+ * A 36 character alphanumeric hash that uniquely identifies a session.
1495
+ *
1496
+ *
1497
+ * This should match the UUID V4 as specified in RFC 9652:
1498
+ * https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
1499
+ *
1500
+ * e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
1501
+ browser_session_id?: string | null;
1257
1502
  /** @description The name of the system/service that the event originates from */
1258
1503
  service?: string;
1259
1504
  /** @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 +1507,31 @@ interface paths {
1262
1507
  environment?: string;
1263
1508
  /** @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
1509
  feedback_score_text?: string;
1265
- /** @description A 32 character alphanumeric hash that uniquely identifies a conversation */
1510
+ /** @description A 36 character alphanumeric hash that uniquely identifies a conversation.
1511
+ *
1512
+ * This should match the UUID V4 as specified in RFC 9652:
1513
+ * https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
1514
+ *
1515
+ * e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
1266
1516
  conversation_id?: string;
1267
1517
  /** @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
1518
  feedback_score_num?: number;
1269
1519
  /** @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
1520
  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 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.
1521
+ /** @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
1522
  *
1273
- * All message_turn values except for 0 (the opening message if it exists) should be expected to come in pairs.
1523
+ * All message_turn values except for 1 (the opening message if it exists) should be expected to come in pairs.
1274
1524
  *
1275
1525
  * 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
1526
  *
1277
- * 0,1,1,2,2,3,3,4,4,5,5 */
1527
+ * 1,2,2,3,3,4,4,5,5,6,6 */
1278
1528
  conversation_turn_num?: number;
1279
- /** @description An alphanumeric hash that uniquely identifies a turn in a conversation */
1529
+ /** @description An alphanumeric hash that uniquely identifies a turn in a conversation
1530
+ *
1531
+ * This should match the UUID V4 as specified in RFC 9652:
1532
+ * https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4
1533
+ *
1534
+ * e.g f81d4fae-7dec-41d0-a765-00a0c91e6bf6 */
1280
1535
  conversation_turn_id?: string;
1281
1536
  /** @description Describes the type of message e.g. text, single select, multi select etc */
1282
1537
  message_type?: string;
@@ -1290,6 +1545,8 @@ interface paths {
1290
1545
  guardrails?: unknown[];
1291
1546
  /** @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
1547
  is_pre_output_guardrail_checks?: boolean;
1548
+ /** @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. */
1549
+ conversation_stage?: string | null;
1293
1550
  /** @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
1551
  recommendation_products?: unknown[];
1295
1552
  /** @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 +1555,9 @@ interface paths {
1298
1555
  is_allow_free_text_message?: boolean;
1299
1556
  /** @description The reason an exit to chat response was provided by the conversation api */
1300
1557
  exit_to_chat_reason?: string;
1301
- /** @description The ID for the sale, a unique value we can correlate with customer records. */
1558
+ /** @description The type of destination the user will be sent to as a result of exiting to chat. E.g 'phone','chat','email' etc */
1559
+ exit_destination_type?: string;
1560
+ /** @description The ID for the sale, a unique, non-empty value we can correlate with customer records. */
1302
1561
  sale_id?: string;
1303
1562
  /** @description The type of user, for example, existing or prospect. */
1304
1563
  user_type?: string;
@@ -1308,7 +1567,7 @@ interface paths {
1308
1567
  sale_total_value?: number;
1309
1568
  /** @description A list containing separate line items for each product sold. */
1310
1569
  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. */
1570
+ /** @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
1571
  language?: string;
1313
1572
  /** @description A list of product items with properties that are specific to Spectrum */
1314
1573
  products_sold_spectrum?: unknown[];
@@ -1320,6 +1579,8 @@ interface paths {
1320
1579
  sale_custom_properties_aidem?: Record<string, never>;
1321
1580
  /** @description A list of product items with properties that are specific to Aidem */
1322
1581
  products_sold_aidem?: unknown[];
1582
+ /** @description Specifies whether the click on the entry point was a positive or negative CTA. Positive would be expected to open the tool ui, negative would be expected to close the entry point. */
1583
+ entry_point_click_type?: string | null;
1323
1584
  /** @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) */
1324
1585
  is_qualified?: boolean;
1325
1586
  /** @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.
@@ -1340,19 +1601,27 @@ interface paths {
1340
1601
  experiment_variation_id?: string;
1341
1602
  /** @description The human readable name for the variation as defined in Growthbook */
1342
1603
  experiment_variation_name?: string;
1343
- /** @description The type of entry point the event refers to (tab, engagement bubble etc) */
1344
- entry_point_type?: string;
1604
+ /** @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).
1605
+ *
1606
+ * https://backoffice.15gifts.com/product/recommender/slots */
1607
+ slots?: unknown[];
1345
1608
  /** @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
1609
  entry_point_closed_reason?: string;
1347
1610
  };
1348
- /** @description A 32 character alphanumeric hash that uniquely identifies a conversation */
1611
+ /**
1612
+ * @description A 36 character hash, 5 segments, separated by dashes that uniquely identifies a conversation
1613
+ * @example 1a1a1a1a-1a1a-1a1a-1a1a-1a1a1a1a1a1a
1614
+ */
1349
1615
  conversationId?: string;
1350
1616
  /**
1351
1617
  * @description Event Name
1352
1618
  * @enum {string}
1353
1619
  */
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) */
1620
+ 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" | "assistant_message-submitted exit_to_human" | "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" | "user-created" | "exit_to_human-completed";
1621
+ /**
1622
+ * @description A 36 character hash, 5 segments, separated by dashes that uniquely identifies a page view (page-shown event)
1623
+ * @example 1a1a1a1a-1a1a-1a1a-1a1a-1a1a1a1a1a1a
1624
+ */
1356
1625
  pageviewId: string;
1357
1626
  /** @description The device screen height in pixels - window.screen.height in JS. This is a user level property that should never change. */
1358
1627
  screenHeight?: number;
@@ -1624,7 +1893,7 @@ declare class Client {
1624
1893
  content: {
1625
1894
  "application/json": {
1626
1895
  additionalProperties?: {
1627
- session_id?: string;
1896
+ session_id?: string | null;
1628
1897
  user_id?: string;
1629
1898
  event_at?: string;
1630
1899
  url?: string;
@@ -1634,9 +1903,12 @@ declare class Client {
1634
1903
  event_id?: string;
1635
1904
  event_name?: string;
1636
1905
  pageview_id?: string;
1906
+ web_analytics_platform_user_id?: string | null;
1637
1907
  screen_width?: number;
1638
1908
  screen_height?: number;
1639
1909
  screen_size?: string;
1910
+ entry_point_type?: string;
1911
+ browser_session_id?: string | null;
1640
1912
  service?: string;
1641
1913
  service_versions?: Record<string, never>;
1642
1914
  environment?: string;
@@ -1652,10 +1924,12 @@ declare class Client {
1652
1924
  is_user_message_guardrailed?: boolean;
1653
1925
  guardrails?: unknown[];
1654
1926
  is_pre_output_guardrail_checks?: boolean;
1927
+ conversation_stage?: string | null;
1655
1928
  recommendation_products?: unknown[];
1656
1929
  fallback_text?: string;
1657
1930
  is_allow_free_text_message?: boolean;
1658
1931
  exit_to_chat_reason?: string;
1932
+ exit_destination_type?: string;
1659
1933
  sale_id?: string;
1660
1934
  user_type?: string;
1661
1935
  currency_code?: string;
@@ -1667,17 +1941,18 @@ declare class Client {
1667
1941
  products_sold_media?: unknown[];
1668
1942
  sale_custom_properties_aidem?: Record<string, never>;
1669
1943
  products_sold_aidem?: unknown[];
1944
+ entry_point_click_type?: string | null;
1670
1945
  is_qualified?: boolean;
1671
1946
  qualification_stage?: string;
1672
1947
  is_main_uplift_experiment?: boolean;
1673
1948
  experiment_id?: string;
1674
1949
  experiment_variation_id?: string;
1675
1950
  experiment_variation_name?: string;
1676
- entry_point_type?: string;
1951
+ slots?: unknown[];
1677
1952
  entry_point_closed_reason?: string;
1678
1953
  };
1679
1954
  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";
1955
+ 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" | "assistant_message-submitted exit_to_human" | "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" | "user-created" | "exit_to_human-completed";
1681
1956
  pageviewId: string;
1682
1957
  screenHeight?: number;
1683
1958
  screenSize?: "mobile" | "large";