kcommons 18.20.2 → 18.22.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.
Files changed (67) hide show
  1. package/build/index.d.ts +2 -0
  2. package/build/index.js +2 -0
  3. package/build/typings/approvalChain.typings.d.ts +0 -3
  4. package/build/typings/approvalChain.typings.js +1 -5
  5. package/build/typings/approvalChainStageNames.typings.d.ts +22 -0
  6. package/build/typings/approvalChainStageNames.typings.js +9 -0
  7. package/build/typings/approvalComments.typings.d.ts +3 -1
  8. package/build/typings/approvalComments.typings.js +2 -0
  9. package/build/typings/approvalConfig.typings.d.ts +7 -4
  10. package/build/typings/approvalConfig.typings.js +1 -0
  11. package/build/typings/asn.typings.d.ts +4 -1
  12. package/build/typings/asn.typings.js +1 -0
  13. package/build/typings/company/masters/po.typings.d.ts +4 -1
  14. package/build/typings/company/masters/po.typings.js +1 -0
  15. package/build/typings/company/masters/ves.typings.d.ts +4 -1
  16. package/build/typings/company/masters/ves.typings.js +1 -0
  17. package/build/typings/company/vendorOnboardingRequest/vendorOnboardingRequest.typing.d.ts +4 -1
  18. package/build/typings/company/vendorOnboardingRequest/vendorOnboardingRequest.typing.js +1 -0
  19. package/build/typings/companyCustomer.typings.d.ts +4 -1
  20. package/build/typings/companyCustomer.typings.js +1 -0
  21. package/build/typings/companyVendors.typings.d.ts +4 -1
  22. package/build/typings/companyVendors.typings.js +1 -0
  23. package/build/typings/comparative.typings.d.ts +4 -1
  24. package/build/typings/comparative.typings.js +1 -0
  25. package/build/typings/entityApprovalChainStageNames.typings.d.ts +22 -0
  26. package/build/typings/entityApprovalChainStageNames.typings.js +8 -0
  27. package/build/typings/grn.typings.d.ts +4 -1
  28. package/build/typings/grn.typings.js +1 -0
  29. package/build/typings/indent.typings.d.ts +4 -1
  30. package/build/typings/indent.typings.js +1 -0
  31. package/build/typings/item.typings.d.ts +4 -1
  32. package/build/typings/item.typings.js +1 -0
  33. package/build/typings/mi.typings.d.ts +4 -1
  34. package/build/typings/mi.typings.js +1 -0
  35. package/build/typings/mrn.typings.d.ts +4 -1
  36. package/build/typings/mrn.typings.js +1 -0
  37. package/build/typings/pr.typings.d.ts +4 -1
  38. package/build/typings/pr.typings.js +1 -0
  39. package/build/typings/qcd.typings.d.ts +4 -1
  40. package/build/typings/qcd.typings.js +1 -0
  41. package/build/typings/rfq.typings.d.ts +4 -1
  42. package/build/typings/rfq.typings.js +1 -0
  43. package/build/typings/subPO.typings.d.ts +4 -1
  44. package/build/typings/subPO.typings.js +1 -0
  45. package/build/typings/user.typings.d.ts +12 -2
  46. package/build/typings/user.typings.js +4 -0
  47. package/package.json +1 -1
  48. package/build/configs/erpPlugins.contants.d.ts +0 -3
  49. package/build/configs/erpPlugins.contants.js +0 -7
  50. package/build/helpers/isBackendRequestError.helper.d.ts +0 -2
  51. package/build/helpers/isBackendRequestError.helper.js +0 -14
  52. package/build/typings/company/masters/distributorManagementBody.typings.d.ts +0 -39
  53. package/build/typings/company/masters/distributorManagementBody.typings.js +0 -12
  54. package/build/typings/company/masters/poMetafields.typings.d.ts +0 -7
  55. package/build/typings/company/masters/poMetafields.typings.js +0 -10
  56. package/build/typings/companyDistributor.typings.d.ts +0 -77
  57. package/build/typings/companyDistributor.typings.js +0 -34
  58. package/build/typings/companyDistributorCategory.typings.d.ts +0 -30
  59. package/build/typings/companyDistributorCategory.typings.js +0 -11
  60. package/build/typings/distributor.typings.d.ts +0 -80
  61. package/build/typings/distributor.typings.js +0 -13
  62. package/build/typings/plugins/plugin.typings.d.ts +0 -4
  63. package/build/typings/plugins/plugin.typings.js +0 -8
  64. package/build/utils/getMediaName.util.d.ts +0 -3
  65. package/build/utils/getMediaName.util.js +0 -17
  66. package/build/utils/getMediaName.util.spec.d.ts +0 -1
  67. package/build/utils/getMediaName.util.spec.js +0 -29
@@ -54,6 +54,7 @@ var QCD_METAFIELDS_INCLUDE;
54
54
  QCD_METAFIELDS_INCLUDE["supplier_invoice_data"] = "supplier_invoice_data";
55
55
  QCD_METAFIELDS_INCLUDE["supplier_invoice_created_by_user_data"] = "supplier_invoice_created_by_user_data";
56
56
  QCD_METAFIELDS_INCLUDE["approval_logs"] = "approval_logs";
