@capibox/bridge-server 0.0.86 → 0.0.90

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
@@ -945,6 +945,8 @@ interface components {
945
945
  [key: string]: unknown;
946
946
  };
947
947
  country: string;
948
+ /** @description Address state, e.g. 'California', 'Texas', 'New York', etc. */
949
+ state: string;
948
950
  createdAt: string;
949
951
  ip: string;
950
952
  isEu: boolean;
@@ -983,6 +985,55 @@ interface components {
983
985
  [key: string]: unknown;
984
986
  };
985
987
  };
988
+ SessionResponseV2Dto: {
989
+ id: string;
990
+ project: string;
991
+ /** @example {
992
+ * "session_id": "1234567890",
993
+ * "session_token": "1234567890"
994
+ * } */
995
+ cookies: {
996
+ [key: string]: unknown;
997
+ };
998
+ country: string;
999
+ /** @description Address state, e.g. 'California', 'Texas', 'New York', etc. */
1000
+ state: string;
1001
+ createdAt: string;
1002
+ ip: string;
1003
+ isEu: boolean;
1004
+ /** @example https://www.example.com */
1005
+ origin: string;
1006
+ /** @example {
1007
+ * "utm_source": "google",
1008
+ * "utm_medium": "cpc",
1009
+ * "utm_campaign": "adwords"
1010
+ * } */
1011
+ query: {
1012
+ [key: string]: unknown;
1013
+ };
1014
+ /** @example https://www.example.com */
1015
+ referer: string;
1016
+ /** @example main/a */
1017
+ slug: string;
1018
+ updatedAt: string;
1019
+ /** @example Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 */
1020
+ useragent: string;
1021
+ /** @example {
1022
+ * "language": "en",
1023
+ * "currency": "USD",
1024
+ * "email": "xxx@example.com"
1025
+ * } */
1026
+ extraData: {
1027
+ [key: string]: unknown;
1028
+ };
1029
+ currency: string;
1030
+ email: string;
1031
+ countryCode: string;
1032
+ };
1033
+ SessionResponseV2FullDto: {
1034
+ success: number;
1035
+ data: components["schemas"]["SessionResponseV2Dto"];
1036
+ };
986
1037
  SessionResponseCurrencyInfo: {
987
1038
  /**
988
1039
  * @description Currency code (ISO 4217)
@@ -1779,10 +1830,15 @@ interface components {
1779
1830
  updatedAt: string;
1780
1831
  };
1781
1832
  BadRequestErrorDto: {
1833
+ /** @example [
1834
+ * "property should not exist",
1835
+ * "page must be a number conforming to the specified constraints"
1836
+ * ] */
1837
+ message: Record<string, never>;
1838
+ /** @example Bad Request */
1839
+ error: string;
1782
1840
  /** @example 400 */
1783
1841
  statusCode: number;
1784
- message: string[];
1785
- error: string;
1786
1842
  };
