repzo 1.0.65 → 1.0.67
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 +13 -0
- package/lib/index.js +26 -0
- package/lib/types/index.d.ts +143 -4
- package/package.json +1 -1
- package/src/index.ts +38 -0
- package/src/types/index.ts +145 -4
package/lib/index.d.ts
CHANGED
|
@@ -670,6 +670,19 @@ export default class Repzo {
|
|
|
670
670
|
body: Service.ReceivingMaterial.Update.Body
|
|
671
671
|
) => Promise<Service.ReceivingMaterial.Update.Result>;
|
|
672
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
|
+
};
|
|
673
686
|
transfer: {
|
|
674
687
|
_path: string;
|
|
675
688
|
find: (
|
package/lib/index.js
CHANGED
|
@@ -1368,6 +1368,32 @@ export default class Repzo {
|
|
|
1368
1368
|
return res;
|
|
1369
1369
|
},
|
|
1370
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
|
+
};
|
|
1371
1397
|
this.transfer = {
|
|
1372
1398
|
_path: "/transfer",
|
|
1373
1399
|
find: async (params) => {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -5665,8 +5665,8 @@ export declare namespace Service {
|
|
|
5665
5665
|
from: string | Warehouse.WarehouseSchema;
|
|
5666
5666
|
to: string | Warehouse.WarehouseSchema;
|
|
5667
5667
|
time: number;
|
|
5668
|
-
creator: AdminCreator | RepCreator
|
|
5669
|
-
editor?: AdminCreator | RepCreator
|
|
5668
|
+
creator: AdminCreator | RepCreator;
|
|
5669
|
+
editor?: AdminCreator | RepCreator;
|
|
5670
5670
|
sync_id: string;
|
|
5671
5671
|
variants: {
|
|
5672
5672
|
_id: string;
|
|
@@ -5694,8 +5694,8 @@ export declare namespace Service {
|
|
|
5694
5694
|
business_day?: string;
|
|
5695
5695
|
document_type?: "receiving-material";
|
|
5696
5696
|
supplier?: string;
|
|
5697
|
-
createdAt:
|
|
5698
|
-
updatedAt:
|
|
5697
|
+
createdAt: string;
|
|
5698
|
+
updatedAt: string;
|
|
5699
5699
|
}
|
|
5700
5700
|
interface CreateBody {
|
|
5701
5701
|
from: string;
|
|
@@ -6037,6 +6037,145 @@ export declare namespace Service {
|
|
|
6037
6037
|
}
|
|
6038
6038
|
export {};
|
|
6039
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: string;
|
|
6098
|
+
updatedAt: string;
|
|
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
|
+
}
|
|
6040
6179
|
namespace AdjustInventory {
|
|
6041
6180
|
interface VariantOfAdjustInventory {
|
|
6042
6181
|
variant: string;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1906,6 +1906,7 @@ export default class Repzo {
|
|
|
1906
1906
|
return res;
|
|
1907
1907
|
},
|
|
1908
1908
|
};
|
|
1909
|
+
|
|
1909
1910
|
receivingMaterial = {
|
|
1910
1911
|
_path: "/receiving-material",
|
|
1911
1912
|
|
|
@@ -1954,6 +1955,43 @@ export default class Repzo {
|
|
|
1954
1955
|
return res;
|
|
1955
1956
|
},
|
|
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
|
+
|
|
1957
1995
|
transfer = {
|
|
1958
1996
|
_path: "/transfer",
|
|
1959
1997
|
find: async (
|
package/src/types/index.ts
CHANGED
|
@@ -5653,8 +5653,8 @@ export namespace Service {
|
|
|
5653
5653
|
from: string | Warehouse.WarehouseSchema;
|
|
5654
5654
|
to: string | Warehouse.WarehouseSchema;
|
|
5655
5655
|
time: number;
|
|
5656
|
-
creator: AdminCreator | RepCreator
|
|
5657
|
-
editor?: AdminCreator | RepCreator
|
|
5656
|
+
creator: AdminCreator | RepCreator;
|
|
5657
|
+
editor?: AdminCreator | RepCreator;
|
|
5658
5658
|
sync_id: string;
|
|
5659
5659
|
variants: {
|
|
5660
5660
|
_id: string;
|
|
@@ -5682,8 +5682,8 @@ export namespace Service {
|
|
|
5682
5682
|
business_day?: string;
|
|
5683
5683
|
document_type?: "receiving-material";
|
|
5684
5684
|
supplier?: string;
|
|
5685
|
-
createdAt:
|
|
5686
|
-
updatedAt:
|
|
5685
|
+
createdAt: string;
|
|
5686
|
+
updatedAt: string;
|
|
5687
5687
|
}
|
|
5688
5688
|
export interface CreateBody {
|
|
5689
5689
|
from: string;
|
|
@@ -6021,6 +6021,147 @@ export namespace Service {
|
|
|
6021
6021
|
}
|
|
6022
6022
|
}
|
|
6023
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: string;
|
|
6082
|
+
updatedAt: string;
|
|
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
|
+
|
|
6024
6165
|
export namespace AdjustInventory {
|
|
6025
6166
|
interface VariantOfAdjustInventory {
|
|
6026
6167
|
variant: string;
|