repzo 1.0.64 → 1.0.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +17 -0
- package/lib/index.js +34 -0
- package/lib/types/index.d.ts +140 -0
- package/package.json +1 -1
- package/src/index.ts +47 -0
- package/src/types/index.ts +141 -0
package/lib/index.d.ts
CHANGED
|
@@ -653,6 +653,23 @@ export default class Repzo {
|
|
|
653
653
|
body: Service.Day.Create.Body
|
|
654
654
|
) => Promise<Service.Day.Create.Result>;
|
|
655
655
|
};
|
|
656
|
+
receivingMaterial: {
|
|
657
|
+
_path: string;
|
|
658
|
+
find: (
|
|
659
|
+
params?: Service.ReceivingMaterial.Find.Params
|
|
660
|
+
) => Promise<Service.ReceivingMaterial.Find.Result>;
|
|
661
|
+
get: (
|
|
662
|
+
id: Service.ReceivingMaterial.Get.ID,
|
|
663
|
+
params?: Service.ReceivingMaterial.Get.Params
|
|
664
|
+
) => Promise<Service.ReceivingMaterial.Get.Result>;
|
|
665
|
+
create: (
|
|
666
|
+
body: Service.ReceivingMaterial.Create.Body
|
|
667
|
+
) => Promise<Service.ReceivingMaterial.Create.Result>;
|
|
668
|
+
update: (
|
|
669
|
+
id: Service.ReceivingMaterial.Update.ID,
|
|
670
|
+
body: Service.ReceivingMaterial.Update.Body
|
|
671
|
+
) => Promise<Service.ReceivingMaterial.Update.Result>;
|
|
672
|
+
};
|
|
656
673
|
transfer: {
|
|
657
674
|
_path: string;
|
|
658
675
|
find: (
|
package/lib/index.js
CHANGED
|
@@ -1334,6 +1334,40 @@ export default class Repzo {
|
|
|
1334
1334
|
return res;
|
|
1335
1335
|
},
|
|
1336
1336
|
};
|
|
1337
|
+
this.receivingMaterial = {
|
|
1338
|
+
_path: "/receiving-material",
|
|
1339
|
+
find: async (params) => {
|
|
1340
|
+
let res = await this._fetch(
|
|
1341
|
+
this.svAPIEndpoint,
|
|
1342
|
+
this.receivingMaterial._path,
|
|
1343
|
+
params
|
|
1344
|
+
);
|
|
1345
|
+
return res;
|
|
1346
|
+
},
|
|
1347
|
+
get: async (id, params) => {
|
|
1348
|
+
return await this._fetch(
|
|
1349
|
+
this.svAPIEndpoint,
|
|
1350
|
+
this.receivingMaterial._path + `/${id}`,
|
|
1351
|
+
params
|
|
1352
|
+
);
|
|
1353
|
+
},
|
|
1354
|
+
create: async (body) => {
|
|
1355
|
+
let res = await this._create(
|
|
1356
|
+
this.svAPIEndpoint,
|
|
1357
|
+
this.receivingMaterial._path,
|
|
1358
|
+
body
|
|
1359
|
+
);
|
|
1360
|
+
return res;
|
|
1361
|
+
},
|
|
1362
|
+
update: async (id, body) => {
|
|
1363
|
+
let res = await this._update(
|
|
1364
|
+
this.svAPIEndpoint,
|
|
1365
|
+
this.receivingMaterial._path + `/${id}`,
|
|
1366
|
+
body
|
|
1367
|
+
);
|
|
1368
|
+
return res;
|
|
1369
|
+
},
|
|
1370
|
+
};
|
|
1337
1371
|
this.transfer = {
|
|
1338
1372
|
_path: "/transfer",
|
|
1339
1373
|
find: async (params) => {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -5658,6 +5658,146 @@ export declare namespace Service {
|
|
|
5658
5658
|
}
|
|
5659
5659
|
export {};
|
|
5660
5660
|
}
|
|
5661
|
+
namespace ReceivingMaterial {
|
|
5662
|
+
interface ReceivingMaterialSchema {
|
|
5663
|
+
_id: string;
|
|
5664
|
+
serial_number: SerialNumber;
|
|
5665
|
+
from: string | Warehouse.WarehouseSchema;
|
|
5666
|
+
to: string | Warehouse.WarehouseSchema;
|
|
5667
|
+
time: number;
|
|
5668
|
+
creator: AdminCreator | RepCreator | ClientCreator;
|
|
5669
|
+
editor?: AdminCreator | RepCreator | ClientCreator;
|
|
5670
|
+
sync_id: string;
|
|
5671
|
+
variants: {
|
|
5672
|
+
_id: string;
|
|
5673
|
+
variant_id: string;
|
|
5674
|
+
qty: number;
|
|
5675
|
+
variant_name?: string;
|
|
5676
|
+
variant_local_name?: string;
|
|
5677
|
+
product_id?: string;
|
|
5678
|
+
product_name?: string;
|
|
5679
|
+
product_local_name?: string;
|
|
5680
|
+
measure_unit_id?: string;
|
|
5681
|
+
measure_unit_name?: string;
|
|
5682
|
+
measure_unit_qty?: number;
|
|
5683
|
+
measure_unit_factor?: number;
|
|
5684
|
+
updatedAt?: Date;
|
|
5685
|
+
note?: string;
|
|
5686
|
+
}[];
|
|
5687
|
+
teams: string[] | Team.TeamSchema[];
|
|
5688
|
+
items_count?: number;
|
|
5689
|
+
total_items_base_unit_qty?: number;
|
|
5690
|
+
company_namespace: string[];
|
|
5691
|
+
transaction_processed: boolean;
|
|
5692
|
+
status: "pending" | "approved" | "processing" | "rejected" | "processed";
|
|
5693
|
+
comment?: string;
|
|
5694
|
+
business_day?: string;
|
|
5695
|
+
document_type?: "receiving-material";
|
|
5696
|
+
supplier?: string;
|
|
5697
|
+
createdAt: Date;
|
|
5698
|
+
updatedAt: Date;
|
|
5699
|
+
}
|
|
5700
|
+
interface CreateBody {
|
|
5701
|
+
from: string;
|
|
5702
|
+
to: string;
|
|
5703
|
+
time: number;
|
|
5704
|
+
sync_id: string;
|
|
5705
|
+
variants: {
|
|
5706
|
+
_id: string;
|
|
5707
|
+
variant_id: string;
|
|
5708
|
+
qty: number;
|
|
5709
|
+
variant_name?: string;
|
|
5710
|
+
variant_local_name?: string;
|
|
5711
|
+
product_id?: string;
|
|
5712
|
+
product_name?: string;
|
|
5713
|
+
product_local_name?: string;
|
|
5714
|
+
measure_unit_id?: string;
|
|
5715
|
+
measure_unit_name?: string;
|
|
5716
|
+
measure_unit_qty?: number;
|
|
5717
|
+
measure_unit_factor?: number;
|
|
5718
|
+
updatedAt?: Date;
|
|
5719
|
+
note?: string;
|
|
5720
|
+
}[];
|
|
5721
|
+
teams: string[];
|
|
5722
|
+
items_count?: number;
|
|
5723
|
+
total_items_base_unit_qty?: number;
|
|
5724
|
+
company_namespace: string[];
|
|
5725
|
+
transaction_processed: boolean;
|
|
5726
|
+
status: "pending" | "approved" | "processing" | "rejected" | "processed";
|
|
5727
|
+
comment?: string;
|
|
5728
|
+
business_day?: string;
|
|
5729
|
+
supplier?: string;
|
|
5730
|
+
}
|
|
5731
|
+
interface UpdateBody {
|
|
5732
|
+
_id?: string;
|
|
5733
|
+
serial_number?: SerialNumber;
|
|
5734
|
+
from?: string;
|
|
5735
|
+
to?: string;
|
|
5736
|
+
time?: number;
|
|
5737
|
+
sync_id?: string;
|
|
5738
|
+
variants?: {
|
|
5739
|
+
_id: string;
|
|
5740
|
+
variant_id: string;
|
|
5741
|
+
qty: number;
|
|
5742
|
+
variant_name?: string;
|
|
5743
|
+
variant_local_name?: string;
|
|
5744
|
+
product_id?: string;
|
|
5745
|
+
product_name?: string;
|
|
5746
|
+
product_local_name?: string;
|
|
5747
|
+
measure_unit_id?: string;
|
|
5748
|
+
measure_unit_name?: string;
|
|
5749
|
+
measure_unit_qty?: number;
|
|
5750
|
+
measure_unit_factor?: number;
|
|
5751
|
+
updatedAt?: Date;
|
|
5752
|
+
note?: string;
|
|
5753
|
+
}[];
|
|
5754
|
+
teams?: string[];
|
|
5755
|
+
items_count?: number;
|
|
5756
|
+
total_items_base_unit_qty?: number;
|
|
5757
|
+
company_namespace?: string[];
|
|
5758
|
+
transaction_processed?: boolean;
|
|
5759
|
+
status?: "pending" | "approved" | "processing" | "rejected" | "processed";
|
|
5760
|
+
comment?: string;
|
|
5761
|
+
business_day?: string;
|
|
5762
|
+
supplier?: string;
|
|
5763
|
+
}
|
|
5764
|
+
namespace Find {
|
|
5765
|
+
type Params = DefaultPaginationQueryParams & {
|
|
5766
|
+
_id?: string[] | string;
|
|
5767
|
+
"creator._id"?: string[] | string;
|
|
5768
|
+
"creator.name"?: string[] | string;
|
|
5769
|
+
"creator.type"?: string[] | string;
|
|
5770
|
+
type?: string;
|
|
5771
|
+
to?: string;
|
|
5772
|
+
from?: string;
|
|
5773
|
+
status?: string;
|
|
5774
|
+
supplier?: string;
|
|
5775
|
+
from_createdAt?: number;
|
|
5776
|
+
to_createdAt?: number;
|
|
5777
|
+
from_updatedAt?: number;
|
|
5778
|
+
[key: string]: any;
|
|
5779
|
+
};
|
|
5780
|
+
interface Result extends DefaultPaginationResult {
|
|
5781
|
+
data: ReceivingMaterialSchema[];
|
|
5782
|
+
absolute_total: number;
|
|
5783
|
+
page_total: number;
|
|
5784
|
+
}
|
|
5785
|
+
}
|
|
5786
|
+
namespace Get {
|
|
5787
|
+
type ID = string;
|
|
5788
|
+
interface Params {}
|
|
5789
|
+
type Result = ReceivingMaterialSchema;
|
|
5790
|
+
}
|
|
5791
|
+
namespace Create {
|
|
5792
|
+
type Body = CreateBody;
|
|
5793
|
+
type Result = ReceivingMaterialSchema;
|
|
5794
|
+
}
|
|
5795
|
+
namespace Update {
|
|
5796
|
+
type ID = string;
|
|
5797
|
+
type Body = UpdateBody;
|
|
5798
|
+
type Result = ReceivingMaterialSchema;
|
|
5799
|
+
}
|
|
5800
|
+
}
|
|
5661
5801
|
namespace Cycle {
|
|
5662
5802
|
type CycleStatus = "pending" | "approved" | "processing" | "rejected";
|
|
5663
5803
|
export interface Schema {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1906,7 +1906,54 @@ export default class Repzo {
|
|
|
1906
1906
|
return res;
|
|
1907
1907
|
},
|
|
1908
1908
|
};
|
|
1909
|
+
receivingMaterial = {
|
|
1910
|
+
_path: "/receiving-material",
|
|
1909
1911
|
|
|
1912
|
+
find: async (
|
|
1913
|
+
params?: Service.ReceivingMaterial.Find.Params
|
|
1914
|
+
): Promise<Service.ReceivingMaterial.Find.Result> => {
|
|
1915
|
+
let res: Service.ReceivingMaterial.Find.Result = await this._fetch(
|
|
1916
|
+
this.svAPIEndpoint,
|
|
1917
|
+
this.receivingMaterial._path,
|
|
1918
|
+
params
|
|
1919
|
+
);
|
|
1920
|
+
return res;
|
|
1921
|
+
},
|
|
1922
|
+
|
|
1923
|
+
get: async (
|
|
1924
|
+
id: Service.ReceivingMaterial.Get.ID,
|
|
1925
|
+
params?: Service.ReceivingMaterial.Get.Params
|
|
1926
|
+
): Promise<Service.ReceivingMaterial.Get.Result> => {
|
|
1927
|
+
return await this._fetch(
|
|
1928
|
+
this.svAPIEndpoint,
|
|
1929
|
+
this.receivingMaterial._path + `/${id}`,
|
|
1930
|
+
params
|
|
1931
|
+
);
|
|
1932
|
+
},
|
|
1933
|
+
|
|
1934
|
+
create: async (
|
|
1935
|
+
body: Service.ReceivingMaterial.Create.Body
|
|
1936
|
+
): Promise<Service.ReceivingMaterial.Create.Result> => {
|
|
1937
|
+
let res = await this._create(
|
|
1938
|
+
this.svAPIEndpoint,
|
|
1939
|
+
this.receivingMaterial._path,
|
|
1940
|
+
body
|
|
1941
|
+
);
|
|
1942
|
+
return res;
|
|
1943
|
+
},
|
|
1944
|
+
|
|
1945
|
+
update: async (
|
|
1946
|
+
id: Service.ReceivingMaterial.Update.ID,
|
|
1947
|
+
body: Service.ReceivingMaterial.Update.Body
|
|
1948
|
+
): Promise<Service.ReceivingMaterial.Update.Result> => {
|
|
1949
|
+
let res: Service.ReceivingMaterial.Update.Result = await this._update(
|
|
1950
|
+
this.svAPIEndpoint,
|
|
1951
|
+
this.receivingMaterial._path + `/${id}`,
|
|
1952
|
+
body
|
|
1953
|
+
);
|
|
1954
|
+
return res;
|
|
1955
|
+
},
|
|
1956
|
+
};
|
|
1910
1957
|
transfer = {
|
|
1911
1958
|
_path: "/transfer",
|
|
1912
1959
|
find: async (
|
package/src/types/index.ts
CHANGED
|
@@ -5645,6 +5645,147 @@ export namespace Service {
|
|
|
5645
5645
|
export type Result = DaySchema;
|
|
5646
5646
|
}
|
|
5647
5647
|
}
|
|
5648
|
+
|
|
5649
|
+
export namespace ReceivingMaterial {
|
|
5650
|
+
export interface ReceivingMaterialSchema {
|
|
5651
|
+
_id: string;
|
|
5652
|
+
serial_number: SerialNumber;
|
|
5653
|
+
from: string | Warehouse.WarehouseSchema;
|
|
5654
|
+
to: string | Warehouse.WarehouseSchema;
|
|
5655
|
+
time: number;
|
|
5656
|
+
creator: AdminCreator | RepCreator | ClientCreator;
|
|
5657
|
+
editor?: AdminCreator | RepCreator | ClientCreator;
|
|
5658
|
+
sync_id: string;
|
|
5659
|
+
variants: {
|
|
5660
|
+
_id: string;
|
|
5661
|
+
variant_id: string;
|
|
5662
|
+
qty: number;
|
|
5663
|
+
variant_name?: string;
|
|
5664
|
+
variant_local_name?: string;
|
|
5665
|
+
product_id?: string;
|
|
5666
|
+
product_name?: string;
|
|
5667
|
+
product_local_name?: string;
|
|
5668
|
+
measure_unit_id?: string;
|
|
5669
|
+
measure_unit_name?: string;
|
|
5670
|
+
measure_unit_qty?: number;
|
|
5671
|
+
measure_unit_factor?: number;
|
|
5672
|
+
updatedAt?: Date;
|
|
5673
|
+
note?: string;
|
|
5674
|
+
}[];
|
|
5675
|
+
teams: string[] | Team.TeamSchema[];
|
|
5676
|
+
items_count?: number;
|
|
5677
|
+
total_items_base_unit_qty?: number;
|
|
5678
|
+
company_namespace: string[];
|
|
5679
|
+
transaction_processed: boolean;
|
|
5680
|
+
status: "pending" | "approved" | "processing" | "rejected" | "processed";
|
|
5681
|
+
comment?: string;
|
|
5682
|
+
business_day?: string;
|
|
5683
|
+
document_type?: "receiving-material";
|
|
5684
|
+
supplier?: string;
|
|
5685
|
+
createdAt: Date;
|
|
5686
|
+
updatedAt: Date;
|
|
5687
|
+
}
|
|
5688
|
+
export interface CreateBody {
|
|
5689
|
+
from: string;
|
|
5690
|
+
to: string;
|
|
5691
|
+
time: number;
|
|
5692
|
+
sync_id: string;
|
|
5693
|
+
variants: {
|
|
5694
|
+
_id: string;
|
|
5695
|
+
variant_id: string;
|
|
5696
|
+
qty: number;
|
|
5697
|
+
variant_name?: string;
|
|
5698
|
+
variant_local_name?: string;
|
|
5699
|
+
product_id?: string;
|
|
5700
|
+
product_name?: string;
|
|
5701
|
+
product_local_name?: string;
|
|
5702
|
+
measure_unit_id?: string;
|
|
5703
|
+
measure_unit_name?: string;
|
|
5704
|
+
measure_unit_qty?: number;
|
|
5705
|
+
measure_unit_factor?: number;
|
|
5706
|
+
updatedAt?: Date;
|
|
5707
|
+
note?: string;
|
|
5708
|
+
}[];
|
|
5709
|
+
teams: string[];
|
|
5710
|
+
items_count?: number;
|
|
5711
|
+
total_items_base_unit_qty?: number;
|
|
5712
|
+
company_namespace: string[];
|
|
5713
|
+
transaction_processed: boolean;
|
|
5714
|
+
status: "pending" | "approved" | "processing" | "rejected" | "processed";
|
|
5715
|
+
comment?: string;
|
|
5716
|
+
business_day?: string;
|
|
5717
|
+
supplier?: string;
|
|
5718
|
+
}
|
|
5719
|
+
export interface UpdateBody {
|
|
5720
|
+
_id?: string;
|
|
5721
|
+
serial_number?: SerialNumber;
|
|
5722
|
+
from?: string;
|
|
5723
|
+
to?: string;
|
|
5724
|
+
time?: number;
|
|
5725
|
+
sync_id?: string;
|
|
5726
|
+
variants?: {
|
|
5727
|
+
_id: string;
|
|
5728
|
+
variant_id: string;
|
|
5729
|
+
qty: number;
|
|
5730
|
+
variant_name?: string;
|
|
5731
|
+
variant_local_name?: string;
|
|
5732
|
+
product_id?: string;
|
|
5733
|
+
product_name?: string;
|
|
5734
|
+
product_local_name?: string;
|
|
5735
|
+
measure_unit_id?: string;
|
|
5736
|
+
measure_unit_name?: string;
|
|
5737
|
+
measure_unit_qty?: number;
|
|
5738
|
+
measure_unit_factor?: number;
|
|
5739
|
+
updatedAt?: Date;
|
|
5740
|
+
note?: string;
|
|
5741
|
+
}[];
|
|
5742
|
+
teams?: string[];
|
|
5743
|
+
items_count?: number;
|
|
5744
|
+
total_items_base_unit_qty?: number;
|
|
5745
|
+
company_namespace?: string[];
|
|
5746
|
+
transaction_processed?: boolean;
|
|
5747
|
+
status?: "pending" | "approved" | "processing" | "rejected" | "processed";
|
|
5748
|
+
comment?: string;
|
|
5749
|
+
business_day?: string;
|
|
5750
|
+
supplier?: string;
|
|
5751
|
+
}
|
|
5752
|
+
export namespace Find {
|
|
5753
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
5754
|
+
_id?: string[] | string;
|
|
5755
|
+
"creator._id"?: string[] | string;
|
|
5756
|
+
"creator.name"?: string[] | string;
|
|
5757
|
+
"creator.type"?: string[] | string;
|
|
5758
|
+
type?: string;
|
|
5759
|
+
to?: string;
|
|
5760
|
+
from?: string;
|
|
5761
|
+
status?: string;
|
|
5762
|
+
supplier?: string;
|
|
5763
|
+
from_createdAt?: number;
|
|
5764
|
+
to_createdAt?: number;
|
|
5765
|
+
from_updatedAt?: number;
|
|
5766
|
+
[key: string]: any; // integration_meta.
|
|
5767
|
+
};
|
|
5768
|
+
export interface Result extends DefaultPaginationResult {
|
|
5769
|
+
data: ReceivingMaterialSchema[];
|
|
5770
|
+
absolute_total: number;
|
|
5771
|
+
page_total: number;
|
|
5772
|
+
}
|
|
5773
|
+
}
|
|
5774
|
+
export namespace Get {
|
|
5775
|
+
export type ID = string;
|
|
5776
|
+
export interface Params {}
|
|
5777
|
+
export type Result = ReceivingMaterialSchema;
|
|
5778
|
+
}
|
|
5779
|
+
export namespace Create {
|
|
5780
|
+
export type Body = CreateBody;
|
|
5781
|
+
export type Result = ReceivingMaterialSchema;
|
|
5782
|
+
}
|
|
5783
|
+
export namespace Update {
|
|
5784
|
+
export type ID = string;
|
|
5785
|
+
export type Body = UpdateBody;
|
|
5786
|
+
export type Result = ReceivingMaterialSchema;
|
|
5787
|
+
}
|
|
5788
|
+
}
|
|
5648
5789
|
export namespace Cycle {
|
|
5649
5790
|
type CycleStatus = "pending" | "approved" | "processing" | "rejected";
|
|
5650
5791
|
export interface Schema {
|