repzo 1.0.285 → 1.0.287
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 +18 -2
- package/lib/index.js +32 -0
- package/lib/types/index.d.ts +170 -0
- package/package.json +1 -1
- package/src/index.ts +73 -0
- package/src/oas/item-status-type.yaml +323 -0
- package/src/types/index.ts +274 -0
package/lib/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export declare const end_points: {
|
|
|
12
12
|
readonly MEASUREUNIT_FAMILY: "measureunit-family";
|
|
13
13
|
readonly MEDIA: "media";
|
|
14
14
|
readonly CYCLES: "cycles";
|
|
15
|
+
readonly CYCLE_REPORT: "cycle-report";
|
|
15
16
|
readonly PRICELIST: "pricelists";
|
|
16
17
|
readonly PRICELIST_ITEM: "pricelistsitems";
|
|
17
18
|
readonly TEAM: "teams";
|
|
@@ -58,6 +59,7 @@ export declare const end_points: {
|
|
|
58
59
|
readonly STORECHECK_TEMPLATE: "storecheck-template";
|
|
59
60
|
readonly ACTIVITY_STORECHECK: "activity-storecheck";
|
|
60
61
|
readonly ACTIVITY_ITEM_STATUS: "activity-item-status";
|
|
62
|
+
readonly ITEM_STATUS_TYPE: "item-status-type";
|
|
61
63
|
readonly ADJUST_INVENTORY: "adjust-inventory";
|
|
62
64
|
readonly INVENTORY: "inventory";
|
|
63
65
|
readonly INTEGRATION_APP: "integration-app";
|
|
@@ -147,7 +149,7 @@ export declare const end_points: {
|
|
|
147
149
|
readonly RESERVATION: "reservation";
|
|
148
150
|
};
|
|
149
151
|
export type EndPoints = (typeof end_points)[keyof typeof end_points];
|
|
150
|
-
export declare const availableService: readonly ["client", "product", "variant", "category", "sub_category", "brand", "product_group", "tax", "measureunit", "measureunitFamily", "media", "priceList", "priceListItem", "team", "returnReason", "rep", "tag", "warehouse", "route", "productModifiersGroup", "channel", "speciality", "clientContact", "paymentTerm", "bank", "bank_list", "customStatus", "customList", "customListItem", "inventoryAdjustmentReason", "workorder", "workorderRequest", "supplier", "quickConvertToPdf", "visit", "activityFeedback", "activityFeedbackV2", "feedbackOption", "invoice", "proforma", "payment", "refund", "settlement", "voidSettlement", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "activityItemStatus", "adjustInventory", "inventory", "integrationApp", "joinActionsWebHook", "patchAction", "updateIntegrationMeta", "assetPartType", "assetPart", "assetPartUnit", "assetPartReceival", "assetPartTransfer", "returnAssetPartUnit", "storeAssetPartUnit", "ocrInvoiceJobTemplate", "ocrInvoiceJobGroup", "activityAiSalesOrder", "ocrInvoiceJob", "ocrInvoiceJobPage", "settings", "mailUnsubscribe", "approvalRequest", "safeInvoiceSerialCounter", "clientLocation", "assetType", "asset", "assetUnit", "workorderPortal", "approval", "workorderCategory", "contract", "contractInstallment", "repBalanceSummary", "workorderPortalLink", "customField", "salesAnalyticsReport", "clmPresentation", "clmSequence", "clmSlide", "clmFetch", "pdfMergeField", "visitReason", "targetRule", "plan", "calendar", "lineTarget", "bulkImport"];
|
|
152
|
+
export declare const availableService: readonly ["client", "product", "variant", "category", "sub_category", "brand", "product_group", "tax", "measureunit", "measureunitFamily", "media", "priceList", "priceListItem", "team", "returnReason", "rep", "tag", "warehouse", "route", "productModifiersGroup", "channel", "speciality", "clientContact", "paymentTerm", "bank", "bank_list", "customStatus", "customList", "customListItem", "inventoryAdjustmentReason", "workorder", "workorderRequest", "supplier", "quickConvertToPdf", "visit", "activityFeedback", "activityFeedbackV2", "feedbackOption", "invoice", "proforma", "payment", "refund", "settlement", "voidSettlement", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "activityItemStatus", "itemStatusType", "adjustInventory", "inventory", "integrationApp", "joinActionsWebHook", "patchAction", "updateIntegrationMeta", "assetPartType", "assetPart", "assetPartUnit", "assetPartReceival", "assetPartTransfer", "returnAssetPartUnit", "storeAssetPartUnit", "ocrInvoiceJobTemplate", "ocrInvoiceJobGroup", "activityAiSalesOrder", "ocrInvoiceJob", "ocrInvoiceJobPage", "settings", "mailUnsubscribe", "approvalRequest", "safeInvoiceSerialCounter", "clientLocation", "assetType", "asset", "assetUnit", "workorderPortal", "approval", "workorderCategory", "contract", "contractInstallment", "repBalanceSummary", "workorderPortalLink", "customField", "salesAnalyticsReport", "clmPresentation", "clmSequence", "clmSlide", "clmFetch", "pdfMergeField", "visitReason", "targetRule", "plan", "calendar", "lineTarget", "bulkImport"];
|
|
151
153
|
export type AvailableService = (typeof availableService)[number];
|
|
152
154
|
export default class Repzo {
|
|
153
155
|
private svAPIEndpoint;
|
|
@@ -172,6 +174,7 @@ export default class Repzo {
|
|
|
172
174
|
readonly MEASUREUNIT_FAMILY: "measureunit-family";
|
|
173
175
|
readonly MEDIA: "media";
|
|
174
176
|
readonly CYCLES: "cycles";
|
|
177
|
+
readonly CYCLE_REPORT: "cycle-report";
|
|
175
178
|
readonly PRICELIST: "pricelists";
|
|
176
179
|
readonly PRICELIST_ITEM: "pricelistsitems";
|
|
177
180
|
readonly TEAM: "teams";
|
|
@@ -218,6 +221,7 @@ export default class Repzo {
|
|
|
218
221
|
readonly STORECHECK_TEMPLATE: "storecheck-template";
|
|
219
222
|
readonly ACTIVITY_STORECHECK: "activity-storecheck";
|
|
220
223
|
readonly ACTIVITY_ITEM_STATUS: "activity-item-status";
|
|
224
|
+
readonly ITEM_STATUS_TYPE: "item-status-type";
|
|
221
225
|
readonly ADJUST_INVENTORY: "adjust-inventory";
|
|
222
226
|
readonly INVENTORY: "inventory";
|
|
223
227
|
readonly INTEGRATION_APP: "integration-app";
|
|
@@ -312,7 +316,7 @@ export default class Repzo {
|
|
|
312
316
|
private _update;
|
|
313
317
|
private _patch;
|
|
314
318
|
private _delete;
|
|
315
|
-
available_services: readonly ["client", "product", "variant", "category", "sub_category", "brand", "product_group", "tax", "measureunit", "measureunitFamily", "media", "priceList", "priceListItem", "team", "returnReason", "rep", "tag", "warehouse", "route", "productModifiersGroup", "channel", "speciality", "clientContact", "paymentTerm", "bank", "bank_list", "customStatus", "customList", "customListItem", "inventoryAdjustmentReason", "workorder", "workorderRequest", "supplier", "quickConvertToPdf", "visit", "activityFeedback", "activityFeedbackV2", "feedbackOption", "invoice", "proforma", "payment", "refund", "settlement", "voidSettlement", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "activityItemStatus", "adjustInventory", "inventory", "integrationApp", "joinActionsWebHook", "patchAction", "updateIntegrationMeta", "assetPartType", "assetPart", "assetPartUnit", "assetPartReceival", "assetPartTransfer", "returnAssetPartUnit", "storeAssetPartUnit", "ocrInvoiceJobTemplate", "ocrInvoiceJobGroup", "activityAiSalesOrder", "ocrInvoiceJob", "ocrInvoiceJobPage", "settings", "mailUnsubscribe", "approvalRequest", "safeInvoiceSerialCounter", "clientLocation", "assetType", "asset", "assetUnit", "workorderPortal", "approval", "workorderCategory", "contract", "contractInstallment", "repBalanceSummary", "workorderPortalLink", "customField", "salesAnalyticsReport", "clmPresentation", "clmSequence", "clmSlide", "clmFetch", "pdfMergeField", "visitReason", "targetRule", "plan", "calendar", "lineTarget", "bulkImport"];
|
|
319
|
+
available_services: readonly ["client", "product", "variant", "category", "sub_category", "brand", "product_group", "tax", "measureunit", "measureunitFamily", "media", "priceList", "priceListItem", "team", "returnReason", "rep", "tag", "warehouse", "route", "productModifiersGroup", "channel", "speciality", "clientContact", "paymentTerm", "bank", "bank_list", "customStatus", "customList", "customListItem", "inventoryAdjustmentReason", "workorder", "workorderRequest", "supplier", "quickConvertToPdf", "visit", "activityFeedback", "activityFeedbackV2", "feedbackOption", "invoice", "proforma", "payment", "refund", "settlement", "voidSettlement", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "activityItemStatus", "itemStatusType", "adjustInventory", "inventory", "integrationApp", "joinActionsWebHook", "patchAction", "updateIntegrationMeta", "assetPartType", "assetPart", "assetPartUnit", "assetPartReceival", "assetPartTransfer", "returnAssetPartUnit", "storeAssetPartUnit", "ocrInvoiceJobTemplate", "ocrInvoiceJobGroup", "activityAiSalesOrder", "ocrInvoiceJob", "ocrInvoiceJobPage", "settings", "mailUnsubscribe", "approvalRequest", "safeInvoiceSerialCounter", "clientLocation", "assetType", "asset", "assetUnit", "workorderPortal", "approval", "workorderCategory", "contract", "contractInstallment", "repBalanceSummary", "workorderPortalLink", "customField", "salesAnalyticsReport", "clmPresentation", "clmSequence", "clmSlide", "clmFetch", "pdfMergeField", "visitReason", "targetRule", "plan", "calendar", "lineTarget", "bulkImport"];
|
|
316
320
|
generateUUID: ({ prefix, suffix, length, }: {
|
|
317
321
|
prefix?: string;
|
|
318
322
|
suffix?: string;
|
|
@@ -737,6 +741,14 @@ export default class Repzo {
|
|
|
737
741
|
create: (body: Service.ActivityItemStatus.Create.Body) => Promise<Service.ActivityItemStatus.Create.Result>;
|
|
738
742
|
update: (id: Service.ActivityItemStatus.Update.ID, body: Service.ActivityItemStatus.Update.Body) => Promise<Service.ActivityItemStatus.Update.Result>;
|
|
739
743
|
};
|
|
744
|
+
itemStatusType: {
|
|
745
|
+
_path: "item-status-type";
|
|
746
|
+
find: (params?: Service.ItemStatusType.Find.Params) => Promise<Service.ItemStatusType.Find.Result>;
|
|
747
|
+
get: (id: Service.ItemStatusType.Get.ID) => Promise<Service.ItemStatusType.Get.Result>;
|
|
748
|
+
create: (body: Service.ItemStatusType.Create.Body) => Promise<Service.ItemStatusType.Create.Result>;
|
|
749
|
+
update: (id: Service.ItemStatusType.Update.ID, body: Service.ItemStatusType.Update.Body) => Promise<Service.ItemStatusType.Update.Result>;
|
|
750
|
+
remove: (id: Service.ItemStatusType.Remove.ID) => Promise<Service.ItemStatusType.Remove.Result>;
|
|
751
|
+
};
|
|
740
752
|
adjustInventory: {
|
|
741
753
|
_path: "adjust-inventory";
|
|
742
754
|
find: (params?: Service.AdjustInventory.Find.Params) => Promise<Service.AdjustInventory.Find.Result>;
|
|
@@ -1207,6 +1219,10 @@ export default class Repzo {
|
|
|
1207
1219
|
find: (params?: Service.Cycle.Find.Params) => Promise<Service.Cycle.Find.Result>;
|
|
1208
1220
|
get: (id: Service.Cycle.Get.ID, params?: Service.Cycle.Get.Params) => Promise<Service.Cycle.Get.Result>;
|
|
1209
1221
|
};
|
|
1222
|
+
cycleReport: {
|
|
1223
|
+
_path: "cycle-report";
|
|
1224
|
+
find: (params?: Service.CycleReport.Find.Params) => Promise<Service.CycleReport.Find.Result>;
|
|
1225
|
+
};
|
|
1210
1226
|
promotions: {
|
|
1211
1227
|
_path: "promotions";
|
|
1212
1228
|
find: (params?: Service.Promotion.Find.Params) => Promise<Service.Promotion.Find.Result>;
|
package/lib/index.js
CHANGED
|
@@ -14,6 +14,7 @@ export const end_points = {
|
|
|
14
14
|
MEASUREUNIT_FAMILY: "measureunit-family",
|
|
15
15
|
MEDIA: "media",
|
|
16
16
|
CYCLES: "cycles",
|
|
17
|
+
CYCLE_REPORT: "cycle-report",
|
|
17
18
|
PRICELIST: "pricelists",
|
|
18
19
|
PRICELIST_ITEM: "pricelistsitems",
|
|
19
20
|
TEAM: "teams",
|
|
@@ -60,6 +61,7 @@ export const end_points = {
|
|
|
60
61
|
STORECHECK_TEMPLATE: "storecheck-template",
|
|
61
62
|
ACTIVITY_STORECHECK: "activity-storecheck",
|
|
62
63
|
ACTIVITY_ITEM_STATUS: "activity-item-status",
|
|
64
|
+
ITEM_STATUS_TYPE: "item-status-type",
|
|
63
65
|
ADJUST_INVENTORY: "adjust-inventory",
|
|
64
66
|
INVENTORY: "inventory",
|
|
65
67
|
INTEGRATION_APP: "integration-app",
|
|
@@ -204,6 +206,7 @@ export const availableService = [
|
|
|
204
206
|
"storecheckTemplate",
|
|
205
207
|
"activityStorecheck",
|
|
206
208
|
"activityItemStatus",
|
|
209
|
+
"itemStatusType",
|
|
207
210
|
"adjustInventory",
|
|
208
211
|
"inventory",
|
|
209
212
|
"integrationApp",
|
|
@@ -1390,6 +1393,28 @@ class Repzo {
|
|
|
1390
1393
|
return res;
|
|
1391
1394
|
},
|
|
1392
1395
|
};
|
|
1396
|
+
this.itemStatusType = {
|
|
1397
|
+
_path: Repzo._end_points.ITEM_STATUS_TYPE,
|
|
1398
|
+
find: async (params) => {
|
|
1399
|
+
let res = await this._fetch(this.svAPIEndpoint, this.itemStatusType._path, params);
|
|
1400
|
+
return res;
|
|
1401
|
+
},
|
|
1402
|
+
get: async (id) => {
|
|
1403
|
+
return await this._fetch(this.svAPIEndpoint, this.itemStatusType._path + `/${id}`);
|
|
1404
|
+
},
|
|
1405
|
+
create: async (body) => {
|
|
1406
|
+
let res = await this._create(this.svAPIEndpoint, this.itemStatusType._path, body);
|
|
1407
|
+
return res;
|
|
1408
|
+
},
|
|
1409
|
+
update: async (id, body) => {
|
|
1410
|
+
let res = await this._update(this.svAPIEndpoint, this.itemStatusType._path + `/${id}`, body);
|
|
1411
|
+
return res;
|
|
1412
|
+
},
|
|
1413
|
+
remove: async (id) => {
|
|
1414
|
+
let res = await this._delete(this.svAPIEndpoint, this.itemStatusType._path + `/${id}`);
|
|
1415
|
+
return res;
|
|
1416
|
+
},
|
|
1417
|
+
};
|
|
1393
1418
|
this.adjustInventory = {
|
|
1394
1419
|
_path: Repzo._end_points.ADJUST_INVENTORY,
|
|
1395
1420
|
find: async (params) => {
|
|
@@ -2400,6 +2425,13 @@ class Repzo {
|
|
|
2400
2425
|
return await this._fetch(this.svAPIEndpoint, this.cycle._path + `/${id}`, params);
|
|
2401
2426
|
},
|
|
2402
2427
|
};
|
|
2428
|
+
this.cycleReport = {
|
|
2429
|
+
_path: Repzo._end_points.CYCLE_REPORT,
|
|
2430
|
+
find: async (params) => {
|
|
2431
|
+
let res = await this._fetch(this.svAPIEndpoint, this.cycleReport._path, params);
|
|
2432
|
+
return res;
|
|
2433
|
+
},
|
|
2434
|
+
};
|
|
2403
2435
|
this.promotions = {
|
|
2404
2436
|
_path: Repzo._end_points.PROMOTIONS,
|
|
2405
2437
|
find: async (params) => {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -6877,6 +6877,8 @@ export declare namespace Service {
|
|
|
6877
6877
|
signature?: StringId;
|
|
6878
6878
|
bypass_freshness_window_code_entered?: boolean;
|
|
6879
6879
|
promotion_freshness_window_exceeded?: boolean;
|
|
6880
|
+
total_word?: string;
|
|
6881
|
+
total_local_word?: string;
|
|
6880
6882
|
createdAt: string;
|
|
6881
6883
|
updatedAt: string;
|
|
6882
6884
|
__v: number;
|
|
@@ -8135,6 +8137,7 @@ export declare namespace Service {
|
|
|
8135
8137
|
teams: string[] | Team.TeamSchema[];
|
|
8136
8138
|
items_count?: number;
|
|
8137
8139
|
total_items_base_unit_qty?: number;
|
|
8140
|
+
total_measure_unit_qty?: number;
|
|
8138
8141
|
company_namespace: string[];
|
|
8139
8142
|
transaction_processed: boolean;
|
|
8140
8143
|
status: "pending" | "approved" | "processing" | "rejected" | "processed";
|
|
@@ -8572,6 +8575,114 @@ export declare namespace Service {
|
|
|
8572
8575
|
}
|
|
8573
8576
|
export {};
|
|
8574
8577
|
}
|
|
8578
|
+
namespace CycleReport {
|
|
8579
|
+
type CycleStatus = "pending" | "approved" | "processing" | "rejected";
|
|
8580
|
+
type ProformaDoc = Pick<Proforma.Data, "_id" | "class" | "serial_number" | "return_serial_number" | "client_name" | "client_id" | "issue_date" | "creator" | "time" | "createdAt" | "currency" | "teams" | "total_word" | "total_local_word" | "total">;
|
|
8581
|
+
type TransferDoc = Pick<Transfer.Data, "_id" | "serial_number" | "type" | "time" | "createdAt" | "from" | "to" | "items_count" | "total_items_base_unit_qty" | "total_measure_unit_qty"> & {
|
|
8582
|
+
from_name?: string;
|
|
8583
|
+
to_name?: string;
|
|
8584
|
+
};
|
|
8585
|
+
type ApprovalRequestDoc = Pick<ApprovalRequest.Data, "_id" | "serial_number" | "type" | "subtype" | "time" | "createdAt" | "creator" | "reference_name" | "reference_local_name">;
|
|
8586
|
+
type ReceivingMaterialDoc = Pick<ReceivingMaterial.Data, "_id" | "to" | "serial_number" | "time" | "createdAt" | "from" | "items_count" | "total_items_base_unit_qty" | "total_measure_unit_qty"> & {
|
|
8587
|
+
to_name?: string;
|
|
8588
|
+
};
|
|
8589
|
+
type AssetPartTransferDoc = Pick<AssetPartTransfer.Data, "_id" | "type" | "from_name" | "to_name" | "creator" | "serial_number" | "asset_part_units_count" | "total_asset_part_units_qty" | "time" | "createdAt" | "from" | "to">;
|
|
8590
|
+
type AdjustInventoryDoc = Pick<AdjustInventory.Data, "_id">;
|
|
8591
|
+
type ReturnAssetPartUnitDoc = Pick<ReturnAssetPartUnit.Data, "_id" | "warehouse" | "warehouse_name" | "creator" | "serial_number" | "asset_part_units_count" | "total_asset_part_units_qty" | "time" | "createdAt" | "client" | "client_name">;
|
|
8592
|
+
type StoreAssetPartUnitDoc = Pick<StoreAssetPartUnit.Data, "_id" | "warehouse" | "warehouse_name" | "creator" | "serial_number" | "asset_part_units_count" | "total_asset_part_units_qty" | "time" | "createdAt">;
|
|
8593
|
+
type ActivityFormV2ResultDoc = Pick<ActivityFormV2Result.Data, "_id" | "client" | "client_name" | "creator" | "serial_number" | "time" | "createdAt" | "form_id"> & {
|
|
8594
|
+
form_name?: string;
|
|
8595
|
+
};
|
|
8596
|
+
interface SchemaBase {
|
|
8597
|
+
_id: string;
|
|
8598
|
+
document_id: string;
|
|
8599
|
+
status: CycleStatus;
|
|
8600
|
+
node?: AdminCreator | RepCreator | ClientCreator;
|
|
8601
|
+
creator?: AdminCreator | RepCreator | ClientCreator;
|
|
8602
|
+
current_nodes: (AdminCreator | RepCreator | ClientCreator)[];
|
|
8603
|
+
stage?: number;
|
|
8604
|
+
stageName?: string;
|
|
8605
|
+
company_namespace: string[];
|
|
8606
|
+
note?: string;
|
|
8607
|
+
serial_number: SerialNumber;
|
|
8608
|
+
version: number;
|
|
8609
|
+
createdAt: string;
|
|
8610
|
+
updatedAt: string;
|
|
8611
|
+
__v: number;
|
|
8612
|
+
}
|
|
8613
|
+
export type Schema = (SchemaBase & {
|
|
8614
|
+
document_type: "proforma";
|
|
8615
|
+
document: ProformaDoc;
|
|
8616
|
+
}) | (SchemaBase & {
|
|
8617
|
+
document_type: "transfer";
|
|
8618
|
+
document: TransferDoc;
|
|
8619
|
+
}) | (SchemaBase & {
|
|
8620
|
+
document_type: "approval-request";
|
|
8621
|
+
document: ApprovalRequestDoc;
|
|
8622
|
+
}) | (SchemaBase & {
|
|
8623
|
+
document_type: "receiving-material";
|
|
8624
|
+
document: ReceivingMaterialDoc;
|
|
8625
|
+
}) | (SchemaBase & {
|
|
8626
|
+
document_type: "asset-part-transfer";
|
|
8627
|
+
document: AssetPartTransferDoc;
|
|
8628
|
+
}) | (SchemaBase & {
|
|
8629
|
+
document_type: "adjust-inventory";
|
|
8630
|
+
document: AdjustInventoryDoc;
|
|
8631
|
+
}) | (SchemaBase & {
|
|
8632
|
+
document_type: "return-asset-part-unit";
|
|
8633
|
+
document: ReturnAssetPartUnitDoc;
|
|
8634
|
+
}) | (SchemaBase & {
|
|
8635
|
+
document_type: "store-asset-part-unit";
|
|
8636
|
+
document: StoreAssetPartUnitDoc;
|
|
8637
|
+
}) | (SchemaBase & {
|
|
8638
|
+
document_type: "activity-form-v2-result";
|
|
8639
|
+
document: ActivityFormV2ResultDoc;
|
|
8640
|
+
});
|
|
8641
|
+
export type Data = Schema;
|
|
8642
|
+
interface Totals {
|
|
8643
|
+
"approval-request"?: number;
|
|
8644
|
+
"receiving-material"?: number;
|
|
8645
|
+
"store-asset-part-unit"?: number;
|
|
8646
|
+
"return-asset-part-unit"?: number;
|
|
8647
|
+
transfer?: number;
|
|
8648
|
+
proforma?: number;
|
|
8649
|
+
"adjust-inventory"?: number;
|
|
8650
|
+
"activity-form-v2-result"?: number;
|
|
8651
|
+
"asset-part-transfer"?: number;
|
|
8652
|
+
}
|
|
8653
|
+
export namespace Find {
|
|
8654
|
+
type Params = DefaultPaginationQueryParams & {
|
|
8655
|
+
sortBy?: {
|
|
8656
|
+
field: "_id";
|
|
8657
|
+
type: "asc" | "desc";
|
|
8658
|
+
}[];
|
|
8659
|
+
_id?: StringId | StringId[];
|
|
8660
|
+
document_id?: StringId | StringId[];
|
|
8661
|
+
document_type?: Schema["document_type"] | Schema["document_type"][];
|
|
8662
|
+
status?: CycleStatus | CycleStatus[];
|
|
8663
|
+
"creator._id"?: StringId | StringId[];
|
|
8664
|
+
disabled?: boolean;
|
|
8665
|
+
from?: number;
|
|
8666
|
+
to?: number;
|
|
8667
|
+
from_updatedAt?: number;
|
|
8668
|
+
to_updatedAt?: number;
|
|
8669
|
+
from_createdAt?: number;
|
|
8670
|
+
to_createdAt?: number;
|
|
8671
|
+
from__id?: StringId;
|
|
8672
|
+
to__id?: StringId;
|
|
8673
|
+
approval?: StringId | StringId[];
|
|
8674
|
+
"current_nodes.type"?: string | string[];
|
|
8675
|
+
"current_nodes.rep"?: StringId | StringId[];
|
|
8676
|
+
"current_nodes.admin"?: StringId | StringId[];
|
|
8677
|
+
[key: string]: any;
|
|
8678
|
+
};
|
|
8679
|
+
interface Result extends DefaultPaginationResult {
|
|
8680
|
+
data: Schema[];
|
|
8681
|
+
totals?: Totals;
|
|
8682
|
+
}
|
|
8683
|
+
}
|
|
8684
|
+
export {};
|
|
8685
|
+
}
|
|
8575
8686
|
namespace Transfer {
|
|
8576
8687
|
export interface VariantTransfer {
|
|
8577
8688
|
variant_id: string;
|
|
@@ -8940,6 +9051,7 @@ export declare namespace Service {
|
|
|
8940
9051
|
updatedAt: string;
|
|
8941
9052
|
__v: number;
|
|
8942
9053
|
}
|
|
9054
|
+
export type Data = Schema;
|
|
8943
9055
|
export interface PopulatedData {
|
|
8944
9056
|
_id: StringId;
|
|
8945
9057
|
serial_number: SerialNumber;
|
|
@@ -14661,6 +14773,64 @@ export declare namespace Service {
|
|
|
14661
14773
|
type Result = Data;
|
|
14662
14774
|
}
|
|
14663
14775
|
}
|
|
14776
|
+
namespace ItemStatusType {
|
|
14777
|
+
interface Data {
|
|
14778
|
+
_id: StringId;
|
|
14779
|
+
name: string;
|
|
14780
|
+
local_name?: string;
|
|
14781
|
+
is_default: boolean;
|
|
14782
|
+
disabled: boolean;
|
|
14783
|
+
company_namespace: string[];
|
|
14784
|
+
creator: AdminCreator;
|
|
14785
|
+
editor?: AdminCreator;
|
|
14786
|
+
createdAt: Date;
|
|
14787
|
+
updatedAt: Date;
|
|
14788
|
+
__v?: number;
|
|
14789
|
+
}
|
|
14790
|
+
interface CreateBody {
|
|
14791
|
+
name: string;
|
|
14792
|
+
local_name?: string;
|
|
14793
|
+
is_default?: boolean;
|
|
14794
|
+
}
|
|
14795
|
+
interface UpdateBody {
|
|
14796
|
+
name?: string;
|
|
14797
|
+
local_name?: string;
|
|
14798
|
+
is_default?: boolean;
|
|
14799
|
+
disabled?: boolean;
|
|
14800
|
+
}
|
|
14801
|
+
namespace Find {
|
|
14802
|
+
type Params = DefaultPaginationQueryParams & {
|
|
14803
|
+
_id?: StringId | StringId[];
|
|
14804
|
+
name?: string | string[];
|
|
14805
|
+
disabled?: boolean;
|
|
14806
|
+
is_default?: boolean;
|
|
14807
|
+
sortBy?: {
|
|
14808
|
+
field: "_id";
|
|
14809
|
+
type: "asc" | "desc";
|
|
14810
|
+
}[];
|
|
14811
|
+
};
|
|
14812
|
+
interface Result extends DefaultPaginationResult {
|
|
14813
|
+
data: Data[];
|
|
14814
|
+
}
|
|
14815
|
+
}
|
|
14816
|
+
namespace Get {
|
|
14817
|
+
type ID = StringId;
|
|
14818
|
+
type Result = Data;
|
|
14819
|
+
}
|
|
14820
|
+
namespace Create {
|
|
14821
|
+
type Body = CreateBody;
|
|
14822
|
+
type Result = Data;
|
|
14823
|
+
}
|
|
14824
|
+
namespace Update {
|
|
14825
|
+
type ID = StringId;
|
|
14826
|
+
type Body = UpdateBody;
|
|
14827
|
+
type Result = Data;
|
|
14828
|
+
}
|
|
14829
|
+
namespace Remove {
|
|
14830
|
+
type ID = StringId;
|
|
14831
|
+
type Result = Data;
|
|
14832
|
+
}
|
|
14833
|
+
}
|
|
14664
14834
|
namespace ActivityPlanogram {
|
|
14665
14835
|
interface Data {
|
|
14666
14836
|
_id: string;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -24,6 +24,7 @@ export const end_points = {
|
|
|
24
24
|
MEASUREUNIT_FAMILY: "measureunit-family",
|
|
25
25
|
MEDIA: "media",
|
|
26
26
|
CYCLES: "cycles",
|
|
27
|
+
CYCLE_REPORT: "cycle-report",
|
|
27
28
|
PRICELIST: "pricelists",
|
|
28
29
|
PRICELIST_ITEM: "pricelistsitems",
|
|
29
30
|
TEAM: "teams",
|
|
@@ -70,6 +71,7 @@ export const end_points = {
|
|
|
70
71
|
STORECHECK_TEMPLATE: "storecheck-template",
|
|
71
72
|
ACTIVITY_STORECHECK: "activity-storecheck",
|
|
72
73
|
ACTIVITY_ITEM_STATUS: "activity-item-status",
|
|
74
|
+
ITEM_STATUS_TYPE: "item-status-type",
|
|
73
75
|
ADJUST_INVENTORY: "adjust-inventory",
|
|
74
76
|
INVENTORY: "inventory",
|
|
75
77
|
INTEGRATION_APP: "integration-app",
|
|
@@ -216,6 +218,7 @@ export const availableService = [
|
|
|
216
218
|
"storecheckTemplate",
|
|
217
219
|
"activityStorecheck",
|
|
218
220
|
"activityItemStatus",
|
|
221
|
+
"itemStatusType",
|
|
219
222
|
"adjustInventory",
|
|
220
223
|
"inventory",
|
|
221
224
|
"integrationApp",
|
|
@@ -3203,6 +3206,62 @@ export default class Repzo {
|
|
|
3203
3206
|
},
|
|
3204
3207
|
};
|
|
3205
3208
|
|
|
3209
|
+
itemStatusType = {
|
|
3210
|
+
_path: Repzo._end_points.ITEM_STATUS_TYPE,
|
|
3211
|
+
find: async (
|
|
3212
|
+
params?: Service.ItemStatusType.Find.Params,
|
|
3213
|
+
): Promise<Service.ItemStatusType.Find.Result> => {
|
|
3214
|
+
let res: Service.ItemStatusType.Find.Result = await this._fetch(
|
|
3215
|
+
this.svAPIEndpoint,
|
|
3216
|
+
this.itemStatusType._path,
|
|
3217
|
+
params,
|
|
3218
|
+
);
|
|
3219
|
+
return res;
|
|
3220
|
+
},
|
|
3221
|
+
|
|
3222
|
+
get: async (
|
|
3223
|
+
id: Service.ItemStatusType.Get.ID,
|
|
3224
|
+
): Promise<Service.ItemStatusType.Get.Result> => {
|
|
3225
|
+
return await this._fetch(
|
|
3226
|
+
this.svAPIEndpoint,
|
|
3227
|
+
this.itemStatusType._path + `/${id}`,
|
|
3228
|
+
);
|
|
3229
|
+
},
|
|
3230
|
+
|
|
3231
|
+
create: async (
|
|
3232
|
+
body: Service.ItemStatusType.Create.Body,
|
|
3233
|
+
): Promise<Service.ItemStatusType.Create.Result> => {
|
|
3234
|
+
let res = await this._create(
|
|
3235
|
+
this.svAPIEndpoint,
|
|
3236
|
+
this.itemStatusType._path,
|
|
3237
|
+
body,
|
|
3238
|
+
);
|
|
3239
|
+
return res;
|
|
3240
|
+
},
|
|
3241
|
+
|
|
3242
|
+
update: async (
|
|
3243
|
+
id: Service.ItemStatusType.Update.ID,
|
|
3244
|
+
body: Service.ItemStatusType.Update.Body,
|
|
3245
|
+
): Promise<Service.ItemStatusType.Update.Result> => {
|
|
3246
|
+
let res: Service.ItemStatusType.Update.Result = await this._update(
|
|
3247
|
+
this.svAPIEndpoint,
|
|
3248
|
+
this.itemStatusType._path + `/${id}`,
|
|
3249
|
+
body,
|
|
3250
|
+
);
|
|
3251
|
+
return res;
|
|
3252
|
+
},
|
|
3253
|
+
|
|
3254
|
+
remove: async (
|
|
3255
|
+
id: Service.ItemStatusType.Remove.ID,
|
|
3256
|
+
): Promise<Service.ItemStatusType.Remove.Result> => {
|
|
3257
|
+
let res: Service.ItemStatusType.Remove.Result = await this._delete(
|
|
3258
|
+
this.svAPIEndpoint,
|
|
3259
|
+
this.itemStatusType._path + `/${id}`,
|
|
3260
|
+
);
|
|
3261
|
+
return res;
|
|
3262
|
+
},
|
|
3263
|
+
};
|
|
3264
|
+
|
|
3206
3265
|
adjustInventory = {
|
|
3207
3266
|
_path: Repzo._end_points.ADJUST_INVENTORY,
|
|
3208
3267
|
find: async (
|
|
@@ -6032,6 +6091,20 @@ export default class Repzo {
|
|
|
6032
6091
|
},
|
|
6033
6092
|
};
|
|
6034
6093
|
|
|
6094
|
+
cycleReport = {
|
|
6095
|
+
_path: Repzo._end_points.CYCLE_REPORT,
|
|
6096
|
+
find: async (
|
|
6097
|
+
params?: Service.CycleReport.Find.Params,
|
|
6098
|
+
): Promise<Service.CycleReport.Find.Result> => {
|
|
6099
|
+
let res: Service.CycleReport.Find.Result = await this._fetch(
|
|
6100
|
+
this.svAPIEndpoint,
|
|
6101
|
+
this.cycleReport._path,
|
|
6102
|
+
params,
|
|
6103
|
+
);
|
|
6104
|
+
return res;
|
|
6105
|
+
},
|
|
6106
|
+
};
|
|
6107
|
+
|
|
6035
6108
|
promotions = {
|
|
6036
6109
|
_path: Repzo._end_points.PROMOTIONS,
|
|
6037
6110
|
find: async (
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
openapi: 3.0.3
|
|
2
|
+
info:
|
|
3
|
+
title: Repzo API - Item Status Type
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
description: OpenAPI specification for Repzo Item Status Type endpoints.
|
|
6
|
+
servers:
|
|
7
|
+
- url: https://sv.api.repzo.me
|
|
8
|
+
description: Production server
|
|
9
|
+
- url: https://staging.sv.api.repzo.me
|
|
10
|
+
description: Staging server
|
|
11
|
+
security:
|
|
12
|
+
- ApiKeyAuth: []
|
|
13
|
+
- JwtAuth: []
|
|
14
|
+
tags:
|
|
15
|
+
- name: Item Status Type
|
|
16
|
+
description: Operations for managing item status type records.
|
|
17
|
+
paths:
|
|
18
|
+
/item-status-type:
|
|
19
|
+
get:
|
|
20
|
+
tags:
|
|
21
|
+
- Item Status Type
|
|
22
|
+
summary: Find item status types
|
|
23
|
+
operationId: findItemStatusTypes
|
|
24
|
+
parameters:
|
|
25
|
+
- in: query
|
|
26
|
+
name: _id
|
|
27
|
+
description: Filter by one or more item status type IDs.
|
|
28
|
+
schema:
|
|
29
|
+
oneOf:
|
|
30
|
+
- type: string
|
|
31
|
+
- type: array
|
|
32
|
+
items:
|
|
33
|
+
type: string
|
|
34
|
+
- in: query
|
|
35
|
+
name: name
|
|
36
|
+
description: Filter by item status type name.
|
|
37
|
+
schema:
|
|
38
|
+
oneOf:
|
|
39
|
+
- type: string
|
|
40
|
+
- type: array
|
|
41
|
+
items:
|
|
42
|
+
type: string
|
|
43
|
+
- in: query
|
|
44
|
+
name: disabled
|
|
45
|
+
description: Filter by soft-delete state.
|
|
46
|
+
schema:
|
|
47
|
+
type: boolean
|
|
48
|
+
- in: query
|
|
49
|
+
name: is_default
|
|
50
|
+
description: Filter by namespace default state.
|
|
51
|
+
schema:
|
|
52
|
+
type: boolean
|
|
53
|
+
- in: query
|
|
54
|
+
name: per_page
|
|
55
|
+
description: Number of records per page.
|
|
56
|
+
schema:
|
|
57
|
+
type: integer
|
|
58
|
+
minimum: 1
|
|
59
|
+
maximum: 500
|
|
60
|
+
- in: query
|
|
61
|
+
name: page
|
|
62
|
+
description: Page number.
|
|
63
|
+
schema:
|
|
64
|
+
type: integer
|
|
65
|
+
minimum: 1
|
|
66
|
+
- in: query
|
|
67
|
+
name: sort
|
|
68
|
+
description: Field to sort by.
|
|
69
|
+
schema:
|
|
70
|
+
type: string
|
|
71
|
+
- in: query
|
|
72
|
+
name: sortPageOrder
|
|
73
|
+
description: Sort direction.
|
|
74
|
+
schema:
|
|
75
|
+
type: string
|
|
76
|
+
enum:
|
|
77
|
+
- asc
|
|
78
|
+
- dsc
|
|
79
|
+
responses:
|
|
80
|
+
"200":
|
|
81
|
+
description: A paginated list of item status types.
|
|
82
|
+
content:
|
|
83
|
+
application/json:
|
|
84
|
+
schema:
|
|
85
|
+
$ref: "#/components/schemas/ItemStatusTypeFindResult"
|
|
86
|
+
"401":
|
|
87
|
+
description: Unauthorized.
|
|
88
|
+
"500":
|
|
89
|
+
description: Internal server error.
|
|
90
|
+
post:
|
|
91
|
+
tags:
|
|
92
|
+
- Item Status Type
|
|
93
|
+
summary: Create an item status type
|
|
94
|
+
operationId: createItemStatusType
|
|
95
|
+
requestBody:
|
|
96
|
+
required: true
|
|
97
|
+
content:
|
|
98
|
+
application/json:
|
|
99
|
+
schema:
|
|
100
|
+
$ref: "#/components/schemas/ItemStatusTypeCreateBody"
|
|
101
|
+
responses:
|
|
102
|
+
"201":
|
|
103
|
+
description: Item status type created.
|
|
104
|
+
content:
|
|
105
|
+
application/json:
|
|
106
|
+
schema:
|
|
107
|
+
$ref: "#/components/schemas/ItemStatusType"
|
|
108
|
+
"400":
|
|
109
|
+
description: Bad request.
|
|
110
|
+
"401":
|
|
111
|
+
description: Unauthorized.
|
|
112
|
+
"500":
|
|
113
|
+
description: Internal server error.
|
|
114
|
+
/item-status-type/{id}:
|
|
115
|
+
get:
|
|
116
|
+
tags:
|
|
117
|
+
- Item Status Type
|
|
118
|
+
summary: Get an item status type by ID
|
|
119
|
+
operationId: getItemStatusType
|
|
120
|
+
parameters:
|
|
121
|
+
- in: path
|
|
122
|
+
name: id
|
|
123
|
+
required: true
|
|
124
|
+
description: Item status type ID.
|
|
125
|
+
schema:
|
|
126
|
+
type: string
|
|
127
|
+
responses:
|
|
128
|
+
"200":
|
|
129
|
+
description: Item status type details.
|
|
130
|
+
content:
|
|
131
|
+
application/json:
|
|
132
|
+
schema:
|
|
133
|
+
$ref: "#/components/schemas/ItemStatusType"
|
|
134
|
+
"401":
|
|
135
|
+
description: Unauthorized.
|
|
136
|
+
"404":
|
|
137
|
+
description: Item status type not found.
|
|
138
|
+
"500":
|
|
139
|
+
description: Internal server error.
|
|
140
|
+
put:
|
|
141
|
+
tags:
|
|
142
|
+
- Item Status Type
|
|
143
|
+
summary: Update an item status type
|
|
144
|
+
operationId: updateItemStatusType
|
|
145
|
+
parameters:
|
|
146
|
+
- in: path
|
|
147
|
+
name: id
|
|
148
|
+
required: true
|
|
149
|
+
description: Item status type ID.
|
|
150
|
+
schema:
|
|
151
|
+
type: string
|
|
152
|
+
requestBody:
|
|
153
|
+
required: true
|
|
154
|
+
content:
|
|
155
|
+
application/json:
|
|
156
|
+
schema:
|
|
157
|
+
$ref: "#/components/schemas/ItemStatusTypeUpdateBody"
|
|
158
|
+
responses:
|
|
159
|
+
"200":
|
|
160
|
+
description: Item status type updated.
|
|
161
|
+
content:
|
|
162
|
+
application/json:
|
|
163
|
+
schema:
|
|
164
|
+
$ref: "#/components/schemas/ItemStatusType"
|
|
165
|
+
"400":
|
|
166
|
+
description: Bad request.
|
|
167
|
+
"401":
|
|
168
|
+
description: Unauthorized.
|
|
169
|
+
"404":
|
|
170
|
+
description: Item status type not found.
|
|
171
|
+
"500":
|
|
172
|
+
description: Internal server error.
|
|
173
|
+
delete:
|
|
174
|
+
tags:
|
|
175
|
+
- Item Status Type
|
|
176
|
+
summary: Remove an item status type
|
|
177
|
+
operationId: removeItemStatusType
|
|
178
|
+
parameters:
|
|
179
|
+
- in: path
|
|
180
|
+
name: id
|
|
181
|
+
required: true
|
|
182
|
+
description: Item status type ID.
|
|
183
|
+
schema:
|
|
184
|
+
type: string
|
|
185
|
+
responses:
|
|
186
|
+
"200":
|
|
187
|
+
description: Item status type removed.
|
|
188
|
+
content:
|
|
189
|
+
application/json:
|
|
190
|
+
schema:
|
|
191
|
+
$ref: "#/components/schemas/ItemStatusType"
|
|
192
|
+
"400":
|
|
193
|
+
description: Bad request.
|
|
194
|
+
"401":
|
|
195
|
+
description: Unauthorized.
|
|
196
|
+
"404":
|
|
197
|
+
description: Item status type not found.
|
|
198
|
+
"500":
|
|
199
|
+
description: Internal server error.
|
|
200
|
+
components:
|
|
201
|
+
securitySchemes:
|
|
202
|
+
ApiKeyAuth:
|
|
203
|
+
type: apiKey
|
|
204
|
+
in: header
|
|
205
|
+
name: api-key
|
|
206
|
+
JwtAuth:
|
|
207
|
+
type: apiKey
|
|
208
|
+
in: header
|
|
209
|
+
name: Authorization
|
|
210
|
+
schemas:
|
|
211
|
+
ItemStatusTypeFindResult:
|
|
212
|
+
allOf:
|
|
213
|
+
- $ref: "#/components/schemas/PaginationResult"
|
|
214
|
+
- type: object
|
|
215
|
+
properties:
|
|
216
|
+
data:
|
|
217
|
+
type: array
|
|
218
|
+
items:
|
|
219
|
+
$ref: "#/components/schemas/ItemStatusType"
|
|
220
|
+
ItemStatusType:
|
|
221
|
+
type: object
|
|
222
|
+
properties:
|
|
223
|
+
_id:
|
|
224
|
+
type: string
|
|
225
|
+
name:
|
|
226
|
+
type: string
|
|
227
|
+
local_name:
|
|
228
|
+
type: string
|
|
229
|
+
is_default:
|
|
230
|
+
type: boolean
|
|
231
|
+
description: Whether this is the default item status type for the namespace.
|
|
232
|
+
disabled:
|
|
233
|
+
type: boolean
|
|
234
|
+
description: Soft-delete flag.
|
|
235
|
+
company_namespace:
|
|
236
|
+
type: array
|
|
237
|
+
items:
|
|
238
|
+
type: string
|
|
239
|
+
creator:
|
|
240
|
+
$ref: "#/components/schemas/UserRef"
|
|
241
|
+
editor:
|
|
242
|
+
$ref: "#/components/schemas/UserRef"
|
|
243
|
+
createdAt:
|
|
244
|
+
type: string
|
|
245
|
+
format: date-time
|
|
246
|
+
updatedAt:
|
|
247
|
+
type: string
|
|
248
|
+
format: date-time
|
|
249
|
+
__v:
|
|
250
|
+
type: number
|
|
251
|
+
required:
|
|
252
|
+
- _id
|
|
253
|
+
- name
|
|
254
|
+
- is_default
|
|
255
|
+
- disabled
|
|
256
|
+
- company_namespace
|
|
257
|
+
- creator
|
|
258
|
+
- createdAt
|
|
259
|
+
- updatedAt
|
|
260
|
+
ItemStatusTypeCreateBody:
|
|
261
|
+
type: object
|
|
262
|
+
properties:
|
|
263
|
+
name:
|
|
264
|
+
type: string
|
|
265
|
+
local_name:
|
|
266
|
+
type: string
|
|
267
|
+
is_default:
|
|
268
|
+
type: boolean
|
|
269
|
+
default: false
|
|
270
|
+
required:
|
|
271
|
+
- name
|
|
272
|
+
ItemStatusTypeUpdateBody:
|
|
273
|
+
type: object
|
|
274
|
+
properties:
|
|
275
|
+
name:
|
|
276
|
+
type: string
|
|
277
|
+
local_name:
|
|
278
|
+
type: string
|
|
279
|
+
is_default:
|
|
280
|
+
type: boolean
|
|
281
|
+
disabled:
|
|
282
|
+
type: boolean
|
|
283
|
+
UserRef:
|
|
284
|
+
type: object
|
|
285
|
+
properties:
|
|
286
|
+
_id:
|
|
287
|
+
type: string
|
|
288
|
+
type:
|
|
289
|
+
type: string
|
|
290
|
+
enum:
|
|
291
|
+
- admin
|
|
292
|
+
name:
|
|
293
|
+
type: string
|
|
294
|
+
admin:
|
|
295
|
+
type: string
|
|
296
|
+
required:
|
|
297
|
+
- _id
|
|
298
|
+
- type
|
|
299
|
+
PaginationResult:
|
|
300
|
+
type: object
|
|
301
|
+
properties:
|
|
302
|
+
total_result:
|
|
303
|
+
type: number
|
|
304
|
+
current_count:
|
|
305
|
+
type: number
|
|
306
|
+
total_pages:
|
|
307
|
+
type: number
|
|
308
|
+
current_page:
|
|
309
|
+
type: number
|
|
310
|
+
per_page:
|
|
311
|
+
type: number
|
|
312
|
+
first_page_url:
|
|
313
|
+
type: string
|
|
314
|
+
last_page_url:
|
|
315
|
+
type: string
|
|
316
|
+
next_page_url:
|
|
317
|
+
type: string
|
|
318
|
+
nullable: true
|
|
319
|
+
prev_page_url:
|
|
320
|
+
type: string
|
|
321
|
+
nullable: true
|
|
322
|
+
path:
|
|
323
|
+
type: string
|
package/src/types/index.ts
CHANGED
|
@@ -7484,6 +7484,8 @@ export namespace Service {
|
|
|
7484
7484
|
signature?: StringId;
|
|
7485
7485
|
bypass_freshness_window_code_entered?: boolean;
|
|
7486
7486
|
promotion_freshness_window_exceeded?: boolean;
|
|
7487
|
+
total_word?: string;
|
|
7488
|
+
total_local_word?: string;
|
|
7487
7489
|
createdAt: string;
|
|
7488
7490
|
updatedAt: string;
|
|
7489
7491
|
__v: number;
|
|
@@ -8706,6 +8708,7 @@ export namespace Service {
|
|
|
8706
8708
|
teams: string[] | Team.TeamSchema[];
|
|
8707
8709
|
items_count?: number;
|
|
8708
8710
|
total_items_base_unit_qty?: number;
|
|
8711
|
+
total_measure_unit_qty?: number;
|
|
8709
8712
|
company_namespace: string[];
|
|
8710
8713
|
transaction_processed: boolean;
|
|
8711
8714
|
status: "pending" | "approved" | "processing" | "rejected" | "processed";
|
|
@@ -9152,6 +9155,210 @@ export namespace Service {
|
|
|
9152
9155
|
}
|
|
9153
9156
|
}
|
|
9154
9157
|
|
|
9158
|
+
export namespace CycleReport {
|
|
9159
|
+
type CycleStatus = "pending" | "approved" | "processing" | "rejected";
|
|
9160
|
+
type ProformaDoc = Pick<
|
|
9161
|
+
Proforma.Data,
|
|
9162
|
+
| "_id"
|
|
9163
|
+
| "class"
|
|
9164
|
+
| "serial_number"
|
|
9165
|
+
| "return_serial_number"
|
|
9166
|
+
| "client_name"
|
|
9167
|
+
| "client_id"
|
|
9168
|
+
| "issue_date"
|
|
9169
|
+
| "creator"
|
|
9170
|
+
| "time"
|
|
9171
|
+
| "createdAt"
|
|
9172
|
+
| "currency"
|
|
9173
|
+
| "teams"
|
|
9174
|
+
| "total_word"
|
|
9175
|
+
| "total_local_word"
|
|
9176
|
+
| "total"
|
|
9177
|
+
>;
|
|
9178
|
+
type TransferDoc = Pick<
|
|
9179
|
+
Transfer.Data,
|
|
9180
|
+
| "_id"
|
|
9181
|
+
| "serial_number"
|
|
9182
|
+
| "type"
|
|
9183
|
+
| "time"
|
|
9184
|
+
| "createdAt"
|
|
9185
|
+
| "from"
|
|
9186
|
+
| "to"
|
|
9187
|
+
| "items_count"
|
|
9188
|
+
| "total_items_base_unit_qty"
|
|
9189
|
+
| "total_measure_unit_qty"
|
|
9190
|
+
> & { from_name?: string; to_name?: string };
|
|
9191
|
+
type ApprovalRequestDoc = Pick<
|
|
9192
|
+
ApprovalRequest.Data,
|
|
9193
|
+
| "_id"
|
|
9194
|
+
| "serial_number"
|
|
9195
|
+
| "type"
|
|
9196
|
+
| "subtype"
|
|
9197
|
+
| "time"
|
|
9198
|
+
| "createdAt"
|
|
9199
|
+
| "creator"
|
|
9200
|
+
| "reference_name"
|
|
9201
|
+
| "reference_local_name"
|
|
9202
|
+
>;
|
|
9203
|
+
type ReceivingMaterialDoc = Pick<
|
|
9204
|
+
ReceivingMaterial.Data,
|
|
9205
|
+
| "_id"
|
|
9206
|
+
| "to"
|
|
9207
|
+
| "serial_number"
|
|
9208
|
+
| "time"
|
|
9209
|
+
| "createdAt"
|
|
9210
|
+
| "from"
|
|
9211
|
+
| "items_count"
|
|
9212
|
+
| "total_items_base_unit_qty"
|
|
9213
|
+
| "total_measure_unit_qty"
|
|
9214
|
+
> & { to_name?: string };
|
|
9215
|
+
type AssetPartTransferDoc = Pick<
|
|
9216
|
+
AssetPartTransfer.Data,
|
|
9217
|
+
| "_id"
|
|
9218
|
+
| "type"
|
|
9219
|
+
| "from_name"
|
|
9220
|
+
| "to_name"
|
|
9221
|
+
| "creator"
|
|
9222
|
+
| "serial_number"
|
|
9223
|
+
| "asset_part_units_count"
|
|
9224
|
+
| "total_asset_part_units_qty"
|
|
9225
|
+
| "time"
|
|
9226
|
+
| "createdAt"
|
|
9227
|
+
| "from"
|
|
9228
|
+
| "to"
|
|
9229
|
+
>;
|
|
9230
|
+
type AdjustInventoryDoc = Pick<AdjustInventory.Data, "_id">;
|
|
9231
|
+
type ReturnAssetPartUnitDoc = Pick<
|
|
9232
|
+
ReturnAssetPartUnit.Data,
|
|
9233
|
+
| "_id"
|
|
9234
|
+
| "warehouse"
|
|
9235
|
+
| "warehouse_name"
|
|
9236
|
+
| "creator"
|
|
9237
|
+
| "serial_number"
|
|
9238
|
+
| "asset_part_units_count"
|
|
9239
|
+
| "total_asset_part_units_qty"
|
|
9240
|
+
| "time"
|
|
9241
|
+
| "createdAt"
|
|
9242
|
+
| "client"
|
|
9243
|
+
| "client_name"
|
|
9244
|
+
>;
|
|
9245
|
+
type StoreAssetPartUnitDoc = Pick<
|
|
9246
|
+
StoreAssetPartUnit.Data,
|
|
9247
|
+
| "_id"
|
|
9248
|
+
| "warehouse"
|
|
9249
|
+
| "warehouse_name"
|
|
9250
|
+
| "creator"
|
|
9251
|
+
| "serial_number"
|
|
9252
|
+
| "asset_part_units_count"
|
|
9253
|
+
| "total_asset_part_units_qty"
|
|
9254
|
+
| "time"
|
|
9255
|
+
| "createdAt"
|
|
9256
|
+
>;
|
|
9257
|
+
type ActivityFormV2ResultDoc = Pick<
|
|
9258
|
+
ActivityFormV2Result.Data,
|
|
9259
|
+
| "_id"
|
|
9260
|
+
| "client"
|
|
9261
|
+
| "client_name"
|
|
9262
|
+
| "creator"
|
|
9263
|
+
| "serial_number"
|
|
9264
|
+
| "time"
|
|
9265
|
+
| "createdAt"
|
|
9266
|
+
| "form_id"
|
|
9267
|
+
> & {
|
|
9268
|
+
form_name?: string;
|
|
9269
|
+
};
|
|
9270
|
+
interface SchemaBase {
|
|
9271
|
+
_id: string;
|
|
9272
|
+
document_id: string;
|
|
9273
|
+
status: CycleStatus;
|
|
9274
|
+
node?: AdminCreator | RepCreator | ClientCreator;
|
|
9275
|
+
creator?: AdminCreator | RepCreator | ClientCreator;
|
|
9276
|
+
current_nodes: (AdminCreator | RepCreator | ClientCreator)[];
|
|
9277
|
+
stage?: number;
|
|
9278
|
+
stageName?: string;
|
|
9279
|
+
company_namespace: string[];
|
|
9280
|
+
note?: string;
|
|
9281
|
+
serial_number: SerialNumber;
|
|
9282
|
+
version: number;
|
|
9283
|
+
createdAt: string;
|
|
9284
|
+
updatedAt: string;
|
|
9285
|
+
__v: number;
|
|
9286
|
+
}
|
|
9287
|
+
export type Schema =
|
|
9288
|
+
| (SchemaBase & { document_type: "proforma"; document: ProformaDoc })
|
|
9289
|
+
| (SchemaBase & { document_type: "transfer"; document: TransferDoc })
|
|
9290
|
+
| (SchemaBase & {
|
|
9291
|
+
document_type: "approval-request";
|
|
9292
|
+
document: ApprovalRequestDoc;
|
|
9293
|
+
})
|
|
9294
|
+
| (SchemaBase & {
|
|
9295
|
+
document_type: "receiving-material";
|
|
9296
|
+
document: ReceivingMaterialDoc;
|
|
9297
|
+
})
|
|
9298
|
+
| (SchemaBase & {
|
|
9299
|
+
document_type: "asset-part-transfer";
|
|
9300
|
+
document: AssetPartTransferDoc;
|
|
9301
|
+
})
|
|
9302
|
+
| (SchemaBase & {
|
|
9303
|
+
document_type: "adjust-inventory";
|
|
9304
|
+
document: AdjustInventoryDoc;
|
|
9305
|
+
})
|
|
9306
|
+
| (SchemaBase & {
|
|
9307
|
+
document_type: "return-asset-part-unit";
|
|
9308
|
+
document: ReturnAssetPartUnitDoc;
|
|
9309
|
+
})
|
|
9310
|
+
| (SchemaBase & {
|
|
9311
|
+
document_type: "store-asset-part-unit";
|
|
9312
|
+
document: StoreAssetPartUnitDoc;
|
|
9313
|
+
})
|
|
9314
|
+
| (SchemaBase & {
|
|
9315
|
+
document_type: "activity-form-v2-result";
|
|
9316
|
+
document: ActivityFormV2ResultDoc;
|
|
9317
|
+
});
|
|
9318
|
+
export type Data = Schema;
|
|
9319
|
+
|
|
9320
|
+
interface Totals {
|
|
9321
|
+
"approval-request"?: number;
|
|
9322
|
+
"receiving-material"?: number;
|
|
9323
|
+
"store-asset-part-unit"?: number;
|
|
9324
|
+
"return-asset-part-unit"?: number;
|
|
9325
|
+
transfer?: number;
|
|
9326
|
+
proforma?: number;
|
|
9327
|
+
"adjust-inventory"?: number;
|
|
9328
|
+
"activity-form-v2-result"?: number;
|
|
9329
|
+
"asset-part-transfer"?: number;
|
|
9330
|
+
}
|
|
9331
|
+
|
|
9332
|
+
export namespace Find {
|
|
9333
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
9334
|
+
sortBy?: { field: "_id"; type: "asc" | "desc" }[];
|
|
9335
|
+
_id?: StringId | StringId[];
|
|
9336
|
+
document_id?: StringId | StringId[];
|
|
9337
|
+
document_type?: Schema["document_type"] | Schema["document_type"][];
|
|
9338
|
+
status?: CycleStatus | CycleStatus[];
|
|
9339
|
+
"creator._id"?: StringId | StringId[];
|
|
9340
|
+
disabled?: boolean;
|
|
9341
|
+
from?: number;
|
|
9342
|
+
to?: number;
|
|
9343
|
+
from_updatedAt?: number;
|
|
9344
|
+
to_updatedAt?: number;
|
|
9345
|
+
from_createdAt?: number;
|
|
9346
|
+
to_createdAt?: number;
|
|
9347
|
+
from__id?: StringId;
|
|
9348
|
+
to__id?: StringId;
|
|
9349
|
+
approval?: StringId | StringId[];
|
|
9350
|
+
"current_nodes.type"?: string | string[];
|
|
9351
|
+
"current_nodes.rep"?: StringId | StringId[];
|
|
9352
|
+
"current_nodes.admin"?: StringId | StringId[];
|
|
9353
|
+
[key: string]: any;
|
|
9354
|
+
};
|
|
9355
|
+
export interface Result extends DefaultPaginationResult {
|
|
9356
|
+
data: Schema[];
|
|
9357
|
+
totals?: Totals;
|
|
9358
|
+
}
|
|
9359
|
+
}
|
|
9360
|
+
}
|
|
9361
|
+
|
|
9155
9362
|
export namespace Transfer {
|
|
9156
9363
|
export interface VariantTransfer {
|
|
9157
9364
|
variant_id: string;
|
|
@@ -9535,6 +9742,7 @@ export namespace Service {
|
|
|
9535
9742
|
updatedAt: string;
|
|
9536
9743
|
__v: number;
|
|
9537
9744
|
}
|
|
9745
|
+
export type Data = Schema;
|
|
9538
9746
|
export interface PopulatedData {
|
|
9539
9747
|
_id: StringId;
|
|
9540
9748
|
serial_number: SerialNumber;
|
|
@@ -15482,6 +15690,72 @@ export namespace Service {
|
|
|
15482
15690
|
}
|
|
15483
15691
|
}
|
|
15484
15692
|
|
|
15693
|
+
export namespace ItemStatusType {
|
|
15694
|
+
export interface Data {
|
|
15695
|
+
_id: StringId;
|
|
15696
|
+
name: string;
|
|
15697
|
+
local_name?: string;
|
|
15698
|
+
is_default: boolean;
|
|
15699
|
+
disabled: boolean;
|
|
15700
|
+
company_namespace: string[];
|
|
15701
|
+
creator: AdminCreator;
|
|
15702
|
+
editor?: AdminCreator;
|
|
15703
|
+
createdAt: Date;
|
|
15704
|
+
updatedAt: Date;
|
|
15705
|
+
__v?: number;
|
|
15706
|
+
}
|
|
15707
|
+
|
|
15708
|
+
export interface CreateBody {
|
|
15709
|
+
name: string;
|
|
15710
|
+
local_name?: string;
|
|
15711
|
+
is_default?: boolean;
|
|
15712
|
+
}
|
|
15713
|
+
|
|
15714
|
+
export interface UpdateBody {
|
|
15715
|
+
name?: string;
|
|
15716
|
+
local_name?: string;
|
|
15717
|
+
is_default?: boolean;
|
|
15718
|
+
disabled?: boolean;
|
|
15719
|
+
}
|
|
15720
|
+
|
|
15721
|
+
export namespace Find {
|
|
15722
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
15723
|
+
_id?: StringId | StringId[];
|
|
15724
|
+
name?: string | string[];
|
|
15725
|
+
disabled?: boolean;
|
|
15726
|
+
is_default?: boolean;
|
|
15727
|
+
sortBy?: {
|
|
15728
|
+
field: "_id";
|
|
15729
|
+
type: "asc" | "desc";
|
|
15730
|
+
}[];
|
|
15731
|
+
};
|
|
15732
|
+
export interface Result extends DefaultPaginationResult {
|
|
15733
|
+
data: Data[];
|
|
15734
|
+
}
|
|
15735
|
+
}
|
|
15736
|
+
|
|
15737
|
+
export namespace Get {
|
|
15738
|
+
export type ID = StringId;
|
|
15739
|
+
export type Result = Data;
|
|
15740
|
+
}
|
|
15741
|
+
|
|
15742
|
+
export namespace Create {
|
|
15743
|
+
export type Body = CreateBody;
|
|
15744
|
+
export type Result = Data;
|
|
15745
|
+
}
|
|
15746
|
+
|
|
15747
|
+
export namespace Update {
|
|
15748
|
+
export type ID = StringId;
|
|
15749
|
+
export type Body = UpdateBody;
|
|
15750
|
+
export type Result = Data;
|
|
15751
|
+
}
|
|
15752
|
+
|
|
15753
|
+
export namespace Remove {
|
|
15754
|
+
export type ID = StringId;
|
|
15755
|
+
export type Result = Data;
|
|
15756
|
+
}
|
|
15757
|
+
}
|
|
15758
|
+
|
|
15485
15759
|
export namespace ActivityPlanogram {
|
|
15486
15760
|
export interface Data {
|
|
15487
15761
|
_id: string;
|