repzo 1.0.271 → 1.0.274
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 +28 -2
- package/lib/index.js +55 -0
- package/lib/types/index.d.ts +194 -6
- package/package.json +1 -1
- package/src/index.ts +132 -0
- package/src/types/index.ts +244 -6
package/lib/index.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ export declare const end_points: {
|
|
|
56
56
|
readonly MEDIA_STORAGE: "media-storage";
|
|
57
57
|
readonly STORECHECK_TEMPLATE: "storecheck-template";
|
|
58
58
|
readonly ACTIVITY_STORECHECK: "activity-storecheck";
|
|
59
|
+
readonly ACTIVITY_ITEM_STATUS: "activity-item-status";
|
|
59
60
|
readonly ADJUST_INVENTORY: "adjust-inventory";
|
|
60
61
|
readonly INVENTORY: "inventory";
|
|
61
62
|
readonly INTEGRATION_APP: "integration-app";
|
|
@@ -133,9 +134,11 @@ export declare const end_points: {
|
|
|
133
134
|
readonly DATA_FILE_WAREHOUSE: "data-file-warehouse";
|
|
134
135
|
readonly DATA_SESSION: "data-session";
|
|
135
136
|
readonly ADMIN: "admin";
|
|
137
|
+
readonly JOB_CATEGORY: "job-category";
|
|
138
|
+
readonly JOB_CATEGORY_AUTOSKIP_ANALYZE: "job-category-autoskip-analyze";
|
|
136
139
|
};
|
|
137
140
|
export type EndPoints = (typeof end_points)[keyof typeof end_points];
|
|
138
|
-
export declare const availableService: readonly ["client", "product", "variant", "category", "sub_category", "brand", "product_group", "tax", "measureunit", "measureunitFamily", "media", "priceList", "priceListItem", "team", "returnReason", "rep", "tag", "warehouse", "route", "productModifiersGroup", "channel", "speciality", "clientContact", "paymentTerm", "bank", "bank_list", "customStatus", "customList", "customListItem", "inventoryAdjustmentReason", "workorder", "workorderRequest", "supplier", "quickConvertToPdf", "visit", "activityFeedback", "activityFeedbackV2", "feedbackOption", "invoice", "proforma", "payment", "refund", "settlement", "voidSettlement", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "adjustInventory", "inventory", "integrationApp", "joinActionsWebHook", "patchAction", "updateIntegrationMeta", "assetPartType", "assetPart", "assetPartUnit", "assetPartReceival", "assetPartTransfer", "returnAssetPartUnit", "storeAssetPartUnit", "ocrInvoiceJobTemplate", "ocrInvoiceJobGroup", "activityAiSalesOrder", "ocrInvoiceJob", "ocrInvoiceJobPage", "settings", "mailUnsubscribe", "approvalRequest", "safeInvoiceSerialCounter", "clientLocation", "assetType", "asset", "assetUnit", "workorderPortal", "approval", "workorderCategory", "contract", "contractInstallment", "repBalanceSummary", "workorderPortalLink", "customField", "salesAnalyticsReport", "clmPresentation", "clmSequence", "clmSlide", "clmFetch", "pdfMergeField"];
|
|
141
|
+
export declare const availableService: readonly ["client", "product", "variant", "category", "sub_category", "brand", "product_group", "tax", "measureunit", "measureunitFamily", "media", "priceList", "priceListItem", "team", "returnReason", "rep", "tag", "warehouse", "route", "productModifiersGroup", "channel", "speciality", "clientContact", "paymentTerm", "bank", "bank_list", "customStatus", "customList", "customListItem", "inventoryAdjustmentReason", "workorder", "workorderRequest", "supplier", "quickConvertToPdf", "visit", "activityFeedback", "activityFeedbackV2", "feedbackOption", "invoice", "proforma", "payment", "refund", "settlement", "voidSettlement", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "activityItemStatus", "adjustInventory", "inventory", "integrationApp", "joinActionsWebHook", "patchAction", "updateIntegrationMeta", "assetPartType", "assetPart", "assetPartUnit", "assetPartReceival", "assetPartTransfer", "returnAssetPartUnit", "storeAssetPartUnit", "ocrInvoiceJobTemplate", "ocrInvoiceJobGroup", "activityAiSalesOrder", "ocrInvoiceJob", "ocrInvoiceJobPage", "settings", "mailUnsubscribe", "approvalRequest", "safeInvoiceSerialCounter", "clientLocation", "assetType", "asset", "assetUnit", "workorderPortal", "approval", "workorderCategory", "contract", "contractInstallment", "repBalanceSummary", "workorderPortalLink", "customField", "salesAnalyticsReport", "clmPresentation", "clmSequence", "clmSlide", "clmFetch", "pdfMergeField"];
|
|
139
142
|
export type AvailableService = (typeof availableService)[number];
|
|
140
143
|
export default class Repzo {
|
|
141
144
|
private svAPIEndpoint;
|
|
@@ -204,6 +207,7 @@ export default class Repzo {
|
|
|
204
207
|
readonly MEDIA_STORAGE: "media-storage";
|
|
205
208
|
readonly STORECHECK_TEMPLATE: "storecheck-template";
|
|
206
209
|
readonly ACTIVITY_STORECHECK: "activity-storecheck";
|
|
210
|
+
readonly ACTIVITY_ITEM_STATUS: "activity-item-status";
|
|
207
211
|
readonly ADJUST_INVENTORY: "adjust-inventory";
|
|
208
212
|
readonly INVENTORY: "inventory";
|
|
209
213
|
readonly INTEGRATION_APP: "integration-app";
|
|
@@ -281,6 +285,8 @@ export default class Repzo {
|
|
|
281
285
|
readonly DATA_FILE_WAREHOUSE: "data-file-warehouse";
|
|
282
286
|
readonly DATA_SESSION: "data-session";
|
|
283
287
|
readonly ADMIN: "admin";
|
|
288
|
+
readonly JOB_CATEGORY: "job-category";
|
|
289
|
+
readonly JOB_CATEGORY_AUTOSKIP_ANALYZE: "job-category-autoskip-analyze";
|
|
284
290
|
};
|
|
285
291
|
private _retryRequest;
|
|
286
292
|
private _fetch;
|
|
@@ -288,7 +294,7 @@ export default class Repzo {
|
|
|
288
294
|
private _update;
|
|
289
295
|
private _patch;
|
|
290
296
|
private _delete;
|
|
291
|
-
available_services: readonly ["client", "product", "variant", "category", "sub_category", "brand", "product_group", "tax", "measureunit", "measureunitFamily", "media", "priceList", "priceListItem", "team", "returnReason", "rep", "tag", "warehouse", "route", "productModifiersGroup", "channel", "speciality", "clientContact", "paymentTerm", "bank", "bank_list", "customStatus", "customList", "customListItem", "inventoryAdjustmentReason", "workorder", "workorderRequest", "supplier", "quickConvertToPdf", "visit", "activityFeedback", "activityFeedbackV2", "feedbackOption", "invoice", "proforma", "payment", "refund", "settlement", "voidSettlement", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "adjustInventory", "inventory", "integrationApp", "joinActionsWebHook", "patchAction", "updateIntegrationMeta", "assetPartType", "assetPart", "assetPartUnit", "assetPartReceival", "assetPartTransfer", "returnAssetPartUnit", "storeAssetPartUnit", "ocrInvoiceJobTemplate", "ocrInvoiceJobGroup", "activityAiSalesOrder", "ocrInvoiceJob", "ocrInvoiceJobPage", "settings", "mailUnsubscribe", "approvalRequest", "safeInvoiceSerialCounter", "clientLocation", "assetType", "asset", "assetUnit", "workorderPortal", "approval", "workorderCategory", "contract", "contractInstallment", "repBalanceSummary", "workorderPortalLink", "customField", "salesAnalyticsReport", "clmPresentation", "clmSequence", "clmSlide", "clmFetch", "pdfMergeField"];
|
|
297
|
+
available_services: readonly ["client", "product", "variant", "category", "sub_category", "brand", "product_group", "tax", "measureunit", "measureunitFamily", "media", "priceList", "priceListItem", "team", "returnReason", "rep", "tag", "warehouse", "route", "productModifiersGroup", "channel", "speciality", "clientContact", "paymentTerm", "bank", "bank_list", "customStatus", "customList", "customListItem", "inventoryAdjustmentReason", "workorder", "workorderRequest", "supplier", "quickConvertToPdf", "visit", "activityFeedback", "activityFeedbackV2", "feedbackOption", "invoice", "proforma", "payment", "refund", "settlement", "voidSettlement", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "activityItemStatus", "adjustInventory", "inventory", "integrationApp", "joinActionsWebHook", "patchAction", "updateIntegrationMeta", "assetPartType", "assetPart", "assetPartUnit", "assetPartReceival", "assetPartTransfer", "returnAssetPartUnit", "storeAssetPartUnit", "ocrInvoiceJobTemplate", "ocrInvoiceJobGroup", "activityAiSalesOrder", "ocrInvoiceJob", "ocrInvoiceJobPage", "settings", "mailUnsubscribe", "approvalRequest", "safeInvoiceSerialCounter", "clientLocation", "assetType", "asset", "assetUnit", "workorderPortal", "approval", "workorderCategory", "contract", "contractInstallment", "repBalanceSummary", "workorderPortalLink", "customField", "salesAnalyticsReport", "clmPresentation", "clmSequence", "clmSlide", "clmFetch", "pdfMergeField"];
|
|
292
298
|
generateUUID: ({ prefix, suffix, length, }: {
|
|
293
299
|
prefix?: string;
|
|
294
300
|
suffix?: string;
|
|
@@ -706,6 +712,13 @@ export default class Repzo {
|
|
|
706
712
|
create: (body: Service.ActivityStorecheck.Create.Body) => Promise<Service.ActivityStorecheck.Create.Result>;
|
|
707
713
|
update: (id: Service.ActivityStorecheck.Update.ID, body: Service.ActivityStorecheck.Update.Body) => Promise<Service.ActivityStorecheck.Update.Result>;
|
|
708
714
|
};
|
|
715
|
+
activityItemStatus: {
|
|
716
|
+
_path: "activity-item-status";
|
|
717
|
+
find: (params?: Service.ActivityItemStatus.Find.Params) => Promise<Service.ActivityItemStatus.Find.Result>;
|
|
718
|
+
get: (id: Service.ActivityItemStatus.Get.ID, params?: Service.ActivityItemStatus.Get.Params) => Promise<Service.ActivityItemStatus.Get.Result>;
|
|
719
|
+
create: (body: Service.ActivityItemStatus.Create.Body) => Promise<Service.ActivityItemStatus.Create.Result>;
|
|
720
|
+
update: (id: Service.ActivityItemStatus.Update.ID, body: Service.ActivityItemStatus.Update.Body) => Promise<Service.ActivityItemStatus.Update.Result>;
|
|
721
|
+
};
|
|
709
722
|
adjustInventory: {
|
|
710
723
|
_path: "adjust-inventory";
|
|
711
724
|
find: (params?: Service.AdjustInventory.Find.Params) => Promise<Service.AdjustInventory.Find.Result>;
|
|
@@ -1248,6 +1261,7 @@ export default class Repzo {
|
|
|
1248
1261
|
get: (id: Service.ActivityFormV2Result.Get.ID, params?: Service.ActivityFormV2Result.Get.Params) => Promise<Service.ActivityFormV2Result.Get.Result>;
|
|
1249
1262
|
create: (body: Service.ActivityFormV2Result.Create.Body) => Promise<Service.ActivityFormV2Result.Create.Result>;
|
|
1250
1263
|
update: (id: Service.ActivityFormV2Result.Update.ID, body: Service.ActivityFormV2Result.Update.Body) => Promise<Service.ActivityFormV2Result.Update.Result>;
|
|
1264
|
+
patch: (params: Service.ActivityFormV2Result.Patch.Params, body: Service.ActivityFormV2Result.Patch.Body) => Promise<Service.ActivityFormV2Result.Patch.Result>;
|
|
1251
1265
|
};
|
|
1252
1266
|
lineClassification: {
|
|
1253
1267
|
_path: "line-classification";
|
|
@@ -1308,4 +1322,16 @@ export default class Repzo {
|
|
|
1308
1322
|
globalize: (id: Service.Admin.Globalize.ID) => Promise<Service.Admin.Globalize.Result>;
|
|
1309
1323
|
remove: (id: Service.Admin.Update.ID) => Promise<Service.Admin.Remove.Result>;
|
|
1310
1324
|
};
|
|
1325
|
+
jobCategory: {
|
|
1326
|
+
_path: "job-category";
|
|
1327
|
+
find: (params?: Service.JobCategory.Find.Params) => Promise<Service.JobCategory.Find.Result>;
|
|
1328
|
+
get: (id: Service.JobCategory.Get.ID, params?: Service.JobCategory.Get.Params) => Promise<Service.JobCategory.Get.Result>;
|
|
1329
|
+
create: (body: Service.JobCategory.Create.Body) => Promise<Service.JobCategory.Create.Result>;
|
|
1330
|
+
update: (id: Service.JobCategory.Update.ID, body: Service.JobCategory.Update.Body) => Promise<Service.JobCategory.Update.Result>;
|
|
1331
|
+
remove: (id: Service.JobCategory.Remove.ID) => Promise<Service.JobCategory.Remove.Result>;
|
|
1332
|
+
};
|
|
1333
|
+
jobCategoryAutoSkipAnalyze: {
|
|
1334
|
+
_path: "job-category-autoskip-analyze";
|
|
1335
|
+
create: (body: Service.JobCategoryAutoSkipAnalyze.Create.Body) => Promise<Service.JobCategoryAutoSkipAnalyze.Create.Result>;
|
|
1336
|
+
};
|
|
1311
1337
|
}
|
package/lib/index.js
CHANGED
|
@@ -58,6 +58,7 @@ export const end_points = {
|
|
|
58
58
|
MEDIA_STORAGE: "media-storage",
|
|
59
59
|
STORECHECK_TEMPLATE: "storecheck-template",
|
|
60
60
|
ACTIVITY_STORECHECK: "activity-storecheck",
|
|
61
|
+
ACTIVITY_ITEM_STATUS: "activity-item-status",
|
|
61
62
|
ADJUST_INVENTORY: "adjust-inventory",
|
|
62
63
|
INVENTORY: "inventory",
|
|
63
64
|
INTEGRATION_APP: "integration-app",
|
|
@@ -135,6 +136,8 @@ export const end_points = {
|
|
|
135
136
|
DATA_FILE_WAREHOUSE: "data-file-warehouse",
|
|
136
137
|
DATA_SESSION: "data-session",
|
|
137
138
|
ADMIN: "admin",
|
|
139
|
+
JOB_CATEGORY: "job-category",
|
|
140
|
+
JOB_CATEGORY_AUTOSKIP_ANALYZE: "job-category-autoskip-analyze",
|
|
138
141
|
};
|
|
139
142
|
export const availableService = [
|
|
140
143
|
"client",
|
|
@@ -191,6 +194,7 @@ export const availableService = [
|
|
|
191
194
|
"mediaStorage",
|
|
192
195
|
"storecheckTemplate",
|
|
193
196
|
"activityStorecheck",
|
|
197
|
+
"activityItemStatus",
|
|
194
198
|
"adjustInventory",
|
|
195
199
|
"inventory",
|
|
196
200
|
"integrationApp",
|
|
@@ -1353,6 +1357,24 @@ class Repzo {
|
|
|
1353
1357
|
return res;
|
|
1354
1358
|
},
|
|
1355
1359
|
};
|
|
1360
|
+
this.activityItemStatus = {
|
|
1361
|
+
_path: Repzo._end_points.ACTIVITY_ITEM_STATUS,
|
|
1362
|
+
find: async (params) => {
|
|
1363
|
+
let res = await this._fetch(this.svAPIEndpoint, this.activityItemStatus._path, params);
|
|
1364
|
+
return res;
|
|
1365
|
+
},
|
|
1366
|
+
get: async (id, params) => {
|
|
1367
|
+
return await this._fetch(this.svAPIEndpoint, this.activityItemStatus._path + `/${id}`, params);
|
|
1368
|
+
},
|
|
1369
|
+
create: async (body) => {
|
|
1370
|
+
let res = await this._create(this.svAPIEndpoint, this.activityItemStatus._path, body);
|
|
1371
|
+
return res;
|
|
1372
|
+
},
|
|
1373
|
+
update: async (id, body) => {
|
|
1374
|
+
let res = await this._update(this.svAPIEndpoint, this.activityItemStatus._path + `/${id}`, body);
|
|
1375
|
+
return res;
|
|
1376
|
+
},
|
|
1377
|
+
};
|
|
1356
1378
|
this.adjustInventory = {
|
|
1357
1379
|
_path: Repzo._end_points.ADJUST_INVENTORY,
|
|
1358
1380
|
find: async (params) => {
|
|
@@ -2548,6 +2570,10 @@ class Repzo {
|
|
|
2548
2570
|
let res = await this._update(this.svAPIEndpoint, this.activityFormV2Result._path + `/${id}`, body);
|
|
2549
2571
|
return res;
|
|
2550
2572
|
},
|
|
2573
|
+
patch: async (params, body) => {
|
|
2574
|
+
let res = await this._patch(this.svAPIEndpoint, this.activityFormV2Result._path, body, params);
|
|
2575
|
+
return res;
|
|
2576
|
+
},
|
|
2551
2577
|
};
|
|
2552
2578
|
this.lineClassification = {
|
|
2553
2579
|
_path: Repzo._end_points.LINE_CLASSIFICATION,
|
|
@@ -2715,6 +2741,35 @@ class Repzo {
|
|
|
2715
2741
|
return res;
|
|
2716
2742
|
},
|
|
2717
2743
|
};
|
|
2744
|
+
this.jobCategory = {
|
|
2745
|
+
_path: Repzo._end_points.JOB_CATEGORY,
|
|
2746
|
+
find: async (params) => {
|
|
2747
|
+
let res = await this._fetch(this.svAPIEndpoint, this.jobCategory._path, params);
|
|
2748
|
+
return res;
|
|
2749
|
+
},
|
|
2750
|
+
get: async (id, params) => {
|
|
2751
|
+
return await this._fetch(this.svAPIEndpoint, this.jobCategory._path + `/${id}`, params);
|
|
2752
|
+
},
|
|
2753
|
+
create: async (body) => {
|
|
2754
|
+
let res = await this._create(this.svAPIEndpoint, this.jobCategory._path, body);
|
|
2755
|
+
return res;
|
|
2756
|
+
},
|
|
2757
|
+
update: async (id, body) => {
|
|
2758
|
+
let res = await this._update(this.svAPIEndpoint, this.jobCategory._path + `/${id}`, body);
|
|
2759
|
+
return res;
|
|
2760
|
+
},
|
|
2761
|
+
remove: async (id) => {
|
|
2762
|
+
let res = await this._delete(this.svAPIEndpoint, this.jobCategory._path + `/${id}`);
|
|
2763
|
+
return res;
|
|
2764
|
+
},
|
|
2765
|
+
};
|
|
2766
|
+
this.jobCategoryAutoSkipAnalyze = {
|
|
2767
|
+
_path: Repzo._end_points.JOB_CATEGORY_AUTOSKIP_ANALYZE,
|
|
2768
|
+
create: async (body) => {
|
|
2769
|
+
let res = await this._create(this.svAPIEndpoint, this.jobCategoryAutoSkipAnalyze._path, body);
|
|
2770
|
+
return res;
|
|
2771
|
+
},
|
|
2772
|
+
};
|
|
2718
2773
|
this.svAPIEndpoint =
|
|
2719
2774
|
!options?.env || options?.env == "production"
|
|
2720
2775
|
? "https://sv.api.repzo.me"
|
package/lib/types/index.d.ts
CHANGED
|
@@ -2909,17 +2909,21 @@ export declare namespace Service {
|
|
|
2909
2909
|
}
|
|
2910
2910
|
namespace JobCategory {
|
|
2911
2911
|
interface JobSchema {
|
|
2912
|
-
|
|
2912
|
+
_id?: StringId;
|
|
2913
|
+
type: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13;
|
|
2913
2914
|
description: string;
|
|
2914
|
-
tag?:
|
|
2915
|
-
product_id?:
|
|
2916
|
-
form_id?:
|
|
2917
|
-
msl_id?:
|
|
2915
|
+
tag?: StringId | Tag.TagSchema;
|
|
2916
|
+
product_id?: StringId;
|
|
2917
|
+
form_id?: StringId;
|
|
2918
|
+
msl_id?: StringId;
|
|
2919
|
+
template_id?: StringId;
|
|
2920
|
+
formV2_id?: StringId;
|
|
2918
2921
|
is_required: boolean;
|
|
2919
2922
|
order: number;
|
|
2920
2923
|
}
|
|
2924
|
+
export type AutoSkipActivitySlugs = "activity-ai-sales-order" | "ocr-invoice-job-group" | "activity-audit" | "activity-availability" | "activity-checkout-display" | "activity-form-result" | "activity-form-v2-result" | "activity-item-status" | "activity-note" | "activity-photo" | "activity-planogram" | "activity-secondary-display" | "activity-shelfshare" | "activity-storecheck" | "activity-task" | "approval-request" | "asset-part-receival" | "asset-part-transfer" | "clicks" | "clm-feedback-activity" | "fullinvoices" | "payments" | "proforma" | "refund" | "return-asset-part-unit" | "store-asset-part-unit";
|
|
2921
2925
|
export interface JobCategorySchema {
|
|
2922
|
-
_id:
|
|
2926
|
+
_id: StringId;
|
|
2923
2927
|
en_name: string;
|
|
2924
2928
|
ar_name?: string;
|
|
2925
2929
|
from_date: number;
|
|
@@ -2930,12 +2934,93 @@ export declare namespace Service {
|
|
|
2930
2934
|
jobs: JobSchema[];
|
|
2931
2935
|
disabled?: boolean;
|
|
2932
2936
|
company_namespace: string[];
|
|
2937
|
+
enable_auto_skip_conditions?: boolean;
|
|
2938
|
+
auto_skip_conditions?: {
|
|
2939
|
+
enable_auto_skip_interval_conditions?: boolean;
|
|
2940
|
+
occurrences_per_interval?: number;
|
|
2941
|
+
interval?: "day" | "week" | "month" | "year" | "life_time" | "last_30_days";
|
|
2942
|
+
per_client?: boolean;
|
|
2943
|
+
per_rep?: boolean;
|
|
2944
|
+
enable_auto_skip_excluded_clients?: boolean;
|
|
2945
|
+
excluded_clients?: StringId[];
|
|
2946
|
+
enable_auto_skip_calendar_days?: boolean;
|
|
2947
|
+
skip_if_calendar_day_is_less_than?: number;
|
|
2948
|
+
skip_if_calendar_day_is_more_than?: number;
|
|
2949
|
+
enable_auto_skip_activity_existence?: boolean;
|
|
2950
|
+
auto_skip_activity_slugs?: AutoSkipActivitySlugs[];
|
|
2951
|
+
};
|
|
2933
2952
|
createdAt: string;
|
|
2934
2953
|
updatedAt: string;
|
|
2935
2954
|
__v: number;
|
|
2936
2955
|
}
|
|
2956
|
+
export type Data = JobCategorySchema;
|
|
2957
|
+
export type PopulatedDoc = Data & {
|
|
2958
|
+
jobs: (JobSchema & {
|
|
2959
|
+
tag?: string | Tag.TagSchema;
|
|
2960
|
+
})[];
|
|
2961
|
+
auto_skip_conditions?: Data["auto_skip_conditions"] & {
|
|
2962
|
+
excluded_clients?: (string | Client.ClientSchema)[];
|
|
2963
|
+
};
|
|
2964
|
+
};
|
|
2965
|
+
type CreateBody = Omit<Data, "_id" | "createdAt" | "updatedAt" | "__v">;
|
|
2966
|
+
type PopulatedKeys = "jobs.tag" | "auto_skip_conditions.excluded_clients";
|
|
2967
|
+
export namespace Find {
|
|
2968
|
+
type Params = DefaultPaginationQueryParams & {
|
|
2969
|
+
_id?: string[] | string;
|
|
2970
|
+
search?: string;
|
|
2971
|
+
disabled?: boolean;
|
|
2972
|
+
en_name?: string[] | string;
|
|
2973
|
+
from_updatedAt?: number;
|
|
2974
|
+
to_updatedAt?: number;
|
|
2975
|
+
from__id?: string;
|
|
2976
|
+
to__id?: string;
|
|
2977
|
+
populatedKeys?: PopulatedKeys[];
|
|
2978
|
+
[key: string]: any;
|
|
2979
|
+
};
|
|
2980
|
+
interface Result extends DefaultPaginationResult {
|
|
2981
|
+
data: PopulatedDoc[];
|
|
2982
|
+
}
|
|
2983
|
+
}
|
|
2984
|
+
export namespace Get {
|
|
2985
|
+
type ID = string;
|
|
2986
|
+
type Params = {
|
|
2987
|
+
populatedKeys?: PopulatedKeys[];
|
|
2988
|
+
};
|
|
2989
|
+
type Result = PopulatedDoc;
|
|
2990
|
+
}
|
|
2991
|
+
export namespace Create {
|
|
2992
|
+
type Body = CreateBody;
|
|
2993
|
+
type Result = Data;
|
|
2994
|
+
}
|
|
2995
|
+
export namespace Update {
|
|
2996
|
+
type ID = StringId;
|
|
2997
|
+
type Body = Partial<Data>;
|
|
2998
|
+
type Result = Data;
|
|
2999
|
+
}
|
|
3000
|
+
export namespace Remove {
|
|
3001
|
+
type ID = string;
|
|
3002
|
+
type Result = Data;
|
|
3003
|
+
}
|
|
2937
3004
|
export {};
|
|
2938
3005
|
}
|
|
3006
|
+
namespace JobCategoryAutoSkipAnalyze {
|
|
3007
|
+
interface Data {
|
|
3008
|
+
client: StringId;
|
|
3009
|
+
rep?: StringId;
|
|
3010
|
+
visit_id?: string;
|
|
3011
|
+
job_category: (JobCategory.Data & {
|
|
3012
|
+
skipped?: boolean;
|
|
3013
|
+
jobs: (JobCategory.Data["jobs"][0] & {
|
|
3014
|
+
skipped?: boolean;
|
|
3015
|
+
})[];
|
|
3016
|
+
})[];
|
|
3017
|
+
company_namespace: string[];
|
|
3018
|
+
}
|
|
3019
|
+
namespace Create {
|
|
3020
|
+
type Body = Data;
|
|
3021
|
+
type Result = Data;
|
|
3022
|
+
}
|
|
3023
|
+
}
|
|
2939
3024
|
namespace Tag {
|
|
2940
3025
|
type TagType = "photo" | "client" | "area" | "price";
|
|
2941
3026
|
export interface TagSchema {
|
|
@@ -14401,12 +14486,94 @@ export declare namespace Service {
|
|
|
14401
14486
|
admin_notes: ActivityAdminNote[];
|
|
14402
14487
|
comments: ActivityComment[];
|
|
14403
14488
|
company_namespace: string[];
|
|
14489
|
+
job?: boolean;
|
|
14490
|
+
job_id?: string;
|
|
14491
|
+
job_category_id?: string;
|
|
14404
14492
|
job_start_time?: number;
|
|
14405
14493
|
job_end_time?: number;
|
|
14406
14494
|
job_duration?: number;
|
|
14495
|
+
disabled?: boolean;
|
|
14407
14496
|
createdAt: string;
|
|
14408
14497
|
updatedAt: string;
|
|
14409
14498
|
}
|
|
14499
|
+
interface CreateBody {
|
|
14500
|
+
items: Item[];
|
|
14501
|
+
geoPoint: GeoPoint;
|
|
14502
|
+
time: number;
|
|
14503
|
+
tags?: string[];
|
|
14504
|
+
visit_id: string;
|
|
14505
|
+
user: string;
|
|
14506
|
+
client: string;
|
|
14507
|
+
client_name: string;
|
|
14508
|
+
user_name: string;
|
|
14509
|
+
sync_id: string;
|
|
14510
|
+
route?: string;
|
|
14511
|
+
teams?: string[];
|
|
14512
|
+
company_namespace: string[];
|
|
14513
|
+
}
|
|
14514
|
+
interface UpdateBody {
|
|
14515
|
+
_id?: string;
|
|
14516
|
+
items?: Item[];
|
|
14517
|
+
geoPoint?: GeoPoint;
|
|
14518
|
+
time?: number;
|
|
14519
|
+
tags?: string[];
|
|
14520
|
+
visit_id?: string;
|
|
14521
|
+
user?: string;
|
|
14522
|
+
client?: string;
|
|
14523
|
+
client_name?: string;
|
|
14524
|
+
user_name?: string;
|
|
14525
|
+
sync_id?: string;
|
|
14526
|
+
route?: string;
|
|
14527
|
+
teams?: string[];
|
|
14528
|
+
company_namespace?: string[];
|
|
14529
|
+
}
|
|
14530
|
+
type PopulatedKeys = "teams" | "user" | "client" | "route" | "visit_id";
|
|
14531
|
+
type ActivityItemStatusWithPopulatedKeysSchema = Data & {
|
|
14532
|
+
teams_populated?: Team.TeamSchema[] | string[];
|
|
14533
|
+
user_populated?: Rep.RepSchema | string;
|
|
14534
|
+
client_populated?: Client.ClientSchema | string;
|
|
14535
|
+
route_populated?: Route.RouteSchema | string;
|
|
14536
|
+
visit_id_populated?: Visit.VisitSchema | string;
|
|
14537
|
+
};
|
|
14538
|
+
namespace Find {
|
|
14539
|
+
type Params = DefaultPaginationQueryParams & {
|
|
14540
|
+
_id?: string[] | string;
|
|
14541
|
+
disabled?: boolean;
|
|
14542
|
+
from_updatedAt?: string;
|
|
14543
|
+
from_time?: number;
|
|
14544
|
+
to_time?: number;
|
|
14545
|
+
client?: string;
|
|
14546
|
+
user?: string;
|
|
14547
|
+
teams?: string[];
|
|
14548
|
+
route?: string;
|
|
14549
|
+
populatedKeys?: PopulatedKeys[];
|
|
14550
|
+
from__id?: string;
|
|
14551
|
+
to__id?: string;
|
|
14552
|
+
sortBy?: {
|
|
14553
|
+
field: "_id";
|
|
14554
|
+
type: "asc" | "desc";
|
|
14555
|
+
}[];
|
|
14556
|
+
[key: string]: any;
|
|
14557
|
+
};
|
|
14558
|
+
interface Result extends DefaultPaginationResult {
|
|
14559
|
+
data: ActivityItemStatusWithPopulatedKeysSchema[];
|
|
14560
|
+
}
|
|
14561
|
+
}
|
|
14562
|
+
namespace Get {
|
|
14563
|
+
type ID = string;
|
|
14564
|
+
interface Params {
|
|
14565
|
+
}
|
|
14566
|
+
type Result = Data;
|
|
14567
|
+
}
|
|
14568
|
+
namespace Create {
|
|
14569
|
+
type Body = CreateBody;
|
|
14570
|
+
type Result = Data;
|
|
14571
|
+
}
|
|
14572
|
+
namespace Update {
|
|
14573
|
+
type ID = string;
|
|
14574
|
+
type Body = UpdateBody;
|
|
14575
|
+
type Result = Data;
|
|
14576
|
+
}
|
|
14410
14577
|
}
|
|
14411
14578
|
namespace ActivityPlanogram {
|
|
14412
14579
|
interface Data {
|
|
@@ -18147,6 +18314,27 @@ export declare namespace Service {
|
|
|
18147
18314
|
};
|
|
18148
18315
|
type Result = Data;
|
|
18149
18316
|
}
|
|
18317
|
+
export namespace Patch {
|
|
18318
|
+
type Params = {
|
|
18319
|
+
updateStatus: true;
|
|
18320
|
+
};
|
|
18321
|
+
type Body = {
|
|
18322
|
+
readQuery: [{
|
|
18323
|
+
key: "_id";
|
|
18324
|
+
operator: "in";
|
|
18325
|
+
value: StringId[];
|
|
18326
|
+
}];
|
|
18327
|
+
writeQuery: {
|
|
18328
|
+
key: "status";
|
|
18329
|
+
command: "set";
|
|
18330
|
+
value: "approved" | "rejected";
|
|
18331
|
+
};
|
|
18332
|
+
};
|
|
18333
|
+
type Result = {
|
|
18334
|
+
nFound: number;
|
|
18335
|
+
nModified: number;
|
|
18336
|
+
};
|
|
18337
|
+
}
|
|
18150
18338
|
export {};
|
|
18151
18339
|
}
|
|
18152
18340
|
namespace LineClassification {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -68,6 +68,7 @@ export const end_points = {
|
|
|
68
68
|
MEDIA_STORAGE: "media-storage",
|
|
69
69
|
STORECHECK_TEMPLATE: "storecheck-template",
|
|
70
70
|
ACTIVITY_STORECHECK: "activity-storecheck",
|
|
71
|
+
ACTIVITY_ITEM_STATUS: "activity-item-status",
|
|
71
72
|
ADJUST_INVENTORY: "adjust-inventory",
|
|
72
73
|
INVENTORY: "inventory",
|
|
73
74
|
INTEGRATION_APP: "integration-app",
|
|
@@ -145,6 +146,8 @@ export const end_points = {
|
|
|
145
146
|
DATA_FILE_WAREHOUSE: "data-file-warehouse",
|
|
146
147
|
DATA_SESSION: "data-session",
|
|
147
148
|
ADMIN: "admin",
|
|
149
|
+
JOB_CATEGORY: "job-category",
|
|
150
|
+
JOB_CATEGORY_AUTOSKIP_ANALYZE: "job-category-autoskip-analyze",
|
|
148
151
|
} as const;
|
|
149
152
|
export type EndPoints = (typeof end_points)[keyof typeof end_points];
|
|
150
153
|
|
|
@@ -203,6 +206,7 @@ export const availableService = [
|
|
|
203
206
|
"mediaStorage",
|
|
204
207
|
"storecheckTemplate",
|
|
205
208
|
"activityStorecheck",
|
|
209
|
+
"activityItemStatus",
|
|
206
210
|
"adjustInventory",
|
|
207
211
|
"inventory",
|
|
208
212
|
"integrationApp",
|
|
@@ -3136,6 +3140,54 @@ export default class Repzo {
|
|
|
3136
3140
|
},
|
|
3137
3141
|
};
|
|
3138
3142
|
|
|
3143
|
+
activityItemStatus = {
|
|
3144
|
+
_path: Repzo._end_points.ACTIVITY_ITEM_STATUS,
|
|
3145
|
+
find: async (
|
|
3146
|
+
params?: Service.ActivityItemStatus.Find.Params,
|
|
3147
|
+
): Promise<Service.ActivityItemStatus.Find.Result> => {
|
|
3148
|
+
let res: Service.ActivityItemStatus.Find.Result = await this._fetch(
|
|
3149
|
+
this.svAPIEndpoint,
|
|
3150
|
+
this.activityItemStatus._path,
|
|
3151
|
+
params,
|
|
3152
|
+
);
|
|
3153
|
+
return res;
|
|
3154
|
+
},
|
|
3155
|
+
|
|
3156
|
+
get: async (
|
|
3157
|
+
id: Service.ActivityItemStatus.Get.ID,
|
|
3158
|
+
params?: Service.ActivityItemStatus.Get.Params,
|
|
3159
|
+
): Promise<Service.ActivityItemStatus.Get.Result> => {
|
|
3160
|
+
return await this._fetch(
|
|
3161
|
+
this.svAPIEndpoint,
|
|
3162
|
+
this.activityItemStatus._path + `/${id}`,
|
|
3163
|
+
params,
|
|
3164
|
+
);
|
|
3165
|
+
},
|
|
3166
|
+
|
|
3167
|
+
create: async (
|
|
3168
|
+
body: Service.ActivityItemStatus.Create.Body,
|
|
3169
|
+
): Promise<Service.ActivityItemStatus.Create.Result> => {
|
|
3170
|
+
let res = await this._create(
|
|
3171
|
+
this.svAPIEndpoint,
|
|
3172
|
+
this.activityItemStatus._path,
|
|
3173
|
+
body,
|
|
3174
|
+
);
|
|
3175
|
+
return res;
|
|
3176
|
+
},
|
|
3177
|
+
|
|
3178
|
+
update: async (
|
|
3179
|
+
id: Service.ActivityItemStatus.Update.ID,
|
|
3180
|
+
body: Service.ActivityItemStatus.Update.Body,
|
|
3181
|
+
): Promise<Service.ActivityItemStatus.Update.Result> => {
|
|
3182
|
+
let res: Service.ActivityItemStatus.Update.Result = await this._update(
|
|
3183
|
+
this.svAPIEndpoint,
|
|
3184
|
+
this.activityItemStatus._path + `/${id}`,
|
|
3185
|
+
body,
|
|
3186
|
+
);
|
|
3187
|
+
return res;
|
|
3188
|
+
},
|
|
3189
|
+
};
|
|
3190
|
+
|
|
3139
3191
|
adjustInventory = {
|
|
3140
3192
|
_path: Repzo._end_points.ADJUST_INVENTORY,
|
|
3141
3193
|
find: async (
|
|
@@ -6417,6 +6469,18 @@ export default class Repzo {
|
|
|
6417
6469
|
);
|
|
6418
6470
|
return res;
|
|
6419
6471
|
},
|
|
6472
|
+
patch: async (
|
|
6473
|
+
params: Service.ActivityFormV2Result.Patch.Params,
|
|
6474
|
+
body: Service.ActivityFormV2Result.Patch.Body,
|
|
6475
|
+
): Promise<Service.ActivityFormV2Result.Patch.Result> => {
|
|
6476
|
+
let res: Service.ActivityFormV2Result.Patch.Result = await this._patch(
|
|
6477
|
+
this.svAPIEndpoint,
|
|
6478
|
+
this.activityFormV2Result._path,
|
|
6479
|
+
body,
|
|
6480
|
+
params,
|
|
6481
|
+
);
|
|
6482
|
+
return res;
|
|
6483
|
+
},
|
|
6420
6484
|
};
|
|
6421
6485
|
|
|
6422
6486
|
lineClassification = {
|
|
@@ -6819,6 +6883,74 @@ export default class Repzo {
|
|
|
6819
6883
|
return res;
|
|
6820
6884
|
},
|
|
6821
6885
|
};
|
|
6886
|
+
|
|
6887
|
+
jobCategory = {
|
|
6888
|
+
_path: Repzo._end_points.JOB_CATEGORY,
|
|
6889
|
+
find: async (
|
|
6890
|
+
params?: Service.JobCategory.Find.Params,
|
|
6891
|
+
): Promise<Service.JobCategory.Find.Result> => {
|
|
6892
|
+
let res: Service.JobCategory.Find.Result = await this._fetch(
|
|
6893
|
+
this.svAPIEndpoint,
|
|
6894
|
+
this.jobCategory._path,
|
|
6895
|
+
params,
|
|
6896
|
+
);
|
|
6897
|
+
return res;
|
|
6898
|
+
},
|
|
6899
|
+
get: async (
|
|
6900
|
+
id: Service.JobCategory.Get.ID,
|
|
6901
|
+
params?: Service.JobCategory.Get.Params,
|
|
6902
|
+
): Promise<Service.JobCategory.Get.Result> => {
|
|
6903
|
+
return await this._fetch(
|
|
6904
|
+
this.svAPIEndpoint,
|
|
6905
|
+
this.jobCategory._path + `/${id}`,
|
|
6906
|
+
params,
|
|
6907
|
+
);
|
|
6908
|
+
},
|
|
6909
|
+
create: async (
|
|
6910
|
+
body: Service.JobCategory.Create.Body,
|
|
6911
|
+
): Promise<Service.JobCategory.Create.Result> => {
|
|
6912
|
+
let res = await this._create(
|
|
6913
|
+
this.svAPIEndpoint,
|
|
6914
|
+
this.jobCategory._path,
|
|
6915
|
+
body,
|
|
6916
|
+
);
|
|
6917
|
+
return res;
|
|
6918
|
+
},
|
|
6919
|
+
update: async (
|
|
6920
|
+
id: Service.JobCategory.Update.ID,
|
|
6921
|
+
body: Service.JobCategory.Update.Body,
|
|
6922
|
+
): Promise<Service.JobCategory.Update.Result> => {
|
|
6923
|
+
let res: Service.JobCategory.Update.Result = await this._update(
|
|
6924
|
+
this.svAPIEndpoint,
|
|
6925
|
+
this.jobCategory._path + `/${id}`,
|
|
6926
|
+
body,
|
|
6927
|
+
);
|
|
6928
|
+
return res;
|
|
6929
|
+
},
|
|
6930
|
+
remove: async (
|
|
6931
|
+
id: Service.JobCategory.Remove.ID,
|
|
6932
|
+
): Promise<Service.JobCategory.Remove.Result> => {
|
|
6933
|
+
let res: Service.JobCategory.Remove.Result = await this._delete(
|
|
6934
|
+
this.svAPIEndpoint,
|
|
6935
|
+
this.jobCategory._path + `/${id}`,
|
|
6936
|
+
);
|
|
6937
|
+
return res;
|
|
6938
|
+
},
|
|
6939
|
+
};
|
|
6940
|
+
|
|
6941
|
+
jobCategoryAutoSkipAnalyze = {
|
|
6942
|
+
_path: Repzo._end_points.JOB_CATEGORY_AUTOSKIP_ANALYZE,
|
|
6943
|
+
create: async (
|
|
6944
|
+
body: Service.JobCategoryAutoSkipAnalyze.Create.Body,
|
|
6945
|
+
): Promise<Service.JobCategoryAutoSkipAnalyze.Create.Result> => {
|
|
6946
|
+
let res = await this._create(
|
|
6947
|
+
this.svAPIEndpoint,
|
|
6948
|
+
this.jobCategoryAutoSkipAnalyze._path,
|
|
6949
|
+
body,
|
|
6950
|
+
);
|
|
6951
|
+
return res;
|
|
6952
|
+
},
|
|
6953
|
+
};
|
|
6822
6954
|
}
|
|
6823
6955
|
|
|
6824
6956
|
function normalizeParams(params: Params): { [key: string]: any } {
|
package/src/types/index.ts
CHANGED
|
@@ -3409,18 +3409,66 @@ export namespace Service {
|
|
|
3409
3409
|
}
|
|
3410
3410
|
|
|
3411
3411
|
export namespace JobCategory {
|
|
3412
|
+
/* type
|
|
3413
|
+
0 => task
|
|
3414
|
+
1 => photo,
|
|
3415
|
+
2 => note,
|
|
3416
|
+
3 => form,
|
|
3417
|
+
4 => audit,
|
|
3418
|
+
5 => availability,
|
|
3419
|
+
6 => return
|
|
3420
|
+
7 => shelf share
|
|
3421
|
+
8 => secondary
|
|
3422
|
+
9 => checkout
|
|
3423
|
+
10 => item-status
|
|
3424
|
+
11 => retail-execution
|
|
3425
|
+
12 => form-v2
|
|
3426
|
+
13 => planogram
|
|
3427
|
+
*/
|
|
3428
|
+
|
|
3412
3429
|
interface JobSchema {
|
|
3413
|
-
|
|
3430
|
+
_id?: StringId;
|
|
3431
|
+
type: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13;
|
|
3414
3432
|
description: string;
|
|
3415
|
-
tag?:
|
|
3416
|
-
product_id?:
|
|
3417
|
-
form_id?:
|
|
3418
|
-
msl_id?:
|
|
3433
|
+
tag?: StringId | Tag.TagSchema;
|
|
3434
|
+
product_id?: StringId;
|
|
3435
|
+
form_id?: StringId;
|
|
3436
|
+
msl_id?: StringId;
|
|
3437
|
+
template_id?: StringId;
|
|
3438
|
+
formV2_id?: StringId;
|
|
3419
3439
|
is_required: boolean;
|
|
3420
3440
|
order: number;
|
|
3421
3441
|
}
|
|
3442
|
+
|
|
3443
|
+
export type AutoSkipActivitySlugs =
|
|
3444
|
+
| "activity-ai-sales-order"
|
|
3445
|
+
| "ocr-invoice-job-group"
|
|
3446
|
+
| "activity-audit"
|
|
3447
|
+
| "activity-availability"
|
|
3448
|
+
| "activity-checkout-display"
|
|
3449
|
+
| "activity-form-result"
|
|
3450
|
+
| "activity-form-v2-result"
|
|
3451
|
+
| "activity-item-status"
|
|
3452
|
+
| "activity-note"
|
|
3453
|
+
| "activity-photo"
|
|
3454
|
+
| "activity-planogram"
|
|
3455
|
+
| "activity-secondary-display"
|
|
3456
|
+
| "activity-shelfshare"
|
|
3457
|
+
| "activity-storecheck"
|
|
3458
|
+
| "activity-task"
|
|
3459
|
+
| "approval-request"
|
|
3460
|
+
| "asset-part-receival"
|
|
3461
|
+
| "asset-part-transfer"
|
|
3462
|
+
| "clicks"
|
|
3463
|
+
| "clm-feedback-activity"
|
|
3464
|
+
| "fullinvoices"
|
|
3465
|
+
| "payments"
|
|
3466
|
+
| "proforma"
|
|
3467
|
+
| "refund"
|
|
3468
|
+
| "return-asset-part-unit"
|
|
3469
|
+
| "store-asset-part-unit";
|
|
3422
3470
|
export interface JobCategorySchema {
|
|
3423
|
-
_id:
|
|
3471
|
+
_id: StringId;
|
|
3424
3472
|
en_name: string;
|
|
3425
3473
|
ar_name?: string;
|
|
3426
3474
|
from_date: number;
|
|
@@ -3431,10 +3479,97 @@ export namespace Service {
|
|
|
3431
3479
|
jobs: JobSchema[];
|
|
3432
3480
|
disabled?: boolean;
|
|
3433
3481
|
company_namespace: string[];
|
|
3482
|
+
enable_auto_skip_conditions?: boolean;
|
|
3483
|
+
auto_skip_conditions?: {
|
|
3484
|
+
enable_auto_skip_interval_conditions?: boolean;
|
|
3485
|
+
occurrences_per_interval?: number;
|
|
3486
|
+
interval?:
|
|
3487
|
+
| "day"
|
|
3488
|
+
| "week"
|
|
3489
|
+
| "month"
|
|
3490
|
+
| "year"
|
|
3491
|
+
| "life_time"
|
|
3492
|
+
| "last_30_days";
|
|
3493
|
+
per_client?: boolean;
|
|
3494
|
+
per_rep?: boolean;
|
|
3495
|
+
enable_auto_skip_excluded_clients?: boolean;
|
|
3496
|
+
excluded_clients?: StringId[];
|
|
3497
|
+
enable_auto_skip_calendar_days?: boolean;
|
|
3498
|
+
skip_if_calendar_day_is_less_than?: number; // (1-31)
|
|
3499
|
+
skip_if_calendar_day_is_more_than?: number; // (1-31)
|
|
3500
|
+
enable_auto_skip_activity_existence?: boolean;
|
|
3501
|
+
auto_skip_activity_slugs?: AutoSkipActivitySlugs[];
|
|
3502
|
+
};
|
|
3434
3503
|
createdAt: string;
|
|
3435
3504
|
updatedAt: string;
|
|
3436
3505
|
__v: number;
|
|
3437
3506
|
}
|
|
3507
|
+
|
|
3508
|
+
export type Data = JobCategorySchema;
|
|
3509
|
+
|
|
3510
|
+
export type PopulatedDoc = Data & {
|
|
3511
|
+
jobs: (JobSchema & { tag?: string | Tag.TagSchema })[];
|
|
3512
|
+
auto_skip_conditions?: Data["auto_skip_conditions"] & {
|
|
3513
|
+
excluded_clients?: (string | Client.ClientSchema)[];
|
|
3514
|
+
};
|
|
3515
|
+
};
|
|
3516
|
+
|
|
3517
|
+
type CreateBody = Omit<Data, "_id" | "createdAt" | "updatedAt" | "__v">;
|
|
3518
|
+
type PopulatedKeys = "jobs.tag" | "auto_skip_conditions.excluded_clients";
|
|
3519
|
+
|
|
3520
|
+
export namespace Find {
|
|
3521
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
3522
|
+
_id?: string[] | string;
|
|
3523
|
+
search?: string;
|
|
3524
|
+
disabled?: boolean;
|
|
3525
|
+
en_name?: string[] | string;
|
|
3526
|
+
from_updatedAt?: number;
|
|
3527
|
+
to_updatedAt?: number;
|
|
3528
|
+
from__id?: string;
|
|
3529
|
+
to__id?: string;
|
|
3530
|
+
populatedKeys?: PopulatedKeys[];
|
|
3531
|
+
[key: string]: any;
|
|
3532
|
+
};
|
|
3533
|
+
export interface Result extends DefaultPaginationResult {
|
|
3534
|
+
data: PopulatedDoc[];
|
|
3535
|
+
}
|
|
3536
|
+
}
|
|
3537
|
+
export namespace Get {
|
|
3538
|
+
export type ID = string;
|
|
3539
|
+
export type Params = { populatedKeys?: PopulatedKeys[] };
|
|
3540
|
+
export type Result = PopulatedDoc;
|
|
3541
|
+
}
|
|
3542
|
+
export namespace Create {
|
|
3543
|
+
export type Body = CreateBody;
|
|
3544
|
+
export type Result = Data;
|
|
3545
|
+
}
|
|
3546
|
+
export namespace Update {
|
|
3547
|
+
export type ID = StringId;
|
|
3548
|
+
export type Body = Partial<Data>;
|
|
3549
|
+
export type Result = Data;
|
|
3550
|
+
}
|
|
3551
|
+
export namespace Remove {
|
|
3552
|
+
export type ID = string;
|
|
3553
|
+
export type Result = Data;
|
|
3554
|
+
}
|
|
3555
|
+
}
|
|
3556
|
+
|
|
3557
|
+
export namespace JobCategoryAutoSkipAnalyze {
|
|
3558
|
+
export interface Data {
|
|
3559
|
+
client: StringId;
|
|
3560
|
+
rep?: StringId;
|
|
3561
|
+
visit_id?: string;
|
|
3562
|
+
job_category: (JobCategory.Data & {
|
|
3563
|
+
skipped?: boolean;
|
|
3564
|
+
jobs: (JobCategory.Data["jobs"][0] & { skipped?: boolean })[];
|
|
3565
|
+
})[];
|
|
3566
|
+
company_namespace: string[];
|
|
3567
|
+
}
|
|
3568
|
+
|
|
3569
|
+
export namespace Create {
|
|
3570
|
+
export type Body = Data;
|
|
3571
|
+
export type Result = Data;
|
|
3572
|
+
}
|
|
3438
3573
|
}
|
|
3439
3574
|
|
|
3440
3575
|
export namespace Tag {
|
|
@@ -15378,12 +15513,103 @@ export namespace Service {
|
|
|
15378
15513
|
admin_notes: ActivityAdminNote[];
|
|
15379
15514
|
comments: ActivityComment[];
|
|
15380
15515
|
company_namespace: string[];
|
|
15516
|
+
job?: boolean;
|
|
15517
|
+
job_id?: string;
|
|
15518
|
+
job_category_id?: string;
|
|
15381
15519
|
job_start_time?: number;
|
|
15382
15520
|
job_end_time?: number;
|
|
15383
15521
|
job_duration?: number;
|
|
15522
|
+
disabled?: boolean;
|
|
15384
15523
|
createdAt: string;
|
|
15385
15524
|
updatedAt: string;
|
|
15386
15525
|
}
|
|
15526
|
+
|
|
15527
|
+
export interface CreateBody {
|
|
15528
|
+
items: Item[];
|
|
15529
|
+
geoPoint: GeoPoint;
|
|
15530
|
+
time: number;
|
|
15531
|
+
tags?: string[];
|
|
15532
|
+
visit_id: string;
|
|
15533
|
+
user: string;
|
|
15534
|
+
client: string;
|
|
15535
|
+
client_name: string;
|
|
15536
|
+
user_name: string;
|
|
15537
|
+
sync_id: string;
|
|
15538
|
+
route?: string;
|
|
15539
|
+
teams?: string[];
|
|
15540
|
+
company_namespace: string[];
|
|
15541
|
+
}
|
|
15542
|
+
|
|
15543
|
+
export interface UpdateBody {
|
|
15544
|
+
_id?: string;
|
|
15545
|
+
items?: Item[];
|
|
15546
|
+
geoPoint?: GeoPoint;
|
|
15547
|
+
time?: number;
|
|
15548
|
+
tags?: string[];
|
|
15549
|
+
visit_id?: string;
|
|
15550
|
+
user?: string;
|
|
15551
|
+
client?: string;
|
|
15552
|
+
client_name?: string;
|
|
15553
|
+
user_name?: string;
|
|
15554
|
+
sync_id?: string;
|
|
15555
|
+
route?: string;
|
|
15556
|
+
teams?: string[];
|
|
15557
|
+
company_namespace?: string[];
|
|
15558
|
+
}
|
|
15559
|
+
|
|
15560
|
+
export type PopulatedKeys =
|
|
15561
|
+
| "teams"
|
|
15562
|
+
| "user"
|
|
15563
|
+
| "client"
|
|
15564
|
+
| "route"
|
|
15565
|
+
| "visit_id";
|
|
15566
|
+
|
|
15567
|
+
export type ActivityItemStatusWithPopulatedKeysSchema = Data & {
|
|
15568
|
+
teams_populated?: Team.TeamSchema[] | string[];
|
|
15569
|
+
user_populated?: Rep.RepSchema | string;
|
|
15570
|
+
client_populated?: Client.ClientSchema | string;
|
|
15571
|
+
route_populated?: Route.RouteSchema | string;
|
|
15572
|
+
visit_id_populated?: Visit.VisitSchema | string;
|
|
15573
|
+
};
|
|
15574
|
+
|
|
15575
|
+
export namespace Find {
|
|
15576
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
15577
|
+
_id?: string[] | string;
|
|
15578
|
+
disabled?: boolean;
|
|
15579
|
+
from_updatedAt?: string;
|
|
15580
|
+
from_time?: number;
|
|
15581
|
+
to_time?: number;
|
|
15582
|
+
client?: string;
|
|
15583
|
+
user?: string;
|
|
15584
|
+
teams?: string[];
|
|
15585
|
+
route?: string;
|
|
15586
|
+
populatedKeys?: PopulatedKeys[];
|
|
15587
|
+
from__id?: string;
|
|
15588
|
+
to__id?: string;
|
|
15589
|
+
sortBy?: {
|
|
15590
|
+
field: "_id";
|
|
15591
|
+
type: "asc" | "desc";
|
|
15592
|
+
}[];
|
|
15593
|
+
[key: string]: any;
|
|
15594
|
+
};
|
|
15595
|
+
export interface Result extends DefaultPaginationResult {
|
|
15596
|
+
data: ActivityItemStatusWithPopulatedKeysSchema[];
|
|
15597
|
+
}
|
|
15598
|
+
}
|
|
15599
|
+
export namespace Get {
|
|
15600
|
+
export type ID = string;
|
|
15601
|
+
export interface Params {}
|
|
15602
|
+
export type Result = Data;
|
|
15603
|
+
}
|
|
15604
|
+
export namespace Create {
|
|
15605
|
+
export type Body = CreateBody;
|
|
15606
|
+
export type Result = Data;
|
|
15607
|
+
}
|
|
15608
|
+
export namespace Update {
|
|
15609
|
+
export type ID = string;
|
|
15610
|
+
export type Body = UpdateBody;
|
|
15611
|
+
export type Result = Data;
|
|
15612
|
+
}
|
|
15387
15613
|
}
|
|
15388
15614
|
|
|
15389
15615
|
export namespace ActivityPlanogram {
|
|
@@ -20333,6 +20559,18 @@ export namespace Service {
|
|
|
20333
20559
|
};
|
|
20334
20560
|
export type Result = Data;
|
|
20335
20561
|
}
|
|
20562
|
+
export namespace Patch {
|
|
20563
|
+
export type Params = { updateStatus: true };
|
|
20564
|
+
export type Body = {
|
|
20565
|
+
readQuery: [{ key: "_id"; operator: "in"; value: StringId[] }];
|
|
20566
|
+
writeQuery: {
|
|
20567
|
+
key: "status";
|
|
20568
|
+
command: "set";
|
|
20569
|
+
value: "approved" | "rejected";
|
|
20570
|
+
};
|
|
20571
|
+
};
|
|
20572
|
+
export type Result = { nFound: number; nModified: number };
|
|
20573
|
+
}
|
|
20336
20574
|
}
|
|
20337
20575
|
|
|
20338
20576
|
export namespace LineClassification {
|