repzo 1.0.271 → 1.0.273
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 +17 -0
- package/lib/index.js +35 -0
- package/lib/types/index.d.ts +112 -6
- package/package.json +1 -1
- package/src/index.ts +82 -0
- package/src/types/index.ts +153 -6
package/lib/index.d.ts
CHANGED
|
@@ -133,6 +133,8 @@ export declare const end_points: {
|
|
|
133
133
|
readonly DATA_FILE_WAREHOUSE: "data-file-warehouse";
|
|
134
134
|
readonly DATA_SESSION: "data-session";
|
|
135
135
|
readonly ADMIN: "admin";
|
|
136
|
+
readonly JOB_CATEGORY: "job-category";
|
|
137
|
+
readonly JOB_CATEGORY_AUTOSKIP_ANALYZE: "job-category-autoskip-analyze";
|
|
136
138
|
};
|
|
137
139
|
export type EndPoints = (typeof end_points)[keyof typeof end_points];
|
|
138
140
|
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"];
|
|
@@ -281,6 +283,8 @@ export default class Repzo {
|
|
|
281
283
|
readonly DATA_FILE_WAREHOUSE: "data-file-warehouse";
|
|
282
284
|
readonly DATA_SESSION: "data-session";
|
|
283
285
|
readonly ADMIN: "admin";
|
|
286
|
+
readonly JOB_CATEGORY: "job-category";
|
|
287
|
+
readonly JOB_CATEGORY_AUTOSKIP_ANALYZE: "job-category-autoskip-analyze";
|
|
284
288
|
};
|
|
285
289
|
private _retryRequest;
|
|
286
290
|
private _fetch;
|
|
@@ -1248,6 +1252,7 @@ export default class Repzo {
|
|
|
1248
1252
|
get: (id: Service.ActivityFormV2Result.Get.ID, params?: Service.ActivityFormV2Result.Get.Params) => Promise<Service.ActivityFormV2Result.Get.Result>;
|
|
1249
1253
|
create: (body: Service.ActivityFormV2Result.Create.Body) => Promise<Service.ActivityFormV2Result.Create.Result>;
|
|
1250
1254
|
update: (id: Service.ActivityFormV2Result.Update.ID, body: Service.ActivityFormV2Result.Update.Body) => Promise<Service.ActivityFormV2Result.Update.Result>;
|
|
1255
|
+
patch: (params: Service.ActivityFormV2Result.Patch.Params, body: Service.ActivityFormV2Result.Patch.Body) => Promise<Service.ActivityFormV2Result.Patch.Result>;
|
|
1251
1256
|
};
|
|
1252
1257
|
lineClassification: {
|
|
1253
1258
|
_path: "line-classification";
|
|
@@ -1308,4 +1313,16 @@ export default class Repzo {
|
|
|
1308
1313
|
globalize: (id: Service.Admin.Globalize.ID) => Promise<Service.Admin.Globalize.Result>;
|
|
1309
1314
|
remove: (id: Service.Admin.Update.ID) => Promise<Service.Admin.Remove.Result>;
|
|
1310
1315
|
};
|
|
1316
|
+
jobCategory: {
|
|
1317
|
+
_path: "job-category";
|
|
1318
|
+
find: (params?: Service.JobCategory.Find.Params) => Promise<Service.JobCategory.Find.Result>;
|
|
1319
|
+
get: (id: Service.JobCategory.Get.ID, params?: Service.JobCategory.Get.Params) => Promise<Service.JobCategory.Get.Result>;
|
|
1320
|
+
create: (body: Service.JobCategory.Create.Body) => Promise<Service.JobCategory.Create.Result>;
|
|
1321
|
+
update: (id: Service.JobCategory.Update.ID, body: Service.JobCategory.Update.Body) => Promise<Service.JobCategory.Update.Result>;
|
|
1322
|
+
remove: (id: Service.JobCategory.Remove.ID) => Promise<Service.JobCategory.Remove.Result>;
|
|
1323
|
+
};
|
|
1324
|
+
jobCategoryAutoSkipAnalyze: {
|
|
1325
|
+
_path: "job-category-autoskip-analyze";
|
|
1326
|
+
create: (body: Service.JobCategoryAutoSkipAnalyze.Create.Body) => Promise<Service.JobCategoryAutoSkipAnalyze.Create.Result>;
|
|
1327
|
+
};
|
|
1311
1328
|
}
|
package/lib/index.js
CHANGED
|
@@ -135,6 +135,8 @@ export const end_points = {
|
|
|
135
135
|
DATA_FILE_WAREHOUSE: "data-file-warehouse",
|
|
136
136
|
DATA_SESSION: "data-session",
|
|
137
137
|
ADMIN: "admin",
|
|
138
|
+
JOB_CATEGORY: "job-category",
|
|
139
|
+
JOB_CATEGORY_AUTOSKIP_ANALYZE: "job-category-autoskip-analyze",
|
|
138
140
|
};
|
|
139
141
|
export const availableService = [
|
|
140
142
|
"client",
|
|
@@ -2548,6 +2550,10 @@ class Repzo {
|
|
|
2548
2550
|
let res = await this._update(this.svAPIEndpoint, this.activityFormV2Result._path + `/${id}`, body);
|
|
2549
2551
|
return res;
|
|
2550
2552
|
},
|
|
2553
|
+
patch: async (params, body) => {
|
|
2554
|
+
let res = await this._patch(this.svAPIEndpoint, this.activityFormV2Result._path, body, params);
|
|
2555
|
+
return res;
|
|
2556
|
+
},
|
|
2551
2557
|
};
|
|
2552
2558
|
this.lineClassification = {
|
|
2553
2559
|
_path: Repzo._end_points.LINE_CLASSIFICATION,
|
|
@@ -2715,6 +2721,35 @@ class Repzo {
|
|
|
2715
2721
|
return res;
|
|
2716
2722
|
},
|
|
2717
2723
|
};
|
|
2724
|
+
this.jobCategory = {
|
|
2725
|
+
_path: Repzo._end_points.JOB_CATEGORY,
|
|
2726
|
+
find: async (params) => {
|
|
2727
|
+
let res = await this._fetch(this.svAPIEndpoint, this.jobCategory._path, params);
|
|
2728
|
+
return res;
|
|
2729
|
+
},
|
|
2730
|
+
get: async (id, params) => {
|
|
2731
|
+
return await this._fetch(this.svAPIEndpoint, this.jobCategory._path + `/${id}`, params);
|
|
2732
|
+
},
|
|
2733
|
+
create: async (body) => {
|
|
2734
|
+
let res = await this._create(this.svAPIEndpoint, this.jobCategory._path, body);
|
|
2735
|
+
return res;
|
|
2736
|
+
},
|
|
2737
|
+
update: async (id, body) => {
|
|
2738
|
+
let res = await this._update(this.svAPIEndpoint, this.jobCategory._path + `/${id}`, body);
|
|
2739
|
+
return res;
|
|
2740
|
+
},
|
|
2741
|
+
remove: async (id) => {
|
|
2742
|
+
let res = await this._delete(this.svAPIEndpoint, this.jobCategory._path + `/${id}`);
|
|
2743
|
+
return res;
|
|
2744
|
+
},
|
|
2745
|
+
};
|
|
2746
|
+
this.jobCategoryAutoSkipAnalyze = {
|
|
2747
|
+
_path: Repzo._end_points.JOB_CATEGORY_AUTOSKIP_ANALYZE,
|
|
2748
|
+
create: async (body) => {
|
|
2749
|
+
let res = await this._create(this.svAPIEndpoint, this.jobCategoryAutoSkipAnalyze._path, body);
|
|
2750
|
+
return res;
|
|
2751
|
+
},
|
|
2752
|
+
};
|
|
2718
2753
|
this.svAPIEndpoint =
|
|
2719
2754
|
!options?.env || options?.env == "production"
|
|
2720
2755
|
? "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 {
|
|
@@ -18147,6 +18232,27 @@ export declare namespace Service {
|
|
|
18147
18232
|
};
|
|
18148
18233
|
type Result = Data;
|
|
18149
18234
|
}
|
|
18235
|
+
export namespace Patch {
|
|
18236
|
+
type Params = {
|
|
18237
|
+
updateStatus: true;
|
|
18238
|
+
};
|
|
18239
|
+
type Body = {
|
|
18240
|
+
readQuery: [{
|
|
18241
|
+
key: "_id";
|
|
18242
|
+
operator: "in";
|
|
18243
|
+
value: StringId[];
|
|
18244
|
+
}];
|
|
18245
|
+
writeQuery: {
|
|
18246
|
+
key: "status";
|
|
18247
|
+
command: "set";
|
|
18248
|
+
value: "approved" | "rejected";
|
|
18249
|
+
};
|
|
18250
|
+
};
|
|
18251
|
+
type Result = {
|
|
18252
|
+
nFound: number;
|
|
18253
|
+
nModified: number;
|
|
18254
|
+
};
|
|
18255
|
+
}
|
|
18150
18256
|
export {};
|
|
18151
18257
|
}
|
|
18152
18258
|
namespace LineClassification {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -145,6 +145,8 @@ export const end_points = {
|
|
|
145
145
|
DATA_FILE_WAREHOUSE: "data-file-warehouse",
|
|
146
146
|
DATA_SESSION: "data-session",
|
|
147
147
|
ADMIN: "admin",
|
|
148
|
+
JOB_CATEGORY: "job-category",
|
|
149
|
+
JOB_CATEGORY_AUTOSKIP_ANALYZE: "job-category-autoskip-analyze",
|
|
148
150
|
} as const;
|
|
149
151
|
export type EndPoints = (typeof end_points)[keyof typeof end_points];
|
|
150
152
|
|
|
@@ -6417,6 +6419,18 @@ export default class Repzo {
|
|
|
6417
6419
|
);
|
|
6418
6420
|
return res;
|
|
6419
6421
|
},
|
|
6422
|
+
patch: async (
|
|
6423
|
+
params: Service.ActivityFormV2Result.Patch.Params,
|
|
6424
|
+
body: Service.ActivityFormV2Result.Patch.Body,
|
|
6425
|
+
): Promise<Service.ActivityFormV2Result.Patch.Result> => {
|
|
6426
|
+
let res: Service.ActivityFormV2Result.Patch.Result = await this._patch(
|
|
6427
|
+
this.svAPIEndpoint,
|
|
6428
|
+
this.activityFormV2Result._path,
|
|
6429
|
+
body,
|
|
6430
|
+
params,
|
|
6431
|
+
);
|
|
6432
|
+
return res;
|
|
6433
|
+
},
|
|
6420
6434
|
};
|
|
6421
6435
|
|
|
6422
6436
|
lineClassification = {
|
|
@@ -6819,6 +6833,74 @@ export default class Repzo {
|
|
|
6819
6833
|
return res;
|
|
6820
6834
|
},
|
|
6821
6835
|
};
|
|
6836
|
+
|
|
6837
|
+
jobCategory = {
|
|
6838
|
+
_path: Repzo._end_points.JOB_CATEGORY,
|
|
6839
|
+
find: async (
|
|
6840
|
+
params?: Service.JobCategory.Find.Params,
|
|
6841
|
+
): Promise<Service.JobCategory.Find.Result> => {
|
|
6842
|
+
let res: Service.JobCategory.Find.Result = await this._fetch(
|
|
6843
|
+
this.svAPIEndpoint,
|
|
6844
|
+
this.jobCategory._path,
|
|
6845
|
+
params,
|
|
6846
|
+
);
|
|
6847
|
+
return res;
|
|
6848
|
+
},
|
|
6849
|
+
get: async (
|
|
6850
|
+
id: Service.JobCategory.Get.ID,
|
|
6851
|
+
params?: Service.JobCategory.Get.Params,
|
|
6852
|
+
): Promise<Service.JobCategory.Get.Result> => {
|
|
6853
|
+
return await this._fetch(
|
|
6854
|
+
this.svAPIEndpoint,
|
|
6855
|
+
this.jobCategory._path + `/${id}`,
|
|
6856
|
+
params,
|
|
6857
|
+
);
|
|
6858
|
+
},
|
|
6859
|
+
create: async (
|
|
6860
|
+
body: Service.JobCategory.Create.Body,
|
|
6861
|
+
): Promise<Service.JobCategory.Create.Result> => {
|
|
6862
|
+
let res = await this._create(
|
|
6863
|
+
this.svAPIEndpoint,
|
|
6864
|
+
this.jobCategory._path,
|
|
6865
|
+
body,
|
|
6866
|
+
);
|
|
6867
|
+
return res;
|
|
6868
|
+
},
|
|
6869
|
+
update: async (
|
|
6870
|
+
id: Service.JobCategory.Update.ID,
|
|
6871
|
+
body: Service.JobCategory.Update.Body,
|
|
6872
|
+
): Promise<Service.JobCategory.Update.Result> => {
|
|
6873
|
+
let res: Service.JobCategory.Update.Result = await this._update(
|
|
6874
|
+
this.svAPIEndpoint,
|
|
6875
|
+
this.jobCategory._path + `/${id}`,
|
|
6876
|
+
body,
|
|
6877
|
+
);
|
|
6878
|
+
return res;
|
|
6879
|
+
},
|
|
6880
|
+
remove: async (
|
|
6881
|
+
id: Service.JobCategory.Remove.ID,
|
|
6882
|
+
): Promise<Service.JobCategory.Remove.Result> => {
|
|
6883
|
+
let res: Service.JobCategory.Remove.Result = await this._delete(
|
|
6884
|
+
this.svAPIEndpoint,
|
|
6885
|
+
this.jobCategory._path + `/${id}`,
|
|
6886
|
+
);
|
|
6887
|
+
return res;
|
|
6888
|
+
},
|
|
6889
|
+
};
|
|
6890
|
+
|
|
6891
|
+
jobCategoryAutoSkipAnalyze = {
|
|
6892
|
+
_path: Repzo._end_points.JOB_CATEGORY_AUTOSKIP_ANALYZE,
|
|
6893
|
+
create: async (
|
|
6894
|
+
body: Service.JobCategoryAutoSkipAnalyze.Create.Body,
|
|
6895
|
+
): Promise<Service.JobCategoryAutoSkipAnalyze.Create.Result> => {
|
|
6896
|
+
let res = await this._create(
|
|
6897
|
+
this.svAPIEndpoint,
|
|
6898
|
+
this.jobCategoryAutoSkipAnalyze._path,
|
|
6899
|
+
body,
|
|
6900
|
+
);
|
|
6901
|
+
return res;
|
|
6902
|
+
},
|
|
6903
|
+
};
|
|
6822
6904
|
}
|
|
6823
6905
|
|
|
6824
6906
|
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 {
|
|
@@ -20333,6 +20468,18 @@ export namespace Service {
|
|
|
20333
20468
|
};
|
|
20334
20469
|
export type Result = Data;
|
|
20335
20470
|
}
|
|
20471
|
+
export namespace Patch {
|
|
20472
|
+
export type Params = { updateStatus: true };
|
|
20473
|
+
export type Body = {
|
|
20474
|
+
readQuery: [{ key: "_id"; operator: "in"; value: StringId[] }];
|
|
20475
|
+
writeQuery: {
|
|
20476
|
+
key: "status";
|
|
20477
|
+
command: "set";
|
|
20478
|
+
value: "approved" | "rejected";
|
|
20479
|
+
};
|
|
20480
|
+
};
|
|
20481
|
+
export type Result = { nFound: number; nModified: number };
|
|
20482
|
+
}
|
|
20336
20483
|
}
|
|
20337
20484
|
|
|
20338
20485
|
export namespace LineClassification {
|