repzo 1.0.64 → 1.0.66
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 +30 -0
- package/lib/index.js +60 -0
- package/lib/types/index.d.ts +279 -0
- package/package.json +1 -1
- package/src/index.ts +85 -0
- package/src/types/index.ts +282 -0
package/lib/index.d.ts
CHANGED
|
@@ -653,6 +653,36 @@ 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
|
+
};
|
|
673
|
+
adjustAccount: {
|
|
674
|
+
_path: string;
|
|
675
|
+
find: (
|
|
676
|
+
params?: Service.AdjustAccount.Find.Params
|
|
677
|
+
) => Promise<Service.AdjustAccount.Find.Result>;
|
|
678
|
+
get: (
|
|
679
|
+
id: Service.AdjustAccount.Get.ID,
|
|
680
|
+
params?: Service.AdjustAccount.Get.Params
|
|
681
|
+
) => Promise<Service.AdjustAccount.Get.Result>;
|
|
682
|
+
create: (
|
|
683
|
+
body: Service.AdjustAccount.Create.Body
|
|
684
|
+
) => Promise<Service.AdjustAccount.Create.Result>;
|
|
685
|
+
};
|
|
656
686
|
transfer: {
|
|
657
687
|
_path: string;
|
|
658
688
|
find: (
|
package/lib/index.js
CHANGED
|
@@ -1334,6 +1334,66 @@ 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
|
+
};
|
|
1371
|
+
this.adjustAccount = {
|
|
1372
|
+
_path: "/adjust-account",
|
|
1373
|
+
find: async (params) => {
|
|
1374
|
+
let res = await this._fetch(
|
|
1375
|
+
this.svAPIEndpoint,
|
|
1376
|
+
this.adjustAccount._path,
|
|
1377
|
+
params
|
|
1378
|
+
);
|
|
1379
|
+
return res;
|
|
1380
|
+
},
|
|
1381
|
+
get: async (id, params) => {
|
|
1382
|
+
return await this._fetch(
|
|
1383
|
+
this.svAPIEndpoint,
|
|
1384
|
+
this.adjustAccount._path + `/${id}`,
|
|
1385
|
+
params
|
|
1386
|
+
);
|
|
1387
|
+
},
|
|
1388
|
+
create: async (body) => {
|
|
1389
|
+
let res = await this._create(
|
|
1390
|
+
this.svAPIEndpoint,
|
|
1391
|
+
this.adjustAccount._path,
|
|
1392
|
+
body
|
|
1393
|
+
);
|
|
1394
|
+
return res;
|
|
1395
|
+
},
|
|
1396
|
+
};
|
|
1337
1397
|
this.transfer = {
|
|
1338
1398
|
_path: "/transfer",
|
|
1339
1399
|
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;
|
|
5669
|
+
editor?: AdminCreator | RepCreator;
|
|
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 {
|
|
@@ -5897,6 +6037,145 @@ export declare namespace Service {
|
|
|
5897
6037
|
}
|
|
5898
6038
|
export {};
|
|
5899
6039
|
}
|
|
6040
|
+
namespace AdjustAccount {
|
|
6041
|
+
interface AdjustAccountSchema {
|
|
6042
|
+
_id: string;
|
|
6043
|
+
serial_number: SerialNumber;
|
|
6044
|
+
from: string;
|
|
6045
|
+
time: number;
|
|
6046
|
+
creator: {
|
|
6047
|
+
_id: string;
|
|
6048
|
+
type: "admin";
|
|
6049
|
+
admin?: string;
|
|
6050
|
+
name?: string;
|
|
6051
|
+
};
|
|
6052
|
+
sync_id: string;
|
|
6053
|
+
comment?: string;
|
|
6054
|
+
accounts: {
|
|
6055
|
+
accountHolder: string;
|
|
6056
|
+
description?: string;
|
|
6057
|
+
company_namespace: string[];
|
|
6058
|
+
name?: string;
|
|
6059
|
+
type: "client" | "rep" | "namespace";
|
|
6060
|
+
cash?: number;
|
|
6061
|
+
check?: number;
|
|
6062
|
+
credit?: number;
|
|
6063
|
+
status: "consumed" | "unconsumed" | "partially_consumed";
|
|
6064
|
+
note?: string;
|
|
6065
|
+
paymentsData: {
|
|
6066
|
+
amount: number;
|
|
6067
|
+
paid: number;
|
|
6068
|
+
balance: number;
|
|
6069
|
+
payments: {
|
|
6070
|
+
payment_serial_number?: SerialNumber;
|
|
6071
|
+
payment_id?: string;
|
|
6072
|
+
invoice_serial_number?: SerialNumber;
|
|
6073
|
+
return_serial_number?: SerialNumber;
|
|
6074
|
+
fullinvoice_id?: string;
|
|
6075
|
+
refund_serial_number?: SerialNumber;
|
|
6076
|
+
refund_id?: string;
|
|
6077
|
+
adjustment_serial_number?: SerialNumber;
|
|
6078
|
+
adjustment_id?: string;
|
|
6079
|
+
adjustment_account_id?: string;
|
|
6080
|
+
account_index?: number;
|
|
6081
|
+
view_serial_number?: SerialNumber;
|
|
6082
|
+
type:
|
|
6083
|
+
| "invoice"
|
|
6084
|
+
| "return_invoice"
|
|
6085
|
+
| "payment"
|
|
6086
|
+
| "refund"
|
|
6087
|
+
| "adjustment";
|
|
6088
|
+
amount: number;
|
|
6089
|
+
is_linked_txn?: boolean;
|
|
6090
|
+
}[];
|
|
6091
|
+
};
|
|
6092
|
+
account_index?: number;
|
|
6093
|
+
}[];
|
|
6094
|
+
teams: string[];
|
|
6095
|
+
transaction_processed: boolean;
|
|
6096
|
+
company_namespace: string[];
|
|
6097
|
+
createdAt: Date;
|
|
6098
|
+
updatedAt: Date;
|
|
6099
|
+
}
|
|
6100
|
+
interface CreateBody {
|
|
6101
|
+
serial_number: SerialNumber;
|
|
6102
|
+
from: string;
|
|
6103
|
+
time: number;
|
|
6104
|
+
sync_id: string;
|
|
6105
|
+
comment?: string;
|
|
6106
|
+
accounts: {
|
|
6107
|
+
accountHolder: string;
|
|
6108
|
+
description?: string;
|
|
6109
|
+
company_namespace: string[];
|
|
6110
|
+
name?: string;
|
|
6111
|
+
type: "client" | "rep" | "namespace";
|
|
6112
|
+
cash?: number;
|
|
6113
|
+
check?: number;
|
|
6114
|
+
credit?: number;
|
|
6115
|
+
status: "consumed" | "unconsumed" | "partially_consumed";
|
|
6116
|
+
note?: string;
|
|
6117
|
+
paymentsData: {
|
|
6118
|
+
amount: number;
|
|
6119
|
+
paid: number;
|
|
6120
|
+
balance: number;
|
|
6121
|
+
payments: {
|
|
6122
|
+
payment_serial_number?: SerialNumber;
|
|
6123
|
+
payment_id?: string;
|
|
6124
|
+
invoice_serial_number?: SerialNumber;
|
|
6125
|
+
return_serial_number?: SerialNumber;
|
|
6126
|
+
fullinvoice_id?: string;
|
|
6127
|
+
refund_serial_number?: SerialNumber;
|
|
6128
|
+
refund_id?: string;
|
|
6129
|
+
adjustment_serial_number?: SerialNumber;
|
|
6130
|
+
adjustment_id?: string;
|
|
6131
|
+
adjustment_account_id?: string;
|
|
6132
|
+
account_index?: number;
|
|
6133
|
+
view_serial_number?: SerialNumber;
|
|
6134
|
+
type:
|
|
6135
|
+
| "invoice"
|
|
6136
|
+
| "return_invoice"
|
|
6137
|
+
| "payment"
|
|
6138
|
+
| "refund"
|
|
6139
|
+
| "adjustment";
|
|
6140
|
+
amount: number;
|
|
6141
|
+
is_linked_txn?: boolean;
|
|
6142
|
+
}[];
|
|
6143
|
+
};
|
|
6144
|
+
account_index?: number;
|
|
6145
|
+
}[];
|
|
6146
|
+
teams: string[];
|
|
6147
|
+
transaction_processed: boolean;
|
|
6148
|
+
company_namespace: string[];
|
|
6149
|
+
}
|
|
6150
|
+
namespace Find {
|
|
6151
|
+
type Params = DefaultPaginationQueryParams & {
|
|
6152
|
+
_id?: string[] | string;
|
|
6153
|
+
"creator._id"?: string[] | string;
|
|
6154
|
+
"accounts.type"?: string;
|
|
6155
|
+
"accounts.accountHolder"?: string;
|
|
6156
|
+
from_time?: number;
|
|
6157
|
+
to_time?: number;
|
|
6158
|
+
from_createdAt?: number;
|
|
6159
|
+
to_createdAt?: number;
|
|
6160
|
+
from_updatedAt?: number;
|
|
6161
|
+
[key: string]: any;
|
|
6162
|
+
};
|
|
6163
|
+
interface Result extends DefaultPaginationResult {
|
|
6164
|
+
data: AdjustAccountSchema[];
|
|
6165
|
+
absolute_total: number;
|
|
6166
|
+
page_total: number;
|
|
6167
|
+
}
|
|
6168
|
+
}
|
|
6169
|
+
namespace Get {
|
|
6170
|
+
type ID = string;
|
|
6171
|
+
interface Params {}
|
|
6172
|
+
type Result = AdjustAccountSchema;
|
|
6173
|
+
}
|
|
6174
|
+
namespace Create {
|
|
6175
|
+
type Body = CreateBody;
|
|
6176
|
+
type Result = AdjustAccountSchema;
|
|
6177
|
+
}
|
|
6178
|
+
}
|
|
5900
6179
|
namespace AdjustInventory {
|
|
5901
6180
|
interface VariantOfAdjustInventory {
|
|
5902
6181
|
variant: string;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1907,6 +1907,91 @@ export default class Repzo {
|
|
|
1907
1907
|
},
|
|
1908
1908
|
};
|
|
1909
1909
|
|
|
1910
|
+
receivingMaterial = {
|
|
1911
|
+
_path: "/receiving-material",
|
|
1912
|
+
|
|
1913
|
+
find: async (
|
|
1914
|
+
params?: Service.ReceivingMaterial.Find.Params
|
|
1915
|
+
): Promise<Service.ReceivingMaterial.Find.Result> => {
|
|
1916
|
+
let res: Service.ReceivingMaterial.Find.Result = await this._fetch(
|
|
1917
|
+
this.svAPIEndpoint,
|
|
1918
|
+
this.receivingMaterial._path,
|
|
1919
|
+
params
|
|
1920
|
+
);
|
|
1921
|
+
return res;
|
|
1922
|
+
},
|
|
1923
|
+
|
|
1924
|
+
get: async (
|
|
1925
|
+
id: Service.ReceivingMaterial.Get.ID,
|
|
1926
|
+
params?: Service.ReceivingMaterial.Get.Params
|
|
1927
|
+
): Promise<Service.ReceivingMaterial.Get.Result> => {
|
|
1928
|
+
return await this._fetch(
|
|
1929
|
+
this.svAPIEndpoint,
|
|
1930
|
+
this.receivingMaterial._path + `/${id}`,
|
|
1931
|
+
params
|
|
1932
|
+
);
|
|
1933
|
+
},
|
|
1934
|
+
|
|
1935
|
+
create: async (
|
|
1936
|
+
body: Service.ReceivingMaterial.Create.Body
|
|
1937
|
+
): Promise<Service.ReceivingMaterial.Create.Result> => {
|
|
1938
|
+
let res = await this._create(
|
|
1939
|
+
this.svAPIEndpoint,
|
|
1940
|
+
this.receivingMaterial._path,
|
|
1941
|
+
body
|
|
1942
|
+
);
|
|
1943
|
+
return res;
|
|
1944
|
+
},
|
|
1945
|
+
|
|
1946
|
+
update: async (
|
|
1947
|
+
id: Service.ReceivingMaterial.Update.ID,
|
|
1948
|
+
body: Service.ReceivingMaterial.Update.Body
|
|
1949
|
+
): Promise<Service.ReceivingMaterial.Update.Result> => {
|
|
1950
|
+
let res: Service.ReceivingMaterial.Update.Result = await this._update(
|
|
1951
|
+
this.svAPIEndpoint,
|
|
1952
|
+
this.receivingMaterial._path + `/${id}`,
|
|
1953
|
+
body
|
|
1954
|
+
);
|
|
1955
|
+
return res;
|
|
1956
|
+
},
|
|
1957
|
+
};
|
|
1958
|
+
|
|
1959
|
+
adjustAccount = {
|
|
1960
|
+
_path: "/adjust-account",
|
|
1961
|
+
find: async (
|
|
1962
|
+
params?: Service.AdjustAccount.Find.Params
|
|
1963
|
+
): Promise<Service.AdjustAccount.Find.Result> => {
|
|
1964
|
+
let res: Service.AdjustAccount.Find.Result = await this._fetch(
|
|
1965
|
+
this.svAPIEndpoint,
|
|
1966
|
+
this.adjustAccount._path,
|
|
1967
|
+
params
|
|
1968
|
+
);
|
|
1969
|
+
return res;
|
|
1970
|
+
},
|
|
1971
|
+
|
|
1972
|
+
get: async (
|
|
1973
|
+
id: Service.AdjustAccount.Get.ID,
|
|
1974
|
+
params?: Service.AdjustAccount.Get.Params
|
|
1975
|
+
): Promise<Service.AdjustAccount.Get.Result> => {
|
|
1976
|
+
return await this._fetch(
|
|
1977
|
+
this.svAPIEndpoint,
|
|
1978
|
+
this.adjustAccount._path + `/${id}`,
|
|
1979
|
+
params
|
|
1980
|
+
);
|
|
1981
|
+
},
|
|
1982
|
+
|
|
1983
|
+
create: async (
|
|
1984
|
+
body: Service.AdjustAccount.Create.Body
|
|
1985
|
+
): Promise<Service.AdjustAccount.Create.Result> => {
|
|
1986
|
+
let res = await this._create(
|
|
1987
|
+
this.svAPIEndpoint,
|
|
1988
|
+
this.adjustAccount._path,
|
|
1989
|
+
body
|
|
1990
|
+
);
|
|
1991
|
+
return res;
|
|
1992
|
+
},
|
|
1993
|
+
};
|
|
1994
|
+
|
|
1910
1995
|
transfer = {
|
|
1911
1996
|
_path: "/transfer",
|
|
1912
1997
|
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;
|
|
5657
|
+
editor?: AdminCreator | RepCreator;
|
|
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 {
|
|
@@ -5880,6 +6021,147 @@ export namespace Service {
|
|
|
5880
6021
|
}
|
|
5881
6022
|
}
|
|
5882
6023
|
|
|
6024
|
+
export namespace AdjustAccount {
|
|
6025
|
+
export interface AdjustAccountSchema {
|
|
6026
|
+
_id: string;
|
|
6027
|
+
serial_number: SerialNumber;
|
|
6028
|
+
from: string;
|
|
6029
|
+
time: number;
|
|
6030
|
+
creator: {
|
|
6031
|
+
_id: string;
|
|
6032
|
+
type: "admin";
|
|
6033
|
+
admin?: string;
|
|
6034
|
+
name?: string;
|
|
6035
|
+
};
|
|
6036
|
+
sync_id: string;
|
|
6037
|
+
comment?: string;
|
|
6038
|
+
accounts: {
|
|
6039
|
+
accountHolder: string;
|
|
6040
|
+
description?: string;
|
|
6041
|
+
company_namespace: string[];
|
|
6042
|
+
name?: string;
|
|
6043
|
+
type: "client" | "rep" | "namespace";
|
|
6044
|
+
cash?: number;
|
|
6045
|
+
check?: number;
|
|
6046
|
+
credit?: number;
|
|
6047
|
+
status: "consumed" | "unconsumed" | "partially_consumed";
|
|
6048
|
+
note?: string;
|
|
6049
|
+
paymentsData: {
|
|
6050
|
+
amount: number;
|
|
6051
|
+
paid: number;
|
|
6052
|
+
balance: number;
|
|
6053
|
+
payments: {
|
|
6054
|
+
payment_serial_number?: SerialNumber;
|
|
6055
|
+
payment_id?: string;
|
|
6056
|
+
invoice_serial_number?: SerialNumber;
|
|
6057
|
+
return_serial_number?: SerialNumber;
|
|
6058
|
+
fullinvoice_id?: string;
|
|
6059
|
+
refund_serial_number?: SerialNumber;
|
|
6060
|
+
refund_id?: string;
|
|
6061
|
+
adjustment_serial_number?: SerialNumber;
|
|
6062
|
+
adjustment_id?: string;
|
|
6063
|
+
adjustment_account_id?: string;
|
|
6064
|
+
account_index?: number;
|
|
6065
|
+
view_serial_number?: SerialNumber;
|
|
6066
|
+
type:
|
|
6067
|
+
| "invoice"
|
|
6068
|
+
| "return_invoice"
|
|
6069
|
+
| "payment"
|
|
6070
|
+
| "refund"
|
|
6071
|
+
| "adjustment";
|
|
6072
|
+
amount: number;
|
|
6073
|
+
is_linked_txn?: boolean;
|
|
6074
|
+
}[];
|
|
6075
|
+
};
|
|
6076
|
+
account_index?: number;
|
|
6077
|
+
}[];
|
|
6078
|
+
teams: string[];
|
|
6079
|
+
transaction_processed: boolean;
|
|
6080
|
+
company_namespace: string[];
|
|
6081
|
+
createdAt: Date;
|
|
6082
|
+
updatedAt: Date;
|
|
6083
|
+
}
|
|
6084
|
+
export interface CreateBody {
|
|
6085
|
+
serial_number: SerialNumber;
|
|
6086
|
+
from: string;
|
|
6087
|
+
time: number;
|
|
6088
|
+
sync_id: string;
|
|
6089
|
+
comment?: string;
|
|
6090
|
+
accounts: {
|
|
6091
|
+
accountHolder: string;
|
|
6092
|
+
description?: string;
|
|
6093
|
+
company_namespace: string[];
|
|
6094
|
+
name?: string;
|
|
6095
|
+
type: "client" | "rep" | "namespace";
|
|
6096
|
+
cash?: number;
|
|
6097
|
+
check?: number;
|
|
6098
|
+
credit?: number;
|
|
6099
|
+
status: "consumed" | "unconsumed" | "partially_consumed";
|
|
6100
|
+
note?: string;
|
|
6101
|
+
paymentsData: {
|
|
6102
|
+
amount: number;
|
|
6103
|
+
paid: number;
|
|
6104
|
+
balance: number;
|
|
6105
|
+
payments: {
|
|
6106
|
+
payment_serial_number?: SerialNumber;
|
|
6107
|
+
payment_id?: string;
|
|
6108
|
+
invoice_serial_number?: SerialNumber;
|
|
6109
|
+
return_serial_number?: SerialNumber;
|
|
6110
|
+
fullinvoice_id?: string;
|
|
6111
|
+
refund_serial_number?: SerialNumber;
|
|
6112
|
+
refund_id?: string;
|
|
6113
|
+
adjustment_serial_number?: SerialNumber;
|
|
6114
|
+
adjustment_id?: string;
|
|
6115
|
+
adjustment_account_id?: string;
|
|
6116
|
+
account_index?: number;
|
|
6117
|
+
view_serial_number?: SerialNumber;
|
|
6118
|
+
type:
|
|
6119
|
+
| "invoice"
|
|
6120
|
+
| "return_invoice"
|
|
6121
|
+
| "payment"
|
|
6122
|
+
| "refund"
|
|
6123
|
+
| "adjustment";
|
|
6124
|
+
amount: number;
|
|
6125
|
+
is_linked_txn?: boolean;
|
|
6126
|
+
}[];
|
|
6127
|
+
};
|
|
6128
|
+
account_index?: number;
|
|
6129
|
+
}[];
|
|
6130
|
+
teams: string[];
|
|
6131
|
+
transaction_processed: boolean;
|
|
6132
|
+
company_namespace: string[];
|
|
6133
|
+
}
|
|
6134
|
+
export namespace Find {
|
|
6135
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
6136
|
+
_id?: string[] | string;
|
|
6137
|
+
"creator._id"?: string[] | string;
|
|
6138
|
+
"accounts.type"?: string;
|
|
6139
|
+
"accounts.accountHolder"?: string;
|
|
6140
|
+
from_time?: number;
|
|
6141
|
+
to_time?: number;
|
|
6142
|
+
from_createdAt?: number;
|
|
6143
|
+
to_createdAt?: number;
|
|
6144
|
+
from_updatedAt?: number;
|
|
6145
|
+
[key: string]: any; // integration_meta.
|
|
6146
|
+
};
|
|
6147
|
+
export interface Result extends DefaultPaginationResult {
|
|
6148
|
+
data: AdjustAccountSchema[];
|
|
6149
|
+
absolute_total: number;
|
|
6150
|
+
page_total: number;
|
|
6151
|
+
}
|
|
6152
|
+
}
|
|
6153
|
+
|
|
6154
|
+
export namespace Get {
|
|
6155
|
+
export type ID = string;
|
|
6156
|
+
export interface Params {}
|
|
6157
|
+
export type Result = AdjustAccountSchema;
|
|
6158
|
+
}
|
|
6159
|
+
export namespace Create {
|
|
6160
|
+
export type Body = CreateBody;
|
|
6161
|
+
export type Result = AdjustAccountSchema;
|
|
6162
|
+
}
|
|
6163
|
+
}
|
|
6164
|
+
|
|
5883
6165
|
export namespace AdjustInventory {
|
|
5884
6166
|
interface VariantOfAdjustInventory {
|
|
5885
6167
|
variant: string;
|