@customafk/lunas-api-sdk 0.0.20 → 0.0.22

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.cts CHANGED
@@ -1282,17 +1282,7 @@ declare const _func: () => {
1282
1282
  success: true;
1283
1283
  statusCode: number;
1284
1284
  data: {
1285
- include: {
1286
- name: string;
1287
- uuid: string;
1288
- path: string;
1289
- description: string | null;
1290
- createdAt: Date | null;
1291
- updatedAt: Date | null;
1292
- size: number;
1293
- mimeType: string;
1294
- altText: string | null;
1295
- }[] | undefined;
1285
+ include: unknown;
1296
1286
  data: {
1297
1287
  name: string;
1298
1288
  uuid: string;
@@ -1535,8 +1525,170 @@ declare const _func: () => {
1535
1525
  }>>;
1536
1526
  };
1537
1527
  };
1528
+ options: ((params: {
1529
+ id: string | number;
1530
+ }) => {
1531
+ get: (options?: {
1532
+ headers?: {} | undefined;
1533
+ query?: {} | undefined;
1534
+ fetch?: RequestInit | undefined;
1535
+ } | undefined) => Promise<Treaty.TreatyResponse<{
1536
+ 200: {
1537
+ success: false;
1538
+ statusCode: number;
1539
+ data: null;
1540
+ message: string;
1541
+ error: TResponseError;
1542
+ meta: TResponseMeta;
1543
+ } | {
1544
+ success: true;
1545
+ statusCode: number;
1546
+ data: {
1547
+ name: string;
1548
+ id: number;
1549
+ variants: {
1550
+ value: string;
1551
+ id: number;
1552
+ variantUuid: string;
1553
+ optionId: number;
1554
+ }[];
1555
+ };
1556
+ message: null;
1557
+ error: null;
1558
+ meta: TResponseMeta;
1559
+ };
1560
+ 422: {
1561
+ type: "validation";
1562
+ on: string;
1563
+ summary?: string;
1564
+ message?: string;
1565
+ found?: unknown;
1566
+ property?: string;
1567
+ expected?: string;
1568
+ };
1569
+ }>>;
1570
+ patch: (body: {
1571
+ name: string;
1572
+ }, options?: {
1573
+ headers?: {} | undefined;
1574
+ query?: {} | undefined;
1575
+ fetch?: RequestInit | undefined;
1576
+ } | undefined) => Promise<Treaty.TreatyResponse<{
1577
+ 200: {
1578
+ success: true;
1579
+ statusCode: number;
1580
+ data: null;
1581
+ message: string;
1582
+ error: null;
1583
+ meta: TResponseMeta;
1584
+ } | {
1585
+ success: false;
1586
+ statusCode: number;
1587
+ data: null;
1588
+ message: string;
1589
+ error: TResponseError;
1590
+ meta: TResponseMeta;
1591
+ };
1592
+ 422: {
1593
+ type: "validation";
1594
+ on: string;
1595
+ summary?: string;
1596
+ message?: string;
1597
+ found?: unknown;
1598
+ property?: string;
1599
+ expected?: string;
1600
+ };
1601
+ }>>;
1602
+ delete: (body?: {} | undefined, options?: {
1603
+ headers?: {} | undefined;
1604
+ query?: {} | undefined;
1605
+ fetch?: RequestInit | undefined;
1606
+ } | undefined) => Promise<Treaty.TreatyResponse<{
1607
+ 200: {
1608
+ success: true;
1609
+ statusCode: number;
1610
+ data: null;
1611
+ message: string;
1612
+ error: null;
1613
+ meta: TResponseMeta;
1614
+ } | {
1615
+ success: false;
1616
+ statusCode: number;
1617
+ data: null;
1618
+ message: string;
1619
+ error: TResponseError;
1620
+ meta: TResponseMeta;
1621
+ };
1622
+ 422: {
1623
+ type: "validation";
1624
+ on: string;
1625
+ summary?: string;
1626
+ message?: string;
1627
+ found?: unknown;
1628
+ property?: string;
1629
+ expected?: string;
1630
+ };
1631
+ }>>;
1632
+ }) & {
1633
+ get: (options?: {
1634
+ headers?: {} | undefined;
1635
+ query?: {} | undefined;
1636
+ fetch?: RequestInit | undefined;
1637
+ } | undefined) => Promise<Treaty.TreatyResponse<{
1638
+ 200: {
1639
+ success: false;
1640
+ statusCode: number;
1641
+ data: null;
1642
+ message: string;
1643
+ error: TResponseError;
1644
+ meta: TResponseMeta;
1645
+ } | {
1646
+ success: true;
1647
+ statusCode: number;
1648
+ data: {
1649
+ name: string;
1650
+ id: number;
1651
+ }[];
1652
+ message: null;
1653
+ error: null;
1654
+ meta: TResponseMeta;
1655
+ };
1656
+ }>>;
1657
+ post: (body: {
1658
+ name: string;
1659
+ }, options?: {
1660
+ headers?: {} | undefined;
1661
+ query?: {} | undefined;
1662
+ fetch?: RequestInit | undefined;
1663
+ } | undefined) => Promise<Treaty.TreatyResponse<{
1664
+ 200: {
1665
+ success: true;
1666
+ statusCode: number;
1667
+ data: null;
1668
+ message: string;
1669
+ error: null;
1670
+ meta: TResponseMeta;
1671
+ } | {
1672
+ success: false;
1673
+ statusCode: number;
1674
+ data: null;
1675
+ message: string;
1676
+ error: TResponseError;
1677
+ meta: TResponseMeta;
1678
+ };
1679
+ 422: {
1680
+ type: "validation";
1681
+ on: string;
1682
+ summary?: string;
1683
+ message?: string;
1684
+ found?: unknown;
1685
+ property?: string;
1686
+ expected?: string;
1687
+ };
1688
+ }>>;
1689
+ };
1538
1690
  products: ((params: {
1539
- uuid: string | number;
1691
+ productUuid: string | number;
1540
1692
  }) => {
1541
1693
  get: (options?: {
1542
1694
  headers?: {} | undefined;
@@ -1562,15 +1714,15 @@ declare const _func: () => {
1562
1714
  description: string | null;
1563
1715
  createdAt: Date | null;
1564
1716
  updatedAt: Date | null;
1565
- createdBy: string;
1566
1717
  standardCost: number | null;
1567
1718
  retailCost: number | null;
1568
- quantity: number | null;
1569
1719
  weight: number | null;
1570
1720
  weightUnit: string | null;
1571
1721
  width: number | null;
1572
1722
  height: number | null;
1573
1723
  dimensionUnit: string | null;
1724
+ createdBy: string;
1725
+ quantity: number | null;
1574
1726
  country: string | null;
1575
1727
  productStatus: string;
1576
1728
  inventoryStatus: string | null;
@@ -1586,41 +1738,6 @@ declare const _func: () => {
1586
1738
  totalSales: number | null;
1587
1739
  lastOrderedAt: Date | null;
1588
1740
  lastViewedAt: Date | null;
1589
- author: {
1590
- uuid: string | null;
1591
- email: string;
1592
- username: string;
1593
- };
1594
- parentCategory: {
1595
- name: string;
1596
- uuid: string;
1597
- icon: string | null;
1598
- description: string | null;
1599
- } | null;
1600
- subCategory: {
1601
- name: string;
1602
- uuid: string;
1603
- icon: string | null;
1604
- description: string | null;
1605
- } | null;
1606
- series: {
1607
- name: string;
1608
- uuid: string;
1609
- description: string | null;
1610
- } | null;
1611
- currency: {
1612
- name: string;
1613
- id: number;
1614
- code: string;
1615
- exchangeRate: number;
1616
- } | null;
1617
- supplier: {
1618
- name: string;
1619
- uuid: string;
1620
- phoneNumber: string | null;
1621
- country: string | null;
1622
- contactEmail: string | null;
1623
- } | null;
1624
1741
  variants: {
1625
1742
  length: number | null;
1626
1743
  name: string;
@@ -1630,6 +1747,7 @@ declare const _func: () => {
1630
1747
  updatedAt: Date | null;
1631
1748
  isDefault: boolean | null;
1632
1749
  isActive: boolean | null;
1750
+ sku: string;
1633
1751
  standardCost: number | null;
1634
1752
  retailCost: number | null;
1635
1753
  weight: number | null;
@@ -1637,7 +1755,6 @@ declare const _func: () => {
1637
1755
  width: number | null;
1638
1756
  height: number | null;
1639
1757
  dimensionUnit: string | null;
1640
- sku: string;
1641
1758
  isNew: boolean | null;
1642
1759
  isSpecial: boolean | null;
1643
1760
  options: {
@@ -1660,6 +1777,41 @@ declare const _func: () => {
1660
1777
  };
1661
1778
  } | null;
1662
1779
  }[];
1780
+ author: {
1781
+ uuid: string | null;
1782
+ email: string;
1783
+ username: string;
1784
+ };
1785
+ parentCategory: {
1786
+ name: string;
1787
+ uuid: string;
1788
+ icon: string | null;
1789
+ description: string | null;
1790
+ } | null;
1791
+ subCategory: {
1792
+ name: string;
1793
+ uuid: string;
1794
+ icon: string | null;
1795
+ description: string | null;
1796
+ } | null;
1797
+ series: {
1798
+ name: string;
1799
+ uuid: string;
1800
+ description: string | null;
1801
+ } | null;
1802
+ currency: {
1803
+ name: string;
1804
+ id: number;
1805
+ code: string;
1806
+ exchangeRate: number;
1807
+ } | null;
1808
+ supplier: {
1809
+ name: string;
1810
+ uuid: string;
1811
+ phoneNumber: string | null;
1812
+ country: string | null;
1813
+ contactEmail: string | null;
1814
+ } | null;
1663
1815
  medias: {
1664
1816
  createdAt: Date | null;
1665
1817
  updatedAt: Date | null;
@@ -1688,6 +1840,68 @@ declare const _func: () => {
1688
1840
  expected?: string;
1689
1841
  };
1690
1842
  }>>;
1843
+ delete: (body?: {} | undefined, options?: {
1844
+ headers?: {} | undefined;
1845
+ query?: {} | undefined;
1846
+ fetch?: RequestInit | undefined;
1847
+ } | undefined) => Promise<Treaty.TreatyResponse<{
1848
+ 200: {
1849
+ success: true;
1850
+ statusCode: number;
1851
+ data: null;
1852
+ message: string;
1853
+ error: null;
1854
+ meta: TResponseMeta;
1855
+ } | {
1856
+ success: false;
1857
+ statusCode: number;
1858
+ data: null;
1859
+ message: string;
1860
+ error: TResponseError;
1861
+ meta: TResponseMeta;
1862
+ };
1863
+ 422: {
1864
+ type: "validation";
1865
+ on: string;
1866
+ summary?: string;
1867
+ message?: string;
1868
+ found?: unknown;
1869
+ property?: string;
1870
+ expected?: string;
1871
+ };
1872
+ }>>;
1873
+ forever: {
1874
+ delete: (body?: {} | undefined, options?: {
1875
+ headers?: {} | undefined;
1876
+ query?: {} | undefined;
1877
+ fetch?: RequestInit | undefined;
1878
+ } | undefined) => Promise<Treaty.TreatyResponse<{
1879
+ 200: {
1880
+ success: true;
1881
+ statusCode: number;
1882
+ data: null;
1883
+ message: string;
1884
+ error: null;
1885
+ meta: TResponseMeta;
1886
+ } | {
1887
+ success: false;
1888
+ statusCode: number;
1889
+ data: null;
1890
+ message: string;
1891
+ error: TResponseError;
1892
+ meta: TResponseMeta;
1893
+ };
1894
+ 422: {
1895
+ type: "validation";
1896
+ on: string;
1897
+ summary?: string;
1898
+ message?: string;
1899
+ found?: unknown;
1900
+ property?: string;
1901
+ expected?: string;
1902
+ };
1903
+ }>>;
1904
+ };
1691
1905
  }) & {
1692
1906
  get: (options?: {
1693
1907
  headers?: {} | undefined;
@@ -1714,8 +1928,8 @@ declare const _func: () => {
1714
1928
  uuid: string;
1715
1929
  createdAt: Date | null;
1716
1930
  updatedAt: Date | null;
1717
- createdBy: string;
1718
1931
  standardCost: number | null;
1932
+ createdBy: string;
1719
1933
  quantity: number | null;
1720
1934
  country: string | null;
1721
1935
  productStatus: string;
@@ -1767,13 +1981,13 @@ declare const _func: () => {
1767
1981
  };
1768
1982
  }>>;
1769
1983
  draft: ((params: {
1770
- uuid: string | number;
1984
+ productUuid: string | number;
1771
1985
  }) => {
1772
1986
  patch: (body?: {
1773
1987
  name?: string | undefined;
1774
- description?: string | undefined;
1775
- standardCost?: number | undefined;
1776
- quantity?: number | undefined;
1988
+ description?: string | null | undefined;
1989
+ standardCost?: number | null | undefined;
1990
+ quantity?: number | null | undefined;
1777
1991
  country?: ECountry | undefined;
1778
1992
  inventoryStatus?: EProductInventoryStatus | undefined;
1779
1993
  weight?: number | null | undefined;
@@ -1782,14 +1996,14 @@ declare const _func: () => {
1782
1996
  width?: number | null | undefined;
1783
1997
  height?: number | null | undefined;
1784
1998
  dimensionUnit?: EDimensionUnit | undefined;
1785
- preOrderStartDate?: string | undefined;
1786
- preOrderEndDate?: string | undefined;
1787
- releaseDate?: string | undefined;
1788
- parentCategoryUuid?: string | undefined;
1789
- subCategoryUuid?: string | undefined;
1790
- seriesUuid?: string | undefined;
1791
- supplierUuid?: string | undefined;
1792
- currencyId?: number | undefined;
1999
+ preOrderStartDate?: string | null | undefined;
2000
+ preOrderEndDate?: string | null | undefined;
2001
+ releaseDate?: string | null | undefined;
2002
+ parentCategoryUuid?: string | null | undefined;
2003
+ subCategoryUuid?: string | null | undefined;
2004
+ seriesUuid?: string | null | undefined;
2005
+ supplierUuid?: string | null | undefined;
2006
+ currencyId?: number | null | undefined;
1793
2007
  } | undefined, options?: {
1794
2008
  headers?: {} | undefined;
1795
2009
  query?: {} | undefined;
@@ -1820,6 +2034,233 @@ declare const _func: () => {
1820
2034
  expected?: string;
1821
2035
  };
1822
2036
  }>>;
2037
+ variants: ((params: {
2038
+ variantUuid: string | number;
2039
+ }) => {
2040
+ patch: (body?: {
2041
+ name?: string | undefined;
2042
+ description?: string | null | undefined;
2043
+ standardCost?: number | null | undefined;
2044
+ weight?: number | null | undefined;
2045
+ weightUnit?: EWeightUnit | undefined;
2046
+ length?: number | null | undefined;
2047
+ width?: number | null | undefined;
2048
+ height?: number | null | undefined;
2049
+ dimensionUnit?: EDimensionUnit | undefined;
2050
+ isActive?: boolean | undefined;
2051
+ isDefault?: boolean | undefined;
2052
+ isNew?: boolean | undefined;
2053
+ isSpecial?: boolean | undefined;
2054
+ } | undefined, options?: {
2055
+ headers?: {} | undefined;
2056
+ query?: {} | undefined;
2057
+ fetch?: RequestInit | undefined;
2058
+ } | undefined) => Promise<Treaty.TreatyResponse<{
2059
+ 200: {
2060
+ success: true;
2061
+ statusCode: number;
2062
+ data: null;
2063
+ message: string;
2064
+ error: null;
2065
+ meta: TResponseMeta;
2066
+ } | {
2067
+ success: false;
2068
+ statusCode: number;
2069
+ data: null;
2070
+ message: string;
2071
+ error: TResponseError;
2072
+ meta: TResponseMeta;
2073
+ };
2074
+ 422: {
2075
+ type: "validation";
2076
+ on: string;
2077
+ summary?: string;
2078
+ message?: string;
2079
+ found?: unknown;
2080
+ property?: string;
2081
+ expected?: string;
2082
+ };
2083
+ }>>;
2084
+ delete: (body?: {} | undefined, options?: {
2085
+ headers?: {} | undefined;
2086
+ query?: {} | undefined;
2087
+ fetch?: RequestInit | undefined;
2088
+ } | undefined) => Promise<Treaty.TreatyResponse<{
2089
+ 200: {
2090
+ success: true;
2091
+ statusCode: number;
2092
+ data: null;
2093
+ message: string;
2094
+ error: null;
2095
+ meta: TResponseMeta;
2096
+ } | {
2097
+ success: false;
2098
+ statusCode: number;
2099
+ data: null;
2100
+ message: string;
2101
+ error: TResponseError;
2102
+ meta: TResponseMeta;
2103
+ };
2104
+ 422: {
2105
+ type: "validation";
2106
+ on: string;
2107
+ summary?: string;
2108
+ message?: string;
2109
+ found?: unknown;
2110
+ property?: string;
2111
+ expected?: string;
2112
+ };
2113
+ }>>;
2114
+ options: ((params: {
2115
+ optionId: string | number;
2116
+ }) => {
2117
+ patch: (body: {
2118
+ value: string;
2119
+ }, options?: {
2120
+ headers?: {} | undefined;
2121
+ query?: {} | undefined;
2122
+ fetch?: RequestInit | undefined;
2123
+ } | undefined) => Promise<Treaty.TreatyResponse<{
2124
+ 200: {
2125
+ success: true;
2126
+ statusCode: number;
2127
+ data: null;
2128
+ message: string;
2129
+ error: null;
2130
+ meta: TResponseMeta;
2131
+ } | {
2132
+ success: false;
2133
+ statusCode: number;
2134
+ data: null;
2135
+ message: string;
2136
+ error: TResponseError;
2137
+ meta: TResponseMeta;
2138
+ };
2139
+ 422: {
2140
+ type: "validation";
2141
+ on: string;
2142
+ summary?: string;
2143
+ message?: string;
2144
+ found?: unknown;
2145
+ property?: string;
2146
+ expected?: string;
2147
+ };
2148
+ }>>;
2149
+ delete: (body?: {} | undefined, options?: {
2150
+ headers?: {} | undefined;
2151
+ query?: {} | undefined;
2152
+ fetch?: RequestInit | undefined;
2153
+ } | undefined) => Promise<Treaty.TreatyResponse<{
2154
+ 200: {
2155
+ success: true;
2156
+ statusCode: number;
2157
+ data: null;
2158
+ message: string;
2159
+ error: null;
2160
+ meta: TResponseMeta;
2161
+ } | {
2162
+ success: false;
2163
+ statusCode: number;
2164
+ data: null;
2165
+ message: string;
2166
+ error: TResponseError;
2167
+ meta: TResponseMeta;
2168
+ };
2169
+ 422: {
2170
+ type: "validation";
2171
+ on: string;
2172
+ summary?: string;
2173
+ message?: string;
2174
+ found?: unknown;
2175
+ property?: string;
2176
+ expected?: string;
2177
+ };
2178
+ }>>;
2179
+ }) & {
2180
+ post: (body: {
2181
+ optionId: number;
2182
+ value: string;
2183
+ }, options?: {
2184
+ headers?: {} | undefined;
2185
+ query?: {} | undefined;
2186
+ fetch?: RequestInit | undefined;
2187
+ } | undefined) => Promise<Treaty.TreatyResponse<{
2188
+ 200: {
2189
+ success: true;
2190
+ statusCode: number;
2191
+ data: null;
2192
+ message: string;
2193
+ error: null;
2194
+ meta: TResponseMeta;
2195
+ } | {
2196
+ success: false;
2197
+ statusCode: number;
2198
+ data: null;
2199
+ message: string;
2200
+ error: TResponseError;
2201
+ meta: TResponseMeta;
2202
+ };
2203
+ 422: {
2204
+ type: "validation";
2205
+ on: string;
2206
+ summary?: string;
2207
+ message?: string;
2208
+ found?: unknown;
2209
+ property?: string;
2210
+ expected?: string;
2211
+ };
2212
+ }>>;
2213
+ };
2214
+ }) & {
2215
+ bulk: {
2216
+ post: (body: {
2217
+ variants: {
2218
+ name: string;
2219
+ description: string;
2220
+ standardCost: number | null;
2221
+ weight: number | null;
2222
+ weightUnit: EWeightUnit | null;
2223
+ length: number | null;
2224
+ width: number | null;
2225
+ height: number | null;
2226
+ dimensionUnit: EDimensionUnit | null;
2227
+ isActive: boolean;
2228
+ isDefault: boolean;
2229
+ isNew: boolean;
2230
+ isSpecial: boolean;
2231
+ }[];
2232
+ }, options?: {
2233
+ headers?: {} | undefined;
2234
+ query?: {} | undefined;
2235
+ fetch?: RequestInit | undefined;
2236
+ } | undefined) => Promise<Treaty.TreatyResponse<{
2237
+ 200: {
2238
+ success: true;
2239
+ statusCode: number;
2240
+ data: null;
2241
+ message: string;
2242
+ error: null;
2243
+ meta: TResponseMeta;
2244
+ } | {
2245
+ success: false;
2246
+ statusCode: number;
2247
+ data: null;
2248
+ message: string;
2249
+ error: TResponseError;
2250
+ meta: TResponseMeta;
2251
+ };
2252
+ 422: {
2253
+ type: "validation";
2254
+ on: string;
2255
+ summary?: string;
2256
+ message?: string;
2257
+ found?: unknown;
2258
+ property?: string;
2259
+ expected?: string;
2260
+ };
2261
+ }>>;
2262
+ };
2263
+ };
1823
2264
  }) & {
1824
2265
  post: (body: {
1825
2266
  name: string;