kcommons 14.4.2 → 14.6.0

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.
@@ -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 { IPOASNItemJunction } from "../typings/poAsnJunctionItems.typings";
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, poASNItemJunctions?: IPOASNItemJunction[] | null): IASNItem;
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, poASNItemJunctions = []) {
38
- var _a, _b;
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 = poASNItemJunctions === null || poASNItemJunctions === void 0 ? void 0 : poASNItemJunctions.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,
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: (_b = poASNItemJunctions === null || poASNItemJunctions === void 0 ? void 0 : poASNItemJunctions.find((ele) => ele.item_id === poItem.item_id)) === null || _b === void 0 ? void 0 : _b.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
@@ -64,7 +64,9 @@ export * from "./typings/company/settings/companySettings.typings";
64
64
  export * from "./typings/company/settings/comanyVendorSettings.typings";
65
65
  export * from "./typings/company/vendorOnboardingRequest/vendorOnboardingRequestCategory.typings";
66
66
  export * from "./typings/company/masters/itemManagementbody.typings";
67
+ export * from "./typings/company/settings/termsAndConditions.typings";
67
68
  export * from "./typings/company/_junctions/vesCheckpointTracking.typings";
69
+ export * from "./typings/system/queueJob.typings";
68
70
  export * from "./typings/common/address.typings";
69
71
  export * from "./typings/common/paginationFilters.typings";
70
72
  export * from "./typings/common/uploadMedia.typings";
package/build/index.js CHANGED
@@ -83,7 +83,10 @@ __exportStar(require("./typings/company/settings/companySettings.typings"), expo
83
83
  __exportStar(require("./typings/company/settings/comanyVendorSettings.typings"), exports);
84
84
  __exportStar(require("./typings/company/vendorOnboardingRequest/vendorOnboardingRequestCategory.typings"), exports);
85
85
  __exportStar(require("./typings/company/masters/itemManagementbody.typings"), exports);
86
+ __exportStar(require("./typings/company/settings/termsAndConditions.typings"), exports);
86
87
  __exportStar(require("./typings/company/_junctions/vesCheckpointTracking.typings"), exports);
88
+ // System
89
+ __exportStar(require("./typings/system/queueJob.typings"), exports);
87
90
  // Commons
88
91
  __exportStar(require("./typings/common/address.typings"), exports);
89
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;
@@ -12,7 +12,8 @@ export declare enum LIFECYCLE_LOGS_ENTITY_TYPE {
12
12
  PO = "PO",
13
13
  ASN = "ASN",
14
14
  GRN = "GRN",
15
- MRN = "MRN"
15
+ MRN = "MRN",
16
+ VES = "VES"
16
17
  }
17
18
  export declare enum LIFECYCLE_LOG_ACTIONS {
18
19
  CREATED = "CREATED",
@@ -35,7 +36,9 @@ export declare enum LIFECYCLE_LOG_ACTIONS {
35
36
  ACCEPTED_BY_VENDOR = "ACCEPTED_BY_VENDOR",
36
37
  REJECTED_BY_VENDOR = "REJECTED_BY_VENDOR",
37
38
  READY_FOR_DISPATCH = "READY_FOR_DISPATCH",
38
- SENT_TO_COMPANY_FOR_APPROVAL = "SENT_TO_COMPANY_FOR_APPROVAL"
39
+ SENT_TO_COMPANY_FOR_APPROVAL = "SENT_TO_COMPANY_FOR_APPROVAL",
40
+ ARRIVED = "ARRIVED",
41
+ REQUESTED_AT_SHIPPING_LOCATION = "REQUESTED_AT_SHIPPING_LOCATION"
39
42
  }
40
43
  export declare enum LIFECYCLE_LOGS_INCLUDE {
41
44
  user = "user",
@@ -13,6 +13,7 @@ var LIFECYCLE_LOGS_ENTITY_TYPE;
13
13
  LIFECYCLE_LOGS_ENTITY_TYPE["ASN"] = "ASN";
14
14
  LIFECYCLE_LOGS_ENTITY_TYPE["GRN"] = "GRN";
15
15
  LIFECYCLE_LOGS_ENTITY_TYPE["MRN"] = "MRN";
16
+ LIFECYCLE_LOGS_ENTITY_TYPE["VES"] = "VES";
16
17
  })(LIFECYCLE_LOGS_ENTITY_TYPE || (exports.LIFECYCLE_LOGS_ENTITY_TYPE = LIFECYCLE_LOGS_ENTITY_TYPE = {}));
17
18
  var LIFECYCLE_LOG_ACTIONS;
18
19
  (function (LIFECYCLE_LOG_ACTIONS) {
@@ -37,6 +38,8 @@ var LIFECYCLE_LOG_ACTIONS;
37
38
  LIFECYCLE_LOG_ACTIONS["REJECTED_BY_VENDOR"] = "REJECTED_BY_VENDOR";
38
39
  LIFECYCLE_LOG_ACTIONS["READY_FOR_DISPATCH"] = "READY_FOR_DISPATCH";
39
40
  LIFECYCLE_LOG_ACTIONS["SENT_TO_COMPANY_FOR_APPROVAL"] = "SENT_TO_COMPANY_FOR_APPROVAL";
41
+ LIFECYCLE_LOG_ACTIONS["ARRIVED"] = "ARRIVED";
42
+ LIFECYCLE_LOG_ACTIONS["REQUESTED_AT_SHIPPING_LOCATION"] = "REQUESTED_AT_SHIPPING_LOCATION";
40
43
  })(LIFECYCLE_LOG_ACTIONS || (exports.LIFECYCLE_LOG_ACTIONS = LIFECYCLE_LOG_ACTIONS = {}));
41
44
  var LIFECYCLE_LOGS_INCLUDE;
42
45
  (function (LIFECYCLE_LOGS_INCLUDE) {
@@ -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 = {}));
@@ -0,0 +1,30 @@
1
+ import { INestedUser } from "../../user.typings";
2
+ import { IPaginationFilters } from "../../common/paginationFilters.typings";
3
+ export interface ITermsAndConditions {
4
+ id: string;
5
+ tnc_title: string;
6
+ tnc_content: string;
7
+ created_by_user_id: string;
8
+ last_updated_by_user_id: string | null;
9
+ is_enabled: boolean;
10
+ is_deleted: boolean;
11
+ deleted_at: Date | null;
12
+ created_at: Date;
13
+ updated_at: Date;
14
+ created_by_user: INestedUser | null;
15
+ last_updated_by_user: INestedUser | null;
16
+ }
17
+ export interface INestedTermsAndConditions extends Omit<ITermsAndConditions, "created_by_user" | "last_updated_by_user"> {
18
+ }
19
+ export declare enum TermsAndConditionsInclude {
20
+ created_by_user = "created_by_user",
21
+ last_updated_by_user = "last_updated_by_user"
22
+ }
23
+ export interface ITermsAndConditionsFilters {
24
+ name?: string | null;
25
+ tnc_title?: string | null;
26
+ tnc_content?: string | null;
27
+ include?: TermsAndConditionsInclude[] | null;
28
+ }
29
+ export interface ITermsAndconditionsFiltersWithPagination extends IPaginationFilters, ITermsAndConditionsFilters {
30
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TermsAndConditionsInclude = void 0;
4
+ var TermsAndConditionsInclude;
5
+ (function (TermsAndConditionsInclude) {
6
+ TermsAndConditionsInclude["created_by_user"] = "created_by_user";
7
+ TermsAndConditionsInclude["last_updated_by_user"] = "last_updated_by_user";
8
+ })(TermsAndConditionsInclude || (exports.TermsAndConditionsInclude = TermsAndConditionsInclude = {}));
@@ -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";
@@ -74,7 +74,6 @@ export interface INotificationTemplate {
74
74
  title: string;
75
75
  description: string;
76
76
  action_link: string | null;
77
- mobile_action_link: string | null;
78
77
  }
79
78
  export interface INotifcationReqData {
80
79
  notification: IIndividualNotification;
@@ -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 = {}));
@@ -40,9 +40,11 @@ import { INestedQuote } from "./quote.typings";
40
40
  import { INestedASN } from "./asn.typings";
41
41
  import { INestedInvoice } from "./invoices.typings";
42
42
  import { INestedFormRolback } from "./vendor/vendorFormRollbackRemark.typings";
43
+ import { INestedTermsAndConditions } from "./company/settings/termsAndConditions.typings";
43
44
  import { INestedCheckpoint } from "./company/masters/checkpoints.typings";
44
45
  import { INestedVES } from "./company/masters/ves.typings";
45
46
  import { INestedVESCheckpointTracking } from "./company/_junctions/vesCheckpointTracking.typings";
47
+ import { INestedQueueJob } from "./system/queueJob.typings";
46
48
  export interface IUser {
47
49
  id: string;
48
50
  is_enabled?: boolean | null;
@@ -174,6 +176,8 @@ export interface IUser {
174
176
  created_indents: INestedIndent | null;
175
177
  rollback_forms_by_user: INestedFormRolback | null;
176
178
  asns_sent_to_vendor_by_user: INestedASN[] | null;
179
+ created_terms_and_conditions: INestedTermsAndConditions[] | null;
180
+ last_updated_terms_and_conditions: INestedTermsAndConditions[] | null;
177
181
  checkpoints_created_by_user: INestedCheckpoint[] | null;
178
182
  checkpoints_last_updated_by_user: INestedCheckpoint[] | null;
179
183
  ves_created_by_user: INestedVES[] | null;
@@ -181,8 +185,9 @@ export interface IUser {
181
185
  take_on_approval_for_ves: INestedVES[] | null;
182
186
  ves_cancelled_by_user: INestedVES[] | null;
183
187
  time_records_at_checkpoint: INestedVESCheckpointTracking[] | null;
188
+ created_queue_jobs: INestedQueueJob[] | null;
184
189
  }
185
- 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" | "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"> {
186
191
  }
187
192
  export declare enum UserInclude {
188
193
  subordinates = "subordinates",
@@ -291,13 +296,16 @@ export declare enum UserInclude {
291
296
  onboarded_company_vendors = "onboarded_company_vendors",
292
297
  rollback_forms_by_user = "rollback_forms_by_user",
293
298
  asns_sent_to_vendor_by_user = "asns_sent_to_vendor_by_user",
299
+ created_terms_and_conditions = "created_terms_and_conditions",
300
+ last_updated_terms_and_conditions = "last_updated_terms_and_conditions",
294
301
  checkpoints_created_by_user = "checkpoints_created_by_user",
295
302
  checkpoints_last_updated_by_user = "checkpoints_last_updated_by_user",
296
303
  ves_created_by_user = "ves_created_by_user",
297
304
  ves_last_updated_by_user = "ves_last_updated_by_user",
298
305
  ves_cancelled_by_user = "ves_cancelled_by_user",
299
306
  take_on_approval_for_ves = "take_on_approval_for_ves",
300
- time_records_at_checkpoint = "time_records_at_checkpoint"
307
+ time_records_at_checkpoint = "time_records_at_checkpoint",
308
+ created_queue_jobs = "created_queue_jobs"
301
309
  }
302
310
  export interface IUserFilters {
303
311
  name?: string | null;
@@ -111,6 +111,8 @@ var UserInclude;
111
111
  UserInclude["onboarded_company_vendors"] = "onboarded_company_vendors";
112
112
  UserInclude["rollback_forms_by_user"] = "rollback_forms_by_user";
113
113
  UserInclude["asns_sent_to_vendor_by_user"] = "asns_sent_to_vendor_by_user";
114
+ UserInclude["created_terms_and_conditions"] = "created_terms_and_conditions";
115
+ UserInclude["last_updated_terms_and_conditions"] = "last_updated_terms_and_conditions";
114
116
  UserInclude["checkpoints_created_by_user"] = "checkpoints_created_by_user";
115
117
  UserInclude["checkpoints_last_updated_by_user"] = "checkpoints_last_updated_by_user";
116
118
  UserInclude["ves_created_by_user"] = "ves_created_by_user";
@@ -118,4 +120,5 @@ var UserInclude;
118
120
  UserInclude["ves_cancelled_by_user"] = "ves_cancelled_by_user";
119
121
  UserInclude["take_on_approval_for_ves"] = "take_on_approval_for_ves";
120
122
  UserInclude["time_records_at_checkpoint"] = "time_records_at_checkpoint";
123
+ UserInclude["created_queue_jobs"] = "created_queue_jobs";
121
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<IVendor, "id" | "created_at" | "updated_at" | "is_profile_complete" | "is_profile_verified" | "is_self_verified" | "deleted_at" | "is_deleted" | "vendor" | "vkraya_id" | "quotes" | "associated_companies" | "negotiations" | "as_additional_in_rfqs" | "pos" | "vendor_notifications" | "password" | "extra_que_answers" | "company_item_versions" | "invoices" | "contact_people" | "is_invitation_sent" | "is_enabled" | "svf_form_status" | "svf_rollback_remark" | "vendor_mob_notification_token" | "rollback_form_sent_to_vendor"> {
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;
@@ -72,6 +72,8 @@ describe("Get Contact Person", () => {
72
72
  created_indents: null,
73
73
  rollback_forms_by_user: null,
74
74
  asns_sent_to_vendor_by_user: null,
75
+ created_terms_and_conditions: null,
76
+ last_updated_terms_and_conditions: null,
75
77
  checkpoints_created_by_user: null,
76
78
  checkpoints_last_updated_by_user: null,
77
79
  ves_created_by_user: null,
@@ -79,6 +81,7 @@ describe("Get Contact Person", () => {
79
81
  take_on_approval_for_ves: null,
80
82
  time_records_at_checkpoint: null,
81
83
  ves_cancelled_by_user: null,
84
+ created_queue_jobs: null,
82
85
  };
83
86
  const contact_person = {
84
87
  id: "",
@@ -178,6 +181,8 @@ describe("Get Contact Person", () => {
178
181
  created_indents: null,
179
182
  rollback_forms_by_user: null,
180
183
  asns_sent_to_vendor_by_user: null,
184
+ created_terms_and_conditions: null,
185
+ last_updated_terms_and_conditions: null,
181
186
  checkpoints_created_by_user: null,
182
187
  checkpoints_last_updated_by_user: null,
183
188
  ves_created_by_user: null,
@@ -185,6 +190,7 @@ describe("Get Contact Person", () => {
185
190
  take_on_approval_for_ves: null,
186
191
  time_records_at_checkpoint: null,
187
192
  ves_cancelled_by_user: null,
193
+ created_queue_jobs: null,
188
194
  };
189
195
  const contact_person = {
190
196
  id: "CP-001",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kcommons",
3
- "version": "14.4.2",
3
+ "version": "14.6.0",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",