@customafk/lunas-api-sdk 0.0.20 → 0.0.21

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,171 @@ 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
1691
  uuid: string | number;
1692
+ productUuid: string | number;
1540
1693
  }) => {
1541
1694
  get: (options?: {
1542
1695
  headers?: {} | undefined;
@@ -1562,15 +1715,15 @@ declare const _func: () => {
1562
1715
  description: string | null;
1563
1716
  createdAt: Date | null;
1564
1717
  updatedAt: Date | null;
1565
- createdBy: string;
1566
1718
  standardCost: number | null;
1567
1719
  retailCost: number | null;
1568
- quantity: number | null;
1569
1720
  weight: number | null;
1570
1721
  weightUnit: string | null;
1571
1722
  width: number | null;
1572
1723
  height: number | null;
1573
1724
  dimensionUnit: string | null;
1725
+ createdBy: string;
1726
+ quantity: number | null;
1574
1727
  country: string | null;
1575
1728
  productStatus: string;
1576
1729
  inventoryStatus: string | null;
@@ -1586,41 +1739,6 @@ declare const _func: () => {
1586
1739
  totalSales: number | null;
1587
1740
  lastOrderedAt: Date | null;
1588
1741
  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
1742
  variants: {
1625
1743
  length: number | null;
1626
1744
  name: string;
@@ -1630,6 +1748,7 @@ declare const _func: () => {
1630
1748
  updatedAt: Date | null;
1631
1749
  isDefault: boolean | null;
1632
1750
  isActive: boolean | null;
1751
+ sku: string;
1633
1752
  standardCost: number | null;
1634
1753
  retailCost: number | null;
1635
1754
  weight: number | null;
@@ -1637,7 +1756,6 @@ declare const _func: () => {
1637
1756
  width: number | null;
1638
1757
  height: number | null;
1639
1758
  dimensionUnit: string | null;
1640
- sku: string;
1641
1759
  isNew: boolean | null;
1642
1760
  isSpecial: boolean | null;
1643
1761
  options: {
@@ -1660,6 +1778,41 @@ declare const _func: () => {
1660
1778
  };
1661
1779
  } | null;
1662
1780
  }[];
1781
+ author: {
1782
+ uuid: string | null;
1783
+ email: string;
1784
+ username: string;
1785
+ };
1786
+ parentCategory: {
1787
+ name: string;
1788
+ uuid: string;
1789
+ icon: string | null;
1790
+ description: string | null;
1791
+ } | null;
1792
+ subCategory: {
1793
+ name: string;
1794
+ uuid: string;
1795
+ icon: string | null;
1796
+ description: string | null;
1797
+ } | null;
1798
+ series: {
1799
+ name: string;
1800
+ uuid: string;
1801
+ description: string | null;
1802
+ } | null;
1803
+ currency: {
1804
+ name: string;
1805
+ id: number;
1806
+ code: string;
1807
+ exchangeRate: number;
1808
+ } | null;
1809
+ supplier: {
1810
+ name: string;
1811
+ uuid: string;
1812
+ phoneNumber: string | null;
1813
+ country: string | null;
1814
+ contactEmail: string | null;
1815
+ } | null;
1663
1816
  medias: {
1664
1817
  createdAt: Date | null;
1665
1818
  updatedAt: Date | null;
@@ -1688,6 +1841,69 @@ declare const _func: () => {
1688
1841
  expected?: string;
1689
1842
  };
1690
1843
  }>>;
1844
+ } | {
1845
+ delete: (body?: {} | undefined, options?: {
1846
+ headers?: {} | undefined;
1847
+ query?: {} | undefined;
1848
+ fetch?: RequestInit | undefined;
1849
+ } | undefined) => Promise<Treaty.TreatyResponse<{
1850
+ 200: {
1851
+ success: true;
1852
+ statusCode: number;
1853
+ data: null;
1854
+ message: string;
1855
+ error: null;
1856
+ meta: TResponseMeta;
1857
+ } | {
1858
+ success: false;
1859
+ statusCode: number;
1860
+ data: null;
1861
+ message: string;
1862
+ error: TResponseError;
1863
+ meta: TResponseMeta;
1864
+ };
1865
+ 422: {
1866
+ type: "validation";
1867
+ on: string;
1868
+ summary?: string;
1869
+ message?: string;
1870
+ found?: unknown;
1871
+ property?: string;
1872
+ expected?: string;
1873
+ };
1874
+ }>>;
1875
+ forever: {
1876
+ delete: (body?: {} | undefined, options?: {
1877
+ headers?: {} | undefined;
1878
+ query?: {} | undefined;
1879
+ fetch?: RequestInit | undefined;
1880
+ } | undefined) => Promise<Treaty.TreatyResponse<{
1881
+ 200: {
1882
+ success: true;
1883
+ statusCode: number;
1884
+ data: null;
1885
+ message: string;
1886
+ error: null;
1887
+ meta: TResponseMeta;
1888
+ } | {
1889
+ success: false;
1890
+ statusCode: number;
1891
+ data: null;
1892
+ message: string;
1893
+ error: TResponseError;
1894
+ meta: TResponseMeta;
1895
+ };
1896
+ 422: {
1897
+ type: "validation";
1898
+ on: string;
1899
+ summary?: string;
1900
+ message?: string;
1901
+ found?: unknown;
1902
+ property?: string;
1903
+ expected?: string;
1904
+ };
1905
+ }>>;
1906
+ };
1691
1907
  }) & {
1692
1908
  get: (options?: {
1693
1909
  headers?: {} | undefined;
@@ -1714,8 +1930,8 @@ declare const _func: () => {
1714
1930
  uuid: string;
1715
1931
  createdAt: Date | null;
1716
1932
  updatedAt: Date | null;
1717
- createdBy: string;
1718
1933
  standardCost: number | null;
1934
+ createdBy: string;
1719
1935
  quantity: number | null;
1720
1936
  country: string | null;
1721
1937
  productStatus: string;
@@ -1767,13 +1983,13 @@ declare const _func: () => {
1767
1983
  };
1768
1984
  }>>;
1769
1985
  draft: ((params: {
1770
- uuid: string | number;
1986
+ productUuid: string | number;
1771
1987
  }) => {
1772
1988
  patch: (body?: {
1773
1989
  name?: string | undefined;
1774
- description?: string | undefined;
1775
- standardCost?: number | undefined;
1776
- quantity?: number | undefined;
1990
+ description?: string | null | undefined;
1991
+ standardCost?: number | null | undefined;
1992
+ quantity?: number | null | undefined;
1777
1993
  country?: ECountry | undefined;
1778
1994
  inventoryStatus?: EProductInventoryStatus | undefined;
1779
1995
  weight?: number | null | undefined;
@@ -1782,14 +1998,14 @@ declare const _func: () => {
1782
1998
  width?: number | null | undefined;
1783
1999
  height?: number | null | undefined;
1784
2000
  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;
2001
+ preOrderStartDate?: string | null | undefined;
2002
+ preOrderEndDate?: string | null | undefined;
2003
+ releaseDate?: string | null | undefined;
2004
+ parentCategoryUuid?: string | null | undefined;
2005
+ subCategoryUuid?: string | null | undefined;
2006
+ seriesUuid?: string | null | undefined;
2007
+ supplierUuid?: string | null | undefined;
2008
+ currencyId?: number | null | undefined;
1793
2009
  } | undefined, options?: {
1794
2010
  headers?: {} | undefined;
1795
2011
  query?: {} | undefined;
@@ -1820,6 +2036,233 @@ declare const _func: () => {
1820
2036
  expected?: string;
1821
2037
  };
1822
2038
  }>>;
2039
+ variants: ((params: {
2040
+ variantUuid: string | number;
2041
+ }) => {
2042
+ patch: (body?: {
2043
+ name?: string | undefined;
2044
+ description?: string | null | undefined;
2045
+ standardCost?: number | null | undefined;
2046
+ weight?: number | null | undefined;
2047
+ weightUnit?: EWeightUnit | undefined;
2048
+ length?: number | null | undefined;
2049
+ width?: number | null | undefined;
2050
+ height?: number | null | undefined;
2051
+ dimensionUnit?: EDimensionUnit | undefined;
2052
+ isActive?: boolean | undefined;
2053
+ isDefault?: boolean | undefined;
2054
+ isNew?: boolean | undefined;
2055
+ isSpecial?: boolean | undefined;
2056
+ } | undefined, options?: {
2057
+ headers?: {} | undefined;
2058
+ query?: {} | undefined;
2059
+ fetch?: RequestInit | undefined;
2060
+ } | undefined) => Promise<Treaty.TreatyResponse<{
2061
+ 200: {
2062
+ success: true;
2063
+ statusCode: number;
2064
+ data: null;
2065
+ message: string;
2066
+ error: null;
2067
+ meta: TResponseMeta;
2068
+ } | {
2069
+ success: false;
2070
+ statusCode: number;
2071
+ data: null;
2072
+ message: string;
2073
+ error: TResponseError;
2074
+ meta: TResponseMeta;
2075
+ };
2076
+ 422: {
2077
+ type: "validation";
2078
+ on: string;
2079
+ summary?: string;
2080
+ message?: string;
2081
+ found?: unknown;
2082
+ property?: string;
2083
+ expected?: string;
2084
+ };
2085
+ }>>;
2086
+ delete: (body?: {} | undefined, options?: {
2087
+ headers?: {} | undefined;
2088
+ query?: {} | undefined;
2089
+ fetch?: RequestInit | undefined;
2090
+ } | undefined) => Promise<Treaty.TreatyResponse<{
2091
+ 200: {
2092
+ success: true;
2093
+ statusCode: number;
2094
+ data: null;
2095
+ message: string;
2096
+ error: null;
2097
+ meta: TResponseMeta;
2098
+ } | {
2099
+ success: false;
2100
+ statusCode: number;
2101
+ data: null;
2102
+ message: string;
2103
+ error: TResponseError;
2104
+ meta: TResponseMeta;
2105
+ };
2106
+ 422: {
2107
+ type: "validation";
2108
+ on: string;
2109
+ summary?: string;
2110
+ message?: string;
2111
+ found?: unknown;
2112
+ property?: string;
2113
+ expected?: string;
2114
+ };
2115
+ }>>;
2116
+ options: ((params: {
2117
+ optionId: string | number;
2118
+ }) => {
2119
+ patch: (body: {
2120
+ value: string;
2121
+ }, options?: {
2122
+ headers?: {} | undefined;
2123
+ query?: {} | undefined;
2124
+ fetch?: RequestInit | undefined;
2125
+ } | undefined) => Promise<Treaty.TreatyResponse<{
2126
+ 200: {
2127
+ success: true;
2128
+ statusCode: number;
2129
+ data: null;
2130
+ message: string;
2131
+ error: null;
2132
+ meta: TResponseMeta;
2133
+ } | {
2134
+ success: false;
2135
+ statusCode: number;
2136
+ data: null;
2137
+ message: string;
2138
+ error: TResponseError;
2139
+ meta: TResponseMeta;
2140
+ };
2141
+ 422: {
2142
+ type: "validation";
2143
+ on: string;
2144
+ summary?: string;
2145
+ message?: string;
2146
+ found?: unknown;
2147
+ property?: string;
2148
+ expected?: string;
2149
+ };
2150
+ }>>;
2151
+ delete: (body?: {} | undefined, options?: {
2152
+ headers?: {} | undefined;
2153
+ query?: {} | undefined;
2154
+ fetch?: RequestInit | undefined;
2155
+ } | undefined) => Promise<Treaty.TreatyResponse<{
2156
+ 200: {
2157
+ success: true;
2158
+ statusCode: number;
2159
+ data: null;
2160
+ message: string;
2161
+ error: null;
2162
+ meta: TResponseMeta;
2163
+ } | {
2164
+ success: false;
2165
+ statusCode: number;
2166
+ data: null;
2167
+ message: string;
2168
+ error: TResponseError;
2169
+ meta: TResponseMeta;
2170
+ };
2171
+ 422: {
2172
+ type: "validation";
2173
+ on: string;
2174
+ summary?: string;
2175
+ message?: string;
2176
+ found?: unknown;
2177
+ property?: string;
2178
+ expected?: string;
2179
+ };
2180
+ }>>;
2181
+ }) & {
2182
+ post: (body: {
2183
+ optionId: number;
2184
+ value: string;
2185
+ }, options?: {
2186
+ headers?: {} | undefined;
2187
+ query?: {} | undefined;
2188
+ fetch?: RequestInit | undefined;
2189
+ } | undefined) => Promise<Treaty.TreatyResponse<{
2190
+ 200: {
2191
+ success: true;
2192
+ statusCode: number;
2193
+ data: null;
2194
+ message: string;
2195
+ error: null;
2196
+ meta: TResponseMeta;
2197
+ } | {
2198
+ success: false;
2199
+ statusCode: number;
2200
+ data: null;
2201
+ message: string;
2202
+ error: TResponseError;
2203
+ meta: TResponseMeta;
2204
+ };
2205
+ 422: {
2206
+ type: "validation";
2207
+ on: string;
2208
+ summary?: string;
2209
+ message?: string;
2210
+ found?: unknown;
2211
+ property?: string;
2212
+ expected?: string;
2213
+ };
2214
+ }>>;
2215
+ };
2216
+ }) & {
2217
+ bulk: {
2218
+ post: (body: {
2219
+ variants: {
2220
+ name: string;
2221
+ description: string;
2222
+ standardCost: number | null;
2223
+ weight: number | null;
2224
+ weightUnit: EWeightUnit | null;
2225
+ length: number | null;
2226
+ width: number | null;
2227
+ height: number | null;
2228
+ dimensionUnit: EDimensionUnit | null;
2229
+ isActive: boolean;
2230
+ isDefault: boolean;
2231
+ isNew: boolean;
2232
+ isSpecial: boolean;
2233
+ }[];
2234
+ }, options?: {
2235
+ headers?: {} | undefined;
2236
+ query?: {} | undefined;
2237
+ fetch?: RequestInit | undefined;
2238
+ } | undefined) => Promise<Treaty.TreatyResponse<{
2239
+ 200: {
2240
+ success: true;
2241
+ statusCode: number;
2242
+ data: null;
2243
+ message: string;
2244
+ error: null;
2245
+ meta: TResponseMeta;
2246
+ } | {
2247
+ success: false;
2248
+ statusCode: number;
2249
+ data: null;
2250
+ message: string;
2251
+ error: TResponseError;
2252
+ meta: TResponseMeta;
2253
+ };
2254
+ 422: {
2255
+ type: "validation";
2256
+ on: string;
2257
+ summary?: string;
2258
+ message?: string;
2259
+ found?: unknown;
2260
+ property?: string;
2261
+ expected?: string;
2262
+ };
2263
+ }>>;
2264
+ };
2265
+ };
1823
2266
  }) & {
1824
2267
  post: (body: {
1825
2268
  name: string;