-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapi.ts
More file actions
1984 lines (1841 loc) · 63.1 KB
/
Copy pathapi.ts
File metadata and controls
1984 lines (1841 loc) · 63.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* tslint:disable */
/* eslint-disable */
/**
* Croct Export
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.8.0
* Contact: apis@croct.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from './configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from './common';
import type { RequestArgs } from './base';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
/**
* An operation to add a value into an array, map or property.
*/
export interface AddOperation {
/**
* The discriminator identifying the operation.
*/
'type': AddOperationTypeEnum;
/**
* The path where to add the value.
*/
'path': string;
/**
* The value to add. Can be any JSON value.
*/
'value': any;
}
export const AddOperationTypeEnum = {
ADD: 'add',
} as const;
export type AddOperationTypeEnum = typeof AddOperationTypeEnum[keyof typeof AddOperationTypeEnum];
export interface ApiProblem {
[key: string]: any;
'title': string;
'type': string;
'details'?: string;
}
/**
* A sequence of operations to apply atomically to a target value.
*/
export interface AtomicPatch {
/**
* The list of operations to be applied atomically.
*/
'operations': Array<AtomicPatchOperationsInner>;
}
/**
* @type AtomicPatchOperationsInner
*/
export type AtomicPatchOperationsInner = { type: 'add' } & AddOperation | { type: 'clear' } & ClearOperation | { type: 'combine' } & CombineOperation | { type: 'decrement' } & DecrementOperation | { type: 'increment' } & IncrementOperation | { type: 'merge' } & MergeOperation | { type: 'remove' } & RemoveOperation | { type: 'set' } & SetOperation | { type: 'unset' } & UnsetOperation;
/**
* The information about an audience.
*/
export interface Audience {
/**
* The ID that uniquely identifies the audience.
*/
'id': string;
/**
* The name of the audience.
*/
'name'?: string | null;
/**
* The custom ID of the audience.
*/
'customId'?: string | null;
}
export interface AudienceMatched extends EventPayload {
'audiences'?: Array<Audience>;
}
/**
* The available information about a browser.
*/
export interface Browser {
/**
* The name of the browser, non-empty. For example, \"Chrome\".
*/
'name': string | null;
/**
* The version of the browser, non-empty. For example, \"79.0.3945.130\", \"11\" or \"160.1\".
*/
'version': string | null;
'type': BrowserType;
}
/**
* The type of the browser.
*/
export const BrowserType = {
WEB: 'WEB',
IN_APP: 'IN_APP',
CRAWLER: 'CRAWLER',
OTHER: 'OTHER',
UNKNOWN: 'UNKNOWN',
} as const;
export type BrowserType = typeof BrowserType[keyof typeof BrowserType];
export interface Campaign {
/**
* The product promotion or strategic campaign. For example, \"super_promo\".
*/
'name'?: string | null;
/**
* The advertiser that sent traffic to the application. For example, \"newsletter4\".
*/
'source'?: string | null;
/**
* The advertising or marketing medium. For example, \"email\".
*/
'medium'?: string | null;
/**
* The specific content item related the campaign. For example, \"Buy now!\".
*/
'content'?: string | null;
/**
* The search keywords. Foe example, \"web personalization\"
*/
'term'?: string | null;
}
export interface CampaignDetected extends EventPayload {
'campaign': Campaign;
}
/**
* A shopping cart in an online store.
*/
export interface Cart {
/**
* The currency in which the monetary values are expressed in the shopping cart. The currency should be specified using the 3-letter currency codes defined by the ISO 4217 standard. For currencies having no official recognition in ISO 4217, as is the case with cryptocurrencies, it is allowed the use of non-ISO codes adopted locally or commercially. For example, \"BRL\" for Brazilian real or \"BTC\" for Bitcoin.
*/
'currency': string;
/**
* The list of items in the shopping cart.
*/
'items': Array<CartItem>;
/**
* The total of all items and quantities in the shopping cart including applied item promotions. Applied order discounts, estimated shipping, and applied shipping discounts should be excluded from the subtotal amount.
*/
'subtotal': number | null;
/**
* The total shipping price for the items in the shopping cart, including any handling charges.
*/
'shippingPrice': number | null;
/**
* The taxes associated with the transaction.
*/
'taxes': object | null;
/**
* The costs associated with the transaction, such as manufacturing costs, shipping expenses not borne by the customer, or any other costs.
*/
'costs': object | null;
/**
* The amount of the discount applied to the shopping cart.
*/
'discount': number | null;
/**
* The total revenue or grand total associated with the transaction. It includes shipping, tax, and any other adjustment.
*/
'total': number;
/**
* The coupon applied to the shopping cart. For example, \"SUPER_DEALS\".
*/
'coupon': string | null;
/**
* The timestamp when the shopping cart was last updated, in milliseconds since epoch.
*/
'lastUpdateTime': number;
}
export interface CartAbandoned extends EventPayload {
'cart': Cart;
}
/**
* An item in a shopping cart.
*/
export interface CartItem {
/**
* The index, starting from zero, representing the order in which the item was added to the shopping cart.
*/
'index': number;
'product': ProductDetails;
/**
* The number of units of the item in the shopping cart.
*/
'quantity': number;
/**
* The total for the item. It includes discounts and any other adjustment.
*/
'total': number;
/**
* The amount of the discount applied to the item.
*/
'discount': number | null;
/**
* The coupon applied to the item. For example, \"SUPER_DEALS\".
*/
'coupon': string | null;
}
export interface CartModified extends EventPayload {
'cart': Cart;
}
export interface CartViewed extends EventPayload {
'cart': Cart;
}
export interface CheckoutStarted extends EventPayload {
'cart': Cart;
/**
* The ID that uniquely identifies the order across the store.
*/
'orderId': string | null;
}
/**
* An operation to clear the content of an array, map or property.
*/
export interface ClearOperation {
/**
* The discriminator identifying the operation.
*/
'type': ClearOperationTypeEnum;
/**
* The path where to clear the content.
*/
'path': string;
}
export const ClearOperationTypeEnum = {
CLEAR: 'clear',
} as const;
export type ClearOperationTypeEnum = typeof ClearOperationTypeEnum[keyof typeof ClearOperationTypeEnum];
export interface ClientDetected extends EventPayload {
'client': WebClient;
}
/**
* An operation to combine arrays or maps.
*/
export interface CombineOperation {
/**
* The discriminator identifying the operation.
*/
'type': CombineOperationTypeEnum;
/**
* The path where to combine the values.
*/
'path': string;
/**
* The array or map to combine. Can be any JSON value.
*/
'value': any;
}
export const CombineOperationTypeEnum = {
COMBINE: 'combine',
} as const;
export type CombineOperationTypeEnum = typeof CombineOperationTypeEnum[keyof typeof CombineOperationTypeEnum];
/**
* The official currency used in the location.
*/
export interface Currency {
/**
* The common name of the currency. For example, \'US Dollar\'.
*/
'name'?: string | null;
/**
* The currency code. For example, USD.
*/
'code'?: string | null;
}
/**
* An operation to decrement a number.
*/
export interface DecrementOperation {
/**
* The discriminator identifying the operation.
*/
'type': DecrementOperationTypeEnum;
/**
* The path where to decrement the value.
*/
'path': string;
/**
* The amount to decrement. Can be any JSON value.
*/
'value': any;
}
export const DecrementOperationTypeEnum = {
DECREMENT: 'decrement',
} as const;
export type DecrementOperationTypeEnum = typeof DecrementOperationTypeEnum[keyof typeof DecrementOperationTypeEnum];
/**
* The available information about a device.
*/
export interface Device {
/**
* The name of the device, non-empty. For example, \"Mac\", \"iPhone\" or \"Nexus 10\".
*/
'name': string | null;
/**
* The vendor of the device, non-empty. For example, \"Apple\", \"Samsung\" or \"LG\".
*/
'vendor': string | null;
'category': DeviceCategory;
'operatingSystem': OperatingSystem;
}
/**
* The category of the device.
*/
export const DeviceCategory = {
DESKTOP: 'DESKTOP',
TABLET: 'TABLET',
MOBILE: 'MOBILE',
BOT: 'BOT',
OTHER: 'OTHER',
UNKNOWN: 'UNKNOWN',
} as const;
export type DeviceCategory = typeof DeviceCategory[keyof typeof DeviceCategory];
export interface Event {
/**
* The unique identifier of the event.
*/
'eventId': string;
/**
* The ID of the session assigned to the event.
*/
'sessionId': string;
/**
* The internal ID of the user who originated the event.
*/
'userId': string;
/**
* The timestamp when the event was tracked, in milliseconds since epoch.
*/
'timestamp': number;
/**
* The timestamp when the event was ingested by the system, in milliseconds since epoch.
*/
'systemTimestamp': number;
'context': EventContext | null;
'payload': EventPayload;
}
/**
* The context of the client when the event was tracked.
*/
export interface EventContext {
'type': string;
'metadata'?: { [key: string]: string | undefined; };
}
export interface EventOccurred extends EventPayload {
/**
* The name of the event. For example, \"pollAnswered\" or \"onboardingStarted\".
*/
'name': string;
/**
* The details about the event.
*/
'details': object;
}
/**
* The event details, specific to the type of event.
*/
export interface EventPayload {
'type': string;
}
export interface EventResponse {
'items': Array<Event>;
'metadata': EventResponseMetadata;
'nextCursor': string;
}
export interface EventResponseMetadata {
'organizationName': string;
'organizationSlug': string;
'workspaceName': string;
'workspaceSlug': string;
'applicationName': string;
'applicationSlug': string;
}
export const EventType = {
USER_SIGNED_UP: 'userSignedUp',
USER_SIGNED_IN: 'userSignedIn',
USER_SIGNED_OUT: 'userSignedOut',
TAB_OPENED: 'tabOpened',
TAB_URL_CHANGED: 'tabUrlChanged',
TAB_VISIBILITY_CHANGED: 'tabVisibilityChanged',
LOCATION_DETECTED: 'locationDetected',
CLIENT_DETECTED: 'clientDetected',
PAGE_OPENED: 'pageOpened',
PAGE_LOADED: 'pageLoaded',
PRODUCT_ABANDONED: 'productAbandoned',
PRODUCT_VIEWED: 'productViewed',
CART_ABANDONED: 'cartAbandoned',
CART_VIEWED: 'cartViewed',
CART_MODIFIED: 'cartModified',
CHECKOUT_STARTED: 'checkoutStarted',
ORDER_PLACED: 'orderPlaced',
NOTHING_CHANGED: 'nothingChanged',
GOAL_COMPLETED: 'goalCompleted',
EVENT_OCCURRED: 'eventOccurred',
SLOT_PERSONALIZED: 'slotPersonalized',
LEAD_GENERATED: 'leadGenerated',
AUDIENCE_MATCHED: 'audienceMatched',
USER_CLICKED: 'userClicked',
USER_SCROLLED: 'userScrolled',
SESSION_MERGED: 'sessionMerged',
SESSION_CLOSED: 'sessionClosed',
SESSION_STARTED: 'sessionStarted',
POST_VIEWED: 'postViewed',
USER_PROFILE_CHANGED: 'userProfileChanged',
CAMPAIGN_DETECTED: 'campaignDetected',
SESSION_ATTRIBUTES_CHANGED: 'sessionAttributesChanged',
PRODUCT_ORDERED: 'productOrdered',
INTEREST_SHOWN: 'interestShown',
LINK_OPENED: 'linkOpened',
} as const;
export type EventType = typeof EventType[keyof typeof EventType];
/**
* A geographic location represented by a latitude and longitude coordinates pair.
*/
export interface GeoPoint {
/**
* The latitude of the geo-point, may be either negative or positive.
*/
'latitude': number;
/**
* The longitude of the geo-point, may be either negative or positive.
*/
'longitude': number;
}
export interface GoalCompleted extends EventPayload {
/**
* The ID of the goal.
*/
'goalId': string;
/**
* The monetary value associated to the completion of the goal. This can represent an estimated value or a symbolic value. For example, if the sales team can close 10% of people who sign up for a newsletter, and the average transaction is $500, then a possible value for newsletter sign-ups can be $50 (i.e., 10% of $500).
*/
'value': number | null;
/**
* The currency in which the monetary value is expressed. The currency should be specified using the 3-letter currency codes defined by the ISO 4217 standard. For currencies having no official recognition in ISO 4217, as is the case with cryptocurrencies, it is allowed the use of non-ISO codes adopted locally or commercially. For example, \"BRL\" for Brazilian real or \"BTC\" for Bitcoin.
*/
'currency': string | null;
}
/**
* An operation to increment a number.
*/
export interface IncrementOperation {
/**
* The discriminator identifying the operation.
*/
'type': IncrementOperationTypeEnum;
/**
* The path where to increment the value.
*/
'path': string;
/**
* The amount to increment. Can be any JSON value.
*/
'value': any;
}
export const IncrementOperationTypeEnum = {
INCREMENT: 'increment',
} as const;
export type IncrementOperationTypeEnum = typeof IncrementOperationTypeEnum[keyof typeof IncrementOperationTypeEnum];
export interface InterestShown extends EventPayload {
/**
* The set of interests. For example, [\"music\", \"movies\"].
*/
'interests': Array<string>;
}
export interface LeadGenerated extends EventPayload {
/**
* An identifier supplied by the application to uniquely identify the lead.
*/
'leadId'?: string;
/**
* The currency in which the lead value is accounted.
*/
'currency'?: string;
/**
* The total value associated with the lead.
*/
'value'?: number;
'patch'?: AtomicPatch;
}
export interface LinkOpened extends EventPayload {
/**
* The URI of the link. For example, \"https://croct.com/blog/awesome-post\".
*/
'link'?: string;
}
/**
* An identification or estimation of a geographic location of an object.
*/
export interface Location {
'continent': LocationContinent | null;
/**
* The highest administrative division, also known as a nation. The value is a two-letter country code, as defined in ISO 3166. For example, US for United States, BR for Brazil and DE for Germany.
*/
'country': string | null;
'region': Region;
/**
* The name of the incorporated city or town political entity. For example, \"Sao Paulo\".
*/
'city': string | null;
/**
* An administrative division smaller than a city and larger than a neighborhood. For example, the district of Manhattan in New York.
*/
'district': string | null;
/**
* The time-zone ID as defined in IANA Time Zone Database. For example, \"America/New_York\".
*/
'timeZone': string | null;
'coordinates': GeoPoint | null;
'currency'?: Currency | null;
/**
* The international dialing code for this location. For example, \'+1\' or \'+55\'.
*/
'phoneCode'?: string | null;
/**
* The approximate number of people living within the borders of the represented location.
*/
'population'?: number | null;
/**
* The general postal code for the location, such as a starting range, but it may also represent another relevant code for the area. For example, \'12345-678\'.
*/
'postalCode'?: string | null;
/**
* A list of locales following the ISO 639-1 and ISO 3166-1 standards, representing the languages spoken in the location, ordered from the most spoken to the least spoken. For example, \'pt-br\' or \'en-us\'.
*/
'languages'?: Array<string>;
/**
* A list of tags addressing different aspects of a location. For example, \'beach\' or \'ocean\'.
*/
'tags'?: Array<string>;
'source': LocationSource | null;
}
/**
* The continent of the location.
*/
export const LocationContinent = {
AF: 'AF',
AN: 'AN',
AS: 'AS',
EU: 'EU',
NA: 'NA',
OC: 'OC',
SA: 'SA',
} as const;
export type LocationContinent = typeof LocationContinent[keyof typeof LocationContinent];
export interface LocationDetected extends EventPayload {
'location': Location;
}
/**
* The source of information used to determine the location.
*/
export const LocationSource = {
UNKNOWN: 'UNKNOWN',
IP: 'IP',
INPUT: 'INPUT',
BROWSER: 'BROWSER',
GPS: 'GPS',
} as const;
export type LocationSource = typeof LocationSource[keyof typeof LocationSource];
/**
* An operation to merge arrays or maps.
*/
export interface MergeOperation {
/**
* The discriminator identifying the operation.
*/
'type': MergeOperationTypeEnum;
/**
* The path where to merge the values.
*/
'path': string;
/**
* The array or map to merge. Can be any JSON value.
*/
'value': any;
}
export const MergeOperationTypeEnum = {
MERGE: 'merge',
} as const;
export type MergeOperationTypeEnum = typeof MergeOperationTypeEnum[keyof typeof MergeOperationTypeEnum];
export interface NothingChanged extends EventPayload {
/**
* The timestamp when an activity was last observed, in milliseconds since epoch.
*/
'sinceTime': number;
}
/**
* The available information about an operating system.
*/
export interface OperatingSystem {
/**
* The name of the operating system, non-empty. For example, \"macOS\", \"iOS\" or \"Android\".
*/
'name': string | null;
/**
* The version of operating system, non-empty. For example, \"10.15.1\", \"NT 5.1\" or \"8.4\".
*/
'version': string | null;
}
/**
* An order placed in an online store.
*/
export interface Order {
/**
* The ID that uniquely identifies the order across the store.
*/
'orderId': string;
/**
* The currency in which the monetary values are expressed in the order. The currency should be specified using the 3-letter currency codes defined by the ISO 4217 standard. For currencies having no official recognition in ISO 4217, as is the case with cryptocurrencies, it is allowed the use of non-ISO codes adopted locally or commercially. For example, \"BRL\" for Brazilian real or \"BTC\" for Bitcoin.
*/
'currency': string;
/**
* The list of items in the order.
*/
'items': Array<OrderItem>;
/**
* The total of all items and quantities in the order including applied item promotions. Applied order discounts, estimated shipping, and applied shipping discounts should be excluded from the subtotal amount.
*/
'subtotal': number | null;
/**
* The total shipping price for the order, including any handling charges.
*/
'shippingPrice': number | null;
/**
* The taxes associated with the transaction.
*/
'taxes': object | null;
/**
* The costs associated with the transaction, such as manufacturing costs, shipping expenses not borne by the customer, or any other costs.
*/
'costs': object | null;
/**
* The amount of the discount applied to the order.
*/
'discount': number | null;
/**
* The total revenue or grand total associated with the transaction. It includes shipping, tax, and any other adjustment.
*/
'total': number;
/**
* The coupon applied to the order. For example, \"SUPER_DEALS\".
*/
'coupon': string | null;
/**
* The payment method used in the payment. For example, \"Credit Card\", \"Paypal\" or \"Wallet\".
*/
'paymentMethod': string | null;
/**
* The number of installments of the transaction, non-negative.
*/
'installments': number | null;
'status': OrderStatus | null;
}
/**
* An item of an order.
*/
export interface OrderItem {
/**
* The index, starting from zero, representing the order in which the item was added to the shopping cart.
*/
'index': number;
'product': ProductDetails;
/**
* The number of units of the item ordered.
*/
'quantity': number;
/**
* The total for the item. It includes discounts and any other adjustment.
*/
'total': number;
/**
* The amount of the discount applied to the item.
*/
'discount': number | null;
/**
* The coupon applied to the item. For example, \"SUPER_DEALS\".
*/
'coupon': string | null;
}
export interface OrderPlaced extends EventPayload {
'order': Order;
}
/**
* The current status of the order.
*/
export const OrderStatus = {
PLACED: 'PLACED',
PAID: 'PAID',
COMPLETED: 'COMPLETED',
} as const;
export type OrderStatus = typeof OrderStatus[keyof typeof OrderStatus];
/**
* The details of an order.
*/
export interface OrderSummary {
/**
* The ID that uniquely identifies the order across the store.
*/
'orderId': string;
/**
* The currency in which the monetary values are expressed in the order.
*/
'currency': string;
/**
* The quantity of items in the order.
*/
'quantity': number;
/**
* The total of all items and quantities in the order including applied item promotions.
*/
'subtotal'?: number | null;
/**
* The total shipping price for the order, including any handling charges.
*/
'shippingPrice'?: number | null;
/**
* The taxes associated with the transaction.
*/
'taxes': object | null;
/**
* The costs associated with the transaction, such as manufacturing costs, shipping expenses not borne by the customer, or any other costs.
*/
'costs': object | null;
/**
* The amount of the discount applied to the order.
*/
'discount'?: number | null;
/**
* The total revenue or grand total associated with the transaction. It includes shipping, tax, and any other adjustment.
*/
'total': number | null;
/**
* The coupon applied to the order. For example, \\\"SUPER_DEALS\\\".
*/
'coupon'?: string | null;
/**
* The payment method used in the payment. For example, \\\"Credit Card\\\".
*/
'paymentMethod'?: string | null;
/**
* The number of installments of the transaction, non-negative.
*/
'installments'?: number | null;
'status'?: OrderStatus | null;
}
export interface PageLoaded extends EventPayload {
/**
* The URL of the page.
*/
'url': string;
/**
* The title of the page.
*/
'title': string;
/**
* The last time the page was modified.
*/
'lastModifiedTime': number;
}
export interface PageOpened extends EventPayload {
/**
* The URL of the page.
*/
'url': string;
/**
* The user-agent of the client.
*/
'userAgent': string | null;
/**
* An ordered list of the user\'s preferred languages.
*/
'preferredLanguages': string | null;
/**
* The URI of the page that linked to the page that was opened. The value is null when the user navigated to the page directly (not through a link, but by using a bookmark, for example).
*/
'referrer': string | null;
}
/**
* A position in a two-dimensional space.
*/
export interface Point {
/**
* The horizontal position in pixels.
*/
'x': number;
/**
* The vertical position in pixels.
*/
'y': number;
}
/**
* The detailed information of a post.
*/
export interface PostDetails {
/**
* The ID that uniquely identifies the post.
*/
'postId': string;
/**
* The URL of the post page.
*/
'url'?: string | null;
/**
* The title of the post, non-empty.
*/
'title': string;
/**
* The set of post tags.
*/
'tags'?: Array<string> | null;
/**
* The categories the post belongs to.
*/
'categories'?: Array<string> | null;
/**
* The authors of the post.
*/
'authors'?: Array<string | null>;
/**
* The timestamp of the post publication, in milliseconds since epoch.
*/
'publishTime': number;
/**
* The timestamp of the post\'s last update, in milliseconds since epoch.
*/
'updateTime'?: number | null;
}
export interface PostViewed extends EventPayload {
'post': PostDetails;
}
export interface ProductAbandoned extends EventPayload {
'cartItem': CartItem;
'cart': Cart;
}
/**
* The detailed information of a product.
*/
export interface ProductDetails {
/**
* The ID that uniquely identifies the product across the store, non-empty. For example, \"3108\" or \"yO7q4r\".
*/
'productId': string;
/**
* The code that uniquely identifies the product variant across the store, non-empty. For example, \"IPH-GRE-64\".
*/
'sku': string | null;
/**
* The name of the product, non-empty. For example \"iPhone\".
*/
'name': string;
/**
* The category of the product, non-empty. For example, \"Phone\".
*/
'category': string | null;
/**
* The brand associated with the product. For example, \"Apple\".
*/
'brand': string | null;
/**
* The variant of the product, such as size, color and style. For example, \"64GB Green\".
*/
'variant': string | null;
/**
* The price of the product displayed in the store. For example, 59.90.
*/
'displayPrice': number;
/**
* The original price of the product. For example, 99.90.
*/
'originalPrice': number | null;
/**
* The currency in which the monetary values are expressed in the shopping cart.
*/
'currency'?: string | null;
/**
* The URL of the product page. For example, \"https://apple.com/iphone\".
*/
'url': string | null;
/**
* The URL of the main product image. For example, \"https://img.apple.com/iphone.png\".
*/
'imageUrl': string | null;
}
export interface ProductOrdered extends EventPayload {
'order': OrderSummary;
'item': OrderItem;
}
export interface ProductViewed extends EventPayload {
'product': ProductDetails;
}
/**
* A subsection of a country, typically a state or province.
*/
export interface Region {
/**
* The subdivision name, non-empty. For example, \"Sao Paulo\".
*/
'name': string | null;
/**
* The 2-letter code as defined by the ISO 3166-2 standard. For example, \"SP\".
*/
'code': string | null;
}
/**
* An operation to remove a value from an array.
*/
export interface RemoveOperation {
/**
* The discriminator identifying the operation.
*/
'type': RemoveOperationTypeEnum;
/**
* The path where to remove the content.
*/
'path': string;
/**
* The value to remove. Can be any JSON value.
*/
'value': any;
}
export const RemoveOperationTypeEnum = {
REMOVE: 'remove',
} as const;
export type RemoveOperationTypeEnum = typeof RemoveOperationTypeEnum[keyof typeof RemoveOperationTypeEnum];
export interface Session {
/**
* The ID that uniquely identifies the session across the application.
*/
'sessionId'?: string;
/**
* The ID that uniquely identifies the user across the workspace.
*/