@capibox/bridge-nextjs-client 0.0.78 → 0.0.80

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.ts CHANGED
@@ -188,6 +188,13 @@ declare const browser: {
188
188
  pathname?: string;
189
189
  }[];
190
190
  }>;
191
+ cart: (uuid: string, body: {
192
+ strategy: "split-to-2-eq" | "split-to-3-eq" | "split-to-2-desc" | "split-to-3-desc" | "split-to-2-asc" | "split-to-3-asc" | "split-by-price";
193
+ maxPrice?: number;
194
+ }) => Promise<{
195
+ originalCart: Record<string, never>;
196
+ splitCarts: Record<string, never>[];
197
+ }>;
191
198
  };
192
199
  mail: {
193
200
  sendToRecipient: (data: {
@@ -212,15 +219,26 @@ declare const browser: {
212
219
  [key: string]: unknown;
213
220
  };
214
221
  }) => Promise<{
215
- id: number;
216
- uuid: string;
217
- transactionId: string;
218
- userId: string;
219
- trustpilotLink?: string;
220
- postbackUrl?: string;
221
- status: string;
222
+ id: string;
223
+ project: string;
224
+ cookies: {
225
+ [key: string]: unknown;
226
+ };
227
+ country: string;
222
228
  createdAt: string;
229
+ ip: string;
230
+ isEu: boolean;
231
+ origin: string;
232
+ query: {
233
+ [key: string]: unknown;
234
+ };
235
+ referer: string;
236
+ slug: string;
223
237
  updatedAt: string;
238
+ useragent: string;
239
+ extraData: {
240
+ [key: string]: unknown;
241
+ };
224
242
  }>;
225
243
  create: ({ language, email, currency, quiz, ...data }: {
226
244
  language: string;
@@ -244,15 +262,26 @@ declare const browser: {
244
262
  referer?: string;
245
263
  slug: string;
246
264
  }, "origin" | "referer" | "cookies" | "slug" | "query" | "ip" | "user-agent" | "analyticsId" | "analyticsIdv3">) => Promise<{
247
- id: number;
248
- uuid: string;
249
- transactionId: string;
250
- userId: string;
251
- trustpilotLink?: string;
252
- postbackUrl?: string;
253
- status: string;
265
+ id: string;
266
+ project: string;
267
+ cookies: {
268
+ [key: string]: unknown;
269
+ };
270
+ country: string;
254
271
  createdAt: string;
272
+ ip: string;
273
+ isEu: boolean;
274
+ origin: string;
275
+ query: {
276
+ [key: string]: unknown;
277
+ };
278
+ referer: string;
279
+ slug: string;
255
280
  updatedAt: string;
281
+ useragent: string;
282
+ extraData: {
283
+ [key: string]: unknown;
284
+ };
256
285
  }>;
257
286
  get: (uuid: string) => Promise<_capibox_bridge_browser.SDKCapiboxSessionResponse>;
258
287
  markPaid: (uuid: string) => Promise<{
@@ -263,15 +292,26 @@ declare const browser: {
263
292
  get: (uuid: string) => Promise<{
264
293
  success: number;
265
294
  data: {
266
- id: number;
267
- uuid: string;
268
- transactionId: string;
269
- userId: string;
270
- trustpilotLink?: string;
271
- postbackUrl?: string;
272
- status: string;
295
+ id: string;
296
+ project: string;
297
+ cookies: {
298
+ [key: string]: unknown;
299
+ };
300
+ country: string;
273
301
  createdAt: string;
302
+ ip: string;
303
+ isEu: boolean;
304
+ origin: string;
305
+ query: {
306
+ [key: string]: unknown;
307
+ };
308
+ referer: string;
309
+ slug: string;
274
310
  updatedAt: string;
311
+ useragent: string;
312
+ extraData: {
313
+ [key: string]: unknown;
314
+ };
275
315
  };
276
316
  currency: {
277
317
  currency: string;
@@ -304,15 +344,26 @@ declare const browser: {
304
344
  }, "origin" | "referer" | "cookies" | "slug" | "query" | "ip" | "user-agent" | "analyticsId" | "analyticsIdv3">) => Promise<{
305
345
  success: number;
306
346
  data: {
307
- id: number;
308
- uuid: string;
309
- transactionId: string;
310
- userId: string;
311
- trustpilotLink?: string;
312
- postbackUrl?: string;
313
- status: string;
347
+ id: string;
348
+ project: string;
349
+ cookies: {
350
+ [key: string]: unknown;
351
+ };
352
+ country: string;
314
353
  createdAt: string;
354
+ ip: string;
355
+ isEu: boolean;
356
+ origin: string;
357
+ query: {
358
+ [key: string]: unknown;
359
+ };
360
+ referer: string;
361
+ slug: string;
315
362
  updatedAt: string;
363
+ useragent: string;
364
+ extraData: {
365
+ [key: string]: unknown;
366
+ };
316
367
  };
317
368
  currency: {
318
369
  currency: string;
@@ -491,6 +542,15 @@ declare const browser: {
491
542
  payment_source: {
492
543
  paypal: {
493
544
  email_address: string;
545
+ account_id?: string;
546
+ account_status?: string;
547
+ name?: {
548
+ given_name?: string;
549
+ surname?: string;
550
+ };
551
+ address?: {
552
+ country_code?: string;
553
+ };
494
554
  };
495
555
  };
496
556
  purchase_units: {
@@ -499,7 +559,7 @@ declare const browser: {
499
559
  currency_code: string;
500
560
  value: string;
501
561
  breakdown?: {
502
- item_total: {
562
+ item_total?: {
503
563
  currency_code: string;
504
564
  value: string;
505
565
  };
@@ -509,11 +569,98 @@ declare const browser: {
509
569
  email_address: string;
510
570
  merchant_id: string;
511
571
  };
512
- custom_id: string;
572
+ description?: string;
573
+ custom_id?: string;
574
+ supplementary_data?: {
575
+ tax_nexus?: string[];
576
+ };
577
+ payments?: {
578
+ captures?: {
579
+ id: string;
580
+ amount: {
581
+ currency_code: string;
582
+ value: string;
583
+ };
584
+ final_capture: boolean;
585
+ seller_protection: {
586
+ status: string;
587
+ dispute_categories: string[];
588
+ };
589
+ seller_receivable_breakdown: {
590
+ gross_amount: {
591
+ currency_code: string;
592
+ value: string;
593
+ };
594
+ paypal_fee: {
595
+ currency_code: string;
596
+ value: string;
597
+ };
598
+ net_amount: {
599
+ currency_code: string;
600
+ value: string;
601
+ };
602
+ };
603
+ invoice_id?: string;
604
+ custom_id?: string;
605
+ status: string;
606
+ supplementary_data: {
607
+ related_ids: Record<string, never>;
608
+ };
609
+ payee: {
610
+ email_address: string;
611
+ merchant_id: string;
612
+ };
613
+ create_time: string;
614
+ update_time: string;
615
+ links: {
616
+ href: string;
617
+ rel: string;
618
+ method: string;
619
+ }[];
620
+ }[];
621
+ authorizations?: {
622
+ id: string;
623
+ status: string;
624
+ amount: {
625
+ currency_code: string;
626
+ value: string;
627
+ };
628
+ invoice_id?: string;
629
+ seller_protection: {
630
+ status: string;
631
+ dispute_categories: string[];
632
+ };
633
+ supplementary_data: {
634
+ related_ids: Record<string, never>;
635
+ };
636
+ payee: {
637
+ email_address: string;
638
+ merchant_id: string;
639
+ };
640
+ expiration_time: string;
641
+ create_time: string;
642
+ update_time: string;
643
+ links: {
644
+ href: string;
645
+ rel: string;
646
+ method: string;
647
+ }[];
648
+ }[];
649
+ };
513
650
  }[];
514
651
  payer: {
652
+ name?: {
653
+ given_name?: string;
654
+ surname?: string;
655
+ };
515
656
  email_address: string;
657
+ payer_id?: string;
658
+ address?: {
659
+ country_code?: string;
660
+ };
516
661
  };
662
+ create_time?: string;
663
+ update_time?: string;
517
664
  links: {
518
665
  href: string;
519
666
  rel: string;
@@ -527,28 +674,14 @@ declare const browser: {
527
674
  payment_source: {
528
675
  paypal: {
529
676
  email_address: string;
530
- account_id: string;
531
- account_status: string;
532
- name: {
533
- given_name: string;
534
- surname: string;
535
- };
536
- address: {
537
- country_code: string;
677
+ account_id?: string;
678
+ account_status?: string;
679
+ name?: {
680
+ given_name?: string;
681
+ surname?: string;
538
682
  };
539
- attributes?: {
540
- vault?: {
541
- id: string;
542
- status: string;
543
- customer: {
544
- id: string;
545
- };
546
- links: {
547
- href: string;
548
- rel: string;
549
- method: string;
550
- }[];
551
- };
683
+ address?: {
684
+ country_code?: string;
552
685
  };
553
686
  };
554
687
  };
@@ -558,7 +691,7 @@ declare const browser: {
558
691
  currency_code: string;
559
692
  value: string;
560
693
  breakdown?: {
561
- item_total: {
694
+ item_total?: {
562
695
  currency_code: string;
563
696
  value: string;
564
697
  };
@@ -568,11 +701,14 @@ declare const browser: {
568
701
  email_address: string;
569
702
  merchant_id: string;
570
703
  };
571
- custom_id: string;
704
+ description?: string;
705
+ custom_id?: string;
706
+ supplementary_data?: {
707
+ tax_nexus?: string[];
708
+ };
572
709
  payments?: {
573
- captures: {
710
+ captures?: {
574
711
  id: string;
575
- status: string;
576
712
  amount: {
577
713
  currency_code: string;
578
714
  value: string;
@@ -596,28 +732,211 @@ declare const browser: {
596
732
  value: string;
597
733
  };
598
734
  };
735
+ invoice_id?: string;
599
736
  custom_id?: string;
737
+ status: string;
738
+ supplementary_data: {
739
+ related_ids: Record<string, never>;
740
+ };
741
+ payee: {
742
+ email_address: string;
743
+ merchant_id: string;
744
+ };
745
+ create_time: string;
746
+ update_time: string;
600
747
  links: {
601
748
  href: string;
602
749
  rel: string;
603
750
  method: string;
604
751
  }[];
752
+ }[];
753
+ authorizations?: {
754
+ id: string;
755
+ status: string;
756
+ amount: {
757
+ currency_code: string;
758
+ value: string;
759
+ };
760
+ invoice_id?: string;
761
+ seller_protection: {
762
+ status: string;
763
+ dispute_categories: string[];
764
+ };
765
+ supplementary_data: {
766
+ related_ids: Record<string, never>;
767
+ };
768
+ payee: {
769
+ email_address: string;
770
+ merchant_id: string;
771
+ };
772
+ expiration_time: string;
605
773
  create_time: string;
606
774
  update_time: string;
775
+ links: {
776
+ href: string;
777
+ rel: string;
778
+ method: string;
779
+ }[];
607
780
  }[];
608
781
  };
609
782
  }[];
610
783
  payer: {
611
- name: {
612
- given_name: string;
613
- surname: string;
784
+ name?: {
785
+ given_name?: string;
786
+ surname?: string;
614
787
  };
615
788
  email_address: string;
616
- payer_id: string;
617
- address: {
789
+ payer_id?: string;
790
+ address?: {
791
+ country_code?: string;
792
+ };
793
+ };
794
+ create_time?: string;
795
+ update_time?: string;
796
+ links: {
797
+ href: string;
798
+ rel: string;
799
+ method: string;
800
+ }[];
801
+ }>;
802
+ };
803
+ paypalRt: {
804
+ start: (uuid: string, dto: {
805
+ returnUrl: string;
806
+ cancelUrl: string;
807
+ }) => Promise<{
808
+ token_id: string;
809
+ links: {
810
+ href: string;
811
+ rel: string;
812
+ method: string;
813
+ }[];
814
+ }>;
815
+ capture: (tokenBa: string, uuid: string) => Promise<{
816
+ id: string;
817
+ intent: string;
818
+ state: string;
819
+ payer: {
820
+ payment_method: string;
821
+ status: string;
822
+ payer_info: {
823
+ email: string;
824
+ first_name: string;
825
+ last_name: string;
826
+ payer_id: string;
618
827
  country_code: string;
619
828
  };
829
+ funding_instruments: {
830
+ billing: {
831
+ billing_agreement_id: string;
832
+ };
833
+ }[];
620
834
  };
835
+ transactions: {
836
+ amount: {
837
+ total: string;
838
+ currency: string;
839
+ details: {
840
+ subtotal: string;
841
+ shipping: string;
842
+ insurance: string;
843
+ handling_fee: string;
844
+ shipping_discount: string;
845
+ discount: string;
846
+ };
847
+ };
848
+ payee: {
849
+ merchant_id: string;
850
+ email: string;
851
+ };
852
+ description: string;
853
+ invoice_number: string;
854
+ item_list: {
855
+ items: {
856
+ name: string;
857
+ sku: string;
858
+ description: string;
859
+ price: string;
860
+ currency: string;
861
+ tax: string;
862
+ quantity: number;
863
+ image_url: string;
864
+ }[];
865
+ };
866
+ related_resources: {
867
+ sale?: {
868
+ id: string;
869
+ amount: {
870
+ currency_code: string;
871
+ value: string;
872
+ };
873
+ final_capture: boolean;
874
+ seller_protection: {
875
+ status: string;
876
+ dispute_categories: string[];
877
+ };
878
+ seller_receivable_breakdown: {
879
+ gross_amount: {
880
+ currency_code: string;
881
+ value: string;
882
+ };
883
+ paypal_fee: {
884
+ currency_code: string;
885
+ value: string;
886
+ };
887
+ net_amount: {
888
+ currency_code: string;
889
+ value: string;
890
+ };
891
+ };
892
+ invoice_id?: string;
893
+ custom_id?: string;
894
+ status: string;
895
+ supplementary_data: {
896
+ related_ids: Record<string, never>;
897
+ };
898
+ payee: {
899
+ email_address: string;
900
+ merchant_id: string;
901
+ };
902
+ create_time: string;
903
+ update_time: string;
904
+ links: {
905
+ href: string;
906
+ rel: string;
907
+ method: string;
908
+ }[];
909
+ };
910
+ authorization?: {
911
+ id: string;
912
+ status: string;
913
+ amount: {
914
+ currency_code: string;
915
+ value: string;
916
+ };
917
+ invoice_id?: string;
918
+ seller_protection: {
919
+ status: string;
920
+ dispute_categories: string[];
921
+ };
922
+ supplementary_data: {
923
+ related_ids: Record<string, never>;
924
+ };
925
+ payee: {
926
+ email_address: string;
927
+ merchant_id: string;
928
+ };
929
+ expiration_time: string;
930
+ create_time: string;
931
+ update_time: string;
932
+ links: {
933
+ href: string;
934
+ rel: string;
935
+ method: string;
936
+ }[];
937
+ };
938
+ }[];
939
+ }[];
621
940
  create_time: string;
622
941
  update_time: string;
623
942
  links: {
@@ -750,28 +1069,39 @@ declare const browser: {
750
1069
  related_resources: {
751
1070
  sale?: {
752
1071
  id: string;
753
- state: string;
754
1072
  amount: {
755
- total: string;
756
- currency: string;
757
- details: {
758
- subtotal: string;
759
- shipping: string;
760
- insurance: string;
761
- handling_fee: string;
762
- shipping_discount: string;
763
- discount: string;
1073
+ currency_code: string;
1074
+ value: string;
1075
+ };
1076
+ final_capture: boolean;
1077
+ seller_protection: {
1078
+ status: string;
1079
+ dispute_categories: string[];
1080
+ };
1081
+ seller_receivable_breakdown: {
1082
+ gross_amount: {
1083
+ currency_code: string;
1084
+ value: string;
1085
+ };
1086
+ paypal_fee: {
1087
+ currency_code: string;
1088
+ value: string;
1089
+ };
1090
+ net_amount: {
1091
+ currency_code: string;
1092
+ value: string;
764
1093
  };
765
1094
  };
766
- payment_mode: string;
767
- protection_eligibility: string;
768
- protection_eligibility_type: string;
769
- transaction_fee?: {
770
- value: string;
771
- currency: string;
1095
+ invoice_id?: string;
1096
+ custom_id?: string;
1097
+ status: string;
1098
+ supplementary_data: {
1099
+ related_ids: Record<string, never>;
1100
+ };
1101
+ payee: {
1102
+ email_address: string;
1103
+ merchant_id: string;
772
1104
  };
773
- billing_agreement_id: string;
774
- parent_payment: string;
775
1105
  create_time: string;
776
1106
  update_time: string;
777
1107
  links: {
@@ -782,27 +1112,24 @@ declare const browser: {
782
1112
  };
783
1113
  authorization?: {
784
1114
  id: string;
785
- sender_transaction_id?: string;
786
- state: string;
1115
+ status: string;
787
1116
  amount: {
788
- total: string;
789
- currency: string;
790
- details: {
791
- subtotal: string;
792
- shipping: string;
793
- insurance: string;
794
- handling_fee: string;
795
- shipping_discount: string;
796
- discount: string;
797
- };
1117
+ currency_code: string;
1118
+ value: string;
798
1119
  };
799
- payment_mode: string;
800
- reason_code?: string;
801
- protection_eligibility: string;
802
- protection_eligibility_type: string;
803
- billing_agreement_id: string;
804
- parent_payment: string;
805
- valid_until?: string;
1120
+ invoice_id?: string;
1121
+ seller_protection: {
1122
+ status: string;
1123
+ dispute_categories: string[];
1124
+ };
1125
+ supplementary_data: {
1126
+ related_ids: Record<string, never>;
1127
+ };
1128
+ payee: {
1129
+ email_address: string;
1130
+ merchant_id: string;
1131
+ };
1132
+ expiration_time: string;
806
1133
  create_time: string;
807
1134
  update_time: string;
808
1135
  links: {
@@ -905,55 +1232,31 @@ declare const browser: {
905
1232
  }>;
906
1233
  };
907
1234
  jumpTask: {
908
- create: (dto: {
909
- transactionId: string;
910
- userId: string;
911
- }) => Promise<{
912
- id: number;
913
- project: string;
914
- slug: string;
915
- ip: string;
916
- country: string;
917
- isEu: boolean;
918
- referer: string;
919
- useragent: string;
920
- origin: string;
921
- cookies: Record<string, never>;
922
- query: Record<string, never>;
923
- createdAt?: string;
924
- updatedAt?: string;
925
- uuid: string;
926
- extraData: Record<string, never>;
927
- email: string;
928
- analyticsId: string;
929
- state: string;
930
- isPurchased: boolean;
931
- device?: Record<string, never>;
1235
+ create: (dto: any) => Promise<{
1236
+ data: {
1237
+ id: number;
1238
+ uuid: string;
1239
+ transactionId: string;
1240
+ userId: string;
1241
+ trustpilotLink?: string;
1242
+ postbackUrl?: string;
1243
+ status: string;
1244
+ createdAt: string;
1245
+ updatedAt: string;
1246
+ };
932
1247
  }>;
933
- update: (uuid: string, dto: {
934
- trustpilotLink?: string;
935
- status?: "created" | "completed";
936
- }) => Promise<{
937
- id: number;
938
- project: string;
939
- slug: string;
940
- ip: string;
941
- country: string;
942
- isEu: boolean;
943
- referer: string;
944
- useragent: string;
945
- origin: string;
946
- cookies: Record<string, never>;
947
- query: Record<string, never>;
948
- createdAt?: string;
949
- updatedAt?: string;
950
- uuid: string;
951
- extraData: Record<string, never>;
952
- email: string;
953
- analyticsId: string;
954
- state: string;
955
- isPurchased: boolean;
956
- device?: Record<string, never>;
1248
+ update: (uuid: string, dto: any) => Promise<{
1249
+ data: {
1250
+ id: number;
1251
+ uuid: string;
1252
+ transactionId: string;
1253
+ userId: string;
1254
+ trustpilotLink?: string;
1255
+ postbackUrl?: string;
1256
+ status: string;
1257
+ createdAt: string;
1258
+ updatedAt: string;
1259
+ };
957
1260
  }>;
958
1261
  };
959
1262
  klaviyo: {