57
+ QCD_METAFIELDS_INCLUDE["approval_chain_stage_names"] = "approval_chain_stage_names";
57
58
  })(QCD_METAFIELDS_INCLUDE || (exports.QCD_METAFIELDS_INCLUDE = QCD_METAFIELDS_INCLUDE = {}));
58
59
  // export interface IQCDSupplierInvoiceData {
59
60
  // associated_supplier_invoice: INestedSupplierInvoice;
@@ -9,6 +9,7 @@ import { INestedComparative } from "./comparative.typings";
9
9
  import { INestedDepartment } from "./department.typings";
10
10
  import { IEntityApprovalChainEntry, INestedEntityApprovalChainEntry } from "./entityApprovalChainEntry.typings";
11
11
  import { INestedEntityApprovalChainEntryLog } from "./entityApprovalChainEntryLog.typings";
12
+ import { INestedEntityApprovalChainStageNames } from "./entityApprovalChainStageNames.typings";
12
13
  import { INestedItem } from "./item.typings";
13
14
  import { INestedPR, INestedPrItem } from "./pr.typings";
14
15
  import { INestedPurchaseLocation } from "./purchaseLocation.typings";
@@ -260,9 +261,11 @@ export interface IRFQMetafields {
260
261
  items_data: INestedItem[] | null;
261
262
  rfq_vendors_data: IRFQVendorMetafieldsData[] | null;
262
263
  approval_logs: INestedEntityApprovalChainEntryLog[] | null;
264
+ approval_chain_stage_names: INestedEntityApprovalChainStageNames[] | null;
263
265
  }
264
266
  export declare enum RFQ_METAFIELDS_INCLUDE {
265
267
  items_data = "items_data",
266
268
  rfq_vendors_data = "rfq_vendors_data",
267
- approval_logs = "approval_logs"
269
+ approval_logs = "approval_logs",
270
+ approval_chain_stage_names = "approval_chain_stage_names"
268
271
  }
@@ -97,4 +97,5 @@ var RFQ_METAFIELDS_INCLUDE;
97
97
  RFQ_METAFIELDS_INCLUDE["items_data"] = "items_data";
98
98
  RFQ_METAFIELDS_INCLUDE["rfq_vendors_data"] = "rfq_vendors_data";
99
99
  RFQ_METAFIELDS_INCLUDE["approval_logs"] = "approval_logs";
100
+ RFQ_METAFIELDS_INCLUDE["approval_chain_stage_names"] = "approval_chain_stage_names";
100
101
  })(RFQ_METAFIELDS_INCLUDE || (exports.RFQ_METAFIELDS_INCLUDE = RFQ_METAFIELDS_INCLUDE = {}));
@@ -3,6 +3,7 @@ import { INestedCompany } from "./company.typings";
3
3
  import { INestedPo } from "./company/masters/po.typings";
4
4
  import { INestedDocumentTaxes } from "./documentTaxes.typings";
5
5
  import { INestedEntityApprovalChainEntry } from "./entityApprovalChainEntry.typings";
6
+ import { INestedEntityApprovalChainStageNames } from "./entityApprovalChainStageNames.typings";
6
7
  import { INestedItem } from "./item.typings";
7
8
  import { INestedMRN } from "./mrn.typings";
8
9
  import { INestedStoreLocation } from "./storeLocation.typings";
@@ -31,7 +32,8 @@ export declare enum SUB_PO_METAFIELDS_INCLUDE {
31
32
  items_data = "items_data",
32
33
  vendor_data = "vendor_data",
33
34
  shipping_location_data = "shipping_location_data",
34
- reference_po_items = "reference_po_items"
35
+ reference_po_items = "reference_po_items",
36
+ approval_chain_stage_names = "approval_chain_stage_names"
35
37
  }
36
38
  interface ISubPOFiltersBase {
37
39
  name?: string;
@@ -54,6 +56,7 @@ export interface ISubPOMetafields {
54
56
  vendor_data: INestedVendor | null;
55
57
  shipping_location_data: INestedStoreLocation | null;
56
58
  reference_po_items: INestedSubPOItem[] | null;
59
+ approval_chain_stage_names: INestedEntityApprovalChainStageNames[] | null;
57
60
  }
58
61
  export interface ISubPO {
59
62
  id: string;
@@ -27,4 +27,5 @@ var SUB_PO_METAFIELDS_INCLUDE;
27
27
  SUB_PO_METAFIELDS_INCLUDE["vendor_data"] = "vendor_data";
28
28
  SUB_PO_METAFIELDS_INCLUDE["shipping_location_data"] = "shipping_location_data";
29
29
  SUB_PO_METAFIELDS_INCLUDE["reference_po_items"] = "reference_po_items";
30
+ SUB_PO_METAFIELDS_INCLUDE["approval_chain_stage_names"] = "approval_chain_stage_names";
30
31
  })(SUB_PO_METAFIELDS_INCLUDE || (exports.SUB_PO_METAFIELDS_INCLUDE = SUB_PO_METAFIELDS_INCLUDE = {}));
