repzo 1.0.174 → 1.0.176
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 +41 -2
- package/lib/index.js +88 -0
- package/lib/types/index.d.ts +284 -4
- package/package.json +1 -1
- package/src/index.ts +232 -0
- package/src/types/index.ts +372 -1
package/lib/index.d.ts
CHANGED
|
@@ -96,10 +96,14 @@ 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";
|
|
102
|
+
readonly REPORT_FILTER: "report-filter";
|
|
99
103
|
};
|
|
100
|
-
export type EndPoints = typeof end_points[keyof typeof end_points];
|
|
104
|
+
export type EndPoints = (typeof end_points)[keyof typeof end_points];
|
|
101
105
|
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"];
|
|
102
|
-
export type AvailableService = typeof availableService[number];
|
|
106
|
+
export type AvailableService = (typeof availableService)[number];
|
|
103
107
|
export default class Repzo {
|
|
104
108
|
private svAPIEndpoint;
|
|
105
109
|
headers: Headers;
|
|
@@ -203,6 +207,10 @@ export default class Repzo {
|
|
|
203
207
|
readonly WORKORDER_AGENDA: "workorder-agenda";
|
|
204
208
|
readonly MODULE_CUSTOM_VALIDATOR: "module-custom-validator";
|
|
205
209
|
readonly NOTIFICATIONS_CENTER: "notifications-center";
|
|
210
|
+
readonly REPORT_COLUMN_GROUP: "report-column-group";
|
|
211
|
+
readonly REPORT_COLUMN: "report-column";
|
|
212
|
+
readonly REPORT_SORT: "report-sort";
|
|
213
|
+
readonly REPORT_FILTER: "report-filter";
|
|
206
214
|
};
|
|
207
215
|
private _fetch;
|
|
208
216
|
private _create;
|
|
@@ -970,4 +978,35 @@ export default class Repzo {
|
|
|
970
978
|
update: (id: Service.NotificationsCenter.Update.ID, body: Service.NotificationsCenter.Update.Body) => Promise<Service.NotificationsCenter.Update.Result>;
|
|
971
979
|
patch: (body: Service.NotificationsCenter.Patch.Body) => Promise<Service.NotificationsCenter.Patch.Result>;
|
|
972
980
|
};
|
|
981
|
+
reportColumnGroup: {
|
|
982
|
+
_path: "report-column-group";
|
|
983
|
+
find: (params?: Service.ReportColumnGroup.Find.Params) => Promise<Service.ReportColumnGroup.Find.Result>;
|
|
984
|
+
get: (id: Service.ReportColumnGroup.Get.ID, params?: Service.ReportColumnGroup.Get.Params) => Promise<Service.ReportColumnGroup.Get.Result>;
|
|
985
|
+
create: (body: Service.ReportColumnGroup.Create.Body) => Promise<Service.ReportColumnGroup.Create.Result>;
|
|
986
|
+
update: (id: Service.ReportColumnGroup.Update.ID, body: Service.ReportColumnGroup.Update.Body) => Promise<Service.ReportColumnGroup.Update.Result>;
|
|
987
|
+
remove: (id: Service.ReportColumnGroup.Remove.ID, params: Service.ReportColumnGroup.Remove.Params) => Promise<Service.ReportColumnGroup.Remove.Result>;
|
|
988
|
+
};
|
|
989
|
+
reportColumn: {
|
|
990
|
+
_path: "report-column";
|
|
991
|
+
find: (params?: Service.ReportColumn.Find.Params) => Promise<Service.ReportColumn.Find.Result>;
|
|
992
|
+
get: (id: Service.ReportColumn.Get.ID, params?: Service.ReportColumn.Get.Params) => Promise<Service.ReportColumn.Get.Result>;
|
|
993
|
+
create: (body: Service.ReportColumn.Create.Body) => Promise<Service.ReportColumn.Create.Result>;
|
|
994
|
+
update: (id: Service.ReportColumn.Update.ID, body: Service.ReportColumn.Update.Body) => Promise<Service.ReportColumn.Update.Result>;
|
|
995
|
+
remove: (id: Service.ReportColumn.Remove.ID, params: Service.ReportColumn.Remove.Params) => Promise<Service.ReportColumn.Remove.Result>;
|
|
996
|
+
};
|
|
997
|
+
reportSort: {
|
|
998
|
+
_path: "report-sort";
|
|
999
|
+
find: (params?: Service.ReportSort.Find.Params) => Promise<Service.ReportSort.Find.Result>;
|
|
1000
|
+
get: (id: Service.ReportSort.Get.ID, params?: Service.ReportSort.Get.Params) => Promise<Service.ReportSort.Get.Result>;
|
|
1001
|
+
create: (body: Service.ReportSort.Create.Body) => Promise<Service.ReportSort.Create.Result>;
|
|
1002
|
+
update: (id: Service.ReportSort.Update.ID, body: Service.ReportSort.Update.Body) => Promise<Service.ReportSort.Update.Result>;
|
|
1003
|
+
remove: (id: Service.ReportSort.Remove.ID, params: Service.ReportSort.Remove.Params) => Promise<Service.ReportSort.Remove.Result>;
|
|
1004
|
+
};
|
|
1005
|
+
reportFilter: {
|
|
1006
|
+
_path: "report-filter";
|
|
1007
|
+
find: (params?: Service.ReportFilter.Find.Params) => Promise<Service.ReportFilter.Find.Result>;
|
|
1008
|
+
get: (id: Service.ReportFilter.Get.ID, params?: Service.ReportFilter.Get.Params) => Promise<Service.ReportFilter.Get.Result>;
|
|
1009
|
+
create: (body: Service.ReportFilter.Create.Body) => Promise<Service.ReportFilter.Create.Result>;
|
|
1010
|
+
update: (id: Service.ReportFilter.Update.ID, body: Service.ReportFilter.Update.Body) => Promise<Service.ReportFilter.Update.Result>;
|
|
1011
|
+
};
|
|
973
1012
|
}
|
package/lib/index.js
CHANGED
|
@@ -97,6 +97,10 @@ 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",
|
|
103
|
+
REPORT_FILTER: "report-filter",
|
|
100
104
|
};
|
|
101
105
|
export const availableService = [
|
|
102
106
|
"client",
|
|
@@ -1988,6 +1992,90 @@ class Repzo {
|
|
|
1988
1992
|
return res;
|
|
1989
1993
|
},
|
|
1990
1994
|
};
|
|
1995
|
+
this.reportColumnGroup = {
|
|
1996
|
+
_path: Repzo._end_points.REPORT_COLUMN_GROUP,
|
|
1997
|
+
find: async (params) => {
|
|
1998
|
+
let res = await this._fetch(this.svAPIEndpoint, this.reportColumnGroup._path, params);
|
|
1999
|
+
return res;
|
|
2000
|
+
},
|
|
2001
|
+
get: async (id, params) => {
|
|
2002
|
+
return await this._fetch(this.svAPIEndpoint, this.reportColumnGroup._path + `/${id}`, params);
|
|
2003
|
+
},
|
|
2004
|
+
create: async (body) => {
|
|
2005
|
+
let res = await this._create(this.svAPIEndpoint, this.reportColumnGroup._path, body);
|
|
2006
|
+
return res;
|
|
2007
|
+
},
|
|
2008
|
+
update: async (id, body) => {
|
|
2009
|
+
let res = await this._update(this.svAPIEndpoint, this.reportColumnGroup._path + `/${id}`, body);
|
|
2010
|
+
return res;
|
|
2011
|
+
},
|
|
2012
|
+
remove: async (id, params) => {
|
|
2013
|
+
let res = await this._delete(this.svAPIEndpoint, this.reportColumnGroup._path + `/${id}`, params);
|
|
2014
|
+
return res;
|
|
2015
|
+
},
|
|
2016
|
+
};
|
|
2017
|
+
this.reportColumn = {
|
|
2018
|
+
_path: Repzo._end_points.REPORT_COLUMN,
|
|
2019
|
+
find: async (params) => {
|
|
2020
|
+
let res = await this._fetch(this.svAPIEndpoint, this.reportColumn._path, params);
|
|
2021
|
+
return res;
|
|
2022
|
+
},
|
|
2023
|
+
get: async (id, params) => {
|
|
2024
|
+
return await this._fetch(this.svAPIEndpoint, this.reportColumn._path + `/${id}`, params);
|
|
2025
|
+
},
|
|
2026
|
+
create: async (body) => {
|
|
2027
|
+
let res = await this._create(this.svAPIEndpoint, this.reportColumn._path, body);
|
|
2028
|
+
return res;
|
|
2029
|
+
},
|
|
2030
|
+
update: async (id, body) => {
|
|
2031
|
+
let res = await this._update(this.svAPIEndpoint, this.reportColumn._path + `/${id}`, body);
|
|
2032
|
+
return res;
|
|
2033
|
+
},
|
|
2034
|
+
remove: async (id, params) => {
|
|
2035
|
+
let res = await this._delete(this.svAPIEndpoint, this.reportColumn._path + `/${id}`, params);
|
|
2036
|
+
return res;
|
|
2037
|
+
},
|
|
2038
|
+
};
|
|
2039
|
+
this.reportSort = {
|
|
2040
|
+
_path: Repzo._end_points.REPORT_SORT,
|
|
2041
|
+
find: async (params) => {
|
|
2042
|
+
let res = await this._fetch(this.svAPIEndpoint, this.reportSort._path, params);
|
|
2043
|
+
return res;
|
|
2044
|
+
},
|
|
2045
|
+
get: async (id, params) => {
|
|
2046
|
+
return await this._fetch(this.svAPIEndpoint, this.reportSort._path + `/${id}`, params);
|
|
2047
|
+
},
|
|
2048
|
+
create: async (body) => {
|
|
2049
|
+
let res = await this._create(this.svAPIEndpoint, this.reportSort._path, body);
|
|
2050
|
+
return res;
|
|
2051
|
+
},
|
|
2052
|
+
update: async (id, body) => {
|
|
2053
|
+
let res = await this._update(this.svAPIEndpoint, this.reportSort._path + `/${id}`, body);
|
|
2054
|
+
return res;
|
|
2055
|
+
},
|
|
2056
|
+
remove: async (id, params) => {
|
|
2057
|
+
let res = await this._delete(this.svAPIEndpoint, this.reportSort._path + `/${id}`, params);
|
|
2058
|
+
return res;
|
|
2059
|
+
},
|
|
2060
|
+
};
|
|
2061
|
+
this.reportFilter = {
|
|
2062
|
+
_path: Repzo._end_points.REPORT_FILTER,
|
|
2063
|
+
find: async (params) => {
|
|
2064
|
+
let res = await this._fetch(this.svAPIEndpoint, this.reportFilter._path, params);
|
|
2065
|
+
return res;
|
|
2066
|
+
},
|
|
2067
|
+
get: async (id, params) => {
|
|
2068
|
+
return await this._fetch(this.svAPIEndpoint, this.reportFilter._path + `/${id}`, params);
|
|
2069
|
+
},
|
|
2070
|
+
create: async (body) => {
|
|
2071
|
+
let res = await this._create(this.svAPIEndpoint, this.reportFilter._path, body);
|
|
2072
|
+
return res;
|
|
2073
|
+
},
|
|
2074
|
+
update: async (id, body) => {
|
|
2075
|
+
let res = await this._update(this.svAPIEndpoint, this.reportFilter._path + `/${id}`, body);
|
|
2076
|
+
return res;
|
|
2077
|
+
},
|
|
2078
|
+
};
|
|
1991
2079
|
this.svAPIEndpoint =
|
|
1992
2080
|
!options?.env || options?.env == "production"
|
|
1993
2081
|
? "https://sv.api.repzo.me"
|
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
|
}
|
|
@@ -14063,7 +14064,7 @@ export declare namespace Service {
|
|
|
14063
14064
|
}[];
|
|
14064
14065
|
}
|
|
14065
14066
|
export const fieldType_enums: readonly ["Text", "String", "Phone", "Email", "Date", "Number", "List", "Separator", "Heading", "Media", "Signature", "DateTime", "YesNo", "ProductBarcodeScan", "BarcodeScan", "GeoPoint"];
|
|
14066
|
-
export type FormV2FieldType = typeof fieldType_enums[number];
|
|
14067
|
+
export type FormV2FieldType = (typeof fieldType_enums)[number];
|
|
14067
14068
|
interface FieldPrintSettings {
|
|
14068
14069
|
three_inch: {
|
|
14069
14070
|
grid_column?: 1 | 2;
|
|
@@ -14205,7 +14206,7 @@ export declare namespace Service {
|
|
|
14205
14206
|
}
|
|
14206
14207
|
namespace ActivityFormV2Result {
|
|
14207
14208
|
const fieldType_enums: readonly ["Text", "String", "Phone", "Email", "Date", "Number", "List", "Separator", "Heading", "Media", "Signature", "DateTime", "YesNo", "ProductBarcodeScan", "BarcodeScan", "GeoPoint"];
|
|
14208
|
-
type FormV2FieldType = typeof fieldType_enums[number];
|
|
14209
|
+
type FormV2FieldType = (typeof fieldType_enums)[number];
|
|
14209
14210
|
interface FieldResult {
|
|
14210
14211
|
_id?: string;
|
|
14211
14212
|
field_id: string;
|
|
@@ -14480,7 +14481,7 @@ export declare namespace Service {
|
|
|
14480
14481
|
}
|
|
14481
14482
|
namespace TimelineReport {
|
|
14482
14483
|
export const activity_types: readonly ["day", "client", "visit", "payment", "activity-photo", "activity-audit", "activity-availability", "activity-checkout-display", "activity-feedback", "activity-form-result", "activity-form-v2-result", "activity-item-status", "activity-note", "activity-planogram", "activity-secondary-display", "activity-shelfshare", "activity-storecheck", "activity-task", "approval-request", "asset-part-receival", "asset-part-transfer", "asset", "asset-part", "asset-unit", "reminders", "return-asset-part-unit", "store-asset-part-unit", "refund", "settlement", "convert-proforma", "transfer", "proforma", "receiving-material", "void-invoice", "fullinvoices", "workorder", "workorder-request", "return-whole-invoice", "cycle"];
|
|
14483
|
-
type ActivityType = typeof activity_types[number];
|
|
14484
|
+
type ActivityType = (typeof activity_types)[number];
|
|
14484
14485
|
export interface Data {
|
|
14485
14486
|
_id: StringId;
|
|
14486
14487
|
company_namespace: string[];
|
|
@@ -15183,7 +15184,7 @@ export declare namespace Service {
|
|
|
15183
15184
|
}
|
|
15184
15185
|
namespace TimelineTimeList {
|
|
15185
15186
|
export const activity_types: readonly ["day", "client", "visit", "payment", "activity-photo", "activity-audit", "activity-availability", "activity-checkout-display", "activity-feedback", "activity-form-result", "activity-form-v2-result", "activity-item-status", "activity-note", "activity-planogram", "activity-secondary-display", "activity-shelfshare", "activity-storecheck", "activity-task", "approval-request", "asset-part-receival", "asset-part-transfer", "asset", "asset-part", "asset-unit", "reminders", "return-asset-part-unit", "store-asset-part-unit", "refund", "settlement", "convert-proforma", "transfer", "proforma", "receiving-material", "void-invoice", "fullinvoices", "workorder", "workorder-request", "return-whole-invoice", "cycle"];
|
|
15186
|
-
type ActivityType = typeof activity_types[number];
|
|
15187
|
+
type ActivityType = (typeof activity_types)[number];
|
|
15187
15188
|
export interface Data {
|
|
15188
15189
|
_id: StringId;
|
|
15189
15190
|
company_namespace: string[];
|
|
@@ -15972,6 +15973,285 @@ export declare namespace Service {
|
|
|
15972
15973
|
}
|
|
15973
15974
|
export {};
|
|
15974
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
|
+
}
|
|
16150
|
+
namespace ReportFilter {
|
|
16151
|
+
type AccumulatorOperator = "sum" | "count" | "avg" | "max" | "min" | "first" | "last" | "addToSet" | "push";
|
|
16152
|
+
type AccumulatorLabel = "Sum" | "Count" | "Average" | "Max" | "Min" | "First" | "Last" | "Unique" | "ALL";
|
|
16153
|
+
interface Accumulator {
|
|
16154
|
+
value: AccumulatorOperator;
|
|
16155
|
+
label?: AccumulatorLabel;
|
|
16156
|
+
}
|
|
16157
|
+
interface Field {
|
|
16158
|
+
label: string;
|
|
16159
|
+
key: string;
|
|
16160
|
+
accumulator: Accumulator[];
|
|
16161
|
+
}
|
|
16162
|
+
interface GroupData {
|
|
16163
|
+
id_label: string;
|
|
16164
|
+
id: string;
|
|
16165
|
+
fields: Field[];
|
|
16166
|
+
}
|
|
16167
|
+
interface StaticData {
|
|
16168
|
+
label: string;
|
|
16169
|
+
value: string;
|
|
16170
|
+
}
|
|
16171
|
+
type DataType = "string" | "number" | "array" | "boolean";
|
|
16172
|
+
type InputType = "string" | "list" | "checkbox" | "date" | "number" | "date_range" | "number_range" | "group_by";
|
|
16173
|
+
type Operator = "eq" | "ne" | "gt" | "lt" | "gte" | "lte" | "in" | "nin" | "between" | "today" | "yesterday" | "last_seven_days" | "last_thirty_days" | "last_month" | "last_three_months" | "last_six_months" | "last_twelve_months";
|
|
16174
|
+
type DateFormat = "s" | "YYYY-MM-DD" | "YYYY-MM-DD HH:mm:ssZ" | "ISO";
|
|
16175
|
+
interface Data {
|
|
16176
|
+
_id: string;
|
|
16177
|
+
label: string;
|
|
16178
|
+
key: string;
|
|
16179
|
+
render_key: string;
|
|
16180
|
+
filter_key: string;
|
|
16181
|
+
is_multi_select?: boolean;
|
|
16182
|
+
is_static?: boolean;
|
|
16183
|
+
type: DataType;
|
|
16184
|
+
input_type: InputType;
|
|
16185
|
+
operators?: Operator[];
|
|
16186
|
+
date_format?: DateFormat;
|
|
16187
|
+
searchable?: boolean;
|
|
16188
|
+
report_types: ReportType[];
|
|
16189
|
+
endpoint?: string;
|
|
16190
|
+
static_data?: StaticData[];
|
|
16191
|
+
group_data: GroupData[];
|
|
16192
|
+
createdAt?: Date;
|
|
16193
|
+
updatedAt?: Date;
|
|
16194
|
+
}
|
|
16195
|
+
interface CreateBody {
|
|
16196
|
+
label: string;
|
|
16197
|
+
key: string;
|
|
16198
|
+
render_key: string;
|
|
16199
|
+
filter_key: string;
|
|
16200
|
+
report_types: ReportType[];
|
|
16201
|
+
type: DataType;
|
|
16202
|
+
input_type: InputType;
|
|
16203
|
+
is_multi_select?: boolean;
|
|
16204
|
+
is_static?: boolean;
|
|
16205
|
+
operators?: Operator[];
|
|
16206
|
+
date_format?: DateFormat;
|
|
16207
|
+
searchable?: boolean;
|
|
16208
|
+
endpoint?: string;
|
|
16209
|
+
static_data?: StaticData[];
|
|
16210
|
+
group_data: GroupData[];
|
|
16211
|
+
}
|
|
16212
|
+
interface UpdateBody {
|
|
16213
|
+
label?: string;
|
|
16214
|
+
key?: string;
|
|
16215
|
+
render_key?: string;
|
|
16216
|
+
filter_key?: string;
|
|
16217
|
+
report_types?: ReportType[];
|
|
16218
|
+
type?: DataType;
|
|
16219
|
+
input_type?: InputType;
|
|
16220
|
+
is_multi_select?: boolean;
|
|
16221
|
+
is_static?: boolean;
|
|
16222
|
+
operators?: Operator[];
|
|
16223
|
+
date_format?: DateFormat;
|
|
16224
|
+
searchable?: boolean;
|
|
16225
|
+
endpoint?: string;
|
|
16226
|
+
static_data?: StaticData[];
|
|
16227
|
+
group_data: GroupData[];
|
|
16228
|
+
}
|
|
16229
|
+
namespace Find {
|
|
16230
|
+
type Params = DefaultPaginationQueryParams & {
|
|
16231
|
+
report_types?: ReportType | ReportType[];
|
|
16232
|
+
from_createdAt?: Date;
|
|
16233
|
+
to_updatedAt?: Date;
|
|
16234
|
+
search?: string;
|
|
16235
|
+
};
|
|
16236
|
+
interface Result extends DefaultPaginationResult {
|
|
16237
|
+
data: Data[];
|
|
16238
|
+
}
|
|
16239
|
+
}
|
|
16240
|
+
namespace Get {
|
|
16241
|
+
type ID = StringId;
|
|
16242
|
+
type Params = {};
|
|
16243
|
+
type Result = Data;
|
|
16244
|
+
}
|
|
16245
|
+
namespace Create {
|
|
16246
|
+
type Body = CreateBody;
|
|
16247
|
+
type Result = Data;
|
|
16248
|
+
}
|
|
16249
|
+
namespace Update {
|
|
16250
|
+
type ID = StringId;
|
|
16251
|
+
type Body = Partial<UpdateBody>;
|
|
16252
|
+
type Result = Data;
|
|
16253
|
+
}
|
|
16254
|
+
}
|
|
15975
16255
|
}
|
|
15976
16256
|
export type StringId = string;
|
|
15977
16257
|
export type NameSpaces = string[];
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -107,6 +107,10 @@ 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",
|
|
113
|
+
REPORT_FILTER: "report-filter",
|
|
110
114
|
} as const;
|
|
111
115
|
export type EndPoints = (typeof end_points)[keyof typeof end_points];
|
|
112
116
|
|
|
@@ -5068,6 +5072,234 @@ export default class Repzo {
|
|
|
5068
5072
|
return res;
|
|
5069
5073
|
},
|
|
5070
5074
|
};
|
|
5075
|
+
|
|
5076
|
+
reportColumnGroup = {
|
|
5077
|
+
_path: Repzo._end_points.REPORT_COLUMN_GROUP,
|
|
5078
|
+
find: async (
|
|
5079
|
+
params?: Service.ReportColumnGroup.Find.Params,
|
|
5080
|
+
): Promise<Service.ReportColumnGroup.Find.Result> => {
|
|
5081
|
+
let res: Service.ReportColumnGroup.Find.Result = await this._fetch(
|
|
5082
|
+
this.svAPIEndpoint,
|
|
5083
|
+
this.reportColumnGroup._path,
|
|
5084
|
+
params,
|
|
5085
|
+
);
|
|
5086
|
+
return res;
|
|
5087
|
+
},
|
|
5088
|
+
|
|
5089
|
+
get: async (
|
|
5090
|
+
id: Service.ReportColumnGroup.Get.ID,
|
|
5091
|
+
params?: Service.ReportColumnGroup.Get.Params,
|
|
5092
|
+
): Promise<Service.ReportColumnGroup.Get.Result> => {
|
|
5093
|
+
return await this._fetch(
|
|
5094
|
+
this.svAPIEndpoint,
|
|
5095
|
+
this.reportColumnGroup._path + `/${id}`,
|
|
5096
|
+
params,
|
|
5097
|
+
);
|
|
5098
|
+
},
|
|
5099
|
+
|
|
5100
|
+
create: async (
|
|
5101
|
+
body: Service.ReportColumnGroup.Create.Body,
|
|
5102
|
+
): Promise<Service.ReportColumnGroup.Create.Result> => {
|
|
5103
|
+
let res = await this._create(
|
|
5104
|
+
this.svAPIEndpoint,
|
|
5105
|
+
this.reportColumnGroup._path,
|
|
5106
|
+
body,
|
|
5107
|
+
);
|
|
5108
|
+
return res;
|
|
5109
|
+
},
|
|
5110
|
+
|
|
5111
|
+
update: async (
|
|
5112
|
+
id: Service.ReportColumnGroup.Update.ID,
|
|
5113
|
+
body: Service.ReportColumnGroup.Update.Body,
|
|
5114
|
+
): Promise<Service.ReportColumnGroup.Update.Result> => {
|
|
5115
|
+
let res: Service.ReportColumnGroup.Update.Result = await this._update(
|
|
5116
|
+
this.svAPIEndpoint,
|
|
5117
|
+
this.reportColumnGroup._path + `/${id}`,
|
|
5118
|
+
body,
|
|
5119
|
+
);
|
|
5120
|
+
return res;
|
|
5121
|
+
},
|
|
5122
|
+
|
|
5123
|
+
remove: async (
|
|
5124
|
+
id: Service.ReportColumnGroup.Remove.ID,
|
|
5125
|
+
params: Service.ReportColumnGroup.Remove.Params,
|
|
5126
|
+
): Promise<Service.ReportColumnGroup.Remove.Result> => {
|
|
5127
|
+
let res: Service.ReportColumnGroup.Remove.Result = await this._delete(
|
|
5128
|
+
this.svAPIEndpoint,
|
|
5129
|
+
this.reportColumnGroup._path + `/${id}`,
|
|
5130
|
+
params,
|
|
5131
|
+
);
|
|
5132
|
+
return res;
|
|
5133
|
+
},
|
|
5134
|
+
};
|
|
5135
|
+
|
|
5136
|
+
reportColumn = {
|
|
5137
|
+
_path: Repzo._end_points.REPORT_COLUMN,
|
|
5138
|
+
find: async (
|
|
5139
|
+
params?: Service.ReportColumn.Find.Params,
|
|
5140
|
+
): Promise<Service.ReportColumn.Find.Result> => {
|
|
5141
|
+
let res: Service.ReportColumn.Find.Result = await this._fetch(
|
|
5142
|
+
this.svAPIEndpoint,
|
|
5143
|
+
this.reportColumn._path,
|
|
5144
|
+
params,
|
|
5145
|
+
);
|
|
5146
|
+
return res;
|
|
5147
|
+
},
|
|
5148
|
+
|
|
5149
|
+
get: async (
|
|
5150
|
+
id: Service.ReportColumn.Get.ID,
|
|
5151
|
+
params?: Service.ReportColumn.Get.Params,
|
|
5152
|
+
): Promise<Service.ReportColumn.Get.Result> => {
|
|
5153
|
+
return await this._fetch(
|
|
5154
|
+
this.svAPIEndpoint,
|
|
5155
|
+
this.reportColumn._path + `/${id}`,
|
|
5156
|
+
params,
|
|
5157
|
+
);
|
|
5158
|
+
},
|
|
5159
|
+
|
|
5160
|
+
create: async (
|
|
5161
|
+
body: Service.ReportColumn.Create.Body,
|
|
5162
|
+
): Promise<Service.ReportColumn.Create.Result> => {
|
|
5163
|
+
let res = await this._create(
|
|
5164
|
+
this.svAPIEndpoint,
|
|
5165
|
+
this.reportColumn._path,
|
|
5166
|
+
body,
|
|
5167
|
+
);
|
|
5168
|
+
return res;
|
|
5169
|
+
},
|
|
5170
|
+
|
|
5171
|
+
update: async (
|
|
5172
|
+
id: Service.ReportColumn.Update.ID,
|
|
5173
|
+
body: Service.ReportColumn.Update.Body,
|
|
5174
|
+
): Promise<Service.ReportColumn.Update.Result> => {
|
|
5175
|
+
let res: Service.ReportColumn.Update.Result = await this._update(
|
|
5176
|
+
this.svAPIEndpoint,
|
|
5177
|
+
this.reportColumn._path + `/${id}`,
|
|
5178
|
+
body,
|
|
5179
|
+
);
|
|
5180
|
+
return res;
|
|
5181
|
+
},
|
|
5182
|
+
|
|
5183
|
+
remove: async (
|
|
5184
|
+
id: Service.ReportColumn.Remove.ID,
|
|
5185
|
+
params: Service.ReportColumn.Remove.Params,
|
|
5186
|
+
): Promise<Service.ReportColumn.Remove.Result> => {
|
|
5187
|
+
let res: Service.ReportColumn.Remove.Result = await this._delete(
|
|
5188
|
+
this.svAPIEndpoint,
|
|
5189
|
+
this.reportColumn._path + `/${id}`,
|
|
5190
|
+
params,
|
|
5191
|
+
);
|
|
5192
|
+
return res;
|
|
5193
|
+
},
|
|
5194
|
+
};
|
|
5195
|
+
|
|
5196
|
+
reportSort = {
|
|
5197
|
+
_path: Repzo._end_points.REPORT_SORT,
|
|
5198
|
+
find: async (
|
|
5199
|
+
params?: Service.ReportSort.Find.Params,
|
|
5200
|
+
): Promise<Service.ReportSort.Find.Result> => {
|
|
5201
|
+
let res: Service.ReportSort.Find.Result = await this._fetch(
|
|
5202
|
+
this.svAPIEndpoint,
|
|
5203
|
+
this.reportSort._path,
|
|
5204
|
+
params,
|
|
5205
|
+
);
|
|
5206
|
+
return res;
|
|
5207
|
+
},
|
|
5208
|
+
|
|
5209
|
+
get: async (
|
|
5210
|
+
id: Service.ReportSort.Get.ID,
|
|
5211
|
+
params?: Service.ReportSort.Get.Params,
|
|
5212
|
+
): Promise<Service.ReportSort.Get.Result> => {
|
|
5213
|
+
return await this._fetch(
|
|
5214
|
+
this.svAPIEndpoint,
|
|
5215
|
+
this.reportSort._path + `/${id}`,
|
|
5216
|
+
params,
|
|
5217
|
+
);
|
|
5218
|
+
},
|
|
5219
|
+
|
|
5220
|
+
create: async (
|
|
5221
|
+
body: Service.ReportSort.Create.Body,
|
|
5222
|
+
): Promise<Service.ReportSort.Create.Result> => {
|
|
5223
|
+
let res = await this._create(
|
|
5224
|
+
this.svAPIEndpoint,
|
|
5225
|
+
this.reportSort._path,
|
|
5226
|
+
body,
|
|
5227
|
+
);
|
|
5228
|
+
return res;
|
|
5229
|
+
},
|
|
5230
|
+
|
|
5231
|
+
update: async (
|
|
5232
|
+
id: Service.ReportSort.Update.ID,
|
|
5233
|
+
body: Service.ReportSort.Update.Body,
|
|
5234
|
+
): Promise<Service.ReportSort.Update.Result> => {
|
|
5235
|
+
let res: Service.ReportSort.Update.Result = await this._update(
|
|
5236
|
+
this.svAPIEndpoint,
|
|
5237
|
+
this.reportSort._path + `/${id}`,
|
|
5238
|
+
body,
|
|
5239
|
+
);
|
|
5240
|
+
return res;
|
|
5241
|
+
},
|
|
5242
|
+
|
|
5243
|
+
remove: async (
|
|
5244
|
+
id: Service.ReportSort.Remove.ID,
|
|
5245
|
+
params: Service.ReportSort.Remove.Params,
|
|
5246
|
+
): Promise<Service.ReportSort.Remove.Result> => {
|
|
5247
|
+
let res: Service.ReportSort.Remove.Result = await this._delete(
|
|
5248
|
+
this.svAPIEndpoint,
|
|
5249
|
+
this.reportSort._path + `/${id}`,
|
|
5250
|
+
params,
|
|
5251
|
+
);
|
|
5252
|
+
return res;
|
|
5253
|
+
},
|
|
5254
|
+
};
|
|
5255
|
+
|
|
5256
|
+
reportFilter = {
|
|
5257
|
+
_path: Repzo._end_points.REPORT_FILTER,
|
|
5258
|
+
find: async (
|
|
5259
|
+
params?: Service.ReportFilter.Find.Params,
|
|
5260
|
+
): Promise<Service.ReportFilter.Find.Result> => {
|
|
5261
|
+
let res: Service.ReportFilter.Find.Result = await this._fetch(
|
|
5262
|
+
this.svAPIEndpoint,
|
|
5263
|
+
this.reportFilter._path,
|
|
5264
|
+
params,
|
|
5265
|
+
);
|
|
5266
|
+
return res;
|
|
5267
|
+
},
|
|
5268
|
+
|
|
5269
|
+
get: async (
|
|
5270
|
+
id: Service.ReportFilter.Get.ID,
|
|
5271
|
+
params?: Service.ReportFilter.Get.Params,
|
|
5272
|
+
): Promise<Service.ReportFilter.Get.Result> => {
|
|
5273
|
+
return await this._fetch(
|
|
5274
|
+
this.svAPIEndpoint,
|
|
5275
|
+
this.reportFilter._path + `/${id}`,
|
|
5276
|
+
params,
|
|
5277
|
+
);
|
|
5278
|
+
},
|
|
5279
|
+
|
|
5280
|
+
create: async (
|
|
5281
|
+
body: Service.ReportFilter.Create.Body,
|
|
5282
|
+
): Promise<Service.ReportFilter.Create.Result> => {
|
|
5283
|
+
let res = await this._create(
|
|
5284
|
+
this.svAPIEndpoint,
|
|
5285
|
+
this.reportFilter._path,
|
|
5286
|
+
body,
|
|
5287
|
+
);
|
|
5288
|
+
return res;
|
|
5289
|
+
},
|
|
5290
|
+
|
|
5291
|
+
update: async (
|
|
5292
|
+
id: Service.ReportFilter.Update.ID,
|
|
5293
|
+
body: Service.ReportFilter.Update.Body,
|
|
5294
|
+
): Promise<Service.ReportFilter.Update.Result> => {
|
|
5295
|
+
let res: Service.ReportFilter.Update.Result = await this._update(
|
|
5296
|
+
this.svAPIEndpoint,
|
|
5297
|
+
this.reportFilter._path + `/${id}`,
|
|
5298
|
+
body,
|
|
5299
|
+
);
|
|
5300
|
+
return res;
|
|
5301
|
+
},
|
|
5302
|
+
};
|
|
5071
5303
|
}
|
|
5072
5304
|
|
|
5073
5305
|
function normalizeParams(params: Params): { [key: string]: any } {
|
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
|
}
|
|
@@ -18006,6 +18006,377 @@ export namespace Service {
|
|
|
18006
18006
|
}
|
|
18007
18007
|
}
|
|
18008
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
|
+
}
|
|
18209
|
+
}
|
|
18210
|
+
|
|
18211
|
+
export namespace ReportFilter {
|
|
18212
|
+
export type AccumulatorOperator =
|
|
18213
|
+
| "sum"
|
|
18214
|
+
| "count"
|
|
18215
|
+
| "avg"
|
|
18216
|
+
| "max"
|
|
18217
|
+
| "min"
|
|
18218
|
+
| "first"
|
|
18219
|
+
| "last"
|
|
18220
|
+
| "addToSet"
|
|
18221
|
+
| "push";
|
|
18222
|
+
|
|
18223
|
+
export type AccumulatorLabel =
|
|
18224
|
+
| "Sum"
|
|
18225
|
+
| "Count"
|
|
18226
|
+
| "Average"
|
|
18227
|
+
| "Max"
|
|
18228
|
+
| "Min"
|
|
18229
|
+
| "First"
|
|
18230
|
+
| "Last"
|
|
18231
|
+
| "Unique"
|
|
18232
|
+
| "ALL";
|
|
18233
|
+
|
|
18234
|
+
export interface Accumulator {
|
|
18235
|
+
value: AccumulatorOperator;
|
|
18236
|
+
label?: AccumulatorLabel;
|
|
18237
|
+
}
|
|
18238
|
+
|
|
18239
|
+
export interface Field {
|
|
18240
|
+
label: string;
|
|
18241
|
+
key: string;
|
|
18242
|
+
accumulator: Accumulator[];
|
|
18243
|
+
}
|
|
18244
|
+
|
|
18245
|
+
export interface GroupData {
|
|
18246
|
+
id_label: string;
|
|
18247
|
+
id: string;
|
|
18248
|
+
fields: Field[];
|
|
18249
|
+
}
|
|
18250
|
+
|
|
18251
|
+
export interface StaticData {
|
|
18252
|
+
label: string;
|
|
18253
|
+
value: string;
|
|
18254
|
+
}
|
|
18255
|
+
|
|
18256
|
+
export type DataType = "string" | "number" | "array" | "boolean";
|
|
18257
|
+
|
|
18258
|
+
export type InputType =
|
|
18259
|
+
| "string"
|
|
18260
|
+
| "list"
|
|
18261
|
+
| "checkbox"
|
|
18262
|
+
| "date"
|
|
18263
|
+
| "number"
|
|
18264
|
+
| "date_range"
|
|
18265
|
+
| "number_range"
|
|
18266
|
+
| "group_by";
|
|
18267
|
+
|
|
18268
|
+
export type Operator =
|
|
18269
|
+
| "eq"
|
|
18270
|
+
| "ne"
|
|
18271
|
+
| "gt"
|
|
18272
|
+
| "lt"
|
|
18273
|
+
| "gte"
|
|
18274
|
+
| "lte"
|
|
18275
|
+
| "in"
|
|
18276
|
+
| "nin"
|
|
18277
|
+
| "between"
|
|
18278
|
+
| "today"
|
|
18279
|
+
| "yesterday"
|
|
18280
|
+
| "last_seven_days"
|
|
18281
|
+
| "last_thirty_days"
|
|
18282
|
+
| "last_month"
|
|
18283
|
+
| "last_three_months"
|
|
18284
|
+
| "last_six_months"
|
|
18285
|
+
| "last_twelve_months";
|
|
18286
|
+
|
|
18287
|
+
export type DateFormat =
|
|
18288
|
+
| "s"
|
|
18289
|
+
| "YYYY-MM-DD"
|
|
18290
|
+
| "YYYY-MM-DD HH:mm:ssZ"
|
|
18291
|
+
| "ISO";
|
|
18292
|
+
|
|
18293
|
+
export interface Data {
|
|
18294
|
+
_id: string;
|
|
18295
|
+
label: string;
|
|
18296
|
+
key: string;
|
|
18297
|
+
render_key: string;
|
|
18298
|
+
filter_key: string;
|
|
18299
|
+
is_multi_select?: boolean;
|
|
18300
|
+
is_static?: boolean;
|
|
18301
|
+
type: DataType;
|
|
18302
|
+
input_type: InputType;
|
|
18303
|
+
operators?: Operator[];
|
|
18304
|
+
date_format?: DateFormat;
|
|
18305
|
+
searchable?: boolean;
|
|
18306
|
+
report_types: ReportType[];
|
|
18307
|
+
endpoint?: string;
|
|
18308
|
+
static_data?: StaticData[];
|
|
18309
|
+
group_data: GroupData[];
|
|
18310
|
+
createdAt?: Date;
|
|
18311
|
+
updatedAt?: Date;
|
|
18312
|
+
}
|
|
18313
|
+
|
|
18314
|
+
export interface CreateBody {
|
|
18315
|
+
label: string;
|
|
18316
|
+
key: string;
|
|
18317
|
+
render_key: string;
|
|
18318
|
+
filter_key: string;
|
|
18319
|
+
report_types: ReportType[];
|
|
18320
|
+
type: DataType;
|
|
18321
|
+
input_type: InputType;
|
|
18322
|
+
is_multi_select?: boolean;
|
|
18323
|
+
is_static?: boolean;
|
|
18324
|
+
operators?: Operator[];
|
|
18325
|
+
date_format?: DateFormat;
|
|
18326
|
+
searchable?: boolean;
|
|
18327
|
+
endpoint?: string;
|
|
18328
|
+
static_data?: StaticData[];
|
|
18329
|
+
group_data: GroupData[];
|
|
18330
|
+
}
|
|
18331
|
+
|
|
18332
|
+
export interface UpdateBody {
|
|
18333
|
+
label?: string;
|
|
18334
|
+
key?: string;
|
|
18335
|
+
render_key?: string;
|
|
18336
|
+
filter_key?: string;
|
|
18337
|
+
report_types?: ReportType[];
|
|
18338
|
+
type?: DataType;
|
|
18339
|
+
input_type?: InputType;
|
|
18340
|
+
is_multi_select?: boolean;
|
|
18341
|
+
is_static?: boolean;
|
|
18342
|
+
operators?: Operator[];
|
|
18343
|
+
date_format?: DateFormat;
|
|
18344
|
+
searchable?: boolean;
|
|
18345
|
+
endpoint?: string;
|
|
18346
|
+
static_data?: StaticData[];
|
|
18347
|
+
group_data: GroupData[];
|
|
18348
|
+
}
|
|
18349
|
+
|
|
18350
|
+
export namespace Find {
|
|
18351
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
18352
|
+
report_types?: ReportType | ReportType[];
|
|
18353
|
+
from_createdAt?: Date;
|
|
18354
|
+
to_updatedAt?: Date;
|
|
18355
|
+
search?: string;
|
|
18356
|
+
};
|
|
18357
|
+
|
|
18358
|
+
export interface Result extends DefaultPaginationResult {
|
|
18359
|
+
data: Data[];
|
|
18360
|
+
}
|
|
18361
|
+
}
|
|
18362
|
+
|
|
18363
|
+
export namespace Get {
|
|
18364
|
+
export type ID = StringId;
|
|
18365
|
+
export type Params = {};
|
|
18366
|
+
export type Result = Data;
|
|
18367
|
+
}
|
|
18368
|
+
|
|
18369
|
+
export namespace Create {
|
|
18370
|
+
export type Body = CreateBody;
|
|
18371
|
+
export type Result = Data;
|
|
18372
|
+
}
|
|
18373
|
+
|
|
18374
|
+
export namespace Update {
|
|
18375
|
+
export type ID = StringId;
|
|
18376
|
+
export type Body = Partial<UpdateBody>;
|
|
18377
|
+
export type Result = Data;
|
|
18378
|
+
}
|
|
18379
|
+
}
|
|
18009
18380
|
}
|
|
18010
18381
|
|
|
18011
18382
|
export type StringId = string;
|