@mivis/petmart-api 1.2.52 → 1.2.54

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/type.d.ts +68 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mivis/petmart-api",
3
- "version": "1.2.52",
3
+ "version": "1.2.54",
4
4
  "main": "index.js",
5
5
  "types": "type.d.ts",
6
6
  "license": "ISC",
package/type.d.ts CHANGED
@@ -338,6 +338,11 @@ declare namespace Components {
338
338
  updatedAt: Date;
339
339
  }
340
340
 
341
+ export interface ICreateCartResponse {
342
+ message?: string;
343
+ cartItem: ICart;
344
+ }
345
+
341
346
  export interface ICategory {
342
347
  _id: string;
343
348
  name: string;
@@ -566,6 +571,7 @@ declare namespace Components {
566
571
  }
567
572
  ];
568
573
  email: string;
574
+ delivery_sum: number;
569
575
  }
570
576
 
571
577
  export interface IPickUpPoint {
@@ -657,9 +663,27 @@ declare namespace Components {
657
663
 
658
664
  export interface GetDeliverySum {
659
665
  address: string;
666
+ type: ERecieveMethod.COURIER | ERecieveMethod.PVZ;
660
667
  items: IOrderItem[];
661
668
  }
662
669
 
670
+ export interface IDeliverySum {
671
+ delivery_sum: number;
672
+ period_min: number;
673
+ period_max: number;
674
+ calendar_min: number;
675
+ calendar_max: number;
676
+ weight_calc: number;
677
+ services: [
678
+ {
679
+ code: string;
680
+ sum: number;
681
+ }
682
+ ];
683
+ total_sum: number;
684
+ currency: string;
685
+ }
686
+
663
687
  export interface IOrder {
664
688
  sum: number;
665
689
  weight: number;
@@ -688,6 +712,50 @@ declare namespace Components {
688
712
  updatedAt: Date;
689
713
  }
690
714
 
715
+ export interface IPaymentCaptureResponse {
716
+ id: string;
717
+ status: string;
718
+ amount: {
719
+ value: string;
720
+ currency: string;
721
+ };
722
+ description: string;
723
+ captured_at: string;
724
+ created_at: string;
725
+ metadata: {
726
+ multiOrderId: string;
727
+ multiOrderNumber: string;
728
+ };
729
+ }
730
+
731
+ export type IConfirmationType = 'embedded' | 'external' | 'qr' | 'redirect';
732
+
733
+ export interface IConfirmation {
734
+ type: IConfirmationType;
735
+ locale?: string;
736
+ confirmation_token?: string;
737
+ confirmation_data?: string;
738
+ confirmation_url?: string;
739
+ enforce?: boolean;
740
+ return_url?: string;
741
+ }
742
+
743
+ export interface IPaymentResponse {
744
+ id: string;
745
+ status: string;
746
+ amount: {
747
+ value: string;
748
+ currency: string;
749
+ };
750
+ description: string;
751
+ created_at: string;
752
+ confirmation: IConfirmation;
753
+ metadata: {
754
+ multiOrderId: string;
755
+ multiOrderNumber: string;
756
+ };
757
+ }
758
+
691
759
  export enum EMultiOrderStatus {
692
760
  CANCELED = 'CANCELED',
693
761
  PAID = 'PAID',