kcommons 5.27.4 → 5.27.6

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,4 +1,5 @@
1
1
  import { IASNItem } from "../typings/asn.typings";
2
+ import { INestedGRNItem } from "../typings/grn.typings";
2
3
  export declare class ASNItemWrapper implements IASNItem {
3
4
  constructor(partial: IASNItem);
4
5
  po_asn_item_junction_id: string;
@@ -12,6 +13,7 @@ export declare class ASNItemWrapper implements IASNItem {
12
13
  code_sku: string;
13
14
  uom: string;
14
15
  dispatched_quantity: number;
16
+ used_in_grn_items: INestedGRNItem[] | null;
15
17
  delivered_quantity: null;
16
18
  item_description: null;
17
19
  is_deleted: boolean;
@@ -14,6 +14,7 @@ class ASNItemWrapper {
14
14
  this.code_sku = "";
15
15
  this.uom = "";
16
16
  this.dispatched_quantity = 0;
17
+ this.used_in_grn_items = null;
17
18
  this.delivered_quantity = null;
18
19
  this.item_description = null;
19
20
  this.is_deleted = false;
@@ -1,12 +1,33 @@
1
1
  import { IPaginationFilters } from "./common/paginationFilters.typings";
2
2
  import { INestedCompany } from "./company.typings";
3
- import { INestedGRNItem } from "./grn.typings";
3
+ import { INestedGRN, INestedGRNItem } from "./grn.typings";
4
4
  import { INestedItem } from "./item.typings";
5
5
  import { INestedPo } from "./po.typings";
6
6
  import { INestedPOASNItemJunction } from "./poAsnJunctionItems.typings";
7
7
  import { INestedStoreLocation } from "./storeLocation.typings";
8
8
  import { INestedUser } from "./user.typings";
9
9
  import { INestedVendor } from "./vendor.typings";
10
+ export declare enum ASN_CANCELLED_BY_ENTITY {
11
+ COMPANY = "COMPANY",
12
+ VENDOR = "VENDOR"
13
+ }
14
+ export declare enum ASN_STATUS {
15
+ DRAFT = "DRAFT",
16
+ DISPATCHED = "DISPATCHED",
17
+ DELIVERED = "DELIVERED",
18
+ CLOSED = "CLOSED",
19
+ CANCELLED = "CANCELLED"
20
+ }
21
+ export declare enum ASN_INCLUDE {
22
+ created_by_vendor = "created_by_vendor",
23
+ for_company = "for_company",
24
+ parent_po = "parent_po",
25
+ shipping_store_location = "shipping_store_location",
26
+ contact_person = "contact_person",
27
+ items = "items",
28
+ associated_grns = "associated_grns",
29
+ cancelled_by_user = "cancelled_by_user"
30
+ }
10
31
  export interface IASN {
11
32
  id: string;
12
33
  asn_no: string;
@@ -19,18 +40,26 @@ export interface IASN {
19
40
  contact_person_id: string | null;
20
41
  sent_to_company_at: string | null;
21
42
  attachment_link: string | null;
43
+ cancelled_by_entity: ASN_CANCELLED_BY_ENTITY | null;
44
+ cancellation_remark: string | null;
45
+ cancelled_by_user_id: string | null;
22
46
  is_deleted: boolean;
23
47
  deleted_at: string;
48
+ cancelled_at: string | null;
49
+ delivered_at: string | null;
50
+ closed_at: string | null;
24
51
  created_at: string;
25
52
  updated_at: string;
26
53
  created_by_vendor?: INestedVendor | null;
27
- for_company?: INestedCompany | null;
28
- parent_po?: INestedPo | null;
29
- shipping_store_location?: INestedStoreLocation | null;
30
- contact_person?: INestedUser | null;
31
- items?: INestedASNItem[] | null;
54
+ for_company: INestedCompany | null;
55
+ parent_po: INestedPo | null;
56
+ shipping_store_location: INestedStoreLocation | null;
57
+ contact_person: INestedUser | null;
58
+ items: INestedASNItem[] | null;
59
+ associated_grns: INestedGRN[] | null;
60
+ cancelled_by_user: INestedUser | null;
32
61
  }
33
- export interface INestedASN extends Omit<IASN, "created_by_vendor" | "for_company" | "parent_po" | "shipping_store_location" | "contact_person" | "items" | "associated_grns"> {
62
+ export interface INestedASN extends Omit<IASN, "created_by_vendor" | "for_company" | "parent_po" | "shipping_store_location" | "contact_person" | "items" | "associated_grns" | "cancelled_by_user"> {
34
63
  }
35
64
  export interface IASNFilters {
36
65
  company_id?: string;
@@ -43,21 +72,6 @@ export interface IASNFilters {
43
72
  }
44
73
  export interface IASNFiltersWIthPagination extends IPaginationFilters, IASNFilters {
45
74
  }
46
- export declare enum ASN_STATUS {
47
- DRAFT = "DRAFT",
48
- DISPATCHED = "DISPATCHED",
49
- DELIVERED = "DELIVERED",
50
- CLOSED = "CLOSED"
51
- }
52
- export declare enum ASN_INCLUDE {
53
- created_by_vendor = "created_by_vendor",
54
- for_company = "for_company",
55
- parent_po = "parent_po",
56
- shipping_store_location = "shipping_store_location",
57
- contact_person = "contact_person",
58
- items = "items",
59
- associated_grns = "associated_grns"
60
- }
61
75
  export declare enum ASN_ITEM_INCLUDE {
62
76
  company = "company",
63
77
  item = "item",
@@ -79,17 +93,15 @@ export interface IASNItem {
79
93
  delivered_quantity: number | null;
80
94
  item_description: string | null;
81
95
  po_asn_item_junction_id: string;
82
- delivered_at: string | null;
83
- closed_at: string | null;
84
96
  is_deleted: boolean;
85
97
  deleted_at: string | null;
86
98
  created_at: string;
87
99
  updated_at: string;
88
- company?: INestedCompany | null;
89
- item?: INestedItem | null;
90
- parent_asn?: INestedASN | null;
91
- vendor?: INestedVendor | null;
92
- used_in_grn_items?: INestedGRNItem[] | null;
100
+ company: INestedCompany | null;
101
+ item: INestedItem | null;
102
+ parent_asn: INestedASN | null;
103
+ vendor: INestedVendor | null;
104
+ used_in_grn_items: INestedGRNItem[] | null;
93
105
  po_asn_item_junction: INestedPOASNItemJunction | null;
94
106
  }
95
107
  export interface INestedASNItem extends Omit<IASNItem, "company" | "item" | "parent_asn" | "vendor" | "parent_po_item" | "used_in_grn_items" | "po_asn_item_junction"> {
@@ -1,12 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ASN_ITEM_INCLUDE = exports.ASN_INCLUDE = exports.ASN_STATUS = void 0;
3
+ exports.ASN_ITEM_INCLUDE = exports.ASN_INCLUDE = exports.ASN_STATUS = exports.ASN_CANCELLED_BY_ENTITY = void 0;
4
+ var ASN_CANCELLED_BY_ENTITY;
5
+ (function (ASN_CANCELLED_BY_ENTITY) {
6
+ ASN_CANCELLED_BY_ENTITY["COMPANY"] = "COMPANY";
7
+ ASN_CANCELLED_BY_ENTITY["VENDOR"] = "VENDOR";
8
+ })(ASN_CANCELLED_BY_ENTITY || (exports.ASN_CANCELLED_BY_ENTITY = ASN_CANCELLED_BY_ENTITY = {}));
4
9
  var ASN_STATUS;
5
10
  (function (ASN_STATUS) {
6
11
  ASN_STATUS["DRAFT"] = "DRAFT";
7
12
  ASN_STATUS["DISPATCHED"] = "DISPATCHED";
8
13
  ASN_STATUS["DELIVERED"] = "DELIVERED";
9
14
  ASN_STATUS["CLOSED"] = "CLOSED";
15
+ ASN_STATUS["CANCELLED"] = "CANCELLED";
10
16
  })(ASN_STATUS || (exports.ASN_STATUS = ASN_STATUS = {}));
11
17
  var ASN_INCLUDE;
12
18
  (function (ASN_INCLUDE) {
@@ -17,6 +23,7 @@ var ASN_INCLUDE;
17
23
  ASN_INCLUDE["contact_person"] = "contact_person";
18
24
  ASN_INCLUDE["items"] = "items";
19
25
  ASN_INCLUDE["associated_grns"] = "associated_grns";
26
+ ASN_INCLUDE["cancelled_by_user"] = "cancelled_by_user";
20
27
  })(ASN_INCLUDE || (exports.ASN_INCLUDE = ASN_INCLUDE = {}));
21
28
  // ASN Items
22
29
  var ASN_ITEM_INCLUDE;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kcommons",
3
- "version": "5.27.4",
3
+ "version": "5.27.6",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.js",