kcommons 14.5.0 → 14.6.1
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/build/classes/asnWrapper.class.d.ts +2 -2
- package/build/classes/asnWrapper.class.js +4 -4
- package/build/index.d.ts +1 -0
- package/build/index.js +2 -0
- package/build/typings/asn.typings.d.ts +1 -1
- package/build/typings/company/masters/ves.typings.d.ts +11 -0
- package/build/typings/company/masters/ves.typings.js +6 -1
- package/build/typings/company.typings.d.ts +5 -2
- package/build/typings/company.typings.js +1 -0
- package/build/typings/documentTaxes.typings.d.ts +3 -0
- package/build/typings/documentTaxes.typings.js +13 -1
- package/build/typings/roles.typings.d.ts +5 -2
- package/build/typings/roles.typings.js +1 -0
- package/build/typings/system/queueJob.typings.d.ts +59 -0
- package/build/typings/system/queueJob.typings.js +30 -0
- package/build/typings/user.typings.d.ts +5 -2
- package/build/typings/user.typings.js +1 -0
- package/build/typings/vendor.typings.d.ts +6 -3
- package/build/typings/vendor.typings.js +1 -0
- package/build/utils/getContactPerson.util.spec.js +2 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IASNItem } from "../typings/asn.typings";
|
|
2
2
|
import { INestedGRNItem } from "../typings/grn.typings";
|
|
3
3
|
import { INestedPOItem } from "../typings/po.typings";
|
|
4
|
-
import {
|
|
4
|
+
import { INestedPOGRNItemJunction } from "../typings/poGrnJunctionItems.typings";
|
|
5
5
|
export declare class ASNItemWrapper implements IASNItem {
|
|
6
6
|
constructor(partial: IASNItem);
|
|
7
7
|
po_asn_item_junction_id: string;
|
|
@@ -30,4 +30,4 @@ export declare class ASNItemWrapper implements IASNItem {
|
|
|
30
30
|
parent_asn: null;
|
|
31
31
|
vendor: null;
|
|
32
32
|
}
|
|
33
|
-
export declare function convertPOItemToASNItem(poItem: INestedPOItem, vendor_id?: string | null,
|
|
33
|
+
export declare function convertPOItemToASNItem(poItem: INestedPOItem, vendor_id?: string | null, poGRNItemJunction?: INestedPOGRNItemJunction[] | null): IASNItem;
|
|
@@ -34,12 +34,12 @@ class ASNItemWrapper {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
exports.ASNItemWrapper = ASNItemWrapper;
|
|
37
|
-
function convertPOItemToASNItem(poItem, vendor_id,
|
|
38
|
-
var _a
|
|
37
|
+
function convertPOItemToASNItem(poItem, vendor_id, poGRNItemJunction = []) {
|
|
38
|
+
var _a;
|
|
39
39
|
return new ASNItemWrapper({
|
|
40
40
|
id: (0, uuid_1.v4)(),
|
|
41
41
|
parent_asn_id: "",
|
|
42
|
-
dispatched_quantity: ((_a =
|
|
42
|
+
dispatched_quantity: ((_a = poGRNItemJunction === null || poGRNItemJunction === void 0 ? void 0 : poGRNItemJunction.find((ele) => ele.item_id === (poItem === null || poItem === void 0 ? void 0 : poItem.item_id))) === null || _a === void 0 ? void 0 : _a.pending_quantity) || 0,
|
|
43
43
|
delivered_quantity: 0,
|
|
44
44
|
vendor_id: vendor_id || "",
|
|
45
45
|
// po_item_id: item.id,
|
|
@@ -53,7 +53,7 @@ function convertPOItemToASNItem(poItem, vendor_id, poASNItemJunctions = []) {
|
|
|
53
53
|
item_id: poItem.item_id,
|
|
54
54
|
item_name: (poItem === null || poItem === void 0 ? void 0 : poItem.item_name) || "",
|
|
55
55
|
uom: (poItem === null || poItem === void 0 ? void 0 : poItem.uom) || "",
|
|
56
|
-
po_asn_item_junction_id:
|
|
56
|
+
po_asn_item_junction_id: null,
|
|
57
57
|
item: null,
|
|
58
58
|
company: null,
|
|
59
59
|
parent_asn: null,
|
package/build/index.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ export * from "./typings/company/vendorOnboardingRequest/vendorOnboardingRequest
|
|
|
66
66
|
export * from "./typings/company/masters/itemManagementbody.typings";
|
|
67
67
|
export * from "./typings/company/settings/termsAndConditions.typings";
|
|
68
68
|
export * from "./typings/company/_junctions/vesCheckpointTracking.typings";
|
|
69
|
+
export * from "./typings/system/queueJob.typings";
|
|
69
70
|
export * from "./typings/common/address.typings";
|
|
70
71
|
export * from "./typings/common/paginationFilters.typings";
|
|
71
72
|
export * from "./typings/common/uploadMedia.typings";
|
package/build/index.js
CHANGED
|
@@ -85,6 +85,8 @@ __exportStar(require("./typings/company/vendorOnboardingRequest/vendorOnboarding
|
|
|
85
85
|
__exportStar(require("./typings/company/masters/itemManagementbody.typings"), exports);
|
|
86
86
|
__exportStar(require("./typings/company/settings/termsAndConditions.typings"), exports);
|
|
87
87
|
__exportStar(require("./typings/company/_junctions/vesCheckpointTracking.typings"), exports);
|
|
88
|
+
// System
|
|
89
|
+
__exportStar(require("./typings/system/queueJob.typings"), exports);
|
|
88
90
|
// Commons
|
|
89
91
|
__exportStar(require("./typings/common/address.typings"), exports);
|
|
90
92
|
__exportStar(require("./typings/common/paginationFilters.typings"), exports);
|
|
@@ -247,7 +247,7 @@ export interface IASNItem {
|
|
|
247
247
|
dispatched_quantity: number;
|
|
248
248
|
delivered_quantity: number;
|
|
249
249
|
item_description: string | null;
|
|
250
|
-
po_asn_item_junction_id: string;
|
|
250
|
+
po_asn_item_junction_id: string | null;
|
|
251
251
|
is_deleted: boolean;
|
|
252
252
|
deleted_at: string | null;
|
|
253
253
|
created_at: string;
|
|
@@ -6,6 +6,7 @@ import { IGRN } from "../../grn.typings";
|
|
|
6
6
|
import { INestedPo, IPurchaseOrder } from "../../po.typings";
|
|
7
7
|
import { INestedStoreLocation } from "../../storeLocation.typings";
|
|
8
8
|
import { INestedUser } from "../../user.typings";
|
|
9
|
+
import { INestedVendor } from "../../vendor.typings";
|
|
9
10
|
import { INestedVESCheckpointTracking } from "../_junctions/vesCheckpointTracking.typings";
|
|
10
11
|
import { INestedCheckpoint } from "./checkpoints.typings";
|
|
11
12
|
import { INestedVESItem } from "./vesItem.typings";
|
|
@@ -54,6 +55,7 @@ export interface IVESFilters {
|
|
|
54
55
|
was_sent_to_store_location_without_confirmation?: boolean | null;
|
|
55
56
|
name?: string | null;
|
|
56
57
|
include?: VES_INCLUDE[];
|
|
58
|
+
metafields_include?: VES_METAFIELDS_INCLUDE[];
|
|
57
59
|
}
|
|
58
60
|
export interface IVESFiltersWithPagination extends IVESFilters, IPaginationFilters {
|
|
59
61
|
}
|
|
@@ -107,3 +109,12 @@ export interface IFetchDocumentForVESByDocumentNoResponse {
|
|
|
107
109
|
asnData: IASN | null;
|
|
108
110
|
document_type: VES_PARENT_DOCUMENT_TYPE;
|
|
109
111
|
}
|
|
112
|
+
export declare enum VES_METAFIELDS_INCLUDE {
|
|
113
|
+
vendor = "vendor"
|
|
114
|
+
}
|
|
115
|
+
export interface IVESMetafields {
|
|
116
|
+
vendor: INestedVendor | null;
|
|
117
|
+
}
|
|
118
|
+
export interface IVESMetafieldArgs {
|
|
119
|
+
ves_id: string | null;
|
|
120
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VES_INCLUDE = exports.VES_STATUS = exports.VES_VIEW_TABS = exports.VES_PARENT_DOCUMENT_TYPE = exports.VES_REQUESTING_ENTITY_TYPE = void 0;
|
|
3
|
+
exports.VES_METAFIELDS_INCLUDE = exports.VES_INCLUDE = exports.VES_STATUS = exports.VES_VIEW_TABS = exports.VES_PARENT_DOCUMENT_TYPE = exports.VES_REQUESTING_ENTITY_TYPE = void 0;
|
|
4
4
|
var VES_REQUESTING_ENTITY_TYPE;
|
|
5
5
|
(function (VES_REQUESTING_ENTITY_TYPE) {
|
|
6
6
|
VES_REQUESTING_ENTITY_TYPE["STORE_LOCATION"] = "store_location";
|
|
@@ -44,3 +44,8 @@ var VES_INCLUDE;
|
|
|
44
44
|
VES_INCLUDE["checkpoint_trail"] = "checkpoint_trail";
|
|
45
45
|
VES_INCLUDE["child_grns"] = "child_grns";
|
|
46
46
|
})(VES_INCLUDE || (exports.VES_INCLUDE = VES_INCLUDE = {}));
|
|
47
|
+
// Typings for VES Metafields Include
|
|
48
|
+
var VES_METAFIELDS_INCLUDE;
|
|
49
|
+
(function (VES_METAFIELDS_INCLUDE) {
|
|
50
|
+
VES_METAFIELDS_INCLUDE["vendor"] = "vendor";
|
|
51
|
+
})(VES_METAFIELDS_INCLUDE || (exports.VES_METAFIELDS_INCLUDE = VES_METAFIELDS_INCLUDE = {}));
|
|
@@ -46,6 +46,7 @@ import { INestedPOGRNItemJunction } from "./poGrnJunctionItems.typings";
|
|
|
46
46
|
import { INestedFormRolback } from "./vendor/vendorFormRollbackRemark.typings";
|
|
47
47
|
import { INestedCheckpoint } from "./company/masters/checkpoints.typings";
|
|
48
48
|
import { INestedVES } from "./company/masters/ves.typings";
|
|
49
|
+
import { INestedQueueJob } from "./system/queueJob.typings";
|
|
49
50
|
export declare enum PRICING_PLANS {
|
|
50
51
|
BASIC = "BASIC",
|
|
51
52
|
GROWTH = "GROWTH",
|
|
@@ -103,7 +104,8 @@ export declare enum COMPANY_INCLUDE {
|
|
|
103
104
|
vendor_onboarding_request_categories = "vendor_onboarding_request_categories",
|
|
104
105
|
item_management_bodies = "item_management_bodies",
|
|
105
106
|
rollback_forms_sent_by_company = "rollback_forms_sent_by_company",
|
|
106
|
-
company_ves = "company_ves"
|
|
107
|
+
company_ves = "company_ves",
|
|
108
|
+
queue_jobs = "queue_jobs"
|
|
107
109
|
}
|
|
108
110
|
export interface ICompany extends IAddress {
|
|
109
111
|
id: string;
|
|
@@ -192,8 +194,9 @@ export interface ICompany extends IAddress {
|
|
|
192
194
|
rollback_forms_sent_by_company: INestedFormRolback[] | null;
|
|
193
195
|
company_checkpoints: INestedCheckpoint[] | null;
|
|
194
196
|
company_ves: INestedVES[] | null;
|
|
197
|
+
queue_jobs: INestedQueueJob[] | null;
|
|
195
198
|
}
|
|
196
|
-
export interface INestedCompany extends Omit<ICompany, "associated_purchase_locations" | "associated_vendors" | "associated_permissions" | "associated_roles" | "approval_configs" | "subdepartments" | "subcategories" | "categories" | "items" | "offices" | "stores" | "employees" | "departments" | "vendor_groups" | "company_indents" | "indent_items" | "company_mis" | "mi_items" | "company_prs" | "pr_items" | "company_rfqs" | "company_quotes" | "entity_approval_chain_entries" | "company_negotiations" | "company_pos" | "company_grns" | "company_grns_items" | "company_mrns" | "company_mrns_items" | "company_boms" | "company_bom_items" | "company_comparatives" | "company_comparative_items" | "company_notifications" | "extra_question_ans" | "extra_core_related_questions" | "company_specific_vendor_items" | "po_asn_items_junction" | "company_contact_people" | "company_item_vendor_versions" | "istds" | "istd_items" | "inventory_logs" | "invoices" | "logs" | "vendor_onboarding_requests" | "vendor_management_bodies" | "item_management_bodies" | "rollback_forms_sent_by_company" | "company_checkpoints" | "company_ves"> {
|
|
199
|
+
export interface INestedCompany extends Omit<ICompany, "associated_purchase_locations" | "associated_vendors" | "associated_permissions" | "associated_roles" | "approval_configs" | "subdepartments" | "subcategories" | "categories" | "items" | "offices" | "stores" | "employees" | "departments" | "vendor_groups" | "company_indents" | "indent_items" | "company_mis" | "mi_items" | "company_prs" | "pr_items" | "company_rfqs" | "company_quotes" | "entity_approval_chain_entries" | "company_negotiations" | "company_pos" | "company_grns" | "company_grns_items" | "company_mrns" | "company_mrns_items" | "company_boms" | "company_bom_items" | "company_comparatives" | "company_comparative_items" | "company_notifications" | "extra_question_ans" | "extra_core_related_questions" | "company_specific_vendor_items" | "po_asn_items_junction" | "company_contact_people" | "company_item_vendor_versions" | "istds" | "istd_items" | "inventory_logs" | "invoices" | "logs" | "vendor_onboarding_requests" | "vendor_management_bodies" | "item_management_bodies" | "rollback_forms_sent_by_company" | "company_checkpoints" | "company_ves" | "queue_jobs"> {
|
|
197
200
|
}
|
|
198
201
|
export interface ICompanyVendorAdditionalInfoMappingConfig {
|
|
199
202
|
additional_info_form_que_id: string;
|
|
@@ -59,6 +59,7 @@ var COMPANY_INCLUDE;
|
|
|
59
59
|
COMPANY_INCLUDE["item_management_bodies"] = "item_management_bodies";
|
|
60
60
|
COMPANY_INCLUDE["rollback_forms_sent_by_company"] = "rollback_forms_sent_by_company";
|
|
61
61
|
COMPANY_INCLUDE["company_ves"] = "company_ves";
|
|
62
|
+
COMPANY_INCLUDE["queue_jobs"] = "queue_jobs";
|
|
62
63
|
})(COMPANY_INCLUDE || (exports.COMPANY_INCLUDE = COMPANY_INCLUDE = {}));
|
|
63
64
|
// export interface IUpdateVendorOnboardingRequestCategoriesInputs
|
|
64
65
|
// extends Pick<ICompany, "vendor_onboarding_request_categories"> {}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { INestedPo } from "./po.typings";
|
|
2
2
|
import { INestedQuote } from "./quote.typings";
|
|
3
|
+
/** @description An Array of %s of GSTs allowed on the platform */
|
|
4
|
+
export declare const ALLOWED_GSTS: number[];
|
|
3
5
|
export declare enum TAX_TYPE {
|
|
4
6
|
FIXED = "FIXED",
|
|
5
7
|
PERCENTAGE = "PERCENTAGE"
|
|
@@ -25,6 +27,7 @@ export declare const TAX_PLACEHOLDERS: {
|
|
|
25
27
|
ADJUSTMENT: string;
|
|
26
28
|
};
|
|
27
29
|
export declare const TAX_SEQUENCE: TAX_NAME[];
|
|
30
|
+
export declare const TAXES_UNIT_CONFIG: Record<TAX_NAME, TAX_TYPE[]>;
|
|
28
31
|
export interface IDocumentTaxes {
|
|
29
32
|
id: string;
|
|
30
33
|
quote_id?: string | null;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DOCUMENT_TAXES_INCLUDE = exports.TAX_SEQUENCE = exports.TAX_PLACEHOLDERS = exports.TAX_NAME = exports.TAX_TYPE = void 0;
|
|
3
|
+
exports.DOCUMENT_TAXES_INCLUDE = exports.TAXES_UNIT_CONFIG = exports.TAX_SEQUENCE = exports.TAX_PLACEHOLDERS = exports.TAX_NAME = exports.TAX_TYPE = exports.ALLOWED_GSTS = void 0;
|
|
4
|
+
/** @description An Array of %s of GSTs allowed on the platform */
|
|
5
|
+
exports.ALLOWED_GSTS = [0, 0.1, 0.25, 1, 1.5, 3, 5, 6, 7.5, 12, 18, 28];
|
|
4
6
|
var TAX_TYPE;
|
|
5
7
|
(function (TAX_TYPE) {
|
|
6
8
|
TAX_TYPE["FIXED"] = "FIXED";
|
|
@@ -37,6 +39,16 @@ exports.TAX_SEQUENCE = [
|
|
|
37
39
|
TAX_NAME.CESS,
|
|
38
40
|
TAX_NAME.ADJUSTMENT,
|
|
39
41
|
];
|
|
42
|
+
exports.TAXES_UNIT_CONFIG = {
|
|
43
|
+
[TAX_NAME.PNF]: [TAX_TYPE.FIXED, TAX_TYPE.PERCENTAGE],
|
|
44
|
+
[TAX_NAME.ADJUSTMENT]: [TAX_TYPE.FIXED],
|
|
45
|
+
[TAX_NAME.CESS]: [TAX_TYPE.FIXED, TAX_TYPE.PERCENTAGE],
|
|
46
|
+
[TAX_NAME.FREIGHT]: [TAX_TYPE.FIXED],
|
|
47
|
+
[TAX_NAME.GST]: [TAX_TYPE.PERCENTAGE],
|
|
48
|
+
[TAX_NAME.INSURANCE]: [TAX_TYPE.FIXED, TAX_TYPE.PERCENTAGE],
|
|
49
|
+
[TAX_NAME.OTHER_CHARGES]: [TAX_TYPE.FIXED],
|
|
50
|
+
[TAX_NAME.TCS]: [TAX_TYPE.FIXED, TAX_TYPE.PERCENTAGE],
|
|
51
|
+
};
|
|
40
52
|
var DOCUMENT_TAXES_INCLUDE;
|
|
41
53
|
(function (DOCUMENT_TAXES_INCLUDE) {
|
|
42
54
|
DOCUMENT_TAXES_INCLUDE["parent_quote"] = "parent_quote";
|
|
@@ -11,6 +11,7 @@ import { INestedGate } from "./gate.typings";
|
|
|
11
11
|
import { INestedOffice } from "./offices.typings";
|
|
12
12
|
import { INestedPurchaseLocation } from "./purchaseLocation.typings";
|
|
13
13
|
import { INestedStoreLocation } from "./storeLocation.typings";
|
|
14
|
+
import { INestedQueueJob } from "./system/queueJob.typings";
|
|
14
15
|
import { INestedUser } from "./user.typings";
|
|
15
16
|
export declare enum RolesInclude {
|
|
16
17
|
vendor_management_body = "vendor_management_body",
|
|
@@ -26,7 +27,8 @@ export declare enum RolesInclude {
|
|
|
26
27
|
department = "department",
|
|
27
28
|
company = "company",
|
|
28
29
|
item_management_body = "item_management_body",
|
|
29
|
-
checkpoint = "checkpoint"
|
|
30
|
+
checkpoint = "checkpoint",
|
|
31
|
+
associated_queue_jobs = "associated_queue_jobs"
|
|
30
32
|
}
|
|
31
33
|
export interface IRoleFilters extends Partial<Pick<IRoles, "company_id" | "store_location_id" | "purchase_location_id" | "gate_id" | "office_id" | "vendor_management_body_id" | "item_management_body_id" | "checkpoint_id">> {
|
|
32
34
|
type?: string;
|
|
@@ -72,8 +74,9 @@ export interface IRoles {
|
|
|
72
74
|
assigned_users?: null | INestedUser[];
|
|
73
75
|
item_management_body: INestedItemManagementBody | null;
|
|
74
76
|
checkpoint: INestedCheckpoint | null;
|
|
77
|
+
associated_queue_jobs: INestedQueueJob[] | null;
|
|
75
78
|
}
|
|
76
|
-
export interface INestedRole extends Omit<IRoles, "company" | "department" | "office" | "store_location" | "purchase_location" | "gates" | "permissions" | "assigned_active_users" | "approval_chains" | "entity_approval_chain_entries" | "assigned_users" | "vendor_management_body" | "item_management_body" | "checkpoint"> {
|
|
79
|
+
export interface INestedRole extends Omit<IRoles, "company" | "department" | "office" | "store_location" | "purchase_location" | "gates" | "permissions" | "assigned_active_users" | "approval_chains" | "entity_approval_chain_entries" | "assigned_users" | "vendor_management_body" | "item_management_body" | "checkpoint" | "associated_queue_jobs"> {
|
|
77
80
|
}
|
|
78
81
|
export interface IPermissions extends Record<string | PERMISSION_ACTIONS, any> {
|
|
79
82
|
id: string;
|
|
@@ -21,4 +21,5 @@ var RolesInclude;
|
|
|
21
21
|
RolesInclude["company"] = "company";
|
|
22
22
|
RolesInclude["item_management_body"] = "item_management_body";
|
|
23
23
|
RolesInclude["checkpoint"] = "checkpoint";
|
|
24
|
+
RolesInclude["associated_queue_jobs"] = "associated_queue_jobs";
|
|
24
25
|
})(RolesInclude || (exports.RolesInclude = RolesInclude = {}));
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { IPaginationFilters } from "../common/paginationFilters.typings";
|
|
2
|
+
import { INestedCompany } from "../company.typings";
|
|
3
|
+
import { INestedRole } from "../roles.typings";
|
|
4
|
+
import { INestedUser } from "../user.typings";
|
|
5
|
+
import { INestedVendor } from "../vendor.typings";
|
|
6
|
+
export declare enum QUEUE_JOB_TYPES {
|
|
7
|
+
PO_EXCEL_UPLOAD = "PO_EXCEL_UPLOAD"
|
|
8
|
+
}
|
|
9
|
+
export declare enum QUEUE_JOB_STATUS {
|
|
10
|
+
waiting = "waiting",
|
|
11
|
+
active = "active",
|
|
12
|
+
completed = "completed",
|
|
13
|
+
failed = "failed",
|
|
14
|
+
delayed = "delayed",
|
|
15
|
+
paused = "paused",
|
|
16
|
+
stalled = "stalled"
|
|
17
|
+
}
|
|
18
|
+
export declare enum QUEUE_JOB_CREATED_BY_TYPE {
|
|
19
|
+
COMPANY_USER = "COMPANY_USER",
|
|
20
|
+
VENDOR = "VENDOR",
|
|
21
|
+
SUPERADMIN = "SUPERADMIN"
|
|
22
|
+
}
|
|
23
|
+
export declare enum QUEUE_JOB_INCLUDE {
|
|
24
|
+
parent_company = "parent_company",
|
|
25
|
+
created_by_user = "created_by_user",
|
|
26
|
+
created_by_vendor = "created_by_vendor",
|
|
27
|
+
created_by_user_with_role = "created_by_user_with_role"
|
|
28
|
+
}
|
|
29
|
+
export interface IQueueJob {
|
|
30
|
+
id: string;
|
|
31
|
+
bull_job_id: string;
|
|
32
|
+
created_by_type: QUEUE_JOB_CREATED_BY_TYPE;
|
|
33
|
+
parent_company_id: string | null;
|
|
34
|
+
created_by_user_id: string | null;
|
|
35
|
+
created_by_vendor_id: string | null;
|
|
36
|
+
created_by_user_with_role_id: string | null;
|
|
37
|
+
job_type: QUEUE_JOB_TYPES;
|
|
38
|
+
job_status: QUEUE_JOB_STATUS;
|
|
39
|
+
excel_upload_path: string | null;
|
|
40
|
+
notes: string | null;
|
|
41
|
+
created_at: Date;
|
|
42
|
+
updated_at: Date;
|
|
43
|
+
created_by_user: INestedUser | null;
|
|
44
|
+
created_by_vendor: INestedVendor | null;
|
|
45
|
+
parent_company: INestedCompany | null;
|
|
46
|
+
created_by_user_with_role: INestedRole | null;
|
|
47
|
+
}
|
|
48
|
+
export interface INestedQueueJob extends Omit<IQueueJob, "created_by_user" | "created_by_vendor" | "parent_company" | "created_by_user_with_role"> {
|
|
49
|
+
}
|
|
50
|
+
export interface IQueueJobFilters extends Partial<Pick<IQueueJob, "job_type" | "job_status">> {
|
|
51
|
+
}
|
|
52
|
+
export interface IQueueJobFiltersWithPagination extends IPaginationFilters {
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @description Metadata required to create a job. This metadata will be stored in redis server to help the worker identify the type of job and use
|
|
56
|
+
* appropriate services to process it.
|
|
57
|
+
*/
|
|
58
|
+
export interface IQueueJobMetadata extends Pick<IQueueJob, "job_type"> {
|
|
59
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QUEUE_JOB_INCLUDE = exports.QUEUE_JOB_CREATED_BY_TYPE = exports.QUEUE_JOB_STATUS = exports.QUEUE_JOB_TYPES = void 0;
|
|
4
|
+
var QUEUE_JOB_TYPES;
|
|
5
|
+
(function (QUEUE_JOB_TYPES) {
|
|
6
|
+
QUEUE_JOB_TYPES["PO_EXCEL_UPLOAD"] = "PO_EXCEL_UPLOAD";
|
|
7
|
+
})(QUEUE_JOB_TYPES || (exports.QUEUE_JOB_TYPES = QUEUE_JOB_TYPES = {}));
|
|
8
|
+
var QUEUE_JOB_STATUS;
|
|
9
|
+
(function (QUEUE_JOB_STATUS) {
|
|
10
|
+
QUEUE_JOB_STATUS["waiting"] = "waiting";
|
|
11
|
+
QUEUE_JOB_STATUS["active"] = "active";
|
|
12
|
+
QUEUE_JOB_STATUS["completed"] = "completed";
|
|
13
|
+
QUEUE_JOB_STATUS["failed"] = "failed";
|
|
14
|
+
QUEUE_JOB_STATUS["delayed"] = "delayed";
|
|
15
|
+
QUEUE_JOB_STATUS["paused"] = "paused";
|
|
16
|
+
QUEUE_JOB_STATUS["stalled"] = "stalled";
|
|
17
|
+
})(QUEUE_JOB_STATUS || (exports.QUEUE_JOB_STATUS = QUEUE_JOB_STATUS = {}));
|
|
18
|
+
var QUEUE_JOB_CREATED_BY_TYPE;
|
|
19
|
+
(function (QUEUE_JOB_CREATED_BY_TYPE) {
|
|
20
|
+
QUEUE_JOB_CREATED_BY_TYPE["COMPANY_USER"] = "COMPANY_USER";
|
|
21
|
+
QUEUE_JOB_CREATED_BY_TYPE["VENDOR"] = "VENDOR";
|
|
22
|
+
QUEUE_JOB_CREATED_BY_TYPE["SUPERADMIN"] = "SUPERADMIN";
|
|
23
|
+
})(QUEUE_JOB_CREATED_BY_TYPE || (exports.QUEUE_JOB_CREATED_BY_TYPE = QUEUE_JOB_CREATED_BY_TYPE = {}));
|
|
24
|
+
var QUEUE_JOB_INCLUDE;
|
|
25
|
+
(function (QUEUE_JOB_INCLUDE) {
|
|
26
|
+
QUEUE_JOB_INCLUDE["parent_company"] = "parent_company";
|
|
27
|
+
QUEUE_JOB_INCLUDE["created_by_user"] = "created_by_user";
|
|
28
|
+
QUEUE_JOB_INCLUDE["created_by_vendor"] = "created_by_vendor";
|
|
29
|
+
QUEUE_JOB_INCLUDE["created_by_user_with_role"] = "created_by_user_with_role";
|
|
30
|
+
})(QUEUE_JOB_INCLUDE || (exports.QUEUE_JOB_INCLUDE = QUEUE_JOB_INCLUDE = {}));
|
|
@@ -44,6 +44,7 @@ import { INestedTermsAndConditions } from "./company/settings/termsAndConditions
|
|
|
44
44
|
import { INestedCheckpoint } from "./company/masters/checkpoints.typings";
|
|
45
45
|
import { INestedVES } from "./company/masters/ves.typings";
|
|
46
46
|
import { INestedVESCheckpointTracking } from "./company/_junctions/vesCheckpointTracking.typings";
|
|
47
|
+
import { INestedQueueJob } from "./system/queueJob.typings";
|
|
47
48
|
export interface IUser {
|
|
48
49
|
id: string;
|
|
49
50
|
is_enabled?: boolean | null;
|
|
@@ -184,8 +185,9 @@ export interface IUser {
|
|
|
184
185
|
take_on_approval_for_ves: INestedVES[] | null;
|
|
185
186
|
ves_cancelled_by_user: INestedVES[] | null;
|
|
186
187
|
time_records_at_checkpoint: INestedVESCheckpointTracking[] | null;
|
|
188
|
+
created_queue_jobs: INestedQueueJob[] | null;
|
|
187
189
|
}
|
|
188
|
-
export interface INestedUser extends Omit<IUser, "updated_at" | "created_at" | "deleted_at" | "reporting_to" | "active_company" | "active_role" | "subordinates" | "otps" | "as_incharge_in_purchase_locations" | "as_incharge_in_store_locations" | "as_incharge_in_offices" | "as_incharge_in_gates" | "as_contact_person_companies" | "as_contact_person_offices" | "as_contact_person_gates" | "owned_companies" | "head_for_departments" | "created_item_subcategories" | "last_updated_item_subcategories" | "head_for_departments" | "approval_chains" | "indents_created_for_user" | "created_mis" | "mis_issued_for_user" | "mis_sent_for_approval" | "mis_issued" | "mis_last_updated" | "created_prs" | "pr_sent_for_approval" | "pr_sent_to_purchase_location" | "last_updated_prs" | "created_rfqs" | "entity_approval_chains" | "as_contact_person_for_rfqs" | "as_contact_person_for_quotes" | "rfqs_sent_for_approval" | "rfqs_sent_to_vendors" | "created_rfq_items" | "negotiations" | "created_pos" | "last_updated_pos" | "as_contact_person_for_pos" | "pos_sent_for_approval" | "pos_sent_to_vendors" | "created_grns" | "last_updated_grns" | "as_contact_person_for_grns" | "grns_sent_for_approval" | "grns_sent_to_store" | "mrns_sent_for_approval" | "as_contact_person_for_mrns" | "created_boms" | "last_updated_boms" | "created_vendor_groups" | "last_updated_vendor_groups" | "comparatives_sent_for_approval" | "user_notifications" | "created_extra_quesstions" | "updated_extra_quesstions" | "answered_questions" | "created_extra_core_question_for_companies" | "updated_extra_core_question_for_companies" | "cancelled_asns" | "created_contact_people" | "updated_contact_people" | "last_updated_company_item_vendor_version" | "items_last_updated_by_user" | "company_vendors_last_updated_by_user" | "created_istds" | "last_updated_istds" | "source_contact_person_for_istd" | "dest_contact_person_for_istd" | "istds_sent_for_source_approval" | "istds_sent_for_dest_approval" | "istds_sent_for_dest_store" | "istds_marked_as_processed" | "istds_terminated" | "created_payment_terms" | "created_iads" | "user_last_updated_iads" | "as_approver_for_iads" | "iads_terminated_by_user" | "finalised_iads" | "assigned_roles" | "initiated_inventory_logs" | "logs" | "vendor_onboarding_requests_created_by_user" | "vendor_onboarding_requests_last_updated" | "vendor_onboarding_requests_sent_for_approval" | "invitation_sent_for_vendor_onboarding_requests" | "created_vendor_management_bodies" | "last_updated_vendor_management_bodies" | "head_of_vendor_management_bodies" | "cancelled_vendor_onboarding_requests" | "company_vendor_created_by_user" | "company_vendors_last_updated_by_user" | "sent_for_approval_company_vendors" | "sent_questions_to_company_vendors" | "cancelled_company_vendors" | "created_vendor_onboarding_request_categories" | "last_updated_vendor_onboarding_request_categories" | "created_item_management_bodies" | "last_updated_item_management_bodies" | "as_head_of_item_management_bodies" | "created_items" | "items_sent_for_approval" | "cancelled_items" | "invoices_marked_as_paid_or_rejected" | "onboarded_company_vendors" | "created_indents" | "rollback_forms_by_user" | "asns_sent_to_vendor_by_user" | "created_terms_and_conditions" | "last_updated_terms_and_conditions" | "checkpoints_created_by_user" | "checkpoints_last_updated_by_user" | "ves_created_by_user" | "ves_last_updated_by_user" | "ves_cancelled_by_user" | "take_on_approval_for_ves" | "time_records_at_checkpoint"> {
|
|
190
|
+
export interface INestedUser extends Omit<IUser, "updated_at" | "created_at" | "deleted_at" | "reporting_to" | "active_company" | "active_role" | "subordinates" | "otps" | "as_incharge_in_purchase_locations" | "as_incharge_in_store_locations" | "as_incharge_in_offices" | "as_incharge_in_gates" | "as_contact_person_companies" | "as_contact_person_offices" | "as_contact_person_gates" | "owned_companies" | "head_for_departments" | "created_item_subcategories" | "last_updated_item_subcategories" | "head_for_departments" | "approval_chains" | "indents_created_for_user" | "created_mis" | "mis_issued_for_user" | "mis_sent_for_approval" | "mis_issued" | "mis_last_updated" | "created_prs" | "pr_sent_for_approval" | "pr_sent_to_purchase_location" | "last_updated_prs" | "created_rfqs" | "entity_approval_chains" | "as_contact_person_for_rfqs" | "as_contact_person_for_quotes" | "rfqs_sent_for_approval" | "rfqs_sent_to_vendors" | "created_rfq_items" | "negotiations" | "created_pos" | "last_updated_pos" | "as_contact_person_for_pos" | "pos_sent_for_approval" | "pos_sent_to_vendors" | "created_grns" | "last_updated_grns" | "as_contact_person_for_grns" | "grns_sent_for_approval" | "grns_sent_to_store" | "mrns_sent_for_approval" | "as_contact_person_for_mrns" | "created_boms" | "last_updated_boms" | "created_vendor_groups" | "last_updated_vendor_groups" | "comparatives_sent_for_approval" | "user_notifications" | "created_extra_quesstions" | "updated_extra_quesstions" | "answered_questions" | "created_extra_core_question_for_companies" | "updated_extra_core_question_for_companies" | "cancelled_asns" | "created_contact_people" | "updated_contact_people" | "last_updated_company_item_vendor_version" | "items_last_updated_by_user" | "company_vendors_last_updated_by_user" | "created_istds" | "last_updated_istds" | "source_contact_person_for_istd" | "dest_contact_person_for_istd" | "istds_sent_for_source_approval" | "istds_sent_for_dest_approval" | "istds_sent_for_dest_store" | "istds_marked_as_processed" | "istds_terminated" | "created_payment_terms" | "created_iads" | "user_last_updated_iads" | "as_approver_for_iads" | "iads_terminated_by_user" | "finalised_iads" | "assigned_roles" | "initiated_inventory_logs" | "logs" | "vendor_onboarding_requests_created_by_user" | "vendor_onboarding_requests_last_updated" | "vendor_onboarding_requests_sent_for_approval" | "invitation_sent_for_vendor_onboarding_requests" | "created_vendor_management_bodies" | "last_updated_vendor_management_bodies" | "head_of_vendor_management_bodies" | "cancelled_vendor_onboarding_requests" | "company_vendor_created_by_user" | "company_vendors_last_updated_by_user" | "sent_for_approval_company_vendors" | "sent_questions_to_company_vendors" | "cancelled_company_vendors" | "created_vendor_onboarding_request_categories" | "last_updated_vendor_onboarding_request_categories" | "created_item_management_bodies" | "last_updated_item_management_bodies" | "as_head_of_item_management_bodies" | "created_items" | "items_sent_for_approval" | "cancelled_items" | "invoices_marked_as_paid_or_rejected" | "onboarded_company_vendors" | "created_indents" | "rollback_forms_by_user" | "asns_sent_to_vendor_by_user" | "created_terms_and_conditions" | "last_updated_terms_and_conditions" | "checkpoints_created_by_user" | "checkpoints_last_updated_by_user" | "ves_created_by_user" | "ves_last_updated_by_user" | "ves_cancelled_by_user" | "take_on_approval_for_ves" | "time_records_at_checkpoint" | "created_queue_jobs"> {
|
|
189
191
|
}
|
|
190
192
|
export declare enum UserInclude {
|
|
191
193
|
subordinates = "subordinates",
|
|
@@ -302,7 +304,8 @@ export declare enum UserInclude {
|
|
|
302
304
|
ves_last_updated_by_user = "ves_last_updated_by_user",
|
|
303
305
|
ves_cancelled_by_user = "ves_cancelled_by_user",
|
|
304
306
|
take_on_approval_for_ves = "take_on_approval_for_ves",
|
|
305
|
-
time_records_at_checkpoint = "time_records_at_checkpoint"
|
|
307
|
+
time_records_at_checkpoint = "time_records_at_checkpoint",
|
|
308
|
+
created_queue_jobs = "created_queue_jobs"
|
|
306
309
|
}
|
|
307
310
|
export interface IUserFilters {
|
|
308
311
|
name?: string | null;
|
|
@@ -120,4 +120,5 @@ var UserInclude;
|
|
|
120
120
|
UserInclude["ves_cancelled_by_user"] = "ves_cancelled_by_user";
|
|
121
121
|
UserInclude["take_on_approval_for_ves"] = "take_on_approval_for_ves";
|
|
122
122
|
UserInclude["time_records_at_checkpoint"] = "time_records_at_checkpoint";
|
|
123
|
+
UserInclude["created_queue_jobs"] = "created_queue_jobs";
|
|
123
124
|
})(UserInclude || (exports.UserInclude = UserInclude = {}));
|
|
@@ -10,6 +10,7 @@ import { INestedCompanyItemVendorVersion } from "./companyItemVendorVersion.typi
|
|
|
10
10
|
import { INestedInvoice } from "./invoices.typings";
|
|
11
11
|
import { INestedVendorContactPeople } from "./vendor/vendorContactPeople.typings";
|
|
12
12
|
import { INestedFormRolback } from "./vendor/vendorFormRollbackRemark.typings";
|
|
13
|
+
import { INestedQueueJob } from "./system/queueJob.typings";
|
|
13
14
|
export interface IVendor extends IAddress {
|
|
14
15
|
id: string;
|
|
15
16
|
gst_no: string | null;
|
|
@@ -69,15 +70,16 @@ export interface IVendor extends IAddress {
|
|
|
69
70
|
invoices: INestedInvoice[] | null;
|
|
70
71
|
contact_people: INestedVendorContactPeople[] | null;
|
|
71
72
|
rollback_form_sent_to_vendor: INestedFormRolback[] | null;
|
|
73
|
+
created_queue_jobs: INestedQueueJob[] | null;
|
|
72
74
|
}
|
|
73
75
|
export declare enum VENDOR_SVF_FORM_STATUS {
|
|
74
76
|
SENT = "SENT",
|
|
75
77
|
ANSWERED = "ANSWERED",
|
|
76
78
|
ROLLED_BACK = "ROLLED_BACK"
|
|
77
79
|
}
|
|
78
|
-
export interface INestedVendor extends Omit<IVendor, "quotes" | "associated_companies" | "negotiations" | "as_additional_in_rfqs" | "vendor_notifications" | "extra_que_answers" | "pos" | "company_item_versions" | "invoices" | "contact_people" | "rollback_form_sent_to_vendor"> {
|
|
80
|
+
export interface INestedVendor extends Omit<IVendor, "quotes" | "associated_companies" | "negotiations" | "as_additional_in_rfqs" | "vendor_notifications" | "extra_que_answers" | "pos" | "company_item_versions" | "invoices" | "contact_people" | "rollback_form_sent_to_vendor" | "created_queue_jobs"> {
|
|
79
81
|
}
|
|
80
|
-
export interface IVendorInputs extends Omit<
|
|
82
|
+
export interface IVendorInputs extends Omit<INestedVendor, "id" | "created_at" | "updated_at" | "is_profile_complete" | "is_profile_verified" | "is_self_verified" | "deleted_at" | "is_deleted" | "vendor" | "vkraya_id" | "is_invitation_sent" | "is_enabled" | "svf_form_status" | "svf_rollback_remark" | "vendor_mob_notification_token" | "password"> {
|
|
81
83
|
}
|
|
82
84
|
export declare enum VENDOR_INCLUDE {
|
|
83
85
|
quotes = "quotes",
|
|
@@ -90,7 +92,8 @@ export declare enum VENDOR_INCLUDE {
|
|
|
90
92
|
company_item_versions = "company_item_versions",
|
|
91
93
|
invoices = "invoices",
|
|
92
94
|
contact_people = "contact_people",
|
|
93
|
-
rollback_form_sent_to_vendor = "rollback_form_sent_to_vendor"
|
|
95
|
+
rollback_form_sent_to_vendor = "rollback_form_sent_to_vendor",
|
|
96
|
+
created_queue_jobs = "created_queue_jobs"
|
|
94
97
|
}
|
|
95
98
|
export declare enum VENDOR_TYPE {
|
|
96
99
|
MFG = "Manufracturing",
|
|
@@ -20,6 +20,7 @@ var VENDOR_INCLUDE;
|
|
|
20
20
|
VENDOR_INCLUDE["invoices"] = "invoices";
|
|
21
21
|
VENDOR_INCLUDE["contact_people"] = "contact_people";
|
|
22
22
|
VENDOR_INCLUDE["rollback_form_sent_to_vendor"] = "rollback_form_sent_to_vendor";
|
|
23
|
+
VENDOR_INCLUDE["created_queue_jobs"] = "created_queue_jobs";
|
|
23
24
|
})(VENDOR_INCLUDE || (exports.VENDOR_INCLUDE = VENDOR_INCLUDE = {}));
|
|
24
25
|
// for GST-Core activities Types
|
|
25
26
|
var VENDOR_TYPE;
|
|
@@ -81,6 +81,7 @@ describe("Get Contact Person", () => {
|
|
|
81
81
|
take_on_approval_for_ves: null,
|
|
82
82
|
time_records_at_checkpoint: null,
|
|
83
83
|
ves_cancelled_by_user: null,
|
|
84
|
+
created_queue_jobs: null,
|
|
84
85
|
};
|
|
85
86
|
const contact_person = {
|
|
86
87
|
id: "",
|
|
@@ -189,6 +190,7 @@ describe("Get Contact Person", () => {
|
|
|
189
190
|
take_on_approval_for_ves: null,
|
|
190
191
|
time_records_at_checkpoint: null,
|
|
191
192
|
ves_cancelled_by_user: null,
|
|
193
|
+
created_queue_jobs: null,
|
|
192
194
|
};
|
|
193
195
|
const contact_person = {
|
|
194
196
|
id: "CP-001",
|