repzo 1.0.67 → 1.0.69

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/lib/index.d.ts CHANGED
@@ -700,6 +700,44 @@ export default class Repzo {
700
700
  body: Service.Transfer.Update.Body
701
701
  ) => Promise<Service.Transfer.Update.Result>;
702
702
  };
703
+ msl: {
704
+ _path: string;
705
+ find: (
706
+ params?: Service.Msl.Find.Params
707
+ ) => Promise<Service.Msl.Find.Result>;
708
+ get: (
709
+ id: Service.Msl.Get.ID,
710
+ params?: Service.Msl.Get.Params
711
+ ) => Promise<Service.Msl.Get.Result>;
712
+ create: (
713
+ body: Service.Msl.Create.Body
714
+ ) => Promise<Service.Msl.Create.Result>;
715
+ update: (
716
+ id: Service.Msl.Update.ID,
717
+ body: Service.Msl.Update.Body
718
+ ) => Promise<Service.Msl.Update.Result>;
719
+ remove: (id: Service.Msl.Remove.ID) => Promise<Service.Msl.Remove.Result>;
720
+ };
721
+ mslProduct: {
722
+ _path: string;
723
+ find: (
724
+ params?: Service.MslProduct.Find.Params
725
+ ) => Promise<Service.MslProduct.Find.Result>;
726
+ get: (
727
+ id: Service.MslProduct.Get.ID,
728
+ params?: Service.MslProduct.Get.Params
729
+ ) => Promise<Service.MslProduct.Get.Result>;
730
+ create: (
731
+ body: Service.MslProduct.Create.Body
732
+ ) => Promise<Service.MslProduct.Create.Result>;
733
+ update: (
734
+ id: Service.MslProduct.Update.ID,
735
+ body: Service.MslProduct.Update.Body
736
+ ) => Promise<Service.MslProduct.Update.Result>;
737
+ remove: (
738
+ id: Service.MslProduct.Remove.ID
739
+ ) => Promise<Service.MslProduct.Remove.Result>;
740
+ };
703
741
  adjustInventory: {
704
742
  _path: string;
705
743
  find: (
package/lib/index.js CHANGED
@@ -1428,6 +1428,80 @@ export default class Repzo {
1428
1428
  return res;
1429
1429
  },
1430
1430
  };
1431
+ this.msl = {
1432
+ _path: "/msl",
1433
+ find: async (params) => {
1434
+ let res = await this._fetch(this.svAPIEndpoint, this.msl._path, params);
1435
+ return res;
1436
+ },
1437
+ get: async (id, params) => {
1438
+ return await this._fetch(
1439
+ this.svAPIEndpoint,
1440
+ this.msl._path + `/${id}`,
1441
+ params
1442
+ );
1443
+ },
1444
+ create: async (body) => {
1445
+ let res = await this._create(this.svAPIEndpoint, this.msl._path, body);
1446
+ return res;
1447
+ },
1448
+ update: async (id, body) => {
1449
+ let res = await this._update(
1450
+ this.svAPIEndpoint,
1451
+ this.msl._path + `/${id}`,
1452
+ body
1453
+ );
1454
+ return res;
1455
+ },
1456
+ remove: async (id) => {
1457
+ let res = await this._delete(
1458
+ this.svAPIEndpoint,
1459
+ this.msl._path + `/${id}`
1460
+ );
1461
+ return res;
1462
+ },
1463
+ };
1464
+ this.mslProduct = {
1465
+ _path: "/msl-products",
1466
+ find: async (params) => {
1467
+ let res = await this._fetch(
1468
+ this.svAPIEndpoint,
1469
+ this.mslProduct._path,
1470
+ params
1471
+ );
1472
+ return res;
1473
+ },
1474
+ get: async (id, params) => {
1475
+ return await this._fetch(
1476
+ this.svAPIEndpoint,
1477
+ this.mslProduct._path + `/${id}`,
1478
+ params
1479
+ );
1480
+ },
1481
+ create: async (body) => {
1482
+ let res = await this._create(
1483
+ this.svAPIEndpoint,
1484
+ this.mslProduct._path,
1485
+ body
1486
+ );
1487
+ return res;
1488
+ },
1489
+ update: async (id, body) => {
1490
+ let res = await this._update(
1491
+ this.svAPIEndpoint,
1492
+ this.mslProduct._path + `/${id}`,
1493
+ body
1494
+ );
1495
+ return res;
1496
+ },
1497
+ remove: async (id) => {
1498
+ let res = await this._delete(
1499
+ this.svAPIEndpoint,
1500
+ this.mslProduct._path + `/${id}`
1501
+ );
1502
+ return res;
1503
+ },
1504
+ };
1431
1505
  this.adjustInventory = {
1432
1506
  _path: "/adjust-inventory",
1433
1507
  find: async (params) => {
@@ -1643,6 +1643,136 @@ export declare namespace Service {
1643
1643
  }
1644
1644
  export {};
1645
1645
  }
1646
+ namespace Msl {
1647
+ interface MslSchema {
1648
+ _id: string;
1649
+ name: string;
1650
+ disabled: boolean;
1651
+ company_namespace: string[];
1652
+ createdAt: string;
1653
+ updatedAt: string;
1654
+ }
1655
+ interface CreateBody {
1656
+ name: string;
1657
+ disabled: boolean;
1658
+ company_namespace: string[];
1659
+ }
1660
+ interface UpdateBody {
1661
+ _id?: string;
1662
+ name?: string;
1663
+ disabled?: boolean;
1664
+ company_namespace?: string[];
1665
+ }
1666
+ namespace Find {
1667
+ type Params = DefaultPaginationQueryParams & {
1668
+ _id?: string[] | string;
1669
+ disabled?: boolean;
1670
+ name?: string;
1671
+ search?: string;
1672
+ from_updatedAt?: number;
1673
+ };
1674
+ interface Result extends DefaultPaginationResult {
1675
+ data: MslSchema[];
1676
+ }
1677
+ }
1678
+ namespace Get {
1679
+ type ID = string;
1680
+ interface Params {}
1681
+ type Result = MslSchema;
1682
+ }
1683
+ namespace Create {
1684
+ type Body = CreateBody;
1685
+ type Result = MslSchema;
1686
+ }
1687
+ namespace Update {
1688
+ type ID = string;
1689
+ type Body = UpdateBody;
1690
+ type Result = MslSchema;
1691
+ }
1692
+ namespace Remove {
1693
+ type ID = string;
1694
+ type Result = MslSchema;
1695
+ }
1696
+ }
1697
+ namespace MslProduct {
1698
+ export interface MslProductSchema {
1699
+ _id: string;
1700
+ msl_id: string;
1701
+ variant_id: string;
1702
+ product_id: string;
1703
+ min_qty?: number;
1704
+ max_qty?: number;
1705
+ force_min?: boolean;
1706
+ force_max?: boolean;
1707
+ disabled: boolean;
1708
+ company_namespace: string[];
1709
+ createdAt: string;
1710
+ updatedAt: string;
1711
+ }
1712
+ export interface CreateBody {
1713
+ msl_id: string;
1714
+ variant_id: string;
1715
+ product_id: string;
1716
+ min_qty?: number;
1717
+ max_qty?: number;
1718
+ force_min?: boolean;
1719
+ force_max?: boolean;
1720
+ disabled: boolean;
1721
+ company_namespace: string[];
1722
+ }
1723
+ export interface UpdateBody {
1724
+ _id?: string;
1725
+ msl_id?: string;
1726
+ variant_id?: string;
1727
+ product_id?: string;
1728
+ min_qty?: number;
1729
+ max_qty?: number;
1730
+ force_min?: boolean;
1731
+ force_max?: boolean;
1732
+ disabled?: boolean;
1733
+ company_namespace?: string[];
1734
+ }
1735
+ type PopulatedKeys = "product" | "variant" | "msl";
1736
+ export type MslProductWithPopulatedKeysSchema = MslProductSchema & {
1737
+ product_id: string | Product.ProductSchema;
1738
+ variant_id: string | Variant.VariantSchema;
1739
+ msl_id: string | Msl.MslSchema;
1740
+ };
1741
+ export namespace Find {
1742
+ type Params = DefaultPaginationQueryParams & {
1743
+ _id?: string[] | string;
1744
+ disabled?: boolean;
1745
+ product_id?: string;
1746
+ variant_id?: string;
1747
+ msl_id?: string;
1748
+ from_updatedAt?: number;
1749
+ to_updatedAt?: number;
1750
+ populatedKeys?: PopulatedKeys[];
1751
+ };
1752
+ interface Result extends DefaultPaginationResult {
1753
+ data: MslProductWithPopulatedKeysSchema[];
1754
+ }
1755
+ }
1756
+ export namespace Get {
1757
+ type ID = string;
1758
+ interface Params {}
1759
+ type Result = MslProductSchema;
1760
+ }
1761
+ export namespace Create {
1762
+ type Body = CreateBody;
1763
+ type Result = MslProductSchema;
1764
+ }
1765
+ export namespace Update {
1766
+ type ID = string;
1767
+ type Body = UpdateBody;
1768
+ type Result = MslProductSchema;
1769
+ }
1770
+ export namespace Remove {
1771
+ type ID = string;
1772
+ type Result = MslProductSchema;
1773
+ }
1774
+ export {};
1775
+ }
1646
1776
  namespace Team {
1647
1777
  interface TeamSchema {
1648
1778
  _id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.67",
3
+ "version": "1.0.69",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -2040,6 +2040,118 @@ export default class Repzo {
2040
2040
  },
2041
2041
  };
2042
2042
 
2043
+ msl = {
2044
+ _path: "/msl",
2045
+ find: async (
2046
+ params?: Service.Msl.Find.Params
2047
+ ): Promise<Service.Msl.Find.Result> => {
2048
+ let res: Service.Msl.Find.Result = await this._fetch(
2049
+ this.svAPIEndpoint,
2050
+ this.msl._path,
2051
+ params
2052
+ );
2053
+ return res;
2054
+ },
2055
+
2056
+ get: async (
2057
+ id: Service.Msl.Get.ID,
2058
+ params?: Service.Msl.Get.Params
2059
+ ): Promise<Service.Msl.Get.Result> => {
2060
+ return await this._fetch(
2061
+ this.svAPIEndpoint,
2062
+ this.msl._path + `/${id}`,
2063
+ params
2064
+ );
2065
+ },
2066
+
2067
+ create: async (
2068
+ body: Service.Msl.Create.Body
2069
+ ): Promise<Service.Msl.Create.Result> => {
2070
+ let res = await this._create(this.svAPIEndpoint, this.msl._path, body);
2071
+ return res;
2072
+ },
2073
+
2074
+ update: async (
2075
+ id: Service.Msl.Update.ID,
2076
+ body: Service.Msl.Update.Body
2077
+ ): Promise<Service.Msl.Update.Result> => {
2078
+ let res: Service.Msl.Update.Result = await this._update(
2079
+ this.svAPIEndpoint,
2080
+ this.msl._path + `/${id}`,
2081
+ body
2082
+ );
2083
+ return res;
2084
+ },
2085
+
2086
+ remove: async (
2087
+ id: Service.Msl.Remove.ID
2088
+ ): Promise<Service.Msl.Remove.Result> => {
2089
+ let res: Service.Msl.Remove.Result = await this._delete(
2090
+ this.svAPIEndpoint,
2091
+ this.msl._path + `/${id}`
2092
+ );
2093
+ return res;
2094
+ },
2095
+ };
2096
+
2097
+ mslProduct = {
2098
+ _path: "/msl-products",
2099
+ find: async (
2100
+ params?: Service.MslProduct.Find.Params
2101
+ ): Promise<Service.MslProduct.Find.Result> => {
2102
+ let res: Service.MslProduct.Find.Result = await this._fetch(
2103
+ this.svAPIEndpoint,
2104
+ this.mslProduct._path,
2105
+ params
2106
+ );
2107
+ return res;
2108
+ },
2109
+
2110
+ get: async (
2111
+ id: Service.MslProduct.Get.ID,
2112
+ params?: Service.MslProduct.Get.Params
2113
+ ): Promise<Service.MslProduct.Get.Result> => {
2114
+ return await this._fetch(
2115
+ this.svAPIEndpoint,
2116
+ this.mslProduct._path + `/${id}`,
2117
+ params
2118
+ );
2119
+ },
2120
+
2121
+ create: async (
2122
+ body: Service.MslProduct.Create.Body
2123
+ ): Promise<Service.MslProduct.Create.Result> => {
2124
+ let res = await this._create(
2125
+ this.svAPIEndpoint,
2126
+ this.mslProduct._path,
2127
+ body
2128
+ );
2129
+ return res;
2130
+ },
2131
+
2132
+ update: async (
2133
+ id: Service.MslProduct.Update.ID,
2134
+ body: Service.MslProduct.Update.Body
2135
+ ): Promise<Service.MslProduct.Update.Result> => {
2136
+ let res: Service.MslProduct.Update.Result = await this._update(
2137
+ this.svAPIEndpoint,
2138
+ this.mslProduct._path + `/${id}`,
2139
+ body
2140
+ );
2141
+ return res;
2142
+ },
2143
+
2144
+ remove: async (
2145
+ id: Service.MslProduct.Remove.ID
2146
+ ): Promise<Service.MslProduct.Remove.Result> => {
2147
+ let res: Service.MslProduct.Remove.Result = await this._delete(
2148
+ this.svAPIEndpoint,
2149
+ this.mslProduct._path + `/${id}`
2150
+ );
2151
+ return res;
2152
+ },
2153
+ };
2154
+
2043
2155
  adjustInventory = {
2044
2156
  _path: "/adjust-inventory",
2045
2157
  find: async (
@@ -1673,6 +1673,137 @@ export namespace Service {
1673
1673
  }
1674
1674
  }
1675
1675
 
1676
+ export namespace Msl {
1677
+ export interface MslSchema {
1678
+ _id: string;
1679
+ name: string;
1680
+ disabled: boolean;
1681
+ company_namespace: string[];
1682
+ createdAt: string;
1683
+ updatedAt: string;
1684
+ }
1685
+ export interface CreateBody {
1686
+ name: string;
1687
+ disabled: boolean;
1688
+ company_namespace: string[];
1689
+ }
1690
+ export interface UpdateBody {
1691
+ _id?: string;
1692
+ name?: string;
1693
+ disabled?: boolean;
1694
+ company_namespace?: string[];
1695
+ }
1696
+ export namespace Find {
1697
+ export type Params = DefaultPaginationQueryParams & {
1698
+ _id?: string[] | string;
1699
+ disabled?: boolean;
1700
+ name?: string;
1701
+ search?: string;
1702
+ from_updatedAt?: number;
1703
+ };
1704
+ export interface Result extends DefaultPaginationResult {
1705
+ data: MslSchema[];
1706
+ }
1707
+ }
1708
+ export namespace Get {
1709
+ export type ID = string;
1710
+ export interface Params {}
1711
+ export type Result = MslSchema;
1712
+ }
1713
+ export namespace Create {
1714
+ export type Body = CreateBody;
1715
+ export type Result = MslSchema;
1716
+ }
1717
+ export namespace Update {
1718
+ export type ID = string;
1719
+ export type Body = UpdateBody;
1720
+ export type Result = MslSchema;
1721
+ }
1722
+ export namespace Remove {
1723
+ export type ID = string;
1724
+ export type Result = MslSchema;
1725
+ }
1726
+ }
1727
+ export namespace MslProduct {
1728
+ export interface MslProductSchema {
1729
+ _id: string;
1730
+ msl_id: string;
1731
+ variant_id: string;
1732
+ product_id: string;
1733
+ min_qty?: number;
1734
+ max_qty?: number;
1735
+ force_min?: boolean;
1736
+ force_max?: boolean;
1737
+ disabled: boolean;
1738
+ company_namespace: string[];
1739
+ createdAt: string;
1740
+ updatedAt: string;
1741
+ }
1742
+ export interface CreateBody {
1743
+ msl_id: string;
1744
+ variant_id: string;
1745
+ product_id: string;
1746
+ min_qty?: number;
1747
+ max_qty?: number;
1748
+ force_min?: boolean;
1749
+ force_max?: boolean;
1750
+ disabled: boolean;
1751
+ company_namespace: string[];
1752
+ }
1753
+ export interface UpdateBody {
1754
+ _id?: string;
1755
+ msl_id?: string;
1756
+ variant_id?: string;
1757
+ product_id?: string;
1758
+ min_qty?: number;
1759
+ max_qty?: number;
1760
+ force_min?: boolean;
1761
+ force_max?: boolean;
1762
+ disabled?: boolean;
1763
+ company_namespace?: string[];
1764
+ }
1765
+ type PopulatedKeys = "product" | "variant" | "msl";
1766
+
1767
+ export type MslProductWithPopulatedKeysSchema = MslProductSchema & {
1768
+ product_id: string | Product.ProductSchema;
1769
+ variant_id: string | Variant.VariantSchema;
1770
+ msl_id: string | Msl.MslSchema;
1771
+ };
1772
+ export namespace Find {
1773
+ export type Params = DefaultPaginationQueryParams & {
1774
+ _id?: string[] | string;
1775
+ disabled?: boolean;
1776
+ product_id?: string;
1777
+ variant_id?: string;
1778
+ msl_id?: string;
1779
+ from_updatedAt?: number;
1780
+ to_updatedAt?: number;
1781
+ populatedKeys?: PopulatedKeys[];
1782
+ };
1783
+ export interface Result extends DefaultPaginationResult {
1784
+ data: MslProductWithPopulatedKeysSchema[];
1785
+ }
1786
+ }
1787
+ export namespace Get {
1788
+ export type ID = string;
1789
+ export interface Params {}
1790
+ export type Result = MslProductSchema;
1791
+ }
1792
+ export namespace Create {
1793
+ export type Body = CreateBody;
1794
+ export type Result = MslProductSchema;
1795
+ }
1796
+ export namespace Update {
1797
+ export type ID = string;
1798
+ export type Body = UpdateBody;
1799
+ export type Result = MslProductSchema;
1800
+ }
1801
+ export namespace Remove {
1802
+ export type ID = string;
1803
+ export type Result = MslProductSchema;
1804
+ }
1805
+ }
1806
+
1676
1807
  export namespace Team {
1677
1808
  export interface TeamSchema {
1678
1809
  _id: string;