repzo 1.0.173 → 1.0.175
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 +31 -0
- package/lib/index.js +73 -0
- package/lib/types/index.d.ts +186 -0
- package/package.json +1 -1
- package/src/index.ts +193 -0
- package/src/types/index.ts +213 -1
package/lib/index.d.ts
CHANGED
|
@@ -96,6 +96,9 @@ export declare const end_points: {
|
|
|
96
96
|
readonly WORKORDER_AGENDA: "workorder-agenda";
|
|
97
97
|
readonly MODULE_CUSTOM_VALIDATOR: "module-custom-validator";
|
|
98
98
|
readonly NOTIFICATIONS_CENTER: "notifications-center";
|
|
99
|
+
readonly REPORT_COLUMN_GROUP: "report-column-group";
|
|
100
|
+
readonly REPORT_COLUMN: "report-column";
|
|
101
|
+
readonly REPORT_SORT: "report-sort";
|
|
99
102
|
};
|
|
100
103
|
export type EndPoints = (typeof end_points)[keyof typeof end_points];
|
|
101
104
|
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", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "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"];
|
|
@@ -203,6 +206,9 @@ export default class Repzo {
|
|
|
203
206
|
readonly WORKORDER_AGENDA: "workorder-agenda";
|
|
204
207
|
readonly MODULE_CUSTOM_VALIDATOR: "module-custom-validator";
|
|
205
208
|
readonly NOTIFICATIONS_CENTER: "notifications-center";
|
|
209
|
+
readonly REPORT_COLUMN_GROUP: "report-column-group";
|
|
210
|
+
readonly REPORT_COLUMN: "report-column";
|
|
211
|
+
readonly REPORT_SORT: "report-sort";
|
|
206
212
|
};
|
|
207
213
|
private _fetch;
|
|
208
214
|
private _create;
|
|
@@ -968,5 +974,30 @@ export default class Repzo {
|
|
|
968
974
|
get: (id: Service.NotificationsCenter.Get.ID, params?: Service.NotificationsCenter.Get.Params) => Promise<Service.NotificationsCenter.Get.Result>;
|
|
969
975
|
create: (body: Service.NotificationsCenter.Create.Body) => Promise<Service.NotificationsCenter.Create.Result>;
|
|
970
976
|
update: (id: Service.NotificationsCenter.Update.ID, body: Service.NotificationsCenter.Update.Body) => Promise<Service.NotificationsCenter.Update.Result>;
|
|
977
|
+
patch: (body: Service.NotificationsCenter.Patch.Body) => Promise<Service.NotificationsCenter.Patch.Result>;
|
|
978
|
+
};
|
|
979
|
+
reportColumnGroup: {
|
|
980
|
+
_path: "report-column-group";
|
|
981
|
+
find: (params?: Service.ReportColumnGroup.Find.Params) => Promise<Service.ReportColumnGroup.Find.Result>;
|
|
982
|
+
get: (id: Service.ReportColumnGroup.Get.ID, params?: Service.ReportColumnGroup.Get.Params) => Promise<Service.ReportColumnGroup.Get.Result>;
|
|
983
|
+
create: (body: Service.ReportColumnGroup.Create.Body) => Promise<Service.ReportColumnGroup.Create.Result>;
|
|
984
|
+
update: (id: Service.ReportColumnGroup.Update.ID, body: Service.ReportColumnGroup.Update.Body) => Promise<Service.ReportColumnGroup.Update.Result>;
|
|
985
|
+
remove: (id: Service.ReportColumnGroup.Remove.ID, params: Service.ReportColumnGroup.Remove.Params) => Promise<Service.ReportColumnGroup.Remove.Result>;
|
|
986
|
+
};
|
|
987
|
+
reportColumn: {
|
|
988
|
+
_path: "report-column";
|
|
989
|
+
find: (params?: Service.ReportColumn.Find.Params) => Promise<Service.ReportColumn.Find.Result>;
|
|
990
|
+
get: (id: Service.ReportColumn.Get.ID, params?: Service.ReportColumn.Get.Params) => Promise<Service.ReportColumn.Get.Result>;
|
|
991
|
+
create: (body: Service.ReportColumn.Create.Body) => Promise<Service.ReportColumn.Create.Result>;
|
|
992
|
+
update: (id: Service.ReportColumn.Update.ID, body: Service.ReportColumn.Update.Body) => Promise<Service.ReportColumn.Update.Result>;
|
|
993
|
+
remove: (id: Service.ReportColumn.Remove.ID, params: Service.ReportColumn.Remove.Params) => Promise<Service.ReportColumn.Remove.Result>;
|
|
994
|
+
};
|
|
995
|
+
reportSort: {
|
|
996
|
+
_path: "report-sort";
|
|
997
|
+
find: (params?: Service.ReportSort.Find.Params) => Promise<Service.ReportSort.Find.Result>;
|
|
998
|
+
get: (id: Service.ReportSort.Get.ID, params?: Service.ReportSort.Get.Params) => Promise<Service.ReportSort.Get.Result>;
|
|
999
|
+
create: (body: Service.ReportSort.Create.Body) => Promise<Service.ReportSort.Create.Result>;
|
|
1000
|
+
update: (id: Service.ReportSort.Update.ID, body: Service.ReportSort.Update.Body) => Promise<Service.ReportSort.Update.Result>;
|
|
1001
|
+
remove: (id: Service.ReportSort.Remove.ID, params: Service.ReportSort.Remove.Params) => Promise<Service.ReportSort.Remove.Result>;
|
|
971
1002
|
};
|
|
972
1003
|
}
|
package/lib/index.js
CHANGED
|
@@ -97,6 +97,9 @@ export const end_points = {
|
|
|
97
97
|
WORKORDER_AGENDA: "workorder-agenda",
|
|
98
98
|
MODULE_CUSTOM_VALIDATOR: "module-custom-validator",
|
|
99
99
|
NOTIFICATIONS_CENTER: "notifications-center",
|
|
100
|
+
REPORT_COLUMN_GROUP: "report-column-group",
|
|
101
|
+
REPORT_COLUMN: "report-column",
|
|
102
|
+
REPORT_SORT: "report-sort",
|
|
100
103
|
};
|
|
101
104
|
export const availableService = [
|
|
102
105
|
"client",
|
|
@@ -1983,6 +1986,76 @@ class Repzo {
|
|
|
1983
1986
|
let res = await this._update(this.svAPIEndpoint, this.notificationsCenter._path + `/${id}`, body);
|
|
1984
1987
|
return res;
|
|
1985
1988
|
},
|
|
1989
|
+
patch: async (body) => {
|
|
1990
|
+
let res = await this._patch(this.svAPIEndpoint, this.notificationsCenter._path, body);
|
|
1991
|
+
return res;
|
|
1992
|
+
},
|
|
1993
|
+
};
|
|
1994
|
+
this.reportColumnGroup = {
|
|
1995
|
+
_path: Repzo._end_points.REPORT_COLUMN_GROUP,
|
|
1996
|
+
find: async (params) => {
|
|
1997
|
+
let res = await this._fetch(this.svAPIEndpoint, this.reportColumnGroup._path, params);
|
|
1998
|
+
return res;
|
|
1999
|
+
},
|
|
2000
|
+
get: async (id, params) => {
|
|
2001
|
+
return await this._fetch(this.svAPIEndpoint, this.reportColumnGroup._path + `/${id}`, params);
|
|
2002
|
+
},
|
|
2003
|
+
create: async (body) => {
|
|
2004
|
+
let res = await this._create(this.svAPIEndpoint, this.reportColumnGroup._path, body);
|
|
2005
|
+
return res;
|
|
2006
|
+
},
|
|
2007
|
+
update: async (id, body) => {
|
|
2008
|
+
let res = await this._update(this.svAPIEndpoint, this.reportColumnGroup._path + `/${id}`, body);
|
|
2009
|
+
return res;
|
|
2010
|
+
},
|
|
2011
|
+
remove: async (id, params) => {
|
|
2012
|
+
let res = await this._delete(this.svAPIEndpoint, this.reportColumnGroup._path + `/${id}`, params);
|
|
2013
|
+
return res;
|
|
2014
|
+
},
|
|
2015
|
+
};
|
|
2016
|
+
this.reportColumn = {
|
|
2017
|
+
_path: Repzo._end_points.REPORT_COLUMN,
|
|
2018
|
+
find: async (params) => {
|
|
2019
|
+
let res = await this._fetch(this.svAPIEndpoint, this.reportColumn._path, params);
|
|
2020
|
+
return res;
|
|
2021
|
+
},
|
|
2022
|
+
get: async (id, params) => {
|
|
2023
|
+
return await this._fetch(this.svAPIEndpoint, this.reportColumn._path + `/${id}`, params);
|
|
2024
|
+
},
|
|
2025
|
+
create: async (body) => {
|
|
2026
|
+
let res = await this._create(this.svAPIEndpoint, this.reportColumn._path, body);
|
|
2027
|
+
return res;
|
|
2028
|
+
},
|
|
2029
|
+
update: async (id, body) => {
|
|
2030
|
+
let res = await this._update(this.svAPIEndpoint, this.reportColumn._path + `/${id}`, body);
|
|
2031
|
+
return res;
|
|
2032
|
+
},
|
|
2033
|
+
remove: async (id, params) => {
|
|
2034
|
+
let res = await this._delete(this.svAPIEndpoint, this.reportColumn._path + `/${id}`, params);
|
|
2035
|
+
return res;
|
|
2036
|
+
},
|
|
2037
|
+
};
|
|
2038
|
+
this.reportSort = {
|
|
2039
|
+
_path: Repzo._end_points.REPORT_SORT,
|
|
2040
|
+
find: async (params) => {
|
|
2041
|
+
let res = await this._fetch(this.svAPIEndpoint, this.reportSort._path, params);
|
|
2042
|
+
return res;
|
|
2043
|
+
},
|
|
2044
|
+
get: async (id, params) => {
|
|
2045
|
+
return await this._fetch(this.svAPIEndpoint, this.reportSort._path + `/${id}`, params);
|
|
2046
|
+
},
|
|
2047
|
+
create: async (body) => {
|
|
2048
|
+
let res = await this._create(this.svAPIEndpoint, this.reportSort._path, body);
|
|
2049
|
+
return res;
|
|
2050
|
+
},
|
|
2051
|
+
update: async (id, body) => {
|
|
2052
|
+
let res = await this._update(this.svAPIEndpoint, this.reportSort._path + `/${id}`, body);
|
|
2053
|
+
return res;
|
|
2054
|
+
},
|
|
2055
|
+
remove: async (id, params) => {
|
|
2056
|
+
let res = await this._delete(this.svAPIEndpoint, this.reportSort._path + `/${id}`, params);
|
|
2057
|
+
return res;
|
|
2058
|
+
},
|
|
1986
2059
|
};
|
|
1987
2060
|
this.svAPIEndpoint =
|
|
1988
2061
|
!options?.env || options?.env == "production"
|
package/lib/types/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { EndPoints } from "../index.js";
|
|
|
2
2
|
export interface Params {
|
|
3
3
|
[key: string]: any;
|
|
4
4
|
}
|
|
5
|
+
export type ReportType = "sales-analytics";
|
|
5
6
|
export interface Data {
|
|
6
7
|
[key: string]: any;
|
|
7
8
|
}
|
|
@@ -15929,6 +15930,10 @@ export declare namespace Service {
|
|
|
15929
15930
|
createdAt?: Date;
|
|
15930
15931
|
updatedAt?: Date;
|
|
15931
15932
|
}
|
|
15933
|
+
export interface PatchBody {
|
|
15934
|
+
executed: boolean;
|
|
15935
|
+
command: Data["command"] | Data["command"][];
|
|
15936
|
+
}
|
|
15932
15937
|
type PopulatedKeys = "media";
|
|
15933
15938
|
export namespace Find {
|
|
15934
15939
|
type Params = DefaultPaginationQueryParams & {
|
|
@@ -15959,8 +15964,189 @@ export declare namespace Service {
|
|
|
15959
15964
|
type Body = UpdateBody;
|
|
15960
15965
|
type Result = Data;
|
|
15961
15966
|
}
|
|
15967
|
+
export namespace Patch {
|
|
15968
|
+
type Body = PatchBody;
|
|
15969
|
+
interface Result {
|
|
15970
|
+
status: "success";
|
|
15971
|
+
message: "0 updated ";
|
|
15972
|
+
}
|
|
15973
|
+
}
|
|
15962
15974
|
export {};
|
|
15963
15975
|
}
|
|
15976
|
+
namespace ReportColumnGroup {
|
|
15977
|
+
interface Data {
|
|
15978
|
+
_id: StringId;
|
|
15979
|
+
name: string;
|
|
15980
|
+
disabled: boolean;
|
|
15981
|
+
report_types: ReportType[];
|
|
15982
|
+
createdAt: number;
|
|
15983
|
+
updatedAt: number;
|
|
15984
|
+
}
|
|
15985
|
+
interface CreateBody {
|
|
15986
|
+
name: string;
|
|
15987
|
+
report_types: ReportType[];
|
|
15988
|
+
}
|
|
15989
|
+
interface UpdateBody {
|
|
15990
|
+
name?: string;
|
|
15991
|
+
report_types?: ReportType[];
|
|
15992
|
+
}
|
|
15993
|
+
namespace Find {
|
|
15994
|
+
type Params = DefaultPaginationQueryParams & {
|
|
15995
|
+
_id?: StringId | StringId[];
|
|
15996
|
+
name?: string | string[];
|
|
15997
|
+
disabled?: boolean;
|
|
15998
|
+
report_types?: ReportType | ReportType[];
|
|
15999
|
+
from_createdAt?: Date;
|
|
16000
|
+
to_updatedAt?: Date;
|
|
16001
|
+
};
|
|
16002
|
+
interface Result extends DefaultPaginationResult {
|
|
16003
|
+
data: Data[];
|
|
16004
|
+
}
|
|
16005
|
+
}
|
|
16006
|
+
namespace Get {
|
|
16007
|
+
type ID = StringId;
|
|
16008
|
+
type Params = {};
|
|
16009
|
+
type Result = Data;
|
|
16010
|
+
}
|
|
16011
|
+
namespace Create {
|
|
16012
|
+
type Body = CreateBody;
|
|
16013
|
+
type Result = Data;
|
|
16014
|
+
}
|
|
16015
|
+
namespace Update {
|
|
16016
|
+
type ID = StringId;
|
|
16017
|
+
type Body = UpdateBody;
|
|
16018
|
+
type Result = Data;
|
|
16019
|
+
}
|
|
16020
|
+
namespace Remove {
|
|
16021
|
+
type ID = StringId;
|
|
16022
|
+
type Params = {};
|
|
16023
|
+
type Result = Data;
|
|
16024
|
+
}
|
|
16025
|
+
}
|
|
16026
|
+
namespace ReportColumn {
|
|
16027
|
+
interface Data {
|
|
16028
|
+
_id: StringId;
|
|
16029
|
+
disabled: boolean;
|
|
16030
|
+
key: string;
|
|
16031
|
+
name: string;
|
|
16032
|
+
selectable: boolean;
|
|
16033
|
+
show: "default" | "hide" | "show";
|
|
16034
|
+
totals_key?: string;
|
|
16035
|
+
report_types: ReportType[];
|
|
16036
|
+
column_group?: StringId;
|
|
16037
|
+
default_show?: boolean;
|
|
16038
|
+
createdAt?: Date;
|
|
16039
|
+
updatedAt?: Date;
|
|
16040
|
+
}
|
|
16041
|
+
interface CreateBody {
|
|
16042
|
+
key: string;
|
|
16043
|
+
name: string;
|
|
16044
|
+
report_types: ReportType[];
|
|
16045
|
+
selectable?: boolean;
|
|
16046
|
+
show?: "default" | "hide" | "show";
|
|
16047
|
+
totals_key?: string;
|
|
16048
|
+
column_group?: StringId;
|
|
16049
|
+
default_show?: boolean;
|
|
16050
|
+
}
|
|
16051
|
+
interface UpdateBody {
|
|
16052
|
+
disabled: boolean;
|
|
16053
|
+
key: string;
|
|
16054
|
+
name: string;
|
|
16055
|
+
report_types: ReportType[];
|
|
16056
|
+
selectable?: boolean;
|
|
16057
|
+
show?: "default" | "hide" | "show";
|
|
16058
|
+
totals_key?: string;
|
|
16059
|
+
column_group?: StringId;
|
|
16060
|
+
default_show?: boolean;
|
|
16061
|
+
}
|
|
16062
|
+
namespace Find {
|
|
16063
|
+
type Params = DefaultPaginationQueryParams & {
|
|
16064
|
+
_id?: StringId | StringId[];
|
|
16065
|
+
name?: string | string[];
|
|
16066
|
+
disabled?: boolean;
|
|
16067
|
+
report_types?: ReportType | ReportType[];
|
|
16068
|
+
from_createdAt?: Date;
|
|
16069
|
+
to_updatedAt?: Date;
|
|
16070
|
+
};
|
|
16071
|
+
interface Result extends DefaultPaginationResult {
|
|
16072
|
+
data: Data[];
|
|
16073
|
+
}
|
|
16074
|
+
}
|
|
16075
|
+
namespace Get {
|
|
16076
|
+
type ID = StringId;
|
|
16077
|
+
type Params = {};
|
|
16078
|
+
type Result = Data;
|
|
16079
|
+
}
|
|
16080
|
+
namespace Create {
|
|
16081
|
+
type Body = CreateBody;
|
|
16082
|
+
type Result = Data;
|
|
16083
|
+
}
|
|
16084
|
+
namespace Update {
|
|
16085
|
+
type ID = StringId;
|
|
16086
|
+
type Body = UpdateBody;
|
|
16087
|
+
type Result = Data;
|
|
16088
|
+
}
|
|
16089
|
+
namespace Remove {
|
|
16090
|
+
type ID = StringId;
|
|
16091
|
+
type Params = {};
|
|
16092
|
+
type Result = Data;
|
|
16093
|
+
}
|
|
16094
|
+
}
|
|
16095
|
+
namespace ReportSort {
|
|
16096
|
+
interface Data {
|
|
16097
|
+
_id: StringId;
|
|
16098
|
+
disabled: boolean;
|
|
16099
|
+
key: string;
|
|
16100
|
+
name: string;
|
|
16101
|
+
report_types: ReportType[];
|
|
16102
|
+
createdAt?: Date;
|
|
16103
|
+
updatedAt?: Date;
|
|
16104
|
+
}
|
|
16105
|
+
interface CreateBody {
|
|
16106
|
+
key: string;
|
|
16107
|
+
name: string;
|
|
16108
|
+
report_types: ReportType[];
|
|
16109
|
+
}
|
|
16110
|
+
interface UpdateBody {
|
|
16111
|
+
key?: string;
|
|
16112
|
+
name?: string;
|
|
16113
|
+
report_types?: ReportType[];
|
|
16114
|
+
}
|
|
16115
|
+
namespace Find {
|
|
16116
|
+
type Params = DefaultPaginationQueryParams & {
|
|
16117
|
+
_id?: StringId | StringId[];
|
|
16118
|
+
name?: string | string[];
|
|
16119
|
+
disabled?: boolean;
|
|
16120
|
+
key?: string | string[];
|
|
16121
|
+
report_types?: ReportType | ReportType[];
|
|
16122
|
+
from_createdAt?: Date;
|
|
16123
|
+
to_updatedAt?: Date;
|
|
16124
|
+
search?: string;
|
|
16125
|
+
};
|
|
16126
|
+
interface Result extends DefaultPaginationResult {
|
|
16127
|
+
data: Data[];
|
|
16128
|
+
}
|
|
16129
|
+
}
|
|
16130
|
+
namespace Get {
|
|
16131
|
+
type ID = StringId;
|
|
16132
|
+
type Params = {};
|
|
16133
|
+
type Result = Data;
|
|
16134
|
+
}
|
|
16135
|
+
namespace Create {
|
|
16136
|
+
type Body = CreateBody;
|
|
16137
|
+
type Result = Data;
|
|
16138
|
+
}
|
|
16139
|
+
namespace Update {
|
|
16140
|
+
type ID = StringId;
|
|
16141
|
+
type Body = UpdateBody;
|
|
16142
|
+
type Result = Data;
|
|
16143
|
+
}
|
|
16144
|
+
namespace Remove {
|
|
16145
|
+
type ID = StringId;
|
|
16146
|
+
type Params = {};
|
|
16147
|
+
type Result = Data;
|
|
16148
|
+
}
|
|
16149
|
+
}
|
|
15964
16150
|
}
|
|
15965
16151
|
export type StringId = string;
|
|
15966
16152
|
export type NameSpaces = string[];
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -107,6 +107,9 @@ export const end_points = {
|
|
|
107
107
|
WORKORDER_AGENDA: "workorder-agenda",
|
|
108
108
|
MODULE_CUSTOM_VALIDATOR: "module-custom-validator",
|
|
109
109
|
NOTIFICATIONS_CENTER: "notifications-center",
|
|
110
|
+
REPORT_COLUMN_GROUP: "report-column-group",
|
|
111
|
+
REPORT_COLUMN: "report-column",
|
|
112
|
+
REPORT_SORT: "report-sort",
|
|
110
113
|
} as const;
|
|
111
114
|
export type EndPoints = (typeof end_points)[keyof typeof end_points];
|
|
112
115
|
|
|
@@ -5057,6 +5060,196 @@ export default class Repzo {
|
|
|
5057
5060
|
);
|
|
5058
5061
|
return res;
|
|
5059
5062
|
},
|
|
5063
|
+
patch: async (
|
|
5064
|
+
body: Service.NotificationsCenter.Patch.Body,
|
|
5065
|
+
): Promise<Service.NotificationsCenter.Patch.Result> => {
|
|
5066
|
+
let res: Service.NotificationsCenter.Patch.Result = await this._patch(
|
|
5067
|
+
this.svAPIEndpoint,
|
|
5068
|
+
this.notificationsCenter._path,
|
|
5069
|
+
body,
|
|
5070
|
+
);
|
|
5071
|
+
return res;
|
|
5072
|
+
},
|
|
5073
|
+
};
|
|
5074
|
+
|
|
5075
|
+
reportColumnGroup = {
|
|
5076
|
+
_path: Repzo._end_points.REPORT_COLUMN_GROUP,
|
|
5077
|
+
find: async (
|
|
5078
|
+
params?: Service.ReportColumnGroup.Find.Params,
|
|
5079
|
+
): Promise<Service.ReportColumnGroup.Find.Result> => {
|
|
5080
|
+
let res: Service.ReportColumnGroup.Find.Result = await this._fetch(
|
|
5081
|
+
this.svAPIEndpoint,
|
|
5082
|
+
this.reportColumnGroup._path,
|
|
5083
|
+
params,
|
|
5084
|
+
);
|
|
5085
|
+
return res;
|
|
5086
|
+
},
|
|
5087
|
+
|
|
5088
|
+
get: async (
|
|
5089
|
+
id: Service.ReportColumnGroup.Get.ID,
|
|
5090
|
+
params?: Service.ReportColumnGroup.Get.Params,
|
|
5091
|
+
): Promise<Service.ReportColumnGroup.Get.Result> => {
|
|
5092
|
+
return await this._fetch(
|
|
5093
|
+
this.svAPIEndpoint,
|
|
5094
|
+
this.reportColumnGroup._path + `/${id}`,
|
|
5095
|
+
params,
|
|
5096
|
+
);
|
|
5097
|
+
},
|
|
5098
|
+
|
|
5099
|
+
create: async (
|
|
5100
|
+
body: Service.ReportColumnGroup.Create.Body,
|
|
5101
|
+
): Promise<Service.ReportColumnGroup.Create.Result> => {
|
|
5102
|
+
let res = await this._create(
|
|
5103
|
+
this.svAPIEndpoint,
|
|
5104
|
+
this.reportColumnGroup._path,
|
|
5105
|
+
body,
|
|
5106
|
+
);
|
|
5107
|
+
return res;
|
|
5108
|
+
},
|
|
5109
|
+
|
|
5110
|
+
update: async (
|
|
5111
|
+
id: Service.ReportColumnGroup.Update.ID,
|
|
5112
|
+
body: Service.ReportColumnGroup.Update.Body,
|
|
5113
|
+
): Promise<Service.ReportColumnGroup.Update.Result> => {
|
|
5114
|
+
let res: Service.ReportColumnGroup.Update.Result = await this._update(
|
|
5115
|
+
this.svAPIEndpoint,
|
|
5116
|
+
this.reportColumnGroup._path + `/${id}`,
|
|
5117
|
+
body,
|
|
5118
|
+
);
|
|
5119
|
+
return res;
|
|
5120
|
+
},
|
|
5121
|
+
|
|
5122
|
+
remove: async (
|
|
5123
|
+
id: Service.ReportColumnGroup.Remove.ID,
|
|
5124
|
+
params: Service.ReportColumnGroup.Remove.Params,
|
|
5125
|
+
): Promise<Service.ReportColumnGroup.Remove.Result> => {
|
|
5126
|
+
let res: Service.ReportColumnGroup.Remove.Result = await this._delete(
|
|
5127
|
+
this.svAPIEndpoint,
|
|
5128
|
+
this.reportColumnGroup._path + `/${id}`,
|
|
5129
|
+
params,
|
|
5130
|
+
);
|
|
5131
|
+
return res;
|
|
5132
|
+
},
|
|
5133
|
+
};
|
|
5134
|
+
|
|
5135
|
+
reportColumn = {
|
|
5136
|
+
_path: Repzo._end_points.REPORT_COLUMN,
|
|
5137
|
+
find: async (
|
|
5138
|
+
params?: Service.ReportColumn.Find.Params,
|
|
5139
|
+
): Promise<Service.ReportColumn.Find.Result> => {
|
|
5140
|
+
let res: Service.ReportColumn.Find.Result = await this._fetch(
|
|
5141
|
+
this.svAPIEndpoint,
|
|
5142
|
+
this.reportColumn._path,
|
|
5143
|
+
params,
|
|
5144
|
+
);
|
|
5145
|
+
return res;
|
|
5146
|
+
},
|
|
5147
|
+
|
|
5148
|
+
get: async (
|
|
5149
|
+
id: Service.ReportColumn.Get.ID,
|
|
5150
|
+
params?: Service.ReportColumn.Get.Params,
|
|
5151
|
+
): Promise<Service.ReportColumn.Get.Result> => {
|
|
5152
|
+
return await this._fetch(
|
|
5153
|
+
this.svAPIEndpoint,
|
|
5154
|
+
this.reportColumn._path + `/${id}`,
|
|
5155
|
+
params,
|
|
5156
|
+
);
|
|
5157
|
+
},
|
|
5158
|
+
|
|
5159
|
+
create: async (
|
|
5160
|
+
body: Service.ReportColumn.Create.Body,
|
|
5161
|
+
): Promise<Service.ReportColumn.Create.Result> => {
|
|
5162
|
+
let res = await this._create(
|
|
5163
|
+
this.svAPIEndpoint,
|
|
5164
|
+
this.reportColumn._path,
|
|
5165
|
+
body,
|
|
5166
|
+
);
|
|
5167
|
+
return res;
|
|
5168
|
+
},
|
|
5169
|
+
|
|
5170
|
+
update: async (
|
|
5171
|
+
id: Service.ReportColumn.Update.ID,
|
|
5172
|
+
body: Service.ReportColumn.Update.Body,
|
|
5173
|
+
): Promise<Service.ReportColumn.Update.Result> => {
|
|
5174
|
+
let res: Service.ReportColumn.Update.Result = await this._update(
|
|
5175
|
+
this.svAPIEndpoint,
|
|
5176
|
+
this.reportColumn._path + `/${id}`,
|
|
5177
|
+
body,
|
|
5178
|
+
);
|
|
5179
|
+
return res;
|
|
5180
|
+
},
|
|
5181
|
+
|
|
5182
|
+
remove: async (
|
|
5183
|
+
id: Service.ReportColumn.Remove.ID,
|
|
5184
|
+
params: Service.ReportColumn.Remove.Params,
|
|
5185
|
+
): Promise<Service.ReportColumn.Remove.Result> => {
|
|
5186
|
+
let res: Service.ReportColumn.Remove.Result = await this._delete(
|
|
5187
|
+
this.svAPIEndpoint,
|
|
5188
|
+
this.reportColumn._path + `/${id}`,
|
|
5189
|
+
params,
|
|
5190
|
+
);
|
|
5191
|
+
return res;
|
|
5192
|
+
},
|
|
5193
|
+
};
|
|
5194
|
+
|
|
5195
|
+
reportSort = {
|
|
5196
|
+
_path: Repzo._end_points.REPORT_SORT,
|
|
5197
|
+
find: async (
|
|
5198
|
+
params?: Service.ReportSort.Find.Params,
|
|
5199
|
+
): Promise<Service.ReportSort.Find.Result> => {
|
|
5200
|
+
let res: Service.ReportSort.Find.Result = await this._fetch(
|
|
5201
|
+
this.svAPIEndpoint,
|
|
5202
|
+
this.reportSort._path,
|
|
5203
|
+
params,
|
|
5204
|
+
);
|
|
5205
|
+
return res;
|
|
5206
|
+
},
|
|
5207
|
+
|
|
5208
|
+
get: async (
|
|
5209
|
+
id: Service.ReportSort.Get.ID,
|
|
5210
|
+
params?: Service.ReportSort.Get.Params,
|
|
5211
|
+
): Promise<Service.ReportSort.Get.Result> => {
|
|
5212
|
+
return await this._fetch(
|
|
5213
|
+
this.svAPIEndpoint,
|
|
5214
|
+
this.reportSort._path + `/${id}`,
|
|
5215
|
+
params,
|
|
5216
|
+
);
|
|
5217
|
+
},
|
|
5218
|
+
|
|
5219
|
+
create: async (
|
|
5220
|
+
body: Service.ReportSort.Create.Body,
|
|
5221
|
+
): Promise<Service.ReportSort.Create.Result> => {
|
|
5222
|
+
let res = await this._create(
|
|
5223
|
+
this.svAPIEndpoint,
|
|
5224
|
+
this.reportSort._path,
|
|
5225
|
+
body,
|
|
5226
|
+
);
|
|
5227
|
+
return res;
|
|
5228
|
+
},
|
|
5229
|
+
|
|
5230
|
+
update: async (
|
|
5231
|
+
id: Service.ReportSort.Update.ID,
|
|
5232
|
+
body: Service.ReportSort.Update.Body,
|
|
5233
|
+
): Promise<Service.ReportSort.Update.Result> => {
|
|
5234
|
+
let res: Service.ReportSort.Update.Result = await this._update(
|
|
5235
|
+
this.svAPIEndpoint,
|
|
5236
|
+
this.reportSort._path + `/${id}`,
|
|
5237
|
+
body,
|
|
5238
|
+
);
|
|
5239
|
+
return res;
|
|
5240
|
+
},
|
|
5241
|
+
|
|
5242
|
+
remove: async (
|
|
5243
|
+
id: Service.ReportSort.Remove.ID,
|
|
5244
|
+
params: Service.ReportSort.Remove.Params,
|
|
5245
|
+
): Promise<Service.ReportSort.Remove.Result> => {
|
|
5246
|
+
let res: Service.ReportSort.Remove.Result = await this._delete(
|
|
5247
|
+
this.svAPIEndpoint,
|
|
5248
|
+
this.reportSort._path + `/${id}`,
|
|
5249
|
+
params,
|
|
5250
|
+
);
|
|
5251
|
+
return res;
|
|
5252
|
+
},
|
|
5060
5253
|
};
|
|
5061
5254
|
}
|
|
5062
5255
|
|
package/src/types/index.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { EndPoints } from "../index.js";
|
|
|
3
3
|
export interface Params {
|
|
4
4
|
[key: string]: any;
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
export type ReportType = "sales-analytics";
|
|
7
7
|
export interface Data {
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
}
|
|
@@ -17962,6 +17962,10 @@ export namespace Service {
|
|
|
17962
17962
|
createdAt?: Date;
|
|
17963
17963
|
updatedAt?: Date;
|
|
17964
17964
|
}
|
|
17965
|
+
export interface PatchBody {
|
|
17966
|
+
executed: boolean;
|
|
17967
|
+
command: Data["command"] | Data["command"][];
|
|
17968
|
+
}
|
|
17965
17969
|
|
|
17966
17970
|
type PopulatedKeys = "media";
|
|
17967
17971
|
|
|
@@ -17994,6 +17998,214 @@ export namespace Service {
|
|
|
17994
17998
|
export type Body = UpdateBody;
|
|
17995
17999
|
export type Result = Data;
|
|
17996
18000
|
}
|
|
18001
|
+
export namespace Patch {
|
|
18002
|
+
export type Body = PatchBody;
|
|
18003
|
+
export interface Result {
|
|
18004
|
+
status: "success";
|
|
18005
|
+
message: "0 updated ";
|
|
18006
|
+
}
|
|
18007
|
+
}
|
|
18008
|
+
}
|
|
18009
|
+
|
|
18010
|
+
export namespace ReportColumnGroup {
|
|
18011
|
+
export interface Data {
|
|
18012
|
+
_id: StringId;
|
|
18013
|
+
name: string;
|
|
18014
|
+
disabled: boolean;
|
|
18015
|
+
report_types: ReportType[];
|
|
18016
|
+
createdAt: number;
|
|
18017
|
+
updatedAt: number;
|
|
18018
|
+
}
|
|
18019
|
+
|
|
18020
|
+
export interface CreateBody {
|
|
18021
|
+
name: string;
|
|
18022
|
+
report_types: ReportType[];
|
|
18023
|
+
}
|
|
18024
|
+
|
|
18025
|
+
export interface UpdateBody {
|
|
18026
|
+
name?: string;
|
|
18027
|
+
report_types?: ReportType[];
|
|
18028
|
+
}
|
|
18029
|
+
|
|
18030
|
+
export namespace Find {
|
|
18031
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
18032
|
+
_id?: StringId | StringId[];
|
|
18033
|
+
name?: string | string[];
|
|
18034
|
+
disabled?: boolean;
|
|
18035
|
+
report_types?: ReportType | ReportType[];
|
|
18036
|
+
from_createdAt?: Date;
|
|
18037
|
+
to_updatedAt?: Date;
|
|
18038
|
+
};
|
|
18039
|
+
|
|
18040
|
+
export interface Result extends DefaultPaginationResult {
|
|
18041
|
+
data: Data[];
|
|
18042
|
+
}
|
|
18043
|
+
}
|
|
18044
|
+
|
|
18045
|
+
export namespace Get {
|
|
18046
|
+
export type ID = StringId;
|
|
18047
|
+
export type Params = {};
|
|
18048
|
+
export type Result = Data;
|
|
18049
|
+
}
|
|
18050
|
+
|
|
18051
|
+
export namespace Create {
|
|
18052
|
+
export type Body = CreateBody;
|
|
18053
|
+
export type Result = Data;
|
|
18054
|
+
}
|
|
18055
|
+
|
|
18056
|
+
export namespace Update {
|
|
18057
|
+
export type ID = StringId;
|
|
18058
|
+
export type Body = UpdateBody;
|
|
18059
|
+
export type Result = Data;
|
|
18060
|
+
}
|
|
18061
|
+
|
|
18062
|
+
export namespace Remove {
|
|
18063
|
+
export type ID = StringId;
|
|
18064
|
+
export type Params = {};
|
|
18065
|
+
export type Result = Data;
|
|
18066
|
+
}
|
|
18067
|
+
}
|
|
18068
|
+
|
|
18069
|
+
export namespace ReportColumn {
|
|
18070
|
+
export interface Data {
|
|
18071
|
+
_id: StringId;
|
|
18072
|
+
disabled: boolean;
|
|
18073
|
+
key: string;
|
|
18074
|
+
name: string;
|
|
18075
|
+
selectable: boolean;
|
|
18076
|
+
show: "default" | "hide" | "show";
|
|
18077
|
+
totals_key?: string;
|
|
18078
|
+
report_types: ReportType[];
|
|
18079
|
+
column_group?: StringId;
|
|
18080
|
+
default_show?: boolean;
|
|
18081
|
+
createdAt?: Date;
|
|
18082
|
+
updatedAt?: Date;
|
|
18083
|
+
}
|
|
18084
|
+
|
|
18085
|
+
export interface CreateBody {
|
|
18086
|
+
key: string;
|
|
18087
|
+
name: string;
|
|
18088
|
+
report_types: ReportType[];
|
|
18089
|
+
selectable?: boolean;
|
|
18090
|
+
show?: "default" | "hide" | "show";
|
|
18091
|
+
totals_key?: string;
|
|
18092
|
+
column_group?: StringId;
|
|
18093
|
+
default_show?: boolean;
|
|
18094
|
+
}
|
|
18095
|
+
|
|
18096
|
+
export interface UpdateBody {
|
|
18097
|
+
disabled: boolean;
|
|
18098
|
+
key: string;
|
|
18099
|
+
name: string;
|
|
18100
|
+
report_types: ReportType[];
|
|
18101
|
+
selectable?: boolean;
|
|
18102
|
+
show?: "default" | "hide" | "show";
|
|
18103
|
+
totals_key?: string;
|
|
18104
|
+
column_group?: StringId;
|
|
18105
|
+
default_show?: boolean;
|
|
18106
|
+
}
|
|
18107
|
+
|
|
18108
|
+
export namespace Find {
|
|
18109
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
18110
|
+
_id?: StringId | StringId[];
|
|
18111
|
+
name?: string | string[];
|
|
18112
|
+
disabled?: boolean;
|
|
18113
|
+
report_types?: ReportType | ReportType[];
|
|
18114
|
+
from_createdAt?: Date;
|
|
18115
|
+
to_updatedAt?: Date;
|
|
18116
|
+
};
|
|
18117
|
+
|
|
18118
|
+
export interface Result extends DefaultPaginationResult {
|
|
18119
|
+
data: Data[];
|
|
18120
|
+
}
|
|
18121
|
+
}
|
|
18122
|
+
|
|
18123
|
+
export namespace Get {
|
|
18124
|
+
export type ID = StringId;
|
|
18125
|
+
export type Params = {};
|
|
18126
|
+
export type Result = Data;
|
|
18127
|
+
}
|
|
18128
|
+
|
|
18129
|
+
export namespace Create {
|
|
18130
|
+
export type Body = CreateBody;
|
|
18131
|
+
export type Result = Data;
|
|
18132
|
+
}
|
|
18133
|
+
|
|
18134
|
+
export namespace Update {
|
|
18135
|
+
export type ID = StringId;
|
|
18136
|
+
export type Body = UpdateBody;
|
|
18137
|
+
export type Result = Data;
|
|
18138
|
+
}
|
|
18139
|
+
|
|
18140
|
+
export namespace Remove {
|
|
18141
|
+
export type ID = StringId;
|
|
18142
|
+
export type Params = {};
|
|
18143
|
+
export type Result = Data;
|
|
18144
|
+
}
|
|
18145
|
+
}
|
|
18146
|
+
|
|
18147
|
+
export namespace ReportSort {
|
|
18148
|
+
export interface Data {
|
|
18149
|
+
_id: StringId;
|
|
18150
|
+
disabled: boolean;
|
|
18151
|
+
key: string;
|
|
18152
|
+
name: string;
|
|
18153
|
+
report_types: ReportType[];
|
|
18154
|
+
createdAt?: Date;
|
|
18155
|
+
updatedAt?: Date;
|
|
18156
|
+
}
|
|
18157
|
+
|
|
18158
|
+
export interface CreateBody {
|
|
18159
|
+
key: string;
|
|
18160
|
+
name: string;
|
|
18161
|
+
report_types: ReportType[];
|
|
18162
|
+
}
|
|
18163
|
+
|
|
18164
|
+
export interface UpdateBody {
|
|
18165
|
+
key?: string;
|
|
18166
|
+
name?: string;
|
|
18167
|
+
report_types?: ReportType[];
|
|
18168
|
+
}
|
|
18169
|
+
|
|
18170
|
+
export namespace Find {
|
|
18171
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
18172
|
+
_id?: StringId | StringId[];
|
|
18173
|
+
name?: string | string[];
|
|
18174
|
+
disabled?: boolean;
|
|
18175
|
+
key?: string | string[];
|
|
18176
|
+
report_types?: ReportType | ReportType[];
|
|
18177
|
+
from_createdAt?: Date;
|
|
18178
|
+
to_updatedAt?: Date;
|
|
18179
|
+
search?: string;
|
|
18180
|
+
};
|
|
18181
|
+
|
|
18182
|
+
export interface Result extends DefaultPaginationResult {
|
|
18183
|
+
data: Data[];
|
|
18184
|
+
}
|
|
18185
|
+
}
|
|
18186
|
+
|
|
18187
|
+
export namespace Get {
|
|
18188
|
+
export type ID = StringId;
|
|
18189
|
+
export type Params = {};
|
|
18190
|
+
export type Result = Data;
|
|
18191
|
+
}
|
|
18192
|
+
|
|
18193
|
+
export namespace Create {
|
|
18194
|
+
export type Body = CreateBody;
|
|
18195
|
+
export type Result = Data;
|
|
18196
|
+
}
|
|
18197
|
+
|
|
18198
|
+
export namespace Update {
|
|
18199
|
+
export type ID = StringId;
|
|
18200
|
+
export type Body = UpdateBody;
|
|
18201
|
+
export type Result = Data;
|
|
18202
|
+
}
|
|
18203
|
+
|
|
18204
|
+
export namespace Remove {
|
|
18205
|
+
export type ID = StringId;
|
|
18206
|
+
export type Params = {};
|
|
18207
|
+
export type Result = Data;
|
|
18208
|
+
}
|
|
17997
18209
|
}
|
|
17998
18210
|
}
|
|
17999
18211
|
|