@mivis/petmart-api 1.2.189 → 1.2.190

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 +113 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mivis/petmart-api",
3
- "version": "1.2.189",
3
+ "version": "1.2.190",
4
4
  "main": "index.js",
5
5
  "types": "type.d.ts",
6
6
  "license": "ISC",
package/type.d.ts CHANGED
@@ -1620,5 +1620,118 @@ declare namespace Components {
1620
1620
  product_id: string;
1621
1621
  characteristics: ICharacteristic[];
1622
1622
  }
1623
+
1624
+ export enum ESex {
1625
+ MALE = 'male',
1626
+ FEMALE = 'female',
1627
+ }
1628
+
1629
+ export enum EPrefferedCommunication {
1630
+ TELEGRAM = 'Telegram',
1631
+ WHATSAPP = 'WhatsApp',
1632
+ CALLS = 'Звонки',
1633
+ SMS = 'СМС',
1634
+ }
1635
+
1636
+ export interface ICompetitionHistory {
1637
+ name: string;
1638
+ place: string;
1639
+ }
1640
+
1641
+ export interface IHorseLocation {
1642
+ name: string;
1643
+ lat: number;
1644
+ lng: number;
1645
+ }
1646
+
1647
+ export interface ICommunication {
1648
+ tel: number;
1649
+ preferredCommunication: EPrefferedCommunication;
1650
+ }
1651
+
1652
+ export interface ICreateHorse {
1653
+ name: string;
1654
+ sex: ESex;
1655
+ breed: string;
1656
+ suit: string;
1657
+ category: string;
1658
+ age: string;
1659
+ withersHeight: number;
1660
+ price: string;
1661
+ location: IHorseLocation;
1662
+ images: File | File[];
1663
+ video_cover?: File;
1664
+ desc?: string;
1665
+ reg_number?: string;
1666
+ genealogy?: string;
1667
+ birthplace?: string;
1668
+ documents?: File | File[];
1669
+ competition_history?: ICompetitionHistory[];
1670
+ communication: ICommunication;
1671
+ }
1672
+
1673
+ export interface IUpdateHorse extends Partial<ICreateHorse> {
1674
+ toRemoveImages?: string[];
1675
+ toRemoveVideoCover?: string;
1676
+ toRemoveDocuments?: string[];
1677
+ }
1678
+
1679
+ export interface IHorse {
1680
+ _id: string;
1681
+ user_id: string;
1682
+ status: EProductStatus;
1683
+ name: string;
1684
+ sex: ESex;
1685
+ breed: string;
1686
+ suit: string;
1687
+ age: string;
1688
+ category: string;
1689
+ withersHeight: number;
1690
+ price: string;
1691
+ location: IHorseLocation;
1692
+ images: string[];
1693
+ video_cover: string | null;
1694
+ desc: string | null;
1695
+ reg_number: string | null;
1696
+ genealogy: string | null;
1697
+ birthplace: string | null;
1698
+ documents: string[];
1699
+ competition_history: ICompetitionHistory | null;
1700
+ communication: ICommunication;
1701
+ telegram_message_id: string | null;
1702
+ slug: string;
1703
+ number: number;
1704
+ createdAt: Date;
1705
+ updatedAt: Date;
1706
+ }
1707
+
1708
+ export interface IPopulatedHorse
1709
+ extends Omit<IHorse, 'user_id' | 'breed' | 'suit' | 'category'> {
1710
+ user_id: IPopulatedOrderUserApp;
1711
+ breed: IBreed;
1712
+ suit: ISuit;
1713
+ category: IHorseCategory;
1714
+ }
1715
+
1716
+ export interface IBreed {
1717
+ _id: string;
1718
+ name: string;
1719
+ createdAt: Date;
1720
+ updatedAt: Date;
1721
+ }
1722
+
1723
+ export interface ISuit {
1724
+ _id: string;
1725
+ name: string;
1726
+ createdAt: Date;
1727
+ updatedAt: Date;
1728
+ }
1729
+
1730
+ export interface IHorseCategory {
1731
+ _id: string;
1732
+ name: string;
1733
+ createdAt: Date;
1734
+ updatedAt: Date;
1735
+ }
1623
1736
  }
1624
1737
  }