@@ -75,6 +75,8 @@ import { INestedVendorLogs } from "./vendorLogs.typings";
75
75
  import { INestedTransporterDocumentManualVerificationByCompany } from "./common/transporterDocumentManualVerificationByCompany.typings";
76
76
  import { INestedTransporterGroups } from "./transporterGroup.typings";
77
77
  import { INestedTransporterLogs } from "./transporterLogs.typings";
78
+ import { INestedApprovalChainStageNames } from "./approvalChainStageNames.typings";
79
+ import { INestedEntityApprovalChainStageNames } from "./entityApprovalChainStageNames.typings";
78
80
  export interface IUser {
79
81
  id: string;
80
82
  is_enabled?: boolean | null;
@@ -283,8 +285,12 @@ export interface IUser {
283
285
  fos_sent_to_transporters?: INestedFO[] | null;
284
286
  freight_comparative_early_access_requests?: INestedFreightComparativeEarlyAccessRequest[] | null;
285
287
  transporter_logs: INestedTransporterLogs[] | null;
288
+ created_approval_stage_names: INestedApprovalChainStageNames[] | null;
289
+ last_updated_by_approval_stage_names: INestedApprovalChainStageNames[] | null;
290
+ created_entity_approval_chain_stage_names: INestedEntityApprovalChainStageNames[] | null;
291
+ last_updated_entity_approval_chain_stage_names: INestedEntityApprovalChainStageNames[] | null;
286
292
  }
287
- 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" | "created_frrs" | "updated_frrs" | "as_contact_person_for_frrs" | "frrs_sent_for_approval" | "frrs_sent_to_transporters" | "created_vehicles" | "updated_vehicles" | "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" | "freight_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" | "pos_closed_early" | "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" | "last_updated_payment_terms" | "created_temporary_worker_form" | "last_updated_temporary_worker_form" | "resolved_mrns" | "created_amended_po_items" | "last_updated_amended_po_items" | "created_sub_pos" | "last_updated_sub_pos" | "sent_for_approval_sub_pos" | "sent_to_vendor_sub_pos" | "created_sub_po_items" | "last_updated_sub_po_items" | "marked_as_deleted_sub_po_items" | "created_item_questions" | "last_updated_item_questions" | "created_rfq_questions" | "last_updated_rfq_questions" | "created_company_customer_categories" | "last_updated_company_customer_categories" | "company_customer_created_by_user" | "company_customer_last_updated_by_user" | "sent_for_approval_company_customer" | "onboarded_company_customer" | "created_customer_management_bodies" | "last_updated_customer_management_bodies" | "head_of_customer_management_bodies" | "last_updated_comparative_items_quantity_splits" | "comparative_early_access_requests" | "otp_security" | "qa_location_incharge" | "accounts_location_incharge" | "vendor_documents_verified_by_user" | "created_supplier_invoice" | "qcd_cancelled" | "qcd_created" | "qcd_last_updated" | "audits_incharge" | "supplier_invoices_marked_as_cancelled" | "supplier_invoices_marked_as_verified" | "approval_comments" | "last_updated_supplier_invoice" | "vendor_logs" | "vendor_onboarding_request_rollback_to_initiator" | "company_vendor_rollback_to_initiator" | "transporter_documents_verified_by_user" | "as_contact_person_for_freight_quotes" | "submitted_freight_quote" | "last_updated_freight_quote" | "last_updated_freight_comparative_vehicles_quantity_splits" | "freight_comparative_early_access_requests" | "created_fos" | "last_updated_fos" | "as_contact_person_for_fos" | "fos_sent_for_approval" | "fos_sent_to_transporters" | "transporter_logs"> {
293
+ 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" | "created_frrs" | "updated_frrs" | "as_contact_person_for_frrs" | "frrs_sent_for_approval" | "frrs_sent_to_transporters" | "created_vehicles" | "updated_vehicles" | "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" | "freight_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" | "pos_closed_early" | "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" | "last_updated_payment_terms" | "created_temporary_worker_form" | "last_updated_temporary_worker_form" | "resolved_mrns" | "created_amended_po_items" | "last_updated_amended_po_items" | "created_sub_pos" | "last_updated_sub_pos" | "sent_for_approval_sub_pos" | "sent_to_vendor_sub_pos" | "created_sub_po_items" | "last_updated_sub_po_items" | "marked_as_deleted_sub_po_items" | "created_item_questions" | "last_updated_item_questions" | "created_rfq_questions" | "last_updated_rfq_questions" | "created_company_customer_categories" | "last_updated_company_customer_categories" | "company_customer_created_by_user" | "company_customer_last_updated_by_user" | "sent_for_approval_company_customer" | "onboarded_company_customer" | "created_customer_management_bodies" | "last_updated_customer_management_bodies" | "head_of_customer_management_bodies" | "last_updated_comparative_items_quantity_splits" | "comparative_early_access_requests" | "otp_security" | "qa_location_incharge" | "accounts_location_incharge" | "vendor_documents_verified_by_user" | "created_supplier_invoice" | "qcd_cancelled" | "qcd_created" | "qcd_last_updated" | "audits_incharge" | "supplier_invoices_marked_as_cancelled" | "supplier_invoices_marked_as_verified" | "approval_comments" | "last_updated_supplier_invoice" | "vendor_logs" | "vendor_onboarding_request_rollback_to_initiator" | "company_vendor_rollback_to_initiator" | "transporter_documents_verified_by_user" | "as_contact_person_for_freight_quotes" | "submitted_freight_quote" | "last_updated_freight_quote" | "last_updated_freight_comparative_vehicles_quantity_splits" | "freight_comparative_early_access_requests" | "created_fos" | "last_updated_fos" | "as_contact_person_for_fos" | "fos_sent_for_approval" | "fos_sent_to_transporters" | "transporter_logs" | "created_approval_stage_names" | "last_updated_by_approval_stage_names" | "created_entity_approval_chain_stage_names" | "last_updated_entity_approval_chain_stage_names"> {
288
294
  }
