repzo 1.0.70 → 1.0.71

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
@@ -758,6 +758,26 @@ export default class Repzo {
758
758
  id: Service.MediaStorage.Remove.ID
759
759
  ) => Promise<Service.MediaStorage.Remove.Result>;
760
760
  };
761
+ storecheckTemplate: {
762
+ _path: string;
763
+ find: (
764
+ params?: Service.StorecheckTemplate.Find.Params
765
+ ) => Promise<Service.StorecheckTemplate.Find.Result>;
766
+ get: (
767
+ id: Service.StorecheckTemplate.Get.ID,
768
+ params?: Service.StorecheckTemplate.Get.Params
769
+ ) => Promise<Service.StorecheckTemplate.Get.Result>;
770
+ create: (
771
+ body: Service.StorecheckTemplate.Create.Body
772
+ ) => Promise<Service.StorecheckTemplate.Create.Result>;
773
+ update: (
774
+ id: Service.StorecheckTemplate.Update.ID,
775
+ body: Service.StorecheckTemplate.Update.Body
776
+ ) => Promise<Service.StorecheckTemplate.Update.Result>;
777
+ remove: (
778
+ id: Service.StorecheckTemplate.Remove.ID
779
+ ) => Promise<Service.StorecheckTemplate.Remove.Result>;
780
+ };
761
781
  adjustInventory: {
762
782
  _path: string;
763
783
  find: (
package/lib/index.js CHANGED
@@ -1543,6 +1543,47 @@ export default class Repzo {
1543
1543
  return res;
1544
1544
  },
1545
1545
  };
1546
+ this.storecheckTemplate = {
1547
+ _path: "/storecheck-template",
1548
+ find: async (params) => {
1549
+ let res = await this._fetch(
1550
+ this.svAPIEndpoint,
1551
+ this.storecheckTemplate._path,
1552
+ params
1553
+ );
1554
+ return res;
1555
+ },
1556
+ get: async (id, params) => {
1557
+ return await this._fetch(
1558
+ this.svAPIEndpoint,
1559
+ this.storecheckTemplate._path + `/${id}`,
1560
+ params
1561
+ );
1562
+ },
1563
+ create: async (body) => {
1564
+ let res = await this._create(
1565
+ this.svAPIEndpoint,
1566
+ this.storecheckTemplate._path,
1567
+ body
1568
+ );
1569
+ return res;
1570
+ },
1571
+ update: async (id, body) => {
1572
+ let res = await this._update(
1573
+ this.svAPIEndpoint,
1574
+ this.storecheckTemplate._path + `/${id}`,
1575
+ body
1576
+ );
1577
+ return res;
1578
+ },
1579
+ remove: async (id) => {
1580
+ let res = await this._delete(
1581
+ this.svAPIEndpoint,
1582
+ this.storecheckTemplate._path + `/${id}`
1583
+ );
1584
+ return res;
1585
+ },
1586
+ };
1546
1587
  this.adjustInventory = {
1547
1588
  _path: "/adjust-inventory",
1548
1589
  find: async (params) => {
@@ -1851,6 +1851,197 @@ export declare namespace Service {
1851
1851
  }
1852
1852
  export {};
1853
1853
  }
1854
+ namespace StorecheckTemplate {
1855
+ type SourceType =
1856
+ | "product"
1857
+ | "variant"
1858
+ | "product-category"
1859
+ | "product-sub-category"
1860
+ | "product-brand"
1861
+ | "product-group";
1862
+ type FieldType =
1863
+ | "Text"
1864
+ | "String"
1865
+ | "Date"
1866
+ | "Image"
1867
+ | "Boolean"
1868
+ | "Number"
1869
+ | "List"
1870
+ | "Separator"
1871
+ | "Heading"
1872
+ | "Media";
1873
+ type DataType =
1874
+ | "Separator"
1875
+ | "timestamp"
1876
+ | "String"
1877
+ | "Number"
1878
+ | "Boolean"
1879
+ | "Date"
1880
+ | "Image"
1881
+ | "coords"
1882
+ | "Text"
1883
+ | "Media"
1884
+ | "Heading"
1885
+ | "List"
1886
+ | "Phone"
1887
+ | "Email"
1888
+ | "Signature"
1889
+ | "DateTime"
1890
+ | "YesNo"
1891
+ | "ProductBarcodeScan"
1892
+ | "BarcodeScan"
1893
+ | "GeoPoint";
1894
+ interface UsedField {
1895
+ code: string;
1896
+ key: string;
1897
+ data_type: DataType;
1898
+ field_type: "template_field" | "source_attribute" | "activity_attribute";
1899
+ label: string;
1900
+ isArray?: boolean;
1901
+ formula_key: string;
1902
+ field_id?: string;
1903
+ example_value: DataType;
1904
+ manipulator_function?: string;
1905
+ lookup?: {
1906
+ from?: string;
1907
+ localField?: string;
1908
+ foreignField?: string;
1909
+ as?: string;
1910
+ select?: string;
1911
+ unwind?: boolean;
1912
+ filter?: {
1913
+ input?: string;
1914
+ as: string;
1915
+ cond: any;
1916
+ };
1917
+ };
1918
+ }
1919
+ interface Field {
1920
+ _id?: string;
1921
+ name: string;
1922
+ local_name?: string;
1923
+ description?: string;
1924
+ local_description?: string;
1925
+ type: FieldType;
1926
+ isArray?: boolean;
1927
+ isRequired?: boolean;
1928
+ readOnly?: boolean;
1929
+ presets?: any[];
1930
+ previous_entry?: any;
1931
+ show_previous_result?: boolean;
1932
+ hidden?: boolean;
1933
+ custom_list?: string;
1934
+ custom_list_element?: string;
1935
+ parent_field?: string;
1936
+ invisible?: boolean;
1937
+ display_on_home_screen?: boolean;
1938
+ custom_list_end_point?: {
1939
+ [key: string]: any;
1940
+ };
1941
+ visibility?: {
1942
+ operator: "and" | "or";
1943
+ conditions: {
1944
+ field_id: string;
1945
+ type: "Boolean" | "List";
1946
+ custom_list?: string;
1947
+ operator: "lte" | "lt" | "gte" | "gt" | "eq" | "ne" | "in" | "nin";
1948
+ value: any[];
1949
+ }[];
1950
+ };
1951
+ barcode_scan?: boolean;
1952
+ is_calculated_field?: boolean;
1953
+ formula?: string;
1954
+ formula_key: string;
1955
+ used_fields?: UsedField[];
1956
+ }
1957
+ interface Entry {
1958
+ _id?: string;
1959
+ repeatable: boolean;
1960
+ grouping: "product-category" | "product-brand" | "product-group";
1961
+ require_all_source_elements: boolean;
1962
+ require_group_source_elements: boolean;
1963
+ source: SourceType;
1964
+ filters: string[];
1965
+ fields: Field[];
1966
+ }
1967
+ export interface StorecheckTemplateSchema {
1968
+ _id: string;
1969
+ name: string;
1970
+ local_name?: string;
1971
+ description?: string;
1972
+ local_description?: string;
1973
+ disabled: boolean;
1974
+ entries: Entry[];
1975
+ company_namespace: string[];
1976
+ can_edit_types?: boolean;
1977
+ copied_from?: string;
1978
+ client_specific_sources: boolean;
1979
+ previous_result_activated: boolean;
1980
+ presets_activated: boolean;
1981
+ createdAt?: string;
1982
+ updatedAt?: string;
1983
+ __v?: number;
1984
+ }
1985
+ export interface CreateBody {
1986
+ name: string;
1987
+ local_name?: string;
1988
+ description?: string;
1989
+ local_description?: string;
1990
+ disabled: boolean;
1991
+ company_namespace: string[];
1992
+ can_edit_types?: boolean;
1993
+ copied_from?: string;
1994
+ client_specific_sources: boolean;
1995
+ previous_result_activated: boolean;
1996
+ presets_activated: boolean;
1997
+ }
1998
+ export interface UpdateBody {
1999
+ _id?: string;
2000
+ name?: string;
2001
+ local_name?: string;
2002
+ description?: string;
2003
+ local_description?: string;
2004
+ disabled?: boolean;
2005
+ company_namespace?: string[];
2006
+ can_edit_types?: boolean;
2007
+ copied_from?: string;
2008
+ client_specific_sources?: boolean;
2009
+ previous_result_activated?: boolean;
2010
+ presets_activated?: boolean;
2011
+ }
2012
+ export namespace Find {
2013
+ type Params = DefaultPaginationQueryParams & {
2014
+ _id?: string[] | string;
2015
+ key?: string;
2016
+ name?: string;
2017
+ local_name?: string;
2018
+ disabled?: boolean;
2019
+ from_updatedAt?: number;
2020
+ };
2021
+ interface Result extends DefaultPaginationResult {
2022
+ data: StorecheckTemplateSchema[];
2023
+ }
2024
+ }
2025
+ export namespace Get {
2026
+ type ID = string;
2027
+ interface Params {}
2028
+ type Result = StorecheckTemplateSchema;
2029
+ }
2030
+ export namespace Create {
2031
+ type Body = CreateBody;
2032
+ type Result = StorecheckTemplateSchema;
2033
+ }
2034
+ export namespace Update {
2035
+ type ID = string;
2036
+ type Body = UpdateBody;
2037
+ type Result = StorecheckTemplateSchema;
2038
+ }
2039
+ export namespace Remove {
2040
+ type ID = string;
2041
+ type Result = StorecheckTemplateSchema;
2042
+ }
2043
+ export {};
2044
+ }
1854
2045
  namespace Msl {
1855
2046
  interface MslSchema {
1856
2047
  _id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.70",
3
+ "version": "1.0.71",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -2210,6 +2210,64 @@ export default class Repzo {
2210
2210
  },
2211
2211
  };
2212
2212
 
2213
+ storecheckTemplate = {
2214
+ _path: "/storecheck-template",
2215
+ find: async (
2216
+ params?: Service.StorecheckTemplate.Find.Params
2217
+ ): Promise<Service.StorecheckTemplate.Find.Result> => {
2218
+ let res: Service.StorecheckTemplate.Find.Result = await this._fetch(
2219
+ this.svAPIEndpoint,
2220
+ this.storecheckTemplate._path,
2221
+ params
2222
+ );
2223
+ return res;
2224
+ },
2225
+
2226
+ get: async (
2227
+ id: Service.StorecheckTemplate.Get.ID,
2228
+ params?: Service.StorecheckTemplate.Get.Params
2229
+ ): Promise<Service.StorecheckTemplate.Get.Result> => {
2230
+ return await this._fetch(
2231
+ this.svAPIEndpoint,
2232
+ this.storecheckTemplate._path + `/${id}`,
2233
+ params
2234
+ );
2235
+ },
2236
+
2237
+ create: async (
2238
+ body: Service.StorecheckTemplate.Create.Body
2239
+ ): Promise<Service.StorecheckTemplate.Create.Result> => {
2240
+ let res = await this._create(
2241
+ this.svAPIEndpoint,
2242
+ this.storecheckTemplate._path,
2243
+ body
2244
+ );
2245
+ return res;
2246
+ },
2247
+
2248
+ update: async (
2249
+ id: Service.StorecheckTemplate.Update.ID,
2250
+ body: Service.StorecheckTemplate.Update.Body
2251
+ ): Promise<Service.StorecheckTemplate.Update.Result> => {
2252
+ let res: Service.StorecheckTemplate.Update.Result = await this._update(
2253
+ this.svAPIEndpoint,
2254
+ this.storecheckTemplate._path + `/${id}`,
2255
+ body
2256
+ );
2257
+ return res;
2258
+ },
2259
+
2260
+ remove: async (
2261
+ id: Service.StorecheckTemplate.Remove.ID
2262
+ ): Promise<Service.StorecheckTemplate.Remove.Result> => {
2263
+ let res: Service.StorecheckTemplate.Remove.Result = await this._delete(
2264
+ this.svAPIEndpoint,
2265
+ this.storecheckTemplate._path + `/${id}`
2266
+ );
2267
+ return res;
2268
+ },
2269
+ };
2270
+
2213
2271
  adjustInventory = {
2214
2272
  _path: "/adjust-inventory",
2215
2273
  find: async (
@@ -1884,6 +1884,196 @@ export namespace Service {
1884
1884
  }
1885
1885
  }
1886
1886
 
1887
+ export namespace StorecheckTemplate {
1888
+ type SourceType =
1889
+ | "product"
1890
+ | "variant"
1891
+ | "product-category"
1892
+ | "product-sub-category"
1893
+ | "product-brand"
1894
+ | "product-group";
1895
+
1896
+ type FieldType =
1897
+ | "Text"
1898
+ | "String"
1899
+ | "Date"
1900
+ | "Image"
1901
+ | "Boolean"
1902
+ | "Number"
1903
+ | "List"
1904
+ | "Separator"
1905
+ | "Heading"
1906
+ | "Media";
1907
+ type DataType =
1908
+ | "Separator"
1909
+ | "timestamp"
1910
+ | "String"
1911
+ | "Number"
1912
+ | "Boolean"
1913
+ | "Date"
1914
+ | "Image"
1915
+ | "coords"
1916
+ | "Text"
1917
+ | "Media"
1918
+ | "Heading"
1919
+ | "List"
1920
+ | "Phone"
1921
+ | "Email"
1922
+ | "Signature"
1923
+ | "DateTime"
1924
+ | "YesNo"
1925
+ | "ProductBarcodeScan"
1926
+ | "BarcodeScan"
1927
+ | "GeoPoint";
1928
+ interface UsedField {
1929
+ code: string;
1930
+ key: string;
1931
+ data_type: DataType;
1932
+ field_type: "template_field" | "source_attribute" | "activity_attribute";
1933
+ label: string;
1934
+ isArray?: boolean;
1935
+ formula_key: string;
1936
+ field_id?: string;
1937
+ example_value: DataType;
1938
+ manipulator_function?: string;
1939
+ lookup?: {
1940
+ from?: string;
1941
+ localField?: string;
1942
+ foreignField?: string;
1943
+ as?: string;
1944
+ select?: string;
1945
+ unwind?: boolean;
1946
+ filter?: {
1947
+ input?: string;
1948
+ as: string;
1949
+ cond: any;
1950
+ };
1951
+ };
1952
+ }
1953
+ interface Field {
1954
+ _id?: string;
1955
+ name: string;
1956
+ local_name?: string;
1957
+ description?: string;
1958
+ local_description?: string;
1959
+ type: FieldType;
1960
+ isArray?: boolean;
1961
+ isRequired?: boolean;
1962
+ readOnly?: boolean;
1963
+ presets?: any[];
1964
+ previous_entry?: any;
1965
+ show_previous_result?: boolean;
1966
+ hidden?: boolean;
1967
+ custom_list?: string;
1968
+ custom_list_element?: string;
1969
+ parent_field?: string;
1970
+ invisible?: boolean;
1971
+ display_on_home_screen?: boolean;
1972
+ custom_list_end_point?: { [key: string]: any };
1973
+ visibility?: {
1974
+ operator: "and" | "or";
1975
+ conditions: {
1976
+ field_id: string;
1977
+ type: "Boolean" | "List"; // FieldType;
1978
+ custom_list?: string;
1979
+ operator: "lte" | "lt" | "gte" | "gt" | "eq" | "ne" | "in" | "nin";
1980
+ value: any[];
1981
+ }[];
1982
+ };
1983
+ barcode_scan?: boolean;
1984
+ is_calculated_field?: boolean;
1985
+ formula?: string;
1986
+ formula_key: string;
1987
+ used_fields?: UsedField[];
1988
+ }
1989
+ interface Entry {
1990
+ _id?: string;
1991
+ repeatable: boolean;
1992
+ grouping: "product-category" | "product-brand" | "product-group";
1993
+ require_all_source_elements: boolean;
1994
+ require_group_source_elements: boolean;
1995
+ source: SourceType;
1996
+ filters: string[];
1997
+ fields: Field[];
1998
+ }
1999
+ export interface StorecheckTemplateSchema {
2000
+ _id: string;
2001
+ name: string;
2002
+ local_name?: string;
2003
+ description?: string;
2004
+ local_description?: string;
2005
+ disabled: boolean;
2006
+ entries: Entry[];
2007
+ company_namespace: string[];
2008
+ can_edit_types?: boolean;
2009
+ copied_from?: string;
2010
+ client_specific_sources: boolean;
2011
+ previous_result_activated: boolean;
2012
+ presets_activated: boolean;
2013
+ createdAt?: string;
2014
+ updatedAt?: string;
2015
+ __v?: number;
2016
+ }
2017
+ export interface CreateBody {
2018
+ name: string;
2019
+ local_name?: string;
2020
+ description?: string;
2021
+ local_description?: string;
2022
+ disabled: boolean;
2023
+ company_namespace: string[];
2024
+ can_edit_types?: boolean;
2025
+ copied_from?: string;
2026
+ client_specific_sources: boolean;
2027
+ previous_result_activated: boolean;
2028
+ presets_activated: boolean;
2029
+ }
2030
+ export interface UpdateBody {
2031
+ _id?: string;
2032
+ name?: string;
2033
+ local_name?: string;
2034
+ description?: string;
2035
+ local_description?: string;
2036
+ disabled?: boolean;
2037
+ company_namespace?: string[];
2038
+ can_edit_types?: boolean;
2039
+ copied_from?: string;
2040
+ client_specific_sources?: boolean;
2041
+ previous_result_activated?: boolean;
2042
+ presets_activated?: boolean;
2043
+ }
2044
+ export namespace Find {
2045
+ export type Params = DefaultPaginationQueryParams & {
2046
+ _id?: string[] | string;
2047
+ key?: string;
2048
+ name?: string;
2049
+ local_name?: string;
2050
+ disabled?: boolean;
2051
+ from_updatedAt?: number;
2052
+ };
2053
+ export interface Result extends DefaultPaginationResult {
2054
+ data: StorecheckTemplateSchema[];
2055
+ }
2056
+ }
2057
+ export namespace Get {
2058
+ export type ID = string;
2059
+ export interface Params {}
2060
+ export type Result = StorecheckTemplateSchema;
2061
+ }
2062
+ export namespace Create {
2063
+ export type Body = CreateBody;
2064
+ export type Result = StorecheckTemplateSchema;
2065
+ }
2066
+ export namespace Update {
2067
+ export type ID = string;
2068
+ export type Body = UpdateBody;
2069
+ export type Result = StorecheckTemplateSchema;
2070
+ }
2071
+ export namespace Remove {
2072
+ export type ID = string;
2073
+ export type Result = StorecheckTemplateSchema;
2074
+ }
2075
+ }
2076
+
1887
2077
  export namespace Msl {
1888
2078
  export interface MslSchema {
1889
2079
  _id: string;