repzo 1.0.45 → 1.0.47

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
@@ -119,6 +119,14 @@ export default class Repzo {
119
119
  update: (id: Service.Team.Update.ID, body: Service.Team.Update.Body) => Promise<Service.Team.Update.Result>;
120
120
  remove: (id: Service.Team.Remove.ID) => Promise<Service.Team.Remove.Result>;
121
121
  };
122
+ returnReason: {
123
+ _path: string;
124
+ find: (params?: Service.ReturnReason.Find.Params) => Promise<Service.ReturnReason.Find.Result>;
125
+ get: (id: Service.ReturnReason.Get.ID) => Promise<Service.ReturnReason.Get.Result>;
126
+ create: (body: Service.ReturnReason.Create.Body) => Promise<Service.ReturnReason.Create.Result>;
127
+ update: (id: Service.ReturnReason.Update.ID, body: Service.ReturnReason.Update.Body) => Promise<Service.ReturnReason.Update.Result>;
128
+ remove: (id: Service.ReturnReason.Remove.ID) => Promise<Service.ReturnReason.Remove.Result>;
129
+ };
122
130
  rep: {
123
131
  _path: string;
124
132
  find: (params?: Service.Rep.Find.Params) => Promise<Service.Rep.Find.Result>;
@@ -143,6 +151,22 @@ export default class Repzo {
143
151
  update: (id: Service.Warehouse.Update.ID, body: Service.Warehouse.Update.Body) => Promise<Service.Warehouse.Update.Result>;
144
152
  remove: (id: Service.Warehouse.Remove.ID) => Promise<Service.Warehouse.Remove.Result>;
145
153
  };
154
+ route: {
155
+ _path: string;
156
+ find: (params?: Service.Route.Find.Params) => Promise<Service.Route.Find.Result>;
157
+ get: (id: Service.Route.Get.ID) => Promise<Service.Route.Get.Result>;
158
+ create: (body: Service.Route.Create.Body) => Promise<Service.Route.Create.Result>;
159
+ update: (id: Service.Route.Update.ID, body: Service.Route.Update.Body) => Promise<Service.Route.Update.Result>;
160
+ remove: (id: Service.Route.Remove.ID) => Promise<Service.Route.Remove.Result>;
161
+ };
162
+ productModifiersGroup: {
163
+ _path: string;
164
+ find: (params?: Service.ProductModifiersGroup.Find.Params) => Promise<Service.ProductModifiersGroup.Find.Result>;
165
+ get: (id: Service.ProductModifiersGroup.Get.ID) => Promise<Service.ProductModifiersGroup.Get.Result>;
166
+ create: (body: Service.ProductModifiersGroup.Create.Body) => Promise<Service.ProductModifiersGroup.Create.Result>;
167
+ update: (id: Service.ProductModifiersGroup.Update.ID, body: Service.ProductModifiersGroup.Update.Body) => Promise<Service.ProductModifiersGroup.Update.Result>;
168
+ remove: (id: Service.ProductModifiersGroup.Remove.ID) => Promise<Service.ProductModifiersGroup.Remove.Result>;
169
+ };
146
170
  channel: {
147
171
  _path: string;
148
172
  find: (params?: Service.Channel.Find.Params) => Promise<Service.Channel.Find.Result>;
package/lib/index.js CHANGED
@@ -310,6 +310,28 @@ export default class Repzo {
310
310
  return res;
311
311
  },
312
312
  };
313
+ this.returnReason = {
314
+ _path: "/return-reason",
315
+ find: async (params) => {
316
+ let res = await this._fetch(this.svAPIEndpoint, this.returnReason._path, params);
317
+ return res;
318
+ },
319
+ get: async (id) => {
320
+ return await this._fetch(this.svAPIEndpoint, this.returnReason._path + `/${id}`);
321
+ },
322
+ create: async (body) => {
323
+ let res = await this._create(this.svAPIEndpoint, this.returnReason._path, body);
324
+ return res;
325
+ },
326
+ update: async (id, body) => {
327
+ let res = await this._update(this.svAPIEndpoint, this.returnReason._path + `/${id}`, body);
328
+ return res;
329
+ },
330
+ remove: async (id) => {
331
+ let res = await this._delete(this.svAPIEndpoint, this.returnReason._path + `/${id}`);
332
+ return res;
333
+ },
334
+ };
313
335
  this.rep = {
314
336
  _path: "/rep",
315
337
  find: async (params) => {
@@ -376,6 +398,50 @@ export default class Repzo {
376
398
  return res;
377
399
  },
378
400
  };
401
+ this.route = {
402
+ _path: "/route",
403
+ find: async (params) => {
404
+ let res = await this._fetch(this.svAPIEndpoint, this.route._path, params);
405
+ return res;
406
+ },
407
+ get: async (id) => {
408
+ return await this._fetch(this.svAPIEndpoint, this.route._path + `/${id}`);
409
+ },
410
+ create: async (body) => {
411
+ let res = await this._create(this.svAPIEndpoint, this.route._path, body);
412
+ return res;
413
+ },
414
+ update: async (id, body) => {
415
+ let res = await this._update(this.svAPIEndpoint, this.route._path + `/${id}`, body);
416
+ return res;
417
+ },
418
+ remove: async (id) => {
419
+ let res = await this._delete(this.svAPIEndpoint, this.route._path + `/${id}`);
420
+ return res;
421
+ },
422
+ };
423
+ this.productModifiersGroup = {
424
+ _path: "/product-modifiers-group",
425
+ find: async (params) => {
426
+ let res = await this._fetch(this.svAPIEndpoint, this.productModifiersGroup._path, params);
427
+ return res;
428
+ },
429
+ get: async (id) => {
430
+ return await this._fetch(this.svAPIEndpoint, this.productModifiersGroup._path + `/${id}`);
431
+ },
432
+ create: async (body) => {
433
+ let res = await this._create(this.svAPIEndpoint, this.productModifiersGroup._path, body);
434
+ return res;
435
+ },
436
+ update: async (id, body) => {
437
+ let res = await this._update(this.svAPIEndpoint, this.productModifiersGroup._path + `/${id}`, body);
438
+ return res;
439
+ },
440
+ remove: async (id) => {
441
+ let res = await this._delete(this.svAPIEndpoint, this.productModifiersGroup._path + `/${id}`);
442
+ return res;
443
+ },
444
+ };
379
445
  this.channel = {
380
446
  _path: "/client-channel",
381
447
  find: async (params) => {
@@ -712,7 +712,11 @@ export declare namespace Service {
712
712
  [key: string]: any;
713
713
  };
714
714
  }
715
- type PopulatedKeys = "product";
715
+ type PopulatedKeys = "product" | "modifiers_groups";
716
+ type VariantWithPopulatedKeys = VariantSchema & {
717
+ modifiers_groups?: string[] | ProductModifiersGroup.ProductModifiersGroupSchema[];
718
+ product?: string | Product.ProductSchema;
719
+ };
716
720
  export namespace Find {
717
721
  type Params = DefaultPaginationQueryParams & {
718
722
  _id?: string[] | string;
@@ -727,6 +731,7 @@ export declare namespace Service {
727
731
  position?: number[] | number;
728
732
  createdAt?: number;
729
733
  updatedAt?: number;
734
+ from_updatedAt?: number;
730
735
  default?: boolean;
731
736
  category?: string[] | string;
732
737
  subCategory?: string[] | string;
@@ -734,10 +739,11 @@ export declare namespace Service {
734
739
  productGroup?: string[] | string;
735
740
  teams?: string[] | string;
736
741
  withProduct?: boolean;
742
+ populatedKeys?: PopulatedKeys[];
737
743
  [key: string]: any;
738
744
  };
739
745
  interface Result extends DefaultPaginationResult {
740
- data: VariantSchema[];
746
+ data: VariantWithPopulatedKeys[];
741
747
  }
742
748
  }
743
749
  export namespace Get {
@@ -1988,6 +1994,82 @@ export declare namespace Service {
1988
1994
  }
1989
1995
  export {};
1990
1996
  }
1997
+ namespace Route {
1998
+ export interface RouteSchema {
1999
+ _id: string;
2000
+ name: string;
2001
+ disabled: boolean;
2002
+ sync_id: string;
2003
+ force_sequence: boolean;
2004
+ editor: AdminCreator;
2005
+ list: List[];
2006
+ company_namespace: string[];
2007
+ createdAt: string;
2008
+ updatedAt: string;
2009
+ }
2010
+ export interface RouteBody {
2011
+ name?: string;
2012
+ disabled?: boolean;
2013
+ sync_id?: string;
2014
+ force_sequence?: boolean;
2015
+ editor?: AdminCreator;
2016
+ list?: List[];
2017
+ company_namespace?: string[];
2018
+ }
2019
+ type PopulatedKeys = "client" | "list.client";
2020
+ interface List {
2021
+ client: string;
2022
+ from?: string;
2023
+ to?: string;
2024
+ }
2025
+ export type RouteWithPopulatedKeysSchema = RouteSchema & {
2026
+ "list.client"?: string[] | {
2027
+ client: string | Pick<Client.ClientSchema, "name" | "lat" | "lng">;
2028
+ from?: string;
2029
+ to?: string;
2030
+ }[];
2031
+ };
2032
+ export namespace Find {
2033
+ type Params = DefaultPaginationQueryParams & {
2034
+ _id?: string[] | string;
2035
+ name?: string[] | string;
2036
+ disabled?: boolean;
2037
+ from_updatedAt?: number;
2038
+ populatedKeys?: PopulatedKeys[];
2039
+ };
2040
+ interface Result extends DefaultPaginationResult {
2041
+ data: RouteWithPopulatedKeysSchema[];
2042
+ }
2043
+ }
2044
+ export namespace Get {
2045
+ type ID = string;
2046
+ type Result = RouteSchema;
2047
+ }
2048
+ export namespace Create {
2049
+ interface Body extends RouteBody {
2050
+ name: string;
2051
+ force_sequence: boolean;
2052
+ list: List[];
2053
+ sync_id: string;
2054
+ }
2055
+ type Result = RouteSchema;
2056
+ }
2057
+ export namespace Update {
2058
+ type ID = string;
2059
+ interface Body extends RouteBody {
2060
+ _id?: string;
2061
+ createdAt?: string;
2062
+ updatedAt?: string;
2063
+ __v?: number;
2064
+ }
2065
+ type Result = RouteSchema;
2066
+ }
2067
+ export namespace Remove {
2068
+ type ID = string;
2069
+ type Result = RouteSchema;
2070
+ }
2071
+ export {};
2072
+ }
1991
2073
  namespace Warehouse {
1992
2074
  type WarehouseType = "van" | "main" | "origin";
1993
2075
  export interface WarehouseSchema {
@@ -2014,7 +2096,11 @@ export declare namespace Service {
2014
2096
  };
2015
2097
  company_namespace?: string[];
2016
2098
  }
2017
- type PopulatedKeys = "rep_id";
2099
+ type PopulatedKeys = "rep_id" | "teams";
2100
+ export type WarehouseWithPopulatedKeysSchema = WarehouseSchema & {
2101
+ rep_id?: string[] | Pick<Rep.RepSchema, "_id" | "name">[];
2102
+ teams_populated?: string[] | Team.TeamSchema[];
2103
+ };
2018
2104
  export namespace Find {
2019
2105
  type Params = DefaultPaginationQueryParams & {
2020
2106
  _id?: string[] | string;
@@ -2028,9 +2114,7 @@ export declare namespace Service {
2028
2114
  populatedKeys?: PopulatedKeys[];
2029
2115
  };
2030
2116
  interface Result extends DefaultPaginationResult {
2031
- data: (WarehouseSchema & {
2032
- rep_id?: Pick<Rep.RepSchema, "_id" | "name">;
2033
- })[];
2117
+ data: WarehouseWithPopulatedKeysSchema[];
2034
2118
  }
2035
2119
  }
2036
2120
  export namespace Get {
@@ -2060,6 +2144,67 @@ export declare namespace Service {
2060
2144
  }
2061
2145
  export {};
2062
2146
  }
2147
+ namespace ProductModifiersGroup {
2148
+ interface ProductModifiersGroupSchema {
2149
+ _id: string;
2150
+ name: string;
2151
+ disabled: boolean;
2152
+ local_name?: string;
2153
+ position: number;
2154
+ multiple_modifiers: boolean;
2155
+ company_namespace: string[];
2156
+ createdAt: string;
2157
+ updatedAt: string;
2158
+ __v: number;
2159
+ }
2160
+ interface ProductModifiersGroupBody {
2161
+ name?: string;
2162
+ disabled?: boolean;
2163
+ local_name?: string;
2164
+ position?: number;
2165
+ multiple_modifiers?: boolean;
2166
+ company_namespace?: string[];
2167
+ }
2168
+ namespace Find {
2169
+ type Params = DefaultPaginationQueryParams & {
2170
+ _id?: string[] | string;
2171
+ search?: string;
2172
+ name?: string[] | string;
2173
+ local_name?: string[] | string;
2174
+ disabled?: boolean;
2175
+ from_updatedAt?: number;
2176
+ };
2177
+ interface Result extends DefaultPaginationResult {
2178
+ data: ProductModifiersGroupSchema[];
2179
+ }
2180
+ }
2181
+ namespace Get {
2182
+ type ID = string;
2183
+ type Result = ProductModifiersGroupSchema;
2184
+ }
2185
+ namespace Create {
2186
+ interface Body extends ProductModifiersGroupBody {
2187
+ name: string;
2188
+ position: number;
2189
+ multiple_modifiers: boolean;
2190
+ }
2191
+ type Result = ProductModifiersGroupSchema;
2192
+ }
2193
+ namespace Update {
2194
+ type ID = string;
2195
+ interface Body extends ProductModifiersGroupBody {
2196
+ _id?: string;
2197
+ createdAt?: string;
2198
+ updatedAt?: string;
2199
+ __v?: number;
2200
+ }
2201
+ type Result = ProductModifiersGroupSchema;
2202
+ }
2203
+ namespace Remove {
2204
+ type ID = string;
2205
+ type Result = ProductModifiersGroupSchema;
2206
+ }
2207
+ }
2063
2208
  namespace Channel {
2064
2209
  interface ChannelSchema {
2065
2210
  _id: string;
@@ -2528,6 +2673,7 @@ export declare namespace Service {
2528
2673
  name?: string[] | string;
2529
2674
  local_name?: string[] | string;
2530
2675
  disabled?: boolean;
2676
+ from_updatedAt?: number;
2531
2677
  [key: string]: any;
2532
2678
  };
2533
2679
  interface Result extends DefaultPaginationResult {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.45",
3
+ "version": "1.0.47",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -829,6 +829,61 @@ export default class Repzo {
829
829
  },
830
830
  };
831
831
 
832
+ returnReason = {
833
+ _path: "/return-reason",
834
+ find: async (
835
+ params?: Service.ReturnReason.Find.Params
836
+ ): Promise<Service.ReturnReason.Find.Result> => {
837
+ let res: Service.ReturnReason.Find.Result = await this._fetch(
838
+ this.svAPIEndpoint,
839
+ this.returnReason._path,
840
+ params
841
+ );
842
+ return res;
843
+ },
844
+
845
+ get: async (
846
+ id: Service.ReturnReason.Get.ID
847
+ ): Promise<Service.ReturnReason.Get.Result> => {
848
+ return await this._fetch(
849
+ this.svAPIEndpoint,
850
+ this.returnReason._path + `/${id}`
851
+ );
852
+ },
853
+ create: async (
854
+ body: Service.ReturnReason.Create.Body
855
+ ): Promise<Service.ReturnReason.Create.Result> => {
856
+ let res = await this._create(
857
+ this.svAPIEndpoint,
858
+ this.returnReason._path,
859
+ body
860
+ );
861
+ return res;
862
+ },
863
+
864
+ update: async (
865
+ id: Service.ReturnReason.Update.ID,
866
+ body: Service.ReturnReason.Update.Body
867
+ ): Promise<Service.ReturnReason.Update.Result> => {
868
+ let res: Service.ReturnReason.Update.Result = await this._update(
869
+ this.svAPIEndpoint,
870
+ this.returnReason._path + `/${id}`,
871
+ body
872
+ );
873
+ return res;
874
+ },
875
+
876
+ remove: async (
877
+ id: Service.ReturnReason.Remove.ID
878
+ ): Promise<Service.ReturnReason.Remove.Result> => {
879
+ let res: Service.ReturnReason.Remove.Result = await this._delete(
880
+ this.svAPIEndpoint,
881
+ this.returnReason._path + `/${id}`
882
+ );
883
+ return res;
884
+ },
885
+ };
886
+
832
887
  rep = {
833
888
  _path: "/rep",
834
889
  find: async (
@@ -986,6 +1041,103 @@ export default class Repzo {
986
1041
  },
987
1042
  };
988
1043
 
1044
+ route = {
1045
+ _path: "/route",
1046
+ find: async (
1047
+ params?: Service.Route.Find.Params
1048
+ ): Promise<Service.Route.Find.Result> => {
1049
+ let res: Service.Route.Find.Result = await this._fetch(
1050
+ this.svAPIEndpoint,
1051
+ this.route._path,
1052
+ params
1053
+ );
1054
+ return res;
1055
+ },
1056
+ get: async (
1057
+ id: Service.Route.Get.ID
1058
+ ): Promise<Service.Route.Get.Result> => {
1059
+ return await this._fetch(this.svAPIEndpoint, this.route._path + `/${id}`);
1060
+ },
1061
+ create: async (
1062
+ body: Service.Route.Create.Body
1063
+ ): Promise<Service.Route.Create.Result> => {
1064
+ let res = await this._create(this.svAPIEndpoint, this.route._path, body);
1065
+ return res;
1066
+ },
1067
+ update: async (
1068
+ id: Service.Route.Update.ID,
1069
+ body: Service.Route.Update.Body
1070
+ ): Promise<Service.Route.Update.Result> => {
1071
+ let res: Service.Route.Update.Result = await this._update(
1072
+ this.svAPIEndpoint,
1073
+ this.route._path + `/${id}`,
1074
+ body
1075
+ );
1076
+ return res;
1077
+ },
1078
+ remove: async (
1079
+ id: Service.Route.Remove.ID
1080
+ ): Promise<Service.Route.Remove.Result> => {
1081
+ let res: Service.Route.Remove.Result = await this._delete(
1082
+ this.svAPIEndpoint,
1083
+ this.route._path + `/${id}`
1084
+ );
1085
+ return res;
1086
+ },
1087
+ };
1088
+
1089
+ productModifiersGroup = {
1090
+ _path: "/product-modifiers-group",
1091
+ find: async (
1092
+ params?: Service.ProductModifiersGroup.Find.Params
1093
+ ): Promise<Service.ProductModifiersGroup.Find.Result> => {
1094
+ let res: Service.ProductModifiersGroup.Find.Result = await this._fetch(
1095
+ this.svAPIEndpoint,
1096
+ this.productModifiersGroup._path,
1097
+ params
1098
+ );
1099
+ return res;
1100
+ },
1101
+ get: async (
1102
+ id: Service.ProductModifiersGroup.Get.ID
1103
+ ): Promise<Service.ProductModifiersGroup.Get.Result> => {
1104
+ return await this._fetch(
1105
+ this.svAPIEndpoint,
1106
+ this.productModifiersGroup._path + `/${id}`
1107
+ );
1108
+ },
1109
+ create: async (
1110
+ body: Service.ProductModifiersGroup.Create.Body
1111
+ ): Promise<Service.ProductModifiersGroup.Create.Result> => {
1112
+ let res = await this._create(
1113
+ this.svAPIEndpoint,
1114
+ this.productModifiersGroup._path,
1115
+ body
1116
+ );
1117
+ return res;
1118
+ },
1119
+ update: async (
1120
+ id: Service.ProductModifiersGroup.Update.ID,
1121
+ body: Service.ProductModifiersGroup.Update.Body
1122
+ ): Promise<Service.ProductModifiersGroup.Update.Result> => {
1123
+ let res: Service.ProductModifiersGroup.Update.Result = await this._update(
1124
+ this.svAPIEndpoint,
1125
+ this.productModifiersGroup._path + `/${id}`,
1126
+ body
1127
+ );
1128
+ return res;
1129
+ },
1130
+ remove: async (
1131
+ id: Service.ProductModifiersGroup.Remove.ID
1132
+ ): Promise<Service.ProductModifiersGroup.Remove.Result> => {
1133
+ let res: Service.ProductModifiersGroup.Remove.Result = await this._delete(
1134
+ this.svAPIEndpoint,
1135
+ this.productModifiersGroup._path + `/${id}`
1136
+ );
1137
+ return res;
1138
+ },
1139
+ };
1140
+
989
1141
  channel = {
990
1142
  _path: "/client-channel",
991
1143
  find: async (
@@ -868,8 +868,14 @@ export namespace Service {
868
868
  modifiers_groups?: string[];
869
869
  integration_meta?: { [key: string]: any };
870
870
  }
871
- type PopulatedKeys = "product";
871
+ type PopulatedKeys = "product" | "modifiers_groups";
872
872
 
873
+ type VariantWithPopulatedKeys = VariantSchema & {
874
+ modifiers_groups?:
875
+ | string[]
876
+ | ProductModifiersGroup.ProductModifiersGroupSchema[];
877
+ product?: string | Product.ProductSchema;
878
+ };
873
879
  export namespace Find {
874
880
  export type Params = DefaultPaginationQueryParams & {
875
881
  _id?: string[] | string;
@@ -884,6 +890,7 @@ export namespace Service {
884
890
  position?: number[] | number;
885
891
  createdAt?: number;
886
892
  updatedAt?: number;
893
+ from_updatedAt?: number;
887
894
  default?: boolean;
888
895
  category?: string[] | string;
889
896
  subCategory?: string[] | string;
@@ -891,10 +898,11 @@ export namespace Service {
891
898
  productGroup?: string[] | string;
892
899
  teams?: string[] | string;
893
900
  withProduct?: boolean;
901
+ populatedKeys?: PopulatedKeys[];
894
902
  [key: string]: any; // integration_meta.
895
903
  };
896
904
  export interface Result extends DefaultPaginationResult {
897
- data: VariantSchema[];
905
+ data: VariantWithPopulatedKeys[];
898
906
  }
899
907
  }
900
908
 
@@ -2208,6 +2216,87 @@ export namespace Service {
2208
2216
  }
2209
2217
  }
2210
2218
 
2219
+ export namespace Route {
2220
+ export interface RouteSchema {
2221
+ _id: string;
2222
+ name: string;
2223
+ disabled: boolean;
2224
+ sync_id: string;
2225
+ force_sequence: boolean;
2226
+ editor: AdminCreator;
2227
+ list: List[];
2228
+ company_namespace: string[];
2229
+ createdAt: string;
2230
+ updatedAt: string;
2231
+ }
2232
+ export interface RouteBody {
2233
+ name?: string;
2234
+ disabled?: boolean;
2235
+ sync_id?: string;
2236
+ force_sequence?: boolean;
2237
+ editor?: AdminCreator;
2238
+ list?: List[];
2239
+ company_namespace?: string[];
2240
+ }
2241
+ type PopulatedKeys = "client" | "list.client";
2242
+ interface List {
2243
+ client: string;
2244
+ from?: string;
2245
+ to?: string;
2246
+ }
2247
+
2248
+ export type RouteWithPopulatedKeysSchema = RouteSchema & {
2249
+ "list.client"?:
2250
+ | string[]
2251
+ | {
2252
+ client: string | Pick<Client.ClientSchema, "name" | "lat" | "lng">;
2253
+ from?: string;
2254
+ to?: string;
2255
+ }[];
2256
+ };
2257
+ export namespace Find {
2258
+ export type Params = DefaultPaginationQueryParams & {
2259
+ _id?: string[] | string;
2260
+ name?: string[] | string;
2261
+ disabled?: boolean;
2262
+ from_updatedAt?: number;
2263
+ populatedKeys?: PopulatedKeys[];
2264
+ };
2265
+ export interface Result extends DefaultPaginationResult {
2266
+ data: RouteWithPopulatedKeysSchema[];
2267
+ }
2268
+ }
2269
+ export namespace Get {
2270
+ export type ID = string;
2271
+ export type Result = RouteSchema;
2272
+ }
2273
+
2274
+ export namespace Create {
2275
+ export interface Body extends RouteBody {
2276
+ name: string;
2277
+ force_sequence: boolean;
2278
+ list: List[];
2279
+ sync_id: string;
2280
+ }
2281
+ export type Result = RouteSchema;
2282
+ }
2283
+
2284
+ export namespace Update {
2285
+ export type ID = string;
2286
+ export interface Body extends RouteBody {
2287
+ _id?: string;
2288
+ createdAt?: string;
2289
+ updatedAt?: string;
2290
+ __v?: number;
2291
+ }
2292
+ export type Result = RouteSchema;
2293
+ }
2294
+ export namespace Remove {
2295
+ export type ID = string;
2296
+ export type Result = RouteSchema;
2297
+ }
2298
+ }
2299
+
2211
2300
  export namespace Warehouse {
2212
2301
  type WarehouseType = "van" | "main" | "origin";
2213
2302
  export interface WarehouseSchema {
@@ -2230,7 +2319,12 @@ export namespace Service {
2230
2319
  integration_meta?: { [key: string]: any };
2231
2320
  company_namespace?: string[];
2232
2321
  }
2233
- type PopulatedKeys = "rep_id";
2322
+ type PopulatedKeys = "rep_id" | "teams";
2323
+
2324
+ export type WarehouseWithPopulatedKeysSchema = WarehouseSchema & {
2325
+ rep_id?: string[] | Pick<Rep.RepSchema, "_id" | "name">[];
2326
+ teams_populated?: string[] | Team.TeamSchema[];
2327
+ };
2234
2328
  export namespace Find {
2235
2329
  export type Params = DefaultPaginationQueryParams & {
2236
2330
  _id?: string[] | string;
@@ -2244,9 +2338,7 @@ export namespace Service {
2244
2338
  populatedKeys?: PopulatedKeys[];
2245
2339
  };
2246
2340
  export interface Result extends DefaultPaginationResult {
2247
- data: (WarehouseSchema & {
2248
- rep_id?: Pick<Rep.RepSchema, "_id" | "name">;
2249
- })[];
2341
+ data: WarehouseWithPopulatedKeysSchema[];
2250
2342
  }
2251
2343
  }
2252
2344
 
@@ -2280,6 +2372,69 @@ export namespace Service {
2280
2372
  }
2281
2373
  }
2282
2374
 
2375
+ export namespace ProductModifiersGroup {
2376
+ export interface ProductModifiersGroupSchema {
2377
+ _id: string;
2378
+ name: string;
2379
+ disabled: boolean;
2380
+ local_name?: string;
2381
+ position: number;
2382
+ multiple_modifiers: boolean;
2383
+ company_namespace: string[];
2384
+ createdAt: string;
2385
+ updatedAt: string;
2386
+ __v: number;
2387
+ }
2388
+ export interface ProductModifiersGroupBody {
2389
+ name?: string;
2390
+ disabled?: boolean;
2391
+ local_name?: string;
2392
+ position?: number;
2393
+ multiple_modifiers?: boolean;
2394
+ company_namespace?: string[];
2395
+ }
2396
+ export namespace Find {
2397
+ export type Params = DefaultPaginationQueryParams & {
2398
+ _id?: string[] | string;
2399
+ search?: string;
2400
+ name?: string[] | string;
2401
+ local_name?: string[] | string;
2402
+ disabled?: boolean;
2403
+ from_updatedAt?: number;
2404
+ };
2405
+ export interface Result extends DefaultPaginationResult {
2406
+ data: ProductModifiersGroupSchema[];
2407
+ }
2408
+ }
2409
+ export namespace Get {
2410
+ export type ID = string;
2411
+ export type Result = ProductModifiersGroupSchema;
2412
+ }
2413
+
2414
+ export namespace Create {
2415
+ export interface Body extends ProductModifiersGroupBody {
2416
+ name: string;
2417
+ position: number;
2418
+ multiple_modifiers: boolean;
2419
+ }
2420
+ export type Result = ProductModifiersGroupSchema;
2421
+ }
2422
+ export namespace Update {
2423
+ export type ID = string;
2424
+ export interface Body extends ProductModifiersGroupBody {
2425
+ _id?: string;
2426
+ createdAt?: string;
2427
+ updatedAt?: string;
2428
+ __v?: number;
2429
+ }
2430
+ export type Result = ProductModifiersGroupSchema;
2431
+ }
2432
+ export namespace Remove {
2433
+ export type ID = string;
2434
+ export type Result = ProductModifiersGroupSchema;
2435
+ }
2436
+ }
2437
+
2283
2438
  export namespace Channel {
2284
2439
  export interface ChannelSchema {
2285
2440
  _id: string;
@@ -2759,6 +2914,7 @@ export namespace Service {
2759
2914
  name?: string[] | string;
2760
2915
  local_name?: string[] | string;
2761
2916
  disabled?: boolean;
2917
+ from_updatedAt?: number;
2762
2918
  [key: string]: any; // integration_meta.
2763
2919
  };
2764
2920
  export interface Result extends DefaultPaginationResult {