repzo 1.0.286 → 1.0.288
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/changelog.md +1 -0
- package/lib/index.d.ts +12 -2
- package/lib/index.js +24 -0
- package/lib/types/index.d.ts +62 -0
- package/package.json +1 -1
- package/src/index.ts +58 -0
- package/src/oas/item-status-type.yaml +323 -0
- package/src/types/index.ts +70 -0
package/changelog.md
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
- add: workorder-request @maramalshen
|
|
17
17
|
- add: approval @maramalshen
|
|
18
18
|
- add: apps-management, reset-company-namespace & test-reset-company-namespace @maramalshen
|
|
19
|
+
- add: `rep_can_edit_invoice_discount` & `rep_can_edit_sales_order_discount` to RepPermissions and the Rep find-params filters — gate the header discount overwrite (`overwriteDeductionFixed`/`overwriteDeductionRatio`) on invoices and Sales Orders @mkhamis
|
|
19
20
|
|
|
20
21
|
### Changed
|
|
21
22
|
|
package/lib/index.d.ts
CHANGED
|
@@ -59,6 +59,7 @@ export declare const end_points: {
|
|
|
59
59
|
readonly STORECHECK_TEMPLATE: "storecheck-template";
|
|
60
60
|
readonly ACTIVITY_STORECHECK: "activity-storecheck";
|
|
61
61
|
readonly ACTIVITY_ITEM_STATUS: "activity-item-status";
|
|
62
|
+
readonly ITEM_STATUS_TYPE: "item-status-type";
|
|
62
63
|
readonly ADJUST_INVENTORY: "adjust-inventory";
|
|
63
64
|
readonly INVENTORY: "inventory";
|
|
64
65
|
readonly INTEGRATION_APP: "integration-app";
|
|
@@ -148,7 +149,7 @@ export declare const end_points: {
|
|
|
148
149
|
readonly RESERVATION: "reservation";
|
|
149
150
|
};
|
|
150
151
|
export type EndPoints = (typeof end_points)[keyof typeof end_points];
|
|
151
|
-
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"];
|
|
152
153
|
export type AvailableService = (typeof availableService)[number];
|
|
153
154
|
export default class Repzo {
|
|
154
155
|
private svAPIEndpoint;
|
|
@@ -220,6 +221,7 @@ export default class Repzo {
|
|
|
220
221
|
readonly STORECHECK_TEMPLATE: "storecheck-template";
|
|
221
222
|
readonly ACTIVITY_STORECHECK: "activity-storecheck";
|
|
222
223
|
readonly ACTIVITY_ITEM_STATUS: "activity-item-status";
|
|
224
|
+
readonly ITEM_STATUS_TYPE: "item-status-type";
|
|
223
225
|
readonly ADJUST_INVENTORY: "adjust-inventory";
|
|
224
226
|
readonly INVENTORY: "inventory";
|
|
225
227
|
readonly INTEGRATION_APP: "integration-app";
|
|
@@ -314,7 +316,7 @@ export default class Repzo {
|
|
|
314
316
|
private _update;
|
|
315
317
|
private _patch;
|
|
316
318
|
private _delete;
|
|
317
|
-
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"];
|
|
318
320
|
generateUUID: ({ prefix, suffix, length, }: {
|
|
319
321
|
prefix?: string;
|
|
320
322
|
suffix?: string;
|
|
@@ -739,6 +741,14 @@ export default class Repzo {
|
|
|
739
741
|
create: (body: Service.ActivityItemStatus.Create.Body) => Promise<Service.ActivityItemStatus.Create.Result>;
|
|
740
742
|
update: (id: Service.ActivityItemStatus.Update.ID, body: Service.ActivityItemStatus.Update.Body) => Promise<Service.ActivityItemStatus.Update.Result>;
|
|
741
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
|
+
};
|
|
742
752
|
adjustInventory: {
|
|
743
753
|
_path: "adjust-inventory";
|
|
744
754
|
find: (params?: Service.AdjustInventory.Find.Params) => Promise<Service.AdjustInventory.Find.Result>;
|
package/lib/index.js
CHANGED
|
@@ -61,6 +61,7 @@ export const end_points = {
|
|
|
61
61
|
STORECHECK_TEMPLATE: "storecheck-template",
|
|
62
62
|
ACTIVITY_STORECHECK: "activity-storecheck",
|
|
63
63
|
ACTIVITY_ITEM_STATUS: "activity-item-status",
|
|
64
|
+
ITEM_STATUS_TYPE: "item-status-type",
|
|
64
65
|
ADJUST_INVENTORY: "adjust-inventory",
|
|
65
66
|
INVENTORY: "inventory",
|
|
66
67
|
INTEGRATION_APP: "integration-app",
|
|
@@ -205,6 +206,7 @@ export const availableService = [
|
|
|
205
206
|
"storecheckTemplate",
|
|
206
207
|
"activityStorecheck",
|
|
207
208
|
"activityItemStatus",
|
|
209
|
+
"itemStatusType",
|
|
208
210
|
"adjustInventory",
|
|
209
211
|
"inventory",
|
|
210
212
|
"integrationApp",
|
|
@@ -1391,6 +1393,28 @@ class Repzo {
|
|
|
1391
1393
|
return res;
|
|
1392
1394
|
},
|
|
1393
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
|
+
};
|
|
1394
1418
|
this.adjustInventory = {
|
|
1395
1419
|
_path: Repzo._end_points.ADJUST_INVENTORY,
|
|
1396
1420
|
find: async (params) => {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -2512,6 +2512,8 @@ export declare namespace Service {
|
|
|
2512
2512
|
rep_can_submit_multiple_item_status_products?: boolean;
|
|
2513
2513
|
rep_can_edit_return_product_price?: boolean;
|
|
2514
2514
|
rep_can_overwrite_partial_return_invoice_price?: boolean;
|
|
2515
|
+
rep_can_edit_invoice_discount?: boolean;
|
|
2516
|
+
rep_can_edit_sales_order_discount?: boolean;
|
|
2515
2517
|
rep_can_skip_cart_calculation_until_checkout?: boolean;
|
|
2516
2518
|
rep_can_start_day_without_gps_signal?: boolean;
|
|
2517
2519
|
rep_can_start_day_with_outstanding_settlement_balance?: boolean;
|
|
@@ -2799,6 +2801,8 @@ export declare namespace Service {
|
|
|
2799
2801
|
"permissions.rep_can_create_pull_from_client_assigned_to_approval_request"?: boolean;
|
|
2800
2802
|
"permissions.rep_can_print_payment_after_allowance_period"?: boolean;
|
|
2801
2803
|
"permissions.rep_can_overwrite_partial_return_invoice_price"?: boolean;
|
|
2804
|
+
"permissions.rep_can_edit_invoice_discount"?: boolean;
|
|
2805
|
+
"permissions.rep_can_edit_sales_order_discount"?: boolean;
|
|
2802
2806
|
"permissions.rep_can_create_payment"?: boolean;
|
|
2803
2807
|
"permissions.rep_can_print_offline_invoice"?: boolean;
|
|
2804
2808
|
"permissions.rep_can_print_offline_sales_order"?: boolean;
|
|
@@ -14773,6 +14777,64 @@ export declare namespace Service {
|
|
|
14773
14777
|
type Result = Data;
|
|
14774
14778
|
}
|
|
14775
14779
|
}
|
|
14780
|
+
namespace ItemStatusType {
|
|
14781
|
+
interface Data {
|
|
14782
|
+
_id: StringId;
|
|
14783
|
+
name: string;
|
|
14784
|
+
local_name?: string;
|
|
14785
|
+
is_default: boolean;
|
|
14786
|
+
disabled: boolean;
|
|
14787
|
+
company_namespace: string[];
|
|
14788
|
+
creator: AdminCreator;
|
|
14789
|
+
editor?: AdminCreator;
|
|
14790
|
+
createdAt: Date;
|
|
14791
|
+
updatedAt: Date;
|
|
14792
|
+
__v?: number;
|
|
14793
|
+
}
|
|
14794
|
+
interface CreateBody {
|
|
14795
|
+
name: string;
|
|
14796
|
+
local_name?: string;
|
|
14797
|
+
is_default?: boolean;
|
|
14798
|
+
}
|
|
14799
|
+
interface UpdateBody {
|
|
14800
|
+
name?: string;
|
|
14801
|
+
local_name?: string;
|
|
14802
|
+
is_default?: boolean;
|
|
14803
|
+
disabled?: boolean;
|
|
14804
|
+
}
|
|
14805
|
+
namespace Find {
|
|
14806
|
+
type Params = DefaultPaginationQueryParams & {
|
|
14807
|
+
_id?: StringId | StringId[];
|
|
14808
|
+
name?: string | string[];
|
|
14809
|
+
disabled?: boolean;
|
|
14810
|
+
is_default?: boolean;
|
|
14811
|
+
sortBy?: {
|
|
14812
|
+
field: "_id";
|
|
14813
|
+
type: "asc" | "desc";
|
|
14814
|
+
}[];
|
|
14815
|
+
};
|
|
14816
|
+
interface Result extends DefaultPaginationResult {
|
|
14817
|
+
data: Data[];
|
|
14818
|
+
}
|
|
14819
|
+
}
|
|
14820
|
+
namespace Get {
|
|
14821
|
+
type ID = StringId;
|
|
14822
|
+
type Result = Data;
|
|
14823
|
+
}
|
|
14824
|
+
namespace Create {
|
|
14825
|
+
type Body = CreateBody;
|
|
14826
|
+
type Result = Data;
|
|
14827
|
+
}
|
|
14828
|
+
namespace Update {
|
|
14829
|
+
type ID = StringId;
|
|
14830
|
+
type Body = UpdateBody;
|
|
14831
|
+
type Result = Data;
|
|
14832
|
+
}
|
|
14833
|
+
namespace Remove {
|
|
14834
|
+
type ID = StringId;
|
|
14835
|
+
type Result = Data;
|
|
14836
|
+
}
|
|
14837
|
+
}
|
|
14776
14838
|
namespace ActivityPlanogram {
|
|
14777
14839
|
interface Data {
|
|
14778
14840
|
_id: string;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -71,6 +71,7 @@ export const end_points = {
|
|
|
71
71
|
STORECHECK_TEMPLATE: "storecheck-template",
|
|
72
72
|
ACTIVITY_STORECHECK: "activity-storecheck",
|
|
73
73
|
ACTIVITY_ITEM_STATUS: "activity-item-status",
|
|
74
|
+
ITEM_STATUS_TYPE: "item-status-type",
|
|
74
75
|
ADJUST_INVENTORY: "adjust-inventory",
|
|
75
76
|
INVENTORY: "inventory",
|
|
76
77
|
INTEGRATION_APP: "integration-app",
|
|
@@ -217,6 +218,7 @@ export const availableService = [
|
|
|
217
218
|
"storecheckTemplate",
|
|
218
219
|
"activityStorecheck",
|
|
219
220
|
"activityItemStatus",
|
|
221
|
+
"itemStatusType",
|
|
220
222
|
"adjustInventory",
|
|
221
223
|
"inventory",
|
|
222
224
|
"integrationApp",
|
|
@@ -3204,6 +3206,62 @@ export default class Repzo {
|
|
|
3204
3206
|
},
|
|
3205
3207
|
};
|
|
3206
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
|
+
|
|
3207
3265
|
adjustInventory = {
|
|
3208
3266
|
_path: Repzo._end_points.ADJUST_INVENTORY,
|
|
3209
3267
|
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
|
@@ -2928,6 +2928,8 @@ export namespace Service {
|
|
|
2928
2928
|
rep_can_submit_multiple_item_status_products?: boolean;
|
|
2929
2929
|
rep_can_edit_return_product_price?: boolean;
|
|
2930
2930
|
rep_can_overwrite_partial_return_invoice_price?: boolean;
|
|
2931
|
+
rep_can_edit_invoice_discount?: boolean;
|
|
2932
|
+
rep_can_edit_sales_order_discount?: boolean;
|
|
2931
2933
|
rep_can_skip_cart_calculation_until_checkout?: boolean;
|
|
2932
2934
|
rep_can_start_day_without_gps_signal?: boolean;
|
|
2933
2935
|
rep_can_start_day_with_outstanding_settlement_balance?: boolean;
|
|
@@ -3233,6 +3235,8 @@ export namespace Service {
|
|
|
3233
3235
|
"permissions.rep_can_create_pull_from_client_assigned_to_approval_request"?: boolean;
|
|
3234
3236
|
"permissions.rep_can_print_payment_after_allowance_period"?: boolean;
|
|
3235
3237
|
"permissions.rep_can_overwrite_partial_return_invoice_price"?: boolean;
|
|
3238
|
+
"permissions.rep_can_edit_invoice_discount"?: boolean;
|
|
3239
|
+
"permissions.rep_can_edit_sales_order_discount"?: boolean;
|
|
3236
3240
|
"permissions.rep_can_create_payment"?: boolean;
|
|
3237
3241
|
"permissions.rep_can_print_offline_invoice"?: boolean;
|
|
3238
3242
|
"permissions.rep_can_print_offline_sales_order"?: boolean;
|
|
@@ -15690,6 +15694,72 @@ export namespace Service {
|
|
|
15690
15694
|
}
|
|
15691
15695
|
}
|
|
15692
15696
|
|
|
15697
|
+
export namespace ItemStatusType {
|
|
15698
|
+
export interface Data {
|
|
15699
|
+
_id: StringId;
|
|
15700
|
+
name: string;
|
|
15701
|
+
local_name?: string;
|
|
15702
|
+
is_default: boolean;
|
|
15703
|
+
disabled: boolean;
|
|
15704
|
+
company_namespace: string[];
|
|
15705
|
+
creator: AdminCreator;
|
|
15706
|
+
editor?: AdminCreator;
|
|
15707
|
+
createdAt: Date;
|
|
15708
|
+
updatedAt: Date;
|
|
15709
|
+
__v?: number;
|
|
15710
|
+
}
|
|
15711
|
+
|
|
15712
|
+
export interface CreateBody {
|
|
15713
|
+
name: string;
|
|
15714
|
+
local_name?: string;
|
|
15715
|
+
is_default?: boolean;
|
|
15716
|
+
}
|
|
15717
|
+
|
|
15718
|
+
export interface UpdateBody {
|
|
15719
|
+
name?: string;
|
|
15720
|
+
local_name?: string;
|
|
15721
|
+
is_default?: boolean;
|
|
15722
|
+
disabled?: boolean;
|
|
15723
|
+
}
|
|
15724
|
+
|
|
15725
|
+
export namespace Find {
|
|
15726
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
15727
|
+
_id?: StringId | StringId[];
|
|
15728
|
+
name?: string | string[];
|
|
15729
|
+
disabled?: boolean;
|
|
15730
|
+
is_default?: boolean;
|
|
15731
|
+
sortBy?: {
|
|
15732
|
+
field: "_id";
|
|
15733
|
+
type: "asc" | "desc";
|
|
15734
|
+
}[];
|
|
15735
|
+
};
|
|
15736
|
+
export interface Result extends DefaultPaginationResult {
|
|
15737
|
+
data: Data[];
|
|
15738
|
+
}
|
|
15739
|
+
}
|
|
15740
|
+
|
|
15741
|
+
export namespace Get {
|
|
15742
|
+
export type ID = StringId;
|
|
15743
|
+
export type Result = Data;
|
|
15744
|
+
}
|
|
15745
|
+
|
|
15746
|
+
export namespace Create {
|
|
15747
|
+
export type Body = CreateBody;
|
|
15748
|
+
export type Result = Data;
|
|
15749
|
+
}
|
|
15750
|
+
|
|
15751
|
+
export namespace Update {
|
|
15752
|
+
export type ID = StringId;
|
|
15753
|
+
export type Body = UpdateBody;
|
|
15754
|
+
export type Result = Data;
|
|
15755
|
+
}
|
|
15756
|
+
|
|
15757
|
+
export namespace Remove {
|
|
15758
|
+
export type ID = StringId;
|
|
15759
|
+
export type Result = Data;
|
|
15760
|
+
}
|
|
15761
|
+
}
|
|
15762
|
+
|
|
15693
15763
|
export namespace ActivityPlanogram {
|
|
15694
15764
|
export interface Data {
|
|
15695
15765
|
_id: string;
|