289
295
  export declare enum UserInclude {
290
296
  subordinates = "subordinates",
@@ -468,7 +474,11 @@ export declare enum UserInclude {
468
474
  last_updated_fos = "last_updated_fos",
469
475
  as_contact_person_for_fos = "as_contact_person_for_fos",
470
476
  fos_sent_for_approval = "fos_sent_for_approval",
471
- fos_sent_to_transporters = "fos_sent_to_transporters"
477
+ fos_sent_to_transporters = "fos_sent_to_transporters",
478
+ created_approval_stage_names = "created_approval_stage_names",
479
+ last_updated_by_approval_stage_names = "last_updated_by_approval_stage_names",
480
+ created_entity_approval_chain_stage_names = "created_entity_approval_chain_stage_names",
481
+ last_updated_entity_approval_chain_stage_names = "last_updated_entity_approval_chain_stage_names"
472
482
  }
473
483
  export interface IUserFilters {
474
484
  name?: string | null;
@@ -185,4 +185,8 @@ var UserInclude;
185
185
  UserInclude["as_contact_person_for_fos"] = "as_contact_person_for_fos";
186
186
  UserInclude["fos_sent_for_approval"] = "fos_sent_for_approval";
187
187
  UserInclude["fos_sent_to_transporters"] = "fos_sent_to_transporters";
188
+ UserInclude["created_approval_stage_names"] = "created_approval_stage_names";
189
+ UserInclude["last_updated_by_approval_stage_names"] = "last_updated_by_approval_stage_names";
190
+ UserInclude["created_entity_approval_chain_stage_names"] = "created_entity_approval_chain_stage_names";
191
+ UserInclude["last_updated_entity_approval_chain_stage_names"] = "last_updated_entity_approval_chain_stage_names";
188
192
  })(UserInclude || (exports.UserInclude = UserInclude = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kcommons",
3
- "version": "18.20.2",
3
+ "version": "18.22.0",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -1,3 +0,0 @@
1
- export declare enum ERP_PLUGINS {
2
- SYNC_VENDOR_TO_ERP = "SYNC_VENDOR_TO_ERP"
3
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ERP_PLUGINS = void 0;
4
- var ERP_PLUGINS;
5
- (function (ERP_PLUGINS) {
6
- ERP_PLUGINS["SYNC_VENDOR_TO_ERP"] = "SYNC_VENDOR_TO_ERP";
7
- })(ERP_PLUGINS || (exports.ERP_PLUGINS = ERP_PLUGINS = {}));
@@ -1,2 +0,0 @@
1
- import { IErrorResponse } from "../configs/response.typings";
2
- export declare function isBackendRequestError(error: unknown): error is IErrorResponse;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isBackendRequestError = isBackendRequestError;
4
- function isBackendRequestError(error) {
5
- if (!error)
6
- return false;
7
- if (typeof error !== "object")
8
- return false;
9
- if (Array.isArray(error))
10
- return false;
11
- if ("message" in error && "error" in error)
12
- return true;
13
- return false;
14
- }
@@ -1,39 +0,0 @@
1
- import { IPaginationFilters } from "../../common/paginationFilters.typings";
2
- import { INestedCompany } from "../../company.typings";
3
- import { INestedDepartment } from "../../department.typings";
4
- import { INestedRole } from "../../roles.typings";
5
- import { INestedUser } from "../../user.typings";
6
- export interface IDistributorManagementBody {
7
- id: string;
8
- company_id: string;
9
- created_by_id: string;
10
- last_updated_by_id: string;
11
- head_of_body_id: string;
12
- distributor_management_body_name: string;
13
- distributor_management_body_code: string;
14
- is_enabled: boolean;
15
- is_deleted: boolean;
16
- deleted_at: string | null;
17
- created_at: string;
18
- updated_at: string;
19
- company: INestedCompany | null;
20
- created_by_user: INestedUser | null;
21
- last_updated_by_user: INestedUser | null;
22
- head_of_body: INestedUser | null;
23
- departments: INestedDepartment[] | null;
24
- roles: INestedRole[] | null;
25
- }
26
- export interface INestedDistributorManagementBody extends Omit<IDistributorManagementBody, "company" | "created_by_user" | "last_updated_by_user" | "head_of_body" | "departments" | "roles"> {
27
- }
28
- export declare enum DISTRIBUTOR_MANAGEMENT_BODY_INCLUDES {
29
- company = "company",
30
- created_by_user = "created_by_user",
31
- last_updated_by_user = "last_updated_by_user",
32
- head_of_body = "head_of_body",
33
- departments = "departments",
34
- roles = "roles"
35
- }
36
- export interface IDistributorManagementBodyFiltersWithPagination extends IPaginationFilters {
37
- include?: DISTRIBUTOR_MANAGEMENT_BODY_INCLUDES[];
38
- name?: string | null;
39
- }
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DISTRIBUTOR_MANAGEMENT_BODY_INCLUDES = void 0;
4
- var DISTRIBUTOR_MANAGEMENT_BODY_INCLUDES;
5
- (function (DISTRIBUTOR_MANAGEMENT_BODY_INCLUDES) {
6
- DISTRIBUTOR_MANAGEMENT_BODY_INCLUDES["company"] = "company";
7
- DISTRIBUTOR_MANAGEMENT_BODY_INCLUDES["created_by_user"] = "created_by_user";
8
- DISTRIBUTOR_MANAGEMENT_BODY_INCLUDES["last_updated_by_user"] = "last_updated_by_user";
9
- DISTRIBUTOR_MANAGEMENT_BODY_INCLUDES["head_of_body"] = "head_of_body";
10
- DISTRIBUTOR_MANAGEMENT_BODY_INCLUDES["departments"] = "departments";
11
- DISTRIBUTOR_MANAGEMENT_BODY_INCLUDES["roles"] = "roles";
12
- })(DISTRIBUTOR_MANAGEMENT_BODY_INCLUDES || (exports.DISTRIBUTOR_MANAGEMENT_BODY_INCLUDES = DISTRIBUTOR_MANAGEMENT_BODY_INCLUDES = {}));
@@ -1,7 +0,0 @@
1
- import { INestedItem } from "../../item.typings";
2
- export interface IPOMetafields {
3
- items_data: INestedItem[] | null;
4
- }
5
- export declare enum PO_METAFIELDS_INCLUDE {
6
- items_data = "items_data",
7
- }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PO_METAFIELDS_INCLUDE = void 0;
4
- var PO_METAFIELDS_INCLUDE;
5
- (function (PO_METAFIELDS_INCLUDE) {
6
- PO_METAFIELDS_INCLUDE["items_data"] = "items_data";
7
- })(
8
- PO_METAFIELDS_INCLUDE ||
9
- (exports.PO_METAFIELDS_INCLUDE = PO_METAFIELDS_INCLUDE = {})
10
- );
@@ -1,77 +0,0 @@
1
- import { IPaginationFilters } from "./common/paginationFilters.typings";
2
- import { INestedCompany } from "./company.typings";
3
- import { INestedCompanyDistributorCategory } from "./companyDistributorCategory.typings";
4
- import { IDistributor } from "./distributor.typings";
5
- import { INestedEntityApprovalChainEntry } from "./entityApprovalChainEntry.typings";
6
- import { INestedExtraFormAnswer } from "./settings/form/extraFormAns.typings";
7
- import { INestedUser } from "./user.typings";
8
- export interface ICompanyDistributor {
9
- id: string;
10
- company_id: string;
11
- distributor_id: string;
12
- distributor_code: string | null;
13
- erp_distributor_code: string | null;
14
- company_form_status: COMPANY_FORM_STATUS_FOR_DISTRIBUTOR;
15
- status: COMPANY_DISTRIBUTOR_STATUS;
16
- created_by_id: string | null;
17
- last_updated_by_id: string | null;
18
- sent_for_approval_by_user_id: string | null;
19
- onboarded_by_id: string | null;
20
- parent_company_distributor_category_id: string | null;
21
- approved_at?: string | null;
22
- sent_for_approval_at?: string | null;
23
- onboarded_at?: string | null;
24
- is_enabled: boolean;
25
- is_deleted: boolean;
26
- deleted_at?: string | null;
27
- created_at?: string | null;
28
- updated_at?: string | null;
29
- company?: INestedCompany | null;
30
- distributor?: IDistributor | null;
31
- created_by_user: INestedUser | null;
32
- last_updated_by_user: INestedUser | null;
33
- sent_for_approval_by_user: INestedUser | null;
34
- onboarded_by_user: INestedUser | null;
35
- parent_company_distributor_category: INestedCompanyDistributorCategory | null;
36
- approval_chain: INestedEntityApprovalChainEntry[] | null;
37
- extra_form_ans: INestedExtraFormAnswer[] | null;
38
- }
39
- export interface INestedCompanyDistributor extends Omit<ICompanyDistributor, "company" | "distributor" | "created_by_user" | "last_updated_by_user" | "sent_for_approval_by_user" | "onboarded_by_user" | "parent_company_distributor_category" | "approval_chain" | "extra_form_ans"> {
40
- }
41
- export declare enum COMPANY_DISTRIBUTOR_INCLUDE {
42
- company = "company",
43
- distributor = "distributor",
44
- created_by_user = "created_by_user",
45
- last_updated_by_user = "last_updated_by_user",
46
- sent_for_approval_by_user = "sent_for_approval_by_user",
47
- onboarded_by_user = "onboarded_by_user",
48
- parent_company_distributor_category = "parent_company_distributor_category",
49
- approval_chain = "approval_chain",
50
- extra_form_ans = "extra_form_ans"
51
- }
52
- export declare enum COMPANY_FORM_STATUS_FOR_DISTRIBUTOR {
53
- INVITED = "INVITED",
54
- YET_TO_INVITE = "YET_TO_INVITE"
55
- }
56
- export declare enum COMPANY_DISTRIBUTOR_STATUS {
57
- ONBOARDED = "ONBOARDED",
58
- WAITLISTED = "WAITLISTED",
59
- PENDING_APPROVAL = "PENDING_APPROVAL",
60
- APPROVED = "APPROVED",
61
- CANCELLED = "CANCELLED"
62
- }
63
- export interface ICompanyDistributorFilters {
64
- name?: string;
65
- ids?: string[];
66
- parent_company_distributor_category_id?: string;
67
- status_array?: COMPANY_DISTRIBUTOR_STATUS[];
68
- list_type?: COMPANY_DISTRIBUTOR_LIST_TYPE;
69
- include?: COMPANY_DISTRIBUTOR_INCLUDE[];
70
- }
71
- export interface ICompanyDistributorFiltersWithPagination extends IPaginationFilters, ICompanyDistributorFilters {
72
- }
73
- export declare enum COMPANY_DISTRIBUTOR_LIST_TYPE {
74
- ALL = "ALL",
75
- CREATED_BY_ME = "CREATED_BY_ME",
76
- MY_APPROVALS = "MY_APPROVALS"
77
- }
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.COMPANY_DISTRIBUTOR_LIST_TYPE = exports.COMPANY_DISTRIBUTOR_STATUS = exports.COMPANY_FORM_STATUS_FOR_DISTRIBUTOR = exports.COMPANY_DISTRIBUTOR_INCLUDE = void 0;
4
- var COMPANY_DISTRIBUTOR_INCLUDE;
5
- (function (COMPANY_DISTRIBUTOR_INCLUDE) {
6
- COMPANY_DISTRIBUTOR_INCLUDE["company"] = "company";
7
- COMPANY_DISTRIBUTOR_INCLUDE["distributor"] = "distributor";
8
- COMPANY_DISTRIBUTOR_INCLUDE["created_by_user"] = "created_by_user";
9
- COMPANY_DISTRIBUTOR_INCLUDE["last_updated_by_user"] = "last_updated_by_user";
10
- COMPANY_DISTRIBUTOR_INCLUDE["sent_for_approval_by_user"] = "sent_for_approval_by_user";
11
- COMPANY_DISTRIBUTOR_INCLUDE["onboarded_by_user"] = "onboarded_by_user";
12
- COMPANY_DISTRIBUTOR_INCLUDE["parent_company_distributor_category"] = "parent_company_distributor_category";
13
- COMPANY_DISTRIBUTOR_INCLUDE["approval_chain"] = "approval_chain";
14
- COMPANY_DISTRIBUTOR_INCLUDE["extra_form_ans"] = "extra_form_ans";
15
- })(COMPANY_DISTRIBUTOR_INCLUDE || (exports.COMPANY_DISTRIBUTOR_INCLUDE = COMPANY_DISTRIBUTOR_INCLUDE = {}));
16
- var COMPANY_FORM_STATUS_FOR_DISTRIBUTOR;
17
- (function (COMPANY_FORM_STATUS_FOR_DISTRIBUTOR) {
18
- COMPANY_FORM_STATUS_FOR_DISTRIBUTOR["INVITED"] = "INVITED";
19
- COMPANY_FORM_STATUS_FOR_DISTRIBUTOR["YET_TO_INVITE"] = "YET_TO_INVITE";
20
- })(COMPANY_FORM_STATUS_FOR_DISTRIBUTOR || (exports.COMPANY_FORM_STATUS_FOR_DISTRIBUTOR = COMPANY_FORM_STATUS_FOR_DISTRIBUTOR = {}));
21
- var COMPANY_DISTRIBUTOR_STATUS;
22
- (function (COMPANY_DISTRIBUTOR_STATUS) {
23
- COMPANY_DISTRIBUTOR_STATUS["ONBOARDED"] = "ONBOARDED";
24
- COMPANY_DISTRIBUTOR_STATUS["WAITLISTED"] = "WAITLISTED";
25
- COMPANY_DISTRIBUTOR_STATUS["PENDING_APPROVAL"] = "PENDING_APPROVAL";
26
- COMPANY_DISTRIBUTOR_STATUS["APPROVED"] = "APPROVED";
27
- COMPANY_DISTRIBUTOR_STATUS["CANCELLED"] = "CANCELLED";
28
- })(COMPANY_DISTRIBUTOR_STATUS || (exports.COMPANY_DISTRIBUTOR_STATUS = COMPANY_DISTRIBUTOR_STATUS = {}));
29
- var COMPANY_DISTRIBUTOR_LIST_TYPE;
30
- (function (COMPANY_DISTRIBUTOR_LIST_TYPE) {
31
- COMPANY_DISTRIBUTOR_LIST_TYPE["ALL"] = "ALL";
32
- COMPANY_DISTRIBUTOR_LIST_TYPE["CREATED_BY_ME"] = "CREATED_BY_ME";
33
- COMPANY_DISTRIBUTOR_LIST_TYPE["MY_APPROVALS"] = "MY_APPROVALS";
34
- })(COMPANY_DISTRIBUTOR_LIST_TYPE || (exports.COMPANY_DISTRIBUTOR_LIST_TYPE = COMPANY_DISTRIBUTOR_LIST_TYPE = {}));
@@ -1,30 +0,0 @@
1
- import { INestedApprovalConfig } from "./approvalConfig.typings";
2
- import { INestedCompany } from "./company.typings";
3
- import { INestedDistributor } from "./distributor.typings";
4
- import { INestedUser } from "./user.typings";
5
- export interface ICompanyDistributorCategory {
6
- id: string;
7
- company_id: string;
8
- created_by_user_id: string;
9
- last_updated_by_user_id: string;
10
- category_name: string;
11
- category_code: string;
12
- is_deleted: boolean;
13
- deleted_at: string | null;
14
- created_at: string;
15
- updated_at: string;
16
- company: INestedCompany | null;
17
- created_by_user: INestedUser | null;
18
- updated_by_user: INestedUser | null;
19
- company_distributor: INestedDistributor[] | null;
20
- approval_configs: INestedApprovalConfig[] | null;
21
- }
22
- export interface INestedCompanyDistributorCategory extends Omit<ICompanyDistributorCategory, "company" | "created_by_user" | "updated_by_user" | "company_distributor" | "approval_configs"> {
23
- }
24
- export declare enum COMPANY_DISTRIBUTOR_CATEGORY_INCLUDE {
25
- company = "company",
26
- created_by_user = "created_by_user",
27
- updated_by_user = "updated_by_user",
28
- company_distributor = "company_distributor",
29
- approval_configs = "approval_configs"
30
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.COMPANY_DISTRIBUTOR_CATEGORY_INCLUDE = void 0;
4
- var COMPANY_DISTRIBUTOR_CATEGORY_INCLUDE;
5
- (function (COMPANY_DISTRIBUTOR_CATEGORY_INCLUDE) {
6
- COMPANY_DISTRIBUTOR_CATEGORY_INCLUDE["company"] = "company";
7
- COMPANY_DISTRIBUTOR_CATEGORY_INCLUDE["created_by_user"] = "created_by_user";
8
- COMPANY_DISTRIBUTOR_CATEGORY_INCLUDE["updated_by_user"] = "updated_by_user";
9
- COMPANY_DISTRIBUTOR_CATEGORY_INCLUDE["company_distributor"] = "company_distributor";
10
- COMPANY_DISTRIBUTOR_CATEGORY_INCLUDE["approval_configs"] = "approval_configs";
11
- })(COMPANY_DISTRIBUTOR_CATEGORY_INCLUDE || (exports.COMPANY_DISTRIBUTOR_CATEGORY_INCLUDE = COMPANY_DISTRIBUTOR_CATEGORY_INCLUDE = {}));
@@ -1,80 +0,0 @@
1
- import { IPaginationFilters } from "./common/paginationFilters.typings";
2
- import { INestedCompany } from "./company.typings";
3
- export interface IDistributor {
4
- id: string;
5
- distributor_trade_name: string;
6
- contact: string;
7
- email: string;
8
- nature_of_business: string | null;
9
- distributor_business_categories: string[];
10
- distributor_legal_name: string | null;
11
- constitution_of_business: string | null;
12
- pincode: string | null;
13
- area: string | null;
14
- city: string | null;
15
- state: string | null;
16
- address: string | null;
17
- maps_location: string | null;
18
- country: string | null;
19
- firstname: string | null;
20
- middlename: string | null;
21
- lastname: string | null;
22
- designation: string | null;
23
- bank_name: string | null;
24
- bank_branch_name: string | null;
25
- beneficiary_name: string | null;
26
- bank_account_number: string | null;
27
- bank_ifsc_code: string | null;
28
- bank_city: string | null;
29
- bank_pincode: string | null;
30
- is_bank_details_verified: boolean;
31
- gst_no: string | null;
32
- gst_attachment_link: string | null;
33
- is_gst_verified: boolean;
34
- pan_no: string | null;
35
- pan_attachment_link: string | null;
36
- is_pan_verified: boolean;
37
- cin: string | null;
38
- cin_attachment_link: string | null;
39
- is_cin_verified: boolean;
40
- udyam_aadhar: string | null;
41
- udyam_aadhar_attachment_link: string | null;
42
- is_udyam_verified: boolean;
43
- iso_attachment_link: string | null;
44
- fssai_no: string | null;
45
- fssai_no_valid_from: string | null;
46
- fssai_no_valid_to: string | null;
47
- fssai_attachment_link: string | null;
48
- cancelled_cheque_attachment_link: string | null;
49
- is_invitation_sent: boolean;
50
- is_profile_complete: boolean;
51
- is_profile_verified: boolean;
52
- is_self_verified: boolean;
53
- svf_form_status: DISTRIBUTOR_SVF_FORM_STATUS | null;
54
- profile_img: string | null;
55
- is_enabled?: boolean | null;
56
- is_deleted?: boolean | null;
57
- deleted_at?: string | null;
58
- created_at?: string | null;
59
- updated_at?: string | null;
60
- associated_companies: INestedCompany[] | null;
61
- }
62
- export interface INestedDistributor extends Omit<IDistributor, "associated_companies"> {
63
- }
64
- export declare enum DISTRIBUTOR_INCLUDE {
65
- associated_companies = "associated_companies"
66
- }
67
- export interface IDISTRIBUTOR_SVF_TOKEN_PAYLOAD {
68
- distributor_id: string;
69
- }
70
- export declare enum DISTRIBUTOR_SVF_FORM_STATUS {
71
- SENT = "SENT",
72
- ANSWERED = "ANSWERED",
73
- ROLLED_BACK = "ROLLED_BACK"
74
- }
75
- export interface IDistributorFilter {
76
- name?: string;
77
- include?: DISTRIBUTOR_INCLUDE[];
78
- }
79
- export interface IDistributorFiltersWithPagination extends IPaginationFilters, IDistributorFilter {
80
- }
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DISTRIBUTOR_SVF_FORM_STATUS = exports.DISTRIBUTOR_INCLUDE = void 0;
4
- var DISTRIBUTOR_INCLUDE;
5
- (function (DISTRIBUTOR_INCLUDE) {
6
- DISTRIBUTOR_INCLUDE["associated_companies"] = "associated_companies";
7
- })(DISTRIBUTOR_INCLUDE || (exports.DISTRIBUTOR_INCLUDE = DISTRIBUTOR_INCLUDE = {}));
8
- var DISTRIBUTOR_SVF_FORM_STATUS;
9
- (function (DISTRIBUTOR_SVF_FORM_STATUS) {
10
- DISTRIBUTOR_SVF_FORM_STATUS["SENT"] = "SENT";
11
- DISTRIBUTOR_SVF_FORM_STATUS["ANSWERED"] = "ANSWERED";
12
- DISTRIBUTOR_SVF_FORM_STATUS["ROLLED_BACK"] = "ROLLED_BACK";
13
- })(DISTRIBUTOR_SVF_FORM_STATUS || (exports.DISTRIBUTOR_SVF_FORM_STATUS = DISTRIBUTOR_SVF_FORM_STATUS = {}));
@@ -1,4 +0,0 @@
1
- export declare enum COMPANY_PLUGINS {
2
- ITEM_TOLERANCE = "ITEM_TOLERANCE",
3
- ACCOUNTS_PAYABLES_AUTOMATION = "ACCOUNTS_PAYABLES_AUTOMATION"
4
- }
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.COMPANY_PLUGINS = void 0;
4
- var COMPANY_PLUGINS;
5
- (function (COMPANY_PLUGINS) {
6
- COMPANY_PLUGINS["ITEM_TOLERANCE"] = "ITEM_TOLERANCE";
7
- COMPANY_PLUGINS["ACCOUNTS_PAYABLES_AUTOMATION"] = "ACCOUNTS_PAYABLES_AUTOMATION";
8
- })(COMPANY_PLUGINS || (exports.COMPANY_PLUGINS = COMPANY_PLUGINS = {}));
@@ -1,3 +0,0 @@
1
- export declare function extractMediaFilenameFromLink(
2
- link?: string | null,
3
- ): string | null;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.extractMediaFilenameFromLink = extractMediaFilenameFromLink;
4
- function extractMediaFilenameFromLink(link) {
5
- if (!link) return null;
6
- const linkBase =
7
- link === null || link === void 0 ? void 0 : link.split("?")[0];
8
- const mediaName =
9
- linkBase === null || linkBase === void 0
10
- ? void 0
11
- : linkBase.split("/").pop();
12
- const mediaNameWithoutExt =
13
- mediaName === null || mediaName === void 0
14
- ? void 0
15
- : mediaName.split(".").reverse().slice(1).reverse().join(".");
16
- return mediaNameWithoutExt || null;
17
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const getMediaName_util_1 = require("./getMediaName.util");
4
- describe("Get Media Name From Link", () => {
5
- it("If link is Null it gives null", () => {
6
- expect((0, getMediaName_util_1.extractMediaFilenameFromLink)()).toBe(null);
7
- });
8
- it("if gives Image URL is present it gives Media Name", () => {
9
- expect(
10
- (0, getMediaName_util_1.extractMediaFilenameFromLink)(
11
- "https://example.com/images/my-awesome-photo.jpg?size=large",
12
- ),
13
- ).toBe("my-awesome-photo");
14
- });
15
- it("if gives Video URL is present it gives Media Name", () => {
16
- expect(
17
- (0, getMediaName_util_1.extractMediaFilenameFromLink)(
18
- "https://cdn.videos.net/clips/holiday-vacation-clip.mp4",
19
- ),
20
- ).toBe("holiday-vacation-clip");
21
- });
22
- it("if gives Video URL is present it gives Media Name", () => {
23
- expect(
24
- (0, getMediaName_util_1.extractMediaFilenameFromLink)(
25
- "https://docs.storage.org/reports/quarterly_report_2025.pdf",
26
- ),
27
- ).toBe("quarterly_report_2025");
28
- });
29
- });