@mivis/petmart-api 1.2.211 → 1.2.213

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 +63 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mivis/petmart-api",
3
- "version": "1.2.211",
3
+ "version": "1.2.213",
4
4
  "main": "index.js",
5
5
  "types": "type.d.ts",
6
6
  "license": "ISC",
package/type.d.ts CHANGED
@@ -299,6 +299,7 @@ declare namespace Components {
299
299
  brands?: string;
300
300
  sizes?: string;
301
301
  materials?: string;
302
+ sortBy?: EProductsSortOptions;
302
303
  }
303
304
 
304
305
  export interface IProductQueryResponse {
@@ -1842,5 +1843,67 @@ declare namespace Components {
1842
1843
  lat?: string; // user lat
1843
1844
  lng?: string; // user lng
1844
1845
  }
1846
+
1847
+ export enum ECollectionStatus {
1848
+ PUBLISHED = 'PUBLISHED',
1849
+ ARCHIVED = 'ARCHIVED',
1850
+ }
1851
+ export interface IPopulatedCollection
1852
+ extends Omit<ICollection, 'products'> {
1853
+ products: IProductResponse[];
1854
+ }
1855
+
1856
+ export interface ICollectionQueryRequest {
1857
+ title?: string;
1858
+ desc?: string;
1859
+ slug?: string;
1860
+ deeplink?: string;
1861
+ photo?: string;
1862
+ products?: string;
1863
+ status?: string;
1864
+ position?: number;
1865
+ all_fields?: string;
1866
+ skip: string;
1867
+ limit: string;
1868
+ }
1869
+
1870
+ export interface ICreateCollection {
1871
+ title: string;
1872
+ desc?: string;
1873
+ deeplink?: string;
1874
+ photo: File;
1875
+ products: string[];
1876
+ status: ECollectionStatus;
1877
+ position: number;
1878
+ }
1879
+
1880
+ export interface IUpdateCollection {
1881
+ title?: string;
1882
+ desc?: string;
1883
+ deeplink?: string;
1884
+ photo?: File;
1885
+ products?: string[];
1886
+ status?: ECollectionStatus;
1887
+ position?: number;
1888
+ }
1889
+
1890
+ export interface ICollection {
1891
+ _id: string;
1892
+ title: string;
1893
+ desc?: string;
1894
+ slug: string;
1895
+ deeplink?: string;
1896
+ photo: string;
1897
+ products: string[];
1898
+ status: ECollectionStatus;
1899
+ position: number;
1900
+ }
1901
+
1902
+ export enum EProductsSortOptions {
1903
+ NEWEST = 'Новинки',
1904
+ POPULAR = 'Популярные',
1905
+ CHEAPEST = 'Дешевле',
1906
+ EXPENSIVE = 'Дороже',
1907
+ }
1845
1908
  }
1846
1909
  }