1787
1843
  DisputeResponseDto: {
1788
1844
  /** @example PP-D-12345 */
@@ -6407,42 +6463,146 @@ interface components {
6407
6463
  */
6408
6464
  delay: number;
6409
6465
  };
6410
- FbCapiCreatePixelDto: {
6411
- /** @description Title (just for UI purposes) */
6466
+ SnapchatCapiCreatePixelDto: {
6467
+ /**
6468
+ * @description Title of the Facebook Pixel
6469
+ * @example My Website Pixel
6470
+ */
6471
+ title: string;
6472
+ /**
6473
+ * @description Unique Pixel ID provided by Facebook
6474
+ * @example 1234567890
6475
+ */
6476
+ pixel: string;
6477
+ /**
6478
+ * @description Access token for Facebook API
6479
+ * @example EAAGm0PX4ZCpsBAKZCZCZA...
6480
+ */
6481
+ token: string;
6482
+ /**
6483
+ * @description Project identifier this pixel belongs to
6484
+ * @example project-001
6485
+ */
6486
+ project: string;
6487
+ /**
6488
+ * @description Indicates if the pixel is active
6489
+ * @example true
6490
+ */
6491
+ active: boolean;
6492
+ };
6493
+ SnapchatCapiSinglePixelResponseDto: {
6494
+ /**
6495
+ * @description Unique identifier of the pixel record
6496
+ * @example 1
6497
+ */
6498
+ id: number;
6499
+ /**
6500
+ * @description Title of the Facebook Pixel
6501
+ * @example My Website Pixel
6502
+ */
6412
6503
  title: string;
6413
- /** @description Facebook Pixel ID */
6504
+ /**
6505
+ * @description Unique Pixel ID provided by Facebook
6506
+ * @example 1234567890
6507
+ */
6414
6508
  pixel: string;
6415
- /** @description Facebook Pixel Token */
6509
+ /**
6510
+ * @description Access token for Facebook API
6511
+ * @example EAAGm0PX4ZCpsBAKZCZCZA...
6512
+ */
6416
6513
  token: string;
6417
- /** @description Project */
6514
+ /**
6515
+ * @description Project identifier this pixel belongs to
6516
+ * @example project-001
6517
+ */
6418
6518
  project: string;
6419
- /** @description Active */
6519
+ /**
6520
+ * @description Indicates if the pixel is active
6521
+ * @example true
6522
+ */
6420
6523
  active: boolean;
6421
6524
  };
6422
- FbCapiPixelResponseDto: {
6423
- /** @description Unique Record ID */
6525
+ SnapchatCapiPixelDto: {
6526
+ /**
6527
+ * @description Unique identifier of the pixel record
6528
+ * @example 1
6529
+ */
6424
6530
  id: number;
6425
- /** @description Title (just for UI purposes) */
6531
+ /**
6532
+ * @description Display title for the pixel
6533
+ * @example My Facebook Pixel
6534
+ */
6426
6535
  title: string;
6427
- /** @description Facebook Pixel ID */
6536
+ /**
6537
+ * @description Facebook Pixel ID
6538
+ * @example 1234567890
6539
+ */
6428
6540
  pixel: string;
6429
- /** @description Facebook Pixel Token */
6541
+ /**
6542
+ * @description Access token associated with the pixel
6543
+ * @example EAABsb...token
6544
+ */
6430
6545
  token: string;
6431
- /** @description Project */
6546
+ /**
6547
+ * @description Project identifier this pixel belongs to
6548
+ * @example my-project
6549
+ */
6432
6550
  project: string;
6433
- /** @description Active */
6551
+ /**
6552
+ * @description Whether the pixel is currently active
6553
+ * @example true
6554
+ */
6434
6555
  active: boolean;
6435
6556
  };
6436
- FbCapiUpdatePixelDto: {
6437
- /** @description Title (just for UI purposes) */
6557
+ SnapchatCapiPixelResponseDto: {
6558
+ /** @description List of pixel records */
6559
+ data: components["schemas"]["SnapchatCapiPixelDto"][];
6560
+ /**
6561
+ * @description Total number of items available
6562
+ * @example 50
6563
+ */
6564
+ total: number;
6565
+ /**
6566
+ * @description Current page number
6567
+ * @example 1
6568
+ */
6569
+ page: number;
6570
+ /**
6571
+ * @description Number of items per page
6572
+ * @example 10
6573
+ */
6574
+ limit: number;
6575
+ /**
6576
+ * @description Total number of pages
6577
+ * @example 5
6578
+ */
6579
+ totalPages: number;
6580
+ };
6581
+ SnapchatCapiUpdatePixelDto: {
6582
+ /**
6583
+ * @description Title of the Facebook Pixel
6584
+ * @example Updated Pixel Title
6585
+ */
6438
6586
  title?: string;
6439
- /** @description Facebook Pixel ID */
6587
+ /**
6588
+ * @description Unique Pixel ID provided by Facebook
6589
+ * @example 0987654321
6590
+ */
6440
6591
  pixel?: string;
6441
- /** @description Facebook Pixel Token */
6592
+ /**
6593
+ * @description Access token for Facebook API
6594
+ * @example EAAGm0PX4ZCpsBAKZCZCZA...
6595
+ */
6442
6596
  token?: string;
6443
- /** @description Project */
6597
+ /**
6598
+ * @description Project identifier this pixel belongs to
6599
+ * @example project-002
6600
+ */
6444
6601
  project?: string;
6445
- /** @description Active */
6602
+ /**
6603
+ * @description Indicates if the pixel is active
6604
+ * @example false
6605
+ */
6446
6606
  active?: boolean;
6447
6607
  };
6448
6608
  Event: Record<string, never>;
@@ -6506,124 +6666,204 @@ interface components {
6506
6666
  /** @description Response data */
6507
6667
  response?: Record<string, never>;
6508
6668
  };
6509
- FacebookCapiPixelPaginatedResponseDto: {
6510
- /** @description Array of data items for the current page */
6511
- data: components["schemas"]["FbCapiPixelResponseDto"][];
6669
+ FBCapiCreatePixelDto: {
6512
6670
  /**
6513
- * @description Total number of items across all pages
6514
- * @example 100
6671
+ * @description Title of the Facebook Pixel
6672
+ * @example My Website Pixel
6515
6673
  */
6516
- total: number;
6674
+ title: string;
6517
6675
  /**
6518
- * @description Current page number
6519
- * @example 1
6676
+ * @description Unique Pixel ID provided by Facebook
6677
+ * @example 1234567890
6520
6678
  */
6521
- page: number;
6679
+ pixel: string;
6522
6680
  /**
6523
- * @description Number of items per page
6524
- * @example 10
6681
+ * @description Access token for Facebook API
6682
+ * @example EAAGm0PX4ZCpsBAKZCZCZA...
6525
6683
  */
6526
- limit: number;
6684
+ token: string;
6527
6685
  /**
6528
- * @description Total number of pages
6529
- * @example 10
6686
+ * @description Project identifier this pixel belongs to
6687
+ * @example project-001
6530
6688
  */
6531
- totalPages: number;
6532
- };
6533
- FbCapiEventResponseDto: {
6534
- /** @description Unique Record ID */
6535
- id: number;
6689
+ project: string;
6536
6690
  /**
6537
- * Format: date-time
6538
- * @description Created At
6691
+ * @description Indicates if the pixel is active
6692
+ * @example true
6539
6693
  */
6540
- createdAt: string;
6541
- /** @description Pixel ID */
6542
- pixel: number;
6543
- /** @description Event name */
6544
- event: string;
6545
- /** @description Request data */
6546
- request: {
6547
- [key: string]: unknown;
6548
- };
6549
- /** @description Response data */
6550
- response: {
6551
- [key: string]: unknown;
6552
- };
6694
+ active: boolean;
6553
6695
  };
6554
- FbCapiEventFullResponseDto: {
6555
- /** @description The list events */
6556
- data: components["schemas"]["FbCapiEventResponseDto"][];
6696
+ FBCapiSinglePixelResponseDto: {
6557
6697
  /**
6558
- * @description The total number of order items
6559
- * @example 25
6560
- */
6561
- total: number;
6562
- /**
6563
- * @description The current page number
6698
+ * @description Unique identifier of the pixel record
6564
6699
  * @example 1
6565
6700
  */
6566
- page: number;
6701
+ id: number;
6567
6702
  /**
6568
- * @description The number of order items per page
6569
- * @example 10
6703
+ * @description Title of the Facebook Pixel
6704
+ * @example My Website Pixel
6570
6705
  */
6571
- limit: number;
6706
+ title: string;
6572
6707
  /**
6573
- * @description The total number of pages available
6574
- * @example 3
6708
+ * @description Unique Pixel ID provided by Facebook
6709
+ * @example 1234567890
6575
6710
  */
6576
- totalPages: number;
6577
- };
6578
- FacebookCapiPixelDto: {
6579
- /** @example 1234567890123456 */
6580
- pixelId: string;
6581
- /** @description Facebook CAPI Access Token */
6582
- accessToken: string;
6583
- };
6584
- FacebookCapiClientDataDto: {
6711
+ pixel: string;
6585
6712
  /**
6586
- * @description The user's email address.
6587
- * @example joe@example.com
6713
+ * @description Access token for Facebook API
6714
+ * @example EAAGm0PX4ZCpsBAKZCZCZA...
6588
6715
  */
6589
- email: string;
6716
+ token: string;
6590
6717
  /**
6591
- * @description The user's IP address.
6592
- * @example 123.123.123.123
6718
+ * @description Project identifier this pixel belongs to
6719
+ * @example project-001
6593
6720
  */
6594
- ip: string;
6721
+ project: string;
6595
6722
  /**
6596
- * @description The user's browser user agent string.
6597
- * @example Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...
6723
+ * @description Indicates if the pixel is active
6724
+ * @example true
6598
6725
  */
6599
- userAgent: string;
6726
+ active: boolean;
6727
+ };
6728
+ FBCapiPixelDto: {
6600
6729
  /**
6601
- * @description The Facebook click ID.
6602
- * @example fb.1.1554763741205.AbCdEfGhIjKlMnOp
6730
+ * @description Unique identifier of the pixel record
6731
+ * @example 1
6603
6732
  */
6604
- fbc: string;
6733
+ id: number;
6605
6734
  /**
6606
- * @description The Facebook browser ID.
6607
- * @example fb.1.1558571054389.1098115397
6735
+ * @description Display title for the pixel
6736
+ * @example My Facebook Pixel
6608
6737
  */
6609
- fbp: string;
6738
+ title: string;
6610
6739
  /**
6611
- * @description The user country.
6612
- * @example US
6740
+ * @description Facebook Pixel ID
6741
+ * @example 1234567890
6613
6742
  */
6614
- country?: string;
6743
+ pixel: string;
6615
6744
  /**
6616
- * @description The user state.
6617
- * @example DE
6745
+ * @description Access token associated with the pixel
6746
+ * @example EAABsb...token
6618
6747
  */
6619
- state?: string;
6748
+ token: string;
6620
6749
  /**
6621
- * @description The user city.
6622
- * @example Berlin
6750
+ * @description Project identifier this pixel belongs to
6751
+ * @example my-project
6623
6752
  */
6624
- city?: string;
6753
+ project: string;
6625
6754
  /**
6626
- * @description The user zip code.
6755
+ * @description Whether the pixel is currently active
6756
+ * @example true
6757
+ */
6758
+ active: boolean;
6759
+ };
6760
+ FBCapiPixelResponseDto: {
6761
+ /** @description List of pixel records */
6762
+ data: components["schemas"]["FBCapiPixelDto"][];
6763
+ /**
6764
+ * @description Total number of items available
6765
+ * @example 50
6766
+ */
6767
+ total: number;
6768
+ /**
6769
+ * @description Current page number
6770
+ * @example 1
6771
+ */
6772
+ page: number;
6773
+ /**
6774
+ * @description Number of items per page
6775
+ * @example 10
6776
+ */
6777
+ limit: number;
6778
+ /**
6779
+ * @description Total number of pages
6780
+ * @example 5
6781
+ */
6782
+ totalPages: number;
6783
+ };
6784
+ FBCapiUpdatePixelDto: {
6785
+ /**
6786
+ * @description Title of the Facebook Pixel
6787
+ * @example Updated Pixel Title
6788
+ */
6789
+ title?: string;
6790
+ /**
6791
+ * @description Unique Pixel ID provided by Facebook
6792
+ * @example 0987654321
6793
+ */
6794
+ pixel?: string;
6795
+ /**
6796
+ * @description Access token for Facebook API
6797
+ * @example EAAGm0PX4ZCpsBAKZCZCZA...
6798
+ */
6799
+ token?: string;
6800
+ /**
6801
+ * @description Project identifier this pixel belongs to
6802
+ * @example project-002
6803
+ */
6804
+ project?: string;
6805
+ /**
6806
+ * @description Indicates if the pixel is active
6807
+ * @example false
6808
+ */
6809
+ active?: boolean;
6810
+ };
6811
+ FbCapiEventFullResponseDto: {
6812
+ data: components["schemas"]["Event"][];
6813
+ total: number;
6814
+ page: number;
6815
+ limit: number;
6816
+ totalPages: number;
6817
+ };
6818
+ FacebookCapiPixelDto: {
6819
+ /** @example 1234567890123456 */
6820
+ pixelId: string;
6821
+ /** @description Facebook CAPI Access Token */
6822
+ accessToken: string;
6823
+ };
6824
+ FacebookCapiClientDataDto: {
6825
+ /**
6826
+ * @description The user's email address.
6827
+ * @example joe@example.com
6828
+ */
6829
+ email: string;
6830
+ /**
6831
+ * @description The user's IP address.
6832
+ * @example 123.123.123.123
6833
+ */
6834
+ ip: string;
6835
+ /**
6836
+ * @description The user's browser user agent string.
6837
+ * @example Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...
6838
+ */
6839
+ userAgent: string;
6840
+ /**
6841
+ * @description The Facebook click ID.
6842
+ * @example fb.1.1554763741205.AbCdEfGhIjKlMnOp
6843
+ */
6844
+ fbc: string;
6845
+ /**
6846
+ * @description The Facebook browser ID.
6847
+ * @example fb.1.1558571054389.1098115397
6848
+ */
6849
+ fbp: string;
6850
+ /**
6851
+ * @description The user country.
6852
+ * @example US
6853
+ */
6854
+ country?: string;
6855
+ /**
6856
+ * @description The user state.
6857
+ * @example DE
6858
+ */
6859
+ state?: string;
6860
+ /**
6861
+ * @description The user city.
6862
+ * @example Berlin
6863
+ */
6864
+ city?: string;
6865
+ /**
6866
+ * @description The user zip code.
6627
6867
  * @example 19901
6628
6868
  */
6629
6869
  zip?: string;
@@ -6660,44 +6900,83 @@ interface components {
6660
6900
  event: components["schemas"]["FacebookCapiEventDto"];
6661
6901
  postback?: string;
6662
6902
  };
6663
- CreateEventDto: {
6664
- /** @example Viewed Product */
6665
- eventName: string;
6666
- /** @example {
6667
- * "email": "sarah@example.com",
6668
- * "first_name": "Sarah",
6669
- * "last_name": "Connor"
6670
- * } */
6671
- profileAttributes: {
6672
- [key: string]: unknown;
6673
- };
6674
- /** @example {
6675
- * "Brand": "Kids Book",
6676
- * "ProductID": 1111,
6677
- * "ProductName": "Winnie the Pooh"
6678
- * } */
6679
- eventAttributes: {
6680
- [key: string]: unknown;
6681
- };
6682
- /** @example 2022-11-08T00:00:00+00:00 */
6683
- timestamp?: string;
6684
- /** @example 9.99 */
6685
- value?: number;
6686
- /** @example USD */
6687
- value_currency?: string;
6688
- /** @example unique-event-id */
6689
- uniqueId?: string;
6903
+ FBCreateEventDto: {
6904
+ /** @description Event name */
6905
+ event: string;
6906
+ /** @description Request data */
6907
+ request: components["schemas"]["FbCapiPayloadDto"];
6908
+ /** @description Pixel ID */
6909
+ pixelId: number;
6690
6910
  };
6691
6911
  EventCreateResponseDto: {
6692
6912
  /** @description Unique Record ID */
6693
6913
  id: number;
6694
6914
  };
6695
- UpdateEventDto: {
6915
+ FBUpdateEventDto: {
6696
6916
  /** @description Request data */
6697
6917
  response: {
6698
6918
  [key: string]: unknown;
6699
6919
  };
6700
6920
  };
6921
+ TiktokCapiCreatePixelDto: {
6922
+ /**
6923
+ * @description Title of the Facebook Pixel
6924
+ * @example My Website Pixel
6925
+ */
6926
+ title: string;
6927
+ /**
6928
+ * @description Unique Pixel ID provided by Facebook
6929
+ * @example 1234567890
6930
+ */
6931
+ pixel: string;
6932
+ /**
6933
+ * @description Access token for Facebook API
6934
+ * @example EAAGm0PX4ZCpsBAKZCZCZA...
6935
+ */
6936
+ token: string;
6937
+ /**
6938
+ * @description Project identifier this pixel belongs to
6939
+ * @example project-001
6940
+ */
6941
+ project: string;
6942
+ /**
6943
+ * @description Indicates if the pixel is active
6944
+ * @example true
6945
+ */
6946
+ active: boolean;
6947
+ };
6948
+ TiktokCapiSinglePixelResponseDto: {
6949
+ /**
6950
+ * @description Unique identifier of the pixel record
6951
+ * @example 1
6952
+ */
6953
+ id: number;
6954
+ /**
6955
+ * @description Title of the Facebook Pixel
6956
+ * @example My Website Pixel
6957
+ */
6958
+ title: string;
6959
+ /**
6960
+ * @description Unique Pixel ID provided by Facebook
6961
+ * @example 1234567890
6962
+ */
6963
+ pixel: string;
6964
+ /**
6965
+ * @description Access token for Facebook API
6966
+ * @example EAAGm0PX4ZCpsBAKZCZCZA...
6967
+ */
6968
+ token: string;
6969
+ /**
6970
+ * @description Project identifier this pixel belongs to
6971
+ * @example project-001
6972
+ */
6973
+ project: string;
6974
+ /**
6975
+ * @description Indicates if the pixel is active
6976
+ * @example true
6977
+ */
6978
+ active: boolean;
6979
+ };
6701
6980
  TiktokCapiPixelDto: {
6702
6981
  /**
6703
6982
  * @description Unique identifier of the pixel record
@@ -6754,31 +7033,86 @@ interface components {
6754
7033
  */
6755
7034
  totalPages: number;
6756
7035
  };
6757
- TikTokCapiPayloadDto: {
6758
- pixel: components["schemas"]["TiktokCapiPixelDto"];
6759
- postback?: string;
7036
+ TiktokCapiUpdatePixelDto: {
7037
+ /**
7038
+ * @description Title of the Facebook Pixel
7039
+ * @example Updated Pixel Title
7040
+ */
7041
+ title?: string;
7042
+ /**
7043
+ * @description Unique Pixel ID provided by Facebook
7044
+ * @example 0987654321
7045
+ */
7046
+ pixel?: string;
7047
+ /**
7048
+ * @description Access token for Facebook API
7049
+ * @example EAAGm0PX4ZCpsBAKZCZCZA...
7050
+ */
7051
+ token?: string;
7052
+ /**
7053
+ * @description Project identifier this pixel belongs to
7054
+ * @example project-002
7055
+ */
7056
+ project?: string;
7057
+ /**
7058
+ * @description Indicates if the pixel is active
7059
+ * @example false
7060
+ */
7061
+ active?: boolean;
7062
+ };
7063
+ TiktokCapiEventFullResponseDto: {
7064
+ data: components["schemas"]["Event"][];
7065
+ total: number;
7066
+ page: number;
7067
+ limit: number;
7068
+ totalPages: number;
7069
+ };
7070
+ TiktokCreateEventDto: {
7071
+ /** @description Event name */
7072
+ event: string;
7073
+ /** @description Request data */
7074
+ request: components["schemas"]["FbCapiPayloadDto"];
7075
+ /** @description Pixel ID */
7076
+ pixelId: number;
7077
+ };
7078
+ TiktokUpdateEventDto: {
7079
+ /** @description Request data */
7080
+ response: {
7081
+ [key: string]: unknown;
7082
+ };
6760
7083
  };
6761
7084
  CreateAccountDto: {
6762
7085
  /**
6763
- * @description Title of the account
6764
- * @example Development Account
7086
+ * @description Account title
7087
+ * @example Snapchat Account Main
6765
7088
  */
6766
7089
  title: string;
6767
7090
  /**
6768
- * @description External ID of the account
6769
- * @example ext-123
7091
+ * @description External account ID from the platform
7092
+ * @example 7cb170a3-dc41-4ab3-bdcd-4434ebe664bc
6770
7093
  */
6771
- externalId: string;
7094
+ external_id: string;
6772
7095
  /**
6773
- * @description Target source of the account
6774
- * @example Internal
7096
+ * @description Target source platform
7097
+ * @example snapchat
7098
+ * @enum {string}
6775
7099
  */
6776
- targetSource: string;
7100
+ target_source: "snapchat" | "facebook" | "google" | "tiktok";
6777
7101
  /**
6778
- * @description Access token for the account
6779
- * @example abc123token
7102
+ * @description Snapchat OAuth Client ID
7103
+ * @example 439e231c-5720-43fe-bf1b-f66d7c7a9be4
6780
7104
  */
6781
- accessToken: string;
7105
+ client_id: string;
7106
+ /**
7107
+ * @description Snapchat OAuth Client Secret
7108
+ * @example ae4c72d7b5a881b10767
7109
+ */
7110
+ client_secret: string;
7111
+ /**
7112
+ * @description Snapchat Ad Account ID
7113
+ * @example 7cb170a3-dc41-4ab3-bdcd-4434ebe664bc
7114
+ */
7115
+ ad_account_id: string;
6782
7116
  };
6783
7117
  AccountDetailDto: {
6784
7118
  /** @example 1 */
@@ -6823,10 +7157,37 @@ interface components {
6823
7157
  data?: components["schemas"]["AccountResponseDto"];
6824
7158
  };
6825
7159
  UpdateAccountDto: {
7160
+ /**
7161
+ * @description Account title
7162
+ * @example Updated Snapchat Account
7163
+ */
6826
7164
  title?: string;
6827
- externalId?: string;
6828
- targetSource?: string;
6829
- accessToken?: string;
7165
+ /**
7166
+ * @description External account ID from the platform
7167
+ * @example 7cb170a3-dc41-4ab3-bdcd-4434ebe664bc
7168
+ */
7169
+ external_id?: string;
7170
+ /**
7171
+ * @description Target source platform
7172
+ * @example snapchat
7173
+ * @enum {string}
7174
+ */
7175
+ target_source?: "snapchat" | "facebook" | "google" | "tiktok";
7176
+ /**
7177
+ * @description Snapchat OAuth Client ID
7178
+ * @example 439e231c-5720-43fe-bf1b-f66d7c7a9be4
7179
+ */
7180
+ client_id?: string;
7181
+ /**
7182
+ * @description Snapchat OAuth Client Secret
7183
+ * @example ae4c72d7b5a881b10767
7184
+ */
7185
+ client_secret?: string;
7186
+ /**
7187
+ * @description Snapchat Ad Account ID
7188
+ * @example 7cb170a3-dc41-4ab3-bdcd-4434ebe664bc
7189
+ */
7190
+ ad_account_id?: string;
6830
7191
  };
6831
7192
  AccountResponseDto_PATCH_Single_Account_updated_successful_Default: {
6832
7193
  /** @example true */
@@ -7083,7 +7444,7 @@ interface components {
7083
7444
  statusCode: Record<string, never>;
7084
7445
  /** @example accounts */
7085
7446
  path: Record<string, never>;
7086
- /** @example 2025-10-21T13:32:46.602Z */
7447
+ /** @example 2025-11-24T15:21:16.734Z */
7087
7448
  timestamp: Record<string, never>;
7088
7449
  /** @example Account created successfully */
7089
7450
  message: Record<string, never>;
@@ -7100,7 +7461,7 @@ interface components {
7100
7461
  statusCode: Record<string, never>;
7101
7462
  /** @example accounts/{id} */
7102
7463
  path: Record<string, never>;
7103
- /** @example 2025-10-21T13:32:46.605Z */
7464
+ /** @example 2025-11-24T15:21:16.739Z */
7104
7465
  timestamp: Record<string, never>;
7105
7466
  /** @example Account updated successful */
7106
7467
  message: Record<string, never>;
@@ -7117,7 +7478,7 @@ interface components {
7117
7478
  statusCode: Record<string, never>;
7118
7479
  /** @example accounts/{id} */
7119
7480
  path: Record<string, never>;
7120
- /** @example 2025-10-21T13:32:46.607Z */
7481
+ /** @example 2025-11-24T15:21:16.741Z */
7121
7482
  timestamp: Record<string, never>;
7122
7483
  /** @example Account deleted successful */
7123
7484
  message: Record<string, never>;
@@ -7133,7 +7494,7 @@ interface components {
7133
7494
  statusCode: Record<string, never>;
7134
7495
  /** @example accounts/{id} */
7135
7496
  path: Record<string, never>;
7136
- /** @example 2025-10-21T13:32:46.608Z */
7497
+ /** @example 2025-11-24T15:21:16.742Z */
7137
7498
  timestamp: Record<string, never>;
7138
7499
  /** @example Account detail retrieved successful */
7139
7500
  message: Record<string, never>;
@@ -7150,7 +7511,7 @@ interface components {
7150
7511
  statusCode: Record<string, never>;
7151
7512
  /** @example accounts */
7152
7513
  path: Record<string, never>;
7153
- /** @example 2025-10-21T13:32:46.609Z */
7514
+ /** @example 2025-11-24T15:21:16.743Z */
7154
7515
  timestamp: Record<string, never>;
7155
7516
  /** @example Account list retrieved successful */
7156
7517
  message: Record<string, never>;
@@ -7167,7 +7528,7 @@ interface components {
7167
7528
  statusCode: Record<string, never>;
7168
7529
  /** @example spends */
7169
7530
  path: Record<string, never>;
7170
- /** @example 2025-10-21T13:32:46.671Z */
7531
+ /** @example 2025-11-24T15:21:16.794Z */
7171
7532
  timestamp: Record<string, never>;
7172
7533
  /** @example Spend list retrieved successful */
7173
7534
  message: Record<string, never>;
@@ -7184,7 +7545,7 @@ interface components {
7184
7545
  statusCode: Record<string, never>;
7185
7546
  /** @example spends/{id} */
7186
7547
  path: Record<string, never>;
7187
- /** @example 2025-10-21T13:32:46.672Z */
7548
+ /** @example 2025-11-24T15:21:16.795Z */
7188
7549
  timestamp: Record<string, never>;
7189
7550
  /** @example Spend detail retrieved successful */
7190
7551
  message: Record<string, never>;
@@ -7372,6 +7733,34 @@ interface components {
7372
7733
  */
7373
7734
  database: Record<string, never>;
7374
7735
  };
7736
+ CreateEventDto: {
7737
+ /** @example Viewed Product */
7738
+ eventName: string;
7739
+ /** @example {
7740
+ * "email": "sarah@example.com",
7741
+ * "first_name": "Sarah",
7742
+ * "last_name": "Connor"
7743
+ * } */
7744
+ profileAttributes: {
7745
+ [key: string]: unknown;
7746
+ };
7747
+ /** @example {
7748
+ * "Brand": "Kids Book",
7749
+ * "ProductID": 1111,
7750
+ * "ProductName": "Winnie the Pooh"
7751
+ * } */
7752
+ eventAttributes: {
7753
+ [key: string]: unknown;
7754
+ };
7755
+ /** @example 2022-11-08T00:00:00+00:00 */
7756
+ timestamp?: string;
7757
+ /** @example 9.99 */
7758
+ value?: number;
7759
+ /** @example USD */
7760
+ value_currency?: string;
7761
+ /** @example unique-event-id */
7762
+ uniqueId?: string;
7763
+ };
7375
7764
  CreateBulkEventDto: {
7376
7765
  events: components["schemas"]["CreateEventDto"][];
7377
7766
  };
@@ -7535,7 +7924,9 @@ interface components {
7535
7924
  NotFoundErrorDto: {
7536
7925
  /** @example 404 */
7537
7926
  statusCode: number;
7538
- message: string[];
7927
+ /** @example Account with ID 123 not found */
7928
+ message: string;
7929
+ /** @example Not Found */
7539
7930
  error: string;
7540
7931
  };
7541
7932
  ReportItemChangeLogDto: {
@@ -7891,6 +8282,112 @@ interface components {
7891
8282
  /** @description Pagination metadata */
7892
8283
  meta: components["schemas"]["MetaDto"];
7893
8284
  };
8285
+ TransactionAggregationResponseDto: {
8286
+ /**
8287
+ * @description Total number of transactions
8288
+ * @example 120
8289
+ */
8290
+ transactionCount: number;
8291
+ /**
8292
+ * @description Total revenue from emails
8293
+ * @example 4500.75
8294
+ */
8295
+ emailRevenue: number;
8296
+ /**
8297
+ * @description Average share percentage (net/gross)
8298
+ * @example 0.85
8299
+ */
8300
+ avgSharePercentage: number;
8301
+ /**
8302
+ * @description Customer email with highest revenue
8303
+ * @example topuser@example.com
8304
+ */
8305
+ topPerformer: string;
8306
+ };
8307
+ WeeklyMediumFunnelDto: {
8308
+ /**
8309
+ * @description Funnel name (slug)
8310
+ * @example test-funnel
8311
+ */
8312
+ name: string;
8313
+ };
8314
+ WeeklyMediumTransactionsResponseDto: {
8315
+ /**
8316
+ * @description ISO week number
8317
+ * @example 45
8318
+ */
8319
+ week: number;
8320
+ /**
8321
+ * @description List of funnels with transaction counts per medium
8322
+ * @example [
8323
+ * {
8324
+ * "name": "test-funnel",
8325
+ * "email": 2,
8326
+ * "social": 0,
8327
+ * "organic": 3,
8328
+ * "paid": 1
8329
+ * },
8330
+ * {
8331
+ * "name": "test-funnel-2",
8332
+ * "email": 1,
8333
+ * "social": 2,
8334
+ * "organic": 1,
8335
+ * "paid": 0
8336
+ * }
8337
+ * ]
8338
+ */
8339
+ funnels: components["schemas"]["WeeklyMediumFunnelDto"][];
8340
+ };
8341
+ FunnelMetricsResponseDto: {
8342
+ /** @example Signup Funnel */
8343
+ funnel: string;
8344
+ /** @example 1245 */
8345
+ totalTxn: number;
8346
+ /** @example 892 */
8347
+ emailTotal: number;
8348
+ /** @example 234 */
8349
+ newsletterUtm: number;
8350
+ /** @example 156 */
8351
+ abandonedUtm: number;
8352
+ /** @example 89 */
8353
+ promo: number;
8354
+ /** @example 1371 */
8355
+ total: number;
8356
+ /** @example 65 */
8357
+ mailPercent: number;
8358
+ };
8359
+ FunnelMediumPerformanceResponseDto: {
8360
+ /**
8361
+ * @description Campaign / Funnel name
8362
+ * @example Newsletter Campaign
8363
+ */
8364
+ campaignName: string;
8365
+ /**
8366
+ * @description Email transactions count
8367
+ * @example 10
8368
+ */
8369
+ email: number;
8370
+ /**
8371
+ * @description Social transactions count
8372
+ * @example 60
8373
+ */
8374
+ social: number;
8375
+ /**
8376
+ * @description Organic transactions count
8377
+ * @example 40
8378
+ */
8379
+ organic: number;
8380
+ /**
8381
+ * @description Paid transactions count
8382
+ * @example 40
8383
+ */
8384
+ paid: number;
8385
+ /**
8386
+ * @description Total transactions for the campaign
8387
+ * @example 150
8388
+ */
8389
+ total: number;
8390
+ };
7894
8391
  UtmParamsDto: {
7895
8392
  /**
7896
8393
  * @description UTM source parameter
@@ -8842,6 +9339,11 @@ interface components {
8842
9339
  type: Record<string, never> | null;
8843
9340
  };
8844
9341
  CancelSubscriptionDto: {
9342
+ /**
9343
+ * @description Order UUID
9344
+ * @example a81bc81b-dead-4e5d-abff-90865d1e13b1
9345
+ */
9346
+ orderId: string;
8845
9347
  /** @example Customer requested cancellation */
8846
9348
  reason: string;
8847
9349
  };
@@ -8871,6 +9373,11 @@ interface components {
8871
9373
  PauseSubscriptionDto: {
8872
9374
  /** @example 1 */
8873
9375
  subscriptionId: number;
9376
+ /**
9377
+ * @description Order UUID
9378
+ * @example a81bc81b-dead-4e5d-abff-90865d1e13b1
9379
+ */
9380
+ orderId: string;
8874
9381
  /**
8875
9382
  * @description Date in YYYY-MM-DD format
8876
9383
  * @example 2025-01-02
@@ -8909,12 +9416,19 @@ interface components {
8909
9416
  ConflictErrorDto: {
8910
9417
  /** @example 409 */
8911
9418
  statusCode: number;
8912
- message: string[];
9419
+ /** @example Account with external_id '123' and target_source 'snapchat' already exists */
9420
+ message: string;
9421
+ /** @example Conflict */
8913
9422
  error: string;
8914
9423
  };
8915
9424
  DiscountSubscriptionDto: {
8916
9425
  /** @example 1 */
8917
9426
  subscriptionId: number;
9427
+ /**
9428
+ * @description Order UUID
9429
+ * @example a81bc81b-dead-4e5d-abff-90865d1e13b1
9430
+ */
9431
+ orderId: string;
8918
9432
  /**
8919
9433
  * @description Date (YYYY-MM-DD) or timestamp (ms)
8920
9434
  * @example 2025-09-01
@@ -9892,6 +10406,170 @@ interface components {
9892
10406
  /** @description The list of newly created carts resulting from the split operation. */
9893
10407
  splitCarts: components["schemas"]["CartData"][];
9894
10408
  };
10409
+ SnapchatSpendResponseDto: {
10410
+ /**
10411
+ * @description The date of the spend entry
10412
+ * @example 2025-10-06
10413
+ */
10414
+ date: string;
10415
+ /**
10416
+ * @description The amount spent
10417
+ * @example 32.250000
10418
+ */
10419
+ ad_spend: string;
10420
+ /**
10421
+ * @description The country where the ad was shown
10422
+ * @example US
10423
+ */
10424
+ country: string;
10425
+ };
10426
+ PaginationMetadata: {
10427
+ total: number;
10428
+ page: number;
10429
+ limit: number;
10430
+ };
10431
+ SnapchatSpendPaginatedResponseDto: {
10432
+ data: components["schemas"]["SnapchatSpendResponseDto"][];
10433
+ meta: components["schemas"]["PaginationMetadata"];
10434
+ };
10435
+ SnapchatAccountResponseDto: {
10436
+ /** @example 1 */
10437
+ id: number;
10438
+ /** @example Snapchat Account 7cb170a3-... */
10439
+ title: string;
10440
+ /** @example 7cb170a3-dc41-4ab3-bdcd-4434ebe664bc */
10441
+ external_id: string;
10442
+ /** @example snapchat */
10443
+ target_source: string;
10444
+ /**
10445
+ * @description Snapchat OAuth Client ID
10446
+ * @example 439e231c-5720-43fe-bf1b-f66d7c7a9be4
10447
+ */
10448
+ client_id: string;
10449
+ /**
10450
+ * @description Snapchat OAuth Client Secret (masked for security)
10451
+ * @example ***masked***
10452
+ */
10453
+ client_secret: string;
10454
+ /**
10455
+ * @description Snapchat Ad Account ID
10456
+ * @example 7cb170a3-dc41-4ab3-bdcd-4434ebe664bc
10457
+ */
10458
+ ad_account_id: string;
10459
+ /** Format: date-time */
10460
+ createdAt: string;
10461
+ /** Format: date-time */
10462
+ updatedAt: string;
10463
+ };
10464
+ SnapchatAccountPaginatedResponseDto: {
10465
+ data: components["schemas"]["SnapchatAccountResponseDto"][];
10466
+ meta: components["schemas"]["PaginationMetadata"];
10467
+ };
10468
+ SnapchatErpDataResponseDto: {
10469
+ /**
10470
+ * @description ERP data organized by date, source, and country+language
10471
+ * @example {
10472
+ * "2024-01-15": {
10473
+ * "snapchat": {
10474
+ * "US::en": 1500.5,
10475
+ * "UK::en": 800.25,
10476
+ * "DE::de": 1200.75
10477
+ * }
10478
+ * },
10479
+ * "2024-01-16": {
10480
+ * "snapchat": {
10481
+ * "US::en": 2000,
10482
+ * "FR::fr": 900.3
10483
+ * }
10484
+ * }
10485
+ * }
10486
+ */
10487
+ data: {
10488
+ [key: string]: {
10489
+ [key: string]: {
10490
+ [key: string]: number;
10491
+ };
10492
+ };
10493
+ };
10494
+ };
10495
+ DeleteSuccessDto: {
10496
+ /**
10497
+ * @description Success message for account deletion
10498
+ * @example Account 123 deleted successfully
10499
+ */
10500
+ message: string;
10501
+ };
10502
+ DeleteConflictErrorDto: {
10503
+ /** @example 409 */
10504
+ statusCode: number;
10505
+ /** @example Cannot delete account 123. It has 5 associated spend records. Please delete spend records first or reassign them to another account. */
10506
+ message: string;
10507
+ /** @example Conflict */
10508
+ error: string;
10509
+ };
10510
+ AuthUrlResponseDto: {
10511
+ /**
10512
+ * @description Snapchat OAuth authorization URL
10513
+ * @example https://accounts.snapchat.com/login/oauth2/authorize?client_id=...&response_type=code&scope=snapchat-marketing-api&redirect_uri=...
10514
+ */
10515
+ authorizationUrl: string;
10516
+ };
10517
+ OAuthCallbackRequestDto: {
10518
+ /**
10519
+ * @description Authorization code from Snapchat OAuth
10520
+ * @example abc123def456
10521
+ */
10522
+ code: string;
10523
+ /**
10524
+ * @description Redirect URI used in the OAuth flow
10525
+ * @example https://example.com
10526
+ */
10527
+ redirect_uri: string;
10528
+ };
10529
+ OAuthCallbackResponseDto: {
10530
+ /**
10531
+ * @description Success message
10532
+ * @example Tokens stored successfully
10533
+ */
10534
+ message: string;
10535
+ };
10536
+ TokenStatsResponseDto: {
10537
+ /**
10538
+ * @description Account ID
10539
+ * @example 1
10540
+ */
10541
+ accountId: number;
10542
+ /**
10543
+ * @description OAuth provider
10544
+ * @example snapchat
10545
+ */
10546
+ provider: string;
10547
+ /**
10548
+ * @description Token expiration date
10549
+ * @example 2024-01-15T10:30:00Z
10550
+ */
10551
+ expiresAt: Record<string, never> | null;
10552
+ /**
10553
+ * @description Last token refresh date
10554
+ * @example 2024-01-14T10:30:00Z
10555
+ */
10556
+ lastRefreshedAt: Record<string, never> | null;
10557
+ /**
10558
+ * @description Number of token refreshes
10559
+ * @example 5
10560
+ */
10561
+ refreshCount: number;
10562
+ /**
10563
+ * @description Whether the token is expired
10564
+ * @example false
10565
+ */
10566
+ isExpired: boolean;
10567
+ /**
10568
+ * @description Whether the account has valid tokens
10569
+ * @example true
10570
+ */
10571
+ hasValidTokens: boolean;
10572
+ };
9895
10573
  };
9896
10574
  responses: never;
9897
10575
  parameters: never;