repzo 1.0.200 → 1.0.202
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 +34 -4
- package/lib/index.js +72 -0
- package/lib/types/index.d.ts +224 -10
- package/package.json +1 -1
- package/src/index.ts +164 -0
- package/src/types/index.ts +214 -0
package/lib/index.d.ts
CHANGED
|
@@ -107,10 +107,13 @@ export declare const end_points: {
|
|
|
107
107
|
readonly REPORT_VIEW_DEFAULT: "report-view-default";
|
|
108
108
|
readonly REPORT_VIEW_FAVORITE: "report-view-favorite";
|
|
109
109
|
readonly COPY_REPORT_VIEW: "copy-report-view";
|
|
110
|
+
readonly PRESENTATION: "presentation";
|
|
111
|
+
readonly SEQUENCE: "sequence";
|
|
112
|
+
readonly SLIDE: "slide";
|
|
110
113
|
};
|
|
111
|
-
export type EndPoints =
|
|
112
|
-
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", "salesAnalyticsReport"];
|
|
113
|
-
export type AvailableService =
|
|
114
|
+
export type EndPoints = typeof end_points[keyof typeof end_points];
|
|
115
|
+
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", "salesAnalyticsReport", "presentation", "sequence", "slide"];
|
|
116
|
+
export type AvailableService = typeof availableService[number];
|
|
114
117
|
export default class Repzo {
|
|
115
118
|
private svAPIEndpoint;
|
|
116
119
|
headers: Headers;
|
|
@@ -225,13 +228,16 @@ export default class Repzo {
|
|
|
225
228
|
readonly REPORT_VIEW_DEFAULT: "report-view-default";
|
|
226
229
|
readonly REPORT_VIEW_FAVORITE: "report-view-favorite";
|
|
227
230
|
readonly COPY_REPORT_VIEW: "copy-report-view";
|
|
231
|
+
readonly PRESENTATION: "presentation";
|
|
232
|
+
readonly SEQUENCE: "sequence";
|
|
233
|
+
readonly SLIDE: "slide";
|
|
228
234
|
};
|
|
229
235
|
private _fetch;
|
|
230
236
|
private _create;
|
|
231
237
|
private _update;
|
|
232
238
|
private _patch;
|
|
233
239
|
private _delete;
|
|
234
|
-
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", "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", "salesAnalyticsReport"];
|
|
240
|
+
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", "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", "salesAnalyticsReport", "presentation", "sequence", "slide"];
|
|
235
241
|
client: {
|
|
236
242
|
_path: "client";
|
|
237
243
|
find: (params?: Service.Client.Find.Params) => Promise<Service.Client.Find.Result>;
|
|
@@ -1066,4 +1072,28 @@ export default class Repzo {
|
|
|
1066
1072
|
_path: "copy-report-view";
|
|
1067
1073
|
update: (id: Service.CopyReportView.Update.ID, body: Service.CopyReportView.Update.Body) => Promise<Service.CopyReportView.Update.Result>;
|
|
1068
1074
|
};
|
|
1075
|
+
presentation: {
|
|
1076
|
+
_path: "presentation";
|
|
1077
|
+
find: (params?: Service.Presentation.Find.Params) => Promise<Service.Presentation.Find.Result>;
|
|
1078
|
+
get: (id: Service.Presentation.Get.ID, params?: Service.Presentation.Get.Params) => Promise<Service.Presentation.Get.Result>;
|
|
1079
|
+
create: (body: Service.Presentation.Create.Body) => Promise<Service.Presentation.Create.Result>;
|
|
1080
|
+
update: (id: Service.Presentation.Update.ID, body: Service.Presentation.Update.Body) => Promise<Service.Presentation.Update.Result>;
|
|
1081
|
+
remove: (id: Service.Presentation.Update.ID) => Promise<Service.Presentation.Remove.Result>;
|
|
1082
|
+
};
|
|
1083
|
+
sequence: {
|
|
1084
|
+
_path: "sequence";
|
|
1085
|
+
find: (params?: Service.Sequence.Find.Params) => Promise<Service.Sequence.Find.Result>;
|
|
1086
|
+
get: (id: Service.Sequence.Get.ID, params?: Service.Sequence.Get.Params) => Promise<Service.Sequence.Get.Result>;
|
|
1087
|
+
create: (body: Service.Sequence.Create.Body) => Promise<Service.Sequence.Create.Result>;
|
|
1088
|
+
update: (id: Service.Sequence.Update.ID, body: Service.Sequence.Update.Body) => Promise<Service.Sequence.Update.Result>;
|
|
1089
|
+
remove: (id: Service.Sequence.Update.ID) => Promise<Service.Sequence.Remove.Result>;
|
|
1090
|
+
};
|
|
1091
|
+
slide: {
|
|
1092
|
+
_path: "slide";
|
|
1093
|
+
find: (params?: Service.Slide.Find.Params) => Promise<Service.Slide.Find.Result>;
|
|
1094
|
+
get: (id: Service.Slide.Get.ID, params?: Service.Slide.Get.Params) => Promise<Service.Slide.Get.Result>;
|
|
1095
|
+
create: (body: Service.Slide.Create.Body) => Promise<Service.Slide.Create.Result>;
|
|
1096
|
+
update: (id: Service.Slide.Update.ID, body: Service.Slide.Update.Body) => Promise<Service.Slide.Update.Result>;
|
|
1097
|
+
remove: (id: Service.Slide.Update.ID) => Promise<Service.Slide.Remove.Result>;
|
|
1098
|
+
};
|
|
1069
1099
|
}
|
package/lib/index.js
CHANGED
|
@@ -108,6 +108,9 @@ export const end_points = {
|
|
|
108
108
|
REPORT_VIEW_DEFAULT: "report-view-default",
|
|
109
109
|
REPORT_VIEW_FAVORITE: "report-view-favorite",
|
|
110
110
|
COPY_REPORT_VIEW: "copy-report-view",
|
|
111
|
+
PRESENTATION: "presentation",
|
|
112
|
+
SEQUENCE: "sequence",
|
|
113
|
+
SLIDE: "slide",
|
|
111
114
|
};
|
|
112
115
|
export const availableService = [
|
|
113
116
|
"client",
|
|
@@ -198,6 +201,9 @@ export const availableService = [
|
|
|
198
201
|
"workorderPortalLink",
|
|
199
202
|
"customField",
|
|
200
203
|
"salesAnalyticsReport",
|
|
204
|
+
"presentation",
|
|
205
|
+
"sequence",
|
|
206
|
+
"slide",
|
|
201
207
|
];
|
|
202
208
|
class Repzo {
|
|
203
209
|
constructor(apiKey, options) {
|
|
@@ -2188,6 +2194,72 @@ class Repzo {
|
|
|
2188
2194
|
return res;
|
|
2189
2195
|
},
|
|
2190
2196
|
};
|
|
2197
|
+
this.presentation = {
|
|
2198
|
+
_path: Repzo._end_points.PRESENTATION,
|
|
2199
|
+
find: async (params) => {
|
|
2200
|
+
let res = await this._fetch(this.svAPIEndpoint, this.presentation._path, params);
|
|
2201
|
+
return res;
|
|
2202
|
+
},
|
|
2203
|
+
get: async (id, params) => {
|
|
2204
|
+
return await this._fetch(this.svAPIEndpoint, this.presentation._path + `/${id}`, params);
|
|
2205
|
+
},
|
|
2206
|
+
create: async (body) => {
|
|
2207
|
+
let res = await this._create(this.svAPIEndpoint, this.presentation._path, body);
|
|
2208
|
+
return res;
|
|
2209
|
+
},
|
|
2210
|
+
update: async (id, body) => {
|
|
2211
|
+
let res = await this._update(this.svAPIEndpoint, this.presentation._path + `/${id}`, body);
|
|
2212
|
+
return res;
|
|
2213
|
+
},
|
|
2214
|
+
remove: async (id) => {
|
|
2215
|
+
let res = await this._delete(this.svAPIEndpoint, this.presentation._path + `/${id}`);
|
|
2216
|
+
return res;
|
|
2217
|
+
},
|
|
2218
|
+
};
|
|
2219
|
+
this.sequence = {
|
|
2220
|
+
_path: Repzo._end_points.SEQUENCE,
|
|
2221
|
+
find: async (params) => {
|
|
2222
|
+
let res = await this._fetch(this.svAPIEndpoint, this.sequence._path, params);
|
|
2223
|
+
return res;
|
|
2224
|
+
},
|
|
2225
|
+
get: async (id, params) => {
|
|
2226
|
+
return await this._fetch(this.svAPIEndpoint, this.sequence._path + `/${id}`, params);
|
|
2227
|
+
},
|
|
2228
|
+
create: async (body) => {
|
|
2229
|
+
let res = await this._create(this.svAPIEndpoint, this.sequence._path, body);
|
|
2230
|
+
return res;
|
|
2231
|
+
},
|
|
2232
|
+
update: async (id, body) => {
|
|
2233
|
+
let res = await this._update(this.svAPIEndpoint, this.sequence._path + `/${id}`, body);
|
|
2234
|
+
return res;
|
|
2235
|
+
},
|
|
2236
|
+
remove: async (id) => {
|
|
2237
|
+
let res = await this._delete(this.svAPIEndpoint, this.sequence._path + `/${id}`);
|
|
2238
|
+
return res;
|
|
2239
|
+
},
|
|
2240
|
+
};
|
|
2241
|
+
this.slide = {
|
|
2242
|
+
_path: Repzo._end_points.SLIDE,
|
|
2243
|
+
find: async (params) => {
|
|
2244
|
+
let res = await this._fetch(this.svAPIEndpoint, this.slide._path, params);
|
|
2245
|
+
return res;
|
|
2246
|
+
},
|
|
2247
|
+
get: async (id, params) => {
|
|
2248
|
+
return await this._fetch(this.svAPIEndpoint, this.slide._path + `/${id}`, params);
|
|
2249
|
+
},
|
|
2250
|
+
create: async (body) => {
|
|
2251
|
+
let res = await this._create(this.svAPIEndpoint, this.slide._path, body);
|
|
2252
|
+
return res;
|
|
2253
|
+
},
|
|
2254
|
+
update: async (id, body) => {
|
|
2255
|
+
let res = await this._update(this.svAPIEndpoint, this.slide._path + `/${id}`, body);
|
|
2256
|
+
return res;
|
|
2257
|
+
},
|
|
2258
|
+
remove: async (id) => {
|
|
2259
|
+
let res = await this._delete(this.svAPIEndpoint, this.slide._path + `/${id}`);
|
|
2260
|
+
return res;
|
|
2261
|
+
},
|
|
2262
|
+
};
|
|
2191
2263
|
this.svAPIEndpoint =
|
|
2192
2264
|
!options?.env || options?.env == "production"
|
|
2193
2265
|
? "https://sv.api.repzo.me"
|
package/lib/types/index.d.ts
CHANGED
|
@@ -646,6 +646,7 @@ export declare namespace Service {
|
|
|
646
646
|
updatedAt: string;
|
|
647
647
|
__v: number;
|
|
648
648
|
}
|
|
649
|
+
export type Data = ProductSchema;
|
|
649
650
|
interface ProductBody {
|
|
650
651
|
name?: string;
|
|
651
652
|
category?: string;
|
|
@@ -1849,6 +1850,7 @@ export declare namespace Service {
|
|
|
1849
1850
|
previous_entry?: any;
|
|
1850
1851
|
show_previous_result?: boolean;
|
|
1851
1852
|
hidden?: boolean;
|
|
1853
|
+
force_live_photo?: boolean;
|
|
1852
1854
|
custom_list?: string;
|
|
1853
1855
|
custom_list_element?: string;
|
|
1854
1856
|
parent_field?: string;
|
|
@@ -14049,7 +14051,7 @@ export declare namespace Service {
|
|
|
14049
14051
|
}[];
|
|
14050
14052
|
}
|
|
14051
14053
|
export const fieldType_enums: readonly ["Text", "String", "Phone", "Email", "Date", "Number", "List", "Separator", "Heading", "Media", "Signature", "DateTime", "YesNo", "ProductBarcodeScan", "BarcodeScan", "GeoPoint"];
|
|
14052
|
-
export type FormV2FieldType =
|
|
14054
|
+
export type FormV2FieldType = typeof fieldType_enums[number];
|
|
14053
14055
|
interface FieldPrintSettings {
|
|
14054
14056
|
three_inch: {
|
|
14055
14057
|
grid_column?: 1 | 2;
|
|
@@ -14191,7 +14193,7 @@ export declare namespace Service {
|
|
|
14191
14193
|
}
|
|
14192
14194
|
namespace ActivityFormV2Result {
|
|
14193
14195
|
const fieldType_enums: readonly ["Text", "String", "Phone", "Email", "Date", "Number", "List", "Separator", "Heading", "Media", "Signature", "DateTime", "YesNo", "ProductBarcodeScan", "BarcodeScan", "GeoPoint"];
|
|
14194
|
-
type FormV2FieldType =
|
|
14196
|
+
type FormV2FieldType = typeof fieldType_enums[number];
|
|
14195
14197
|
interface FieldResult {
|
|
14196
14198
|
_id?: string;
|
|
14197
14199
|
field_id: string;
|
|
@@ -14466,7 +14468,7 @@ export declare namespace Service {
|
|
|
14466
14468
|
}
|
|
14467
14469
|
namespace TimelineReport {
|
|
14468
14470
|
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"];
|
|
14469
|
-
type ActivityType =
|
|
14471
|
+
type ActivityType = typeof activity_types[number];
|
|
14470
14472
|
export interface Data {
|
|
14471
14473
|
_id: StringId;
|
|
14472
14474
|
company_namespace: string[];
|
|
@@ -15172,7 +15174,7 @@ export declare namespace Service {
|
|
|
15172
15174
|
}
|
|
15173
15175
|
namespace TimelineTimeList {
|
|
15174
15176
|
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"];
|
|
15175
|
-
type ActivityType =
|
|
15177
|
+
type ActivityType = typeof activity_types[number];
|
|
15176
15178
|
export interface Data {
|
|
15177
15179
|
_id: StringId;
|
|
15178
15180
|
company_namespace: string[];
|
|
@@ -15633,17 +15635,17 @@ export declare namespace Service {
|
|
|
15633
15635
|
}
|
|
15634
15636
|
namespace SalesAnalyticsReport {
|
|
15635
15637
|
const groupBy_options: readonly ["client", "rep", "issue_date", "due_date", "serial_number", "product", "variant", "brand", "category", "status", "promotion_type", "class", "measureunit", "promotion", "chain", "channel", "city", "region", "country", "route", "teams"];
|
|
15636
|
-
type GroupByOption =
|
|
15638
|
+
type GroupByOption = typeof groupBy_options[number];
|
|
15637
15639
|
const promotion_type_options: readonly ["get", "buy"];
|
|
15638
|
-
type PromotionTypeOption =
|
|
15640
|
+
type PromotionTypeOption = typeof promotion_type_options[number];
|
|
15639
15641
|
const class_options: readonly ["invoice", "return"];
|
|
15640
|
-
type ClassOption =
|
|
15642
|
+
type ClassOption = typeof class_options[number];
|
|
15641
15643
|
const status_options: readonly ["unpaid", "partially_paid", "paid"];
|
|
15642
|
-
type StatusOption =
|
|
15644
|
+
type StatusOption = typeof status_options[number];
|
|
15643
15645
|
const sortBy_field_options: readonly ["_id", "time"];
|
|
15644
|
-
type SortByFieldOption =
|
|
15646
|
+
type SortByFieldOption = typeof sortBy_field_options[number];
|
|
15645
15647
|
const sortBy_type_options: readonly ["asc", "desc"];
|
|
15646
|
-
type SortByTypeOption =
|
|
15648
|
+
type SortByTypeOption = typeof sortBy_type_options[number];
|
|
15647
15649
|
interface SortByOption {
|
|
15648
15650
|
field: SortByFieldOption;
|
|
15649
15651
|
type: SortByTypeOption;
|
|
@@ -16708,6 +16710,8 @@ export declare namespace Service {
|
|
|
16708
16710
|
is_default?: boolean;
|
|
16709
16711
|
teams_populated: Pick<Team.TeamSchema, "name" | "_id">;
|
|
16710
16712
|
copied_from_populated?: ReportView.Data;
|
|
16713
|
+
report_view_favorite_id?: StringId;
|
|
16714
|
+
report_view_default_id?: StringId;
|
|
16711
16715
|
})[];
|
|
16712
16716
|
}
|
|
16713
16717
|
}
|
|
@@ -16723,6 +16727,8 @@ export declare namespace Service {
|
|
|
16723
16727
|
is_default?: boolean;
|
|
16724
16728
|
teams_populated: Pick<Team.TeamSchema, "name" | "_id">;
|
|
16725
16729
|
copied_from_populated?: ReportView.Data;
|
|
16730
|
+
report_view_favorite_id?: StringId;
|
|
16731
|
+
report_view_default_id?: StringId;
|
|
16726
16732
|
};
|
|
16727
16733
|
}
|
|
16728
16734
|
namespace Create {
|
|
@@ -16853,6 +16859,214 @@ export declare namespace Service {
|
|
|
16853
16859
|
};
|
|
16854
16860
|
}
|
|
16855
16861
|
}
|
|
16862
|
+
namespace Presentation {
|
|
16863
|
+
export interface Data {
|
|
16864
|
+
_id: StringId;
|
|
16865
|
+
company_namespace: string[];
|
|
16866
|
+
name: string;
|
|
16867
|
+
disabled: boolean;
|
|
16868
|
+
teams: StringId[];
|
|
16869
|
+
createdAt: string;
|
|
16870
|
+
updatedAt: string;
|
|
16871
|
+
__v?: number;
|
|
16872
|
+
}
|
|
16873
|
+
export interface CreateBody {
|
|
16874
|
+
company_namespace?: string[];
|
|
16875
|
+
name: string;
|
|
16876
|
+
disabled?: boolean;
|
|
16877
|
+
teams?: StringId[];
|
|
16878
|
+
}
|
|
16879
|
+
export type UpdateBody = Partial<Data>;
|
|
16880
|
+
export type PopulatedDoc = Data & {
|
|
16881
|
+
teams_populated?: Pick<Team.TeamSchema, "name" | "_id">[];
|
|
16882
|
+
};
|
|
16883
|
+
type PopulatedKeys = "teams";
|
|
16884
|
+
type SortingKeys = "_id" | "createdAt" | "updatedAt";
|
|
16885
|
+
export namespace Find {
|
|
16886
|
+
type Params = DefaultPaginationQueryParams & {
|
|
16887
|
+
sortBy?: {
|
|
16888
|
+
field: SortingKeys;
|
|
16889
|
+
type: "asc" | "desc";
|
|
16890
|
+
}[];
|
|
16891
|
+
populatedKeys?: PopulatedKeys | PopulatedKeys[];
|
|
16892
|
+
_id?: StringId | StringId[];
|
|
16893
|
+
search?: string;
|
|
16894
|
+
name?: string | string[];
|
|
16895
|
+
disabled?: boolean;
|
|
16896
|
+
teams?: StringId | StringId[];
|
|
16897
|
+
from_updatedAt?: number;
|
|
16898
|
+
to_updatedAt?: number;
|
|
16899
|
+
from_createdAt?: number;
|
|
16900
|
+
to_createdAt?: number;
|
|
16901
|
+
};
|
|
16902
|
+
interface Result extends DefaultPaginationResult {
|
|
16903
|
+
data: PopulatedDoc[];
|
|
16904
|
+
}
|
|
16905
|
+
}
|
|
16906
|
+
export namespace Get {
|
|
16907
|
+
type ID = string;
|
|
16908
|
+
type Params = {
|
|
16909
|
+
populatedKeys?: PopulatedKeys[];
|
|
16910
|
+
};
|
|
16911
|
+
type Result = PopulatedDoc;
|
|
16912
|
+
}
|
|
16913
|
+
export namespace Create {
|
|
16914
|
+
type Body = CreateBody;
|
|
16915
|
+
type Result = Data;
|
|
16916
|
+
}
|
|
16917
|
+
export namespace Update {
|
|
16918
|
+
type ID = StringId;
|
|
16919
|
+
type Body = UpdateBody;
|
|
16920
|
+
type Result = Data;
|
|
16921
|
+
}
|
|
16922
|
+
export namespace Remove {
|
|
16923
|
+
type ID = string;
|
|
16924
|
+
type Result = Data;
|
|
16925
|
+
}
|
|
16926
|
+
export {};
|
|
16927
|
+
}
|
|
16928
|
+
namespace Sequence {
|
|
16929
|
+
export interface Data {
|
|
16930
|
+
_id: StringId;
|
|
16931
|
+
company_namespace: string[];
|
|
16932
|
+
presentation: StringId;
|
|
16933
|
+
product: StringId;
|
|
16934
|
+
disabled: boolean;
|
|
16935
|
+
position: number;
|
|
16936
|
+
createdAt: string;
|
|
16937
|
+
updatedAt: string;
|
|
16938
|
+
__v?: number;
|
|
16939
|
+
}
|
|
16940
|
+
export interface CreateBody {
|
|
16941
|
+
company_namespace?: string[];
|
|
16942
|
+
presentation: StringId;
|
|
16943
|
+
product: StringId;
|
|
16944
|
+
disabled?: boolean;
|
|
16945
|
+
position: number;
|
|
16946
|
+
}
|
|
16947
|
+
export type UpdateBody = Partial<Data>;
|
|
16948
|
+
export type PopulatedDoc = Data & {
|
|
16949
|
+
presentation_populated?: Pick<Presentation.Data, "name" | "_id">[];
|
|
16950
|
+
product_populated?: Pick<Product.Data, "name" | "_id" | "local_name" | "barcode" | "sku">[];
|
|
16951
|
+
};
|
|
16952
|
+
type PopulatedKeys = "presentation" | "product";
|
|
16953
|
+
type SortingKeys = "_id" | "position";
|
|
16954
|
+
export namespace Find {
|
|
16955
|
+
type Params = DefaultPaginationQueryParams & {
|
|
16956
|
+
sortBy?: {
|
|
16957
|
+
field: SortingKeys;
|
|
16958
|
+
type: "asc" | "desc";
|
|
16959
|
+
}[];
|
|
16960
|
+
populatedKeys?: PopulatedKeys | PopulatedKeys[];
|
|
16961
|
+
_id?: StringId | StringId[];
|
|
16962
|
+
search?: string;
|
|
16963
|
+
product?: StringId | StringId[];
|
|
16964
|
+
presentation?: StringId | StringId[];
|
|
16965
|
+
disabled?: boolean;
|
|
16966
|
+
from_updatedAt?: number;
|
|
16967
|
+
to_updatedAt?: number;
|
|
16968
|
+
from_createdAt?: number;
|
|
16969
|
+
to_createdAt?: number;
|
|
16970
|
+
};
|
|
16971
|
+
interface Result extends DefaultPaginationResult {
|
|
16972
|
+
data: PopulatedDoc[];
|
|
16973
|
+
}
|
|
16974
|
+
}
|
|
16975
|
+
export namespace Get {
|
|
16976
|
+
type ID = string;
|
|
16977
|
+
type Params = {
|
|
16978
|
+
populatedKeys?: PopulatedKeys[];
|
|
16979
|
+
};
|
|
16980
|
+
type Result = PopulatedDoc;
|
|
16981
|
+
}
|
|
16982
|
+
export namespace Create {
|
|
16983
|
+
type Body = CreateBody;
|
|
16984
|
+
type Result = Data;
|
|
16985
|
+
}
|
|
16986
|
+
export namespace Update {
|
|
16987
|
+
type ID = StringId;
|
|
16988
|
+
type Body = UpdateBody;
|
|
16989
|
+
type Result = Data;
|
|
16990
|
+
}
|
|
16991
|
+
export namespace Remove {
|
|
16992
|
+
type ID = string;
|
|
16993
|
+
type Result = Data;
|
|
16994
|
+
}
|
|
16995
|
+
export {};
|
|
16996
|
+
}
|
|
16997
|
+
namespace Slide {
|
|
16998
|
+
export interface Data {
|
|
16999
|
+
_id: StringId;
|
|
17000
|
+
company_namespace: string[];
|
|
17001
|
+
sequence: StringId;
|
|
17002
|
+
photo_media: StringId;
|
|
17003
|
+
is_book_mark?: boolean;
|
|
17004
|
+
book_mark_key_message?: string;
|
|
17005
|
+
disabled: boolean;
|
|
17006
|
+
position: number;
|
|
17007
|
+
createdAt: string;
|
|
17008
|
+
updatedAt: string;
|
|
17009
|
+
__v?: number;
|
|
17010
|
+
}
|
|
17011
|
+
export interface CreateBody {
|
|
17012
|
+
company_namespace?: string[];
|
|
17013
|
+
sequence: StringId;
|
|
17014
|
+
photo_media: StringId;
|
|
17015
|
+
is_book_mark?: boolean;
|
|
17016
|
+
book_mark_key_message?: string;
|
|
17017
|
+
disabled?: boolean;
|
|
17018
|
+
position: number;
|
|
17019
|
+
}
|
|
17020
|
+
export type UpdateBody = Partial<Data>;
|
|
17021
|
+
export type PopulatedDoc = Data & {
|
|
17022
|
+
sequence_populated?: Pick<Sequence.Data, "position" | "_id" | "product" | "presentation">[];
|
|
17023
|
+
photo_media_populated?: PopulatedMediaStorage;
|
|
17024
|
+
};
|
|
17025
|
+
type PopulatedKeys = "sequence" | "photo_media";
|
|
17026
|
+
type SortingKeys = "_id" | "position" | "is_book_mark";
|
|
17027
|
+
export namespace Find {
|
|
17028
|
+
type Params = DefaultPaginationQueryParams & {
|
|
17029
|
+
sortBy?: {
|
|
17030
|
+
field: SortingKeys;
|
|
17031
|
+
type: "asc" | "desc";
|
|
17032
|
+
}[];
|
|
17033
|
+
populatedKeys?: PopulatedKeys | PopulatedKeys[];
|
|
17034
|
+
_id?: StringId | StringId[];
|
|
17035
|
+
search?: string;
|
|
17036
|
+
sequence?: StringId | StringId[];
|
|
17037
|
+
is_book_mark?: boolean | boolean[];
|
|
17038
|
+
disabled?: boolean;
|
|
17039
|
+
from_updatedAt?: number;
|
|
17040
|
+
to_updatedAt?: number;
|
|
17041
|
+
from_createdAt?: number;
|
|
17042
|
+
to_createdAt?: number;
|
|
17043
|
+
};
|
|
17044
|
+
interface Result extends DefaultPaginationResult {
|
|
17045
|
+
data: PopulatedDoc[];
|
|
17046
|
+
}
|
|
17047
|
+
}
|
|
17048
|
+
export namespace Get {
|
|
17049
|
+
type ID = string;
|
|
17050
|
+
type Params = {
|
|
17051
|
+
populatedKeys?: PopulatedKeys[];
|
|
17052
|
+
};
|
|
17053
|
+
type Result = PopulatedDoc;
|
|
17054
|
+
}
|
|
17055
|
+
export namespace Create {
|
|
17056
|
+
type Body = CreateBody;
|
|
17057
|
+
type Result = Data;
|
|
17058
|
+
}
|
|
17059
|
+
export namespace Update {
|
|
17060
|
+
type ID = StringId;
|
|
17061
|
+
type Body = UpdateBody;
|
|
17062
|
+
type Result = Data;
|
|
17063
|
+
}
|
|
17064
|
+
export namespace Remove {
|
|
17065
|
+
type ID = string;
|
|
17066
|
+
type Result = Data;
|
|
17067
|
+
}
|
|
17068
|
+
export {};
|
|
17069
|
+
}
|
|
16856
17070
|
}
|
|
16857
17071
|
export type StringId = string;
|
|
16858
17072
|
export type NameSpaces = string[];
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -118,6 +118,9 @@ export const end_points = {
|
|
|
118
118
|
REPORT_VIEW_DEFAULT: "report-view-default",
|
|
119
119
|
REPORT_VIEW_FAVORITE: "report-view-favorite",
|
|
120
120
|
COPY_REPORT_VIEW: "copy-report-view",
|
|
121
|
+
PRESENTATION: "presentation",
|
|
122
|
+
SEQUENCE: "sequence",
|
|
123
|
+
SLIDE: "slide",
|
|
121
124
|
} as const;
|
|
122
125
|
export type EndPoints = (typeof end_points)[keyof typeof end_points];
|
|
123
126
|
|
|
@@ -210,6 +213,9 @@ export const availableService = [
|
|
|
210
213
|
"workorderPortalLink",
|
|
211
214
|
"customField",
|
|
212
215
|
"salesAnalyticsReport",
|
|
216
|
+
"presentation",
|
|
217
|
+
"sequence",
|
|
218
|
+
"slide",
|
|
213
219
|
] as const;
|
|
214
220
|
export type AvailableService = (typeof availableService)[number];
|
|
215
221
|
|
|
@@ -5564,6 +5570,164 @@ export default class Repzo {
|
|
|
5564
5570
|
return res;
|
|
5565
5571
|
},
|
|
5566
5572
|
};
|
|
5573
|
+
|
|
5574
|
+
presentation = {
|
|
5575
|
+
_path: Repzo._end_points.PRESENTATION,
|
|
5576
|
+
find: async (
|
|
5577
|
+
params?: Service.Presentation.Find.Params,
|
|
5578
|
+
): Promise<Service.Presentation.Find.Result> => {
|
|
5579
|
+
let res: Service.Presentation.Find.Result = await this._fetch(
|
|
5580
|
+
this.svAPIEndpoint,
|
|
5581
|
+
this.presentation._path,
|
|
5582
|
+
params,
|
|
5583
|
+
);
|
|
5584
|
+
return res;
|
|
5585
|
+
},
|
|
5586
|
+
get: async (
|
|
5587
|
+
id: Service.Presentation.Get.ID,
|
|
5588
|
+
params?: Service.Presentation.Get.Params,
|
|
5589
|
+
): Promise<Service.Presentation.Get.Result> => {
|
|
5590
|
+
return await this._fetch(
|
|
5591
|
+
this.svAPIEndpoint,
|
|
5592
|
+
this.presentation._path + `/${id}`,
|
|
5593
|
+
params,
|
|
5594
|
+
);
|
|
5595
|
+
},
|
|
5596
|
+
create: async (
|
|
5597
|
+
body: Service.Presentation.Create.Body,
|
|
5598
|
+
): Promise<Service.Presentation.Create.Result> => {
|
|
5599
|
+
let res = await this._create(
|
|
5600
|
+
this.svAPIEndpoint,
|
|
5601
|
+
this.presentation._path,
|
|
5602
|
+
body,
|
|
5603
|
+
);
|
|
5604
|
+
return res;
|
|
5605
|
+
},
|
|
5606
|
+
update: async (
|
|
5607
|
+
id: Service.Presentation.Update.ID,
|
|
5608
|
+
body: Service.Presentation.Update.Body,
|
|
5609
|
+
): Promise<Service.Presentation.Update.Result> => {
|
|
5610
|
+
let res: Service.Presentation.Update.Result = await this._update(
|
|
5611
|
+
this.svAPIEndpoint,
|
|
5612
|
+
this.presentation._path + `/${id}`,
|
|
5613
|
+
body,
|
|
5614
|
+
);
|
|
5615
|
+
return res;
|
|
5616
|
+
},
|
|
5617
|
+
remove: async (
|
|
5618
|
+
id: Service.Presentation.Update.ID,
|
|
5619
|
+
): Promise<Service.Presentation.Remove.Result> => {
|
|
5620
|
+
let res: Service.Presentation.Remove.Result = await this._delete(
|
|
5621
|
+
this.svAPIEndpoint,
|
|
5622
|
+
this.presentation._path + `/${id}`,
|
|
5623
|
+
);
|
|
5624
|
+
return res;
|
|
5625
|
+
},
|
|
5626
|
+
};
|
|
5627
|
+
|
|
5628
|
+
sequence = {
|
|
5629
|
+
_path: Repzo._end_points.SEQUENCE,
|
|
5630
|
+
find: async (
|
|
5631
|
+
params?: Service.Sequence.Find.Params,
|
|
5632
|
+
): Promise<Service.Sequence.Find.Result> => {
|
|
5633
|
+
let res: Service.Sequence.Find.Result = await this._fetch(
|
|
5634
|
+
this.svAPIEndpoint,
|
|
5635
|
+
this.sequence._path,
|
|
5636
|
+
params,
|
|
5637
|
+
);
|
|
5638
|
+
return res;
|
|
5639
|
+
},
|
|
5640
|
+
get: async (
|
|
5641
|
+
id: Service.Sequence.Get.ID,
|
|
5642
|
+
params?: Service.Sequence.Get.Params,
|
|
5643
|
+
): Promise<Service.Sequence.Get.Result> => {
|
|
5644
|
+
return await this._fetch(
|
|
5645
|
+
this.svAPIEndpoint,
|
|
5646
|
+
this.sequence._path + `/${id}`,
|
|
5647
|
+
params,
|
|
5648
|
+
);
|
|
5649
|
+
},
|
|
5650
|
+
create: async (
|
|
5651
|
+
body: Service.Sequence.Create.Body,
|
|
5652
|
+
): Promise<Service.Sequence.Create.Result> => {
|
|
5653
|
+
let res = await this._create(
|
|
5654
|
+
this.svAPIEndpoint,
|
|
5655
|
+
this.sequence._path,
|
|
5656
|
+
body,
|
|
5657
|
+
);
|
|
5658
|
+
return res;
|
|
5659
|
+
},
|
|
5660
|
+
update: async (
|
|
5661
|
+
id: Service.Sequence.Update.ID,
|
|
5662
|
+
body: Service.Sequence.Update.Body,
|
|
5663
|
+
): Promise<Service.Sequence.Update.Result> => {
|
|
5664
|
+
let res: Service.Sequence.Update.Result = await this._update(
|
|
5665
|
+
this.svAPIEndpoint,
|
|
5666
|
+
this.sequence._path + `/${id}`,
|
|
5667
|
+
body,
|
|
5668
|
+
);
|
|
5669
|
+
return res;
|
|
5670
|
+
},
|
|
5671
|
+
remove: async (
|
|
5672
|
+
id: Service.Sequence.Update.ID,
|
|
5673
|
+
): Promise<Service.Sequence.Remove.Result> => {
|
|
5674
|
+
let res: Service.Sequence.Remove.Result = await this._delete(
|
|
5675
|
+
this.svAPIEndpoint,
|
|
5676
|
+
this.sequence._path + `/${id}`,
|
|
5677
|
+
);
|
|
5678
|
+
return res;
|
|
5679
|
+
},
|
|
5680
|
+
};
|
|
5681
|
+
|
|
5682
|
+
slide = {
|
|
5683
|
+
_path: Repzo._end_points.SLIDE,
|
|
5684
|
+
find: async (
|
|
5685
|
+
params?: Service.Slide.Find.Params,
|
|
5686
|
+
): Promise<Service.Slide.Find.Result> => {
|
|
5687
|
+
let res: Service.Slide.Find.Result = await this._fetch(
|
|
5688
|
+
this.svAPIEndpoint,
|
|
5689
|
+
this.slide._path,
|
|
5690
|
+
params,
|
|
5691
|
+
);
|
|
5692
|
+
return res;
|
|
5693
|
+
},
|
|
5694
|
+
get: async (
|
|
5695
|
+
id: Service.Slide.Get.ID,
|
|
5696
|
+
params?: Service.Slide.Get.Params,
|
|
5697
|
+
): Promise<Service.Slide.Get.Result> => {
|
|
5698
|
+
return await this._fetch(
|
|
5699
|
+
this.svAPIEndpoint,
|
|
5700
|
+
this.slide._path + `/${id}`,
|
|
5701
|
+
params,
|
|
5702
|
+
);
|
|
5703
|
+
},
|
|
5704
|
+
create: async (
|
|
5705
|
+
body: Service.Slide.Create.Body,
|
|
5706
|
+
): Promise<Service.Slide.Create.Result> => {
|
|
5707
|
+
let res = await this._create(this.svAPIEndpoint, this.slide._path, body);
|
|
5708
|
+
return res;
|
|
5709
|
+
},
|
|
5710
|
+
update: async (
|
|
5711
|
+
id: Service.Slide.Update.ID,
|
|
5712
|
+
body: Service.Slide.Update.Body,
|
|
5713
|
+
): Promise<Service.Slide.Update.Result> => {
|
|
5714
|
+
let res: Service.Slide.Update.Result = await this._update(
|
|
5715
|
+
this.svAPIEndpoint,
|
|
5716
|
+
this.slide._path + `/${id}`,
|
|
5717
|
+
body,
|
|
5718
|
+
);
|
|
5719
|
+
return res;
|
|
5720
|
+
},
|
|
5721
|
+
remove: async (
|
|
5722
|
+
id: Service.Slide.Update.ID,
|
|
5723
|
+
): Promise<Service.Slide.Remove.Result> => {
|
|
5724
|
+
let res: Service.Slide.Remove.Result = await this._delete(
|
|
5725
|
+
this.svAPIEndpoint,
|
|
5726
|
+
this.slide._path + `/${id}`,
|
|
5727
|
+
);
|
|
5728
|
+
return res;
|
|
5729
|
+
},
|
|
5730
|
+
};
|
|
5567
5731
|
}
|
|
5568
5732
|
|
|
5569
5733
|
function normalizeParams(params: Params): { [key: string]: any } {
|
package/src/types/index.ts
CHANGED
|
@@ -849,6 +849,7 @@ export namespace Service {
|
|
|
849
849
|
updatedAt: string;
|
|
850
850
|
__v: number;
|
|
851
851
|
}
|
|
852
|
+
export type Data = ProductSchema;
|
|
852
853
|
interface ProductBody {
|
|
853
854
|
name?: string;
|
|
854
855
|
category?: string;
|
|
@@ -2211,6 +2212,7 @@ export namespace Service {
|
|
|
2211
2212
|
previous_entry?: any;
|
|
2212
2213
|
show_previous_result?: boolean;
|
|
2213
2214
|
hidden?: boolean;
|
|
2215
|
+
force_live_photo?: boolean;
|
|
2214
2216
|
custom_list?: string;
|
|
2215
2217
|
custom_list_element?: string;
|
|
2216
2218
|
parent_field?: string;
|
|
@@ -18951,6 +18953,8 @@ export namespace Service {
|
|
|
18951
18953
|
is_default?: boolean;
|
|
18952
18954
|
teams_populated: Pick<Team.TeamSchema, "name" | "_id">;
|
|
18953
18955
|
copied_from_populated?: ReportView.Data;
|
|
18956
|
+
report_view_favorite_id?: StringId;
|
|
18957
|
+
report_view_default_id?: StringId;
|
|
18954
18958
|
})[];
|
|
18955
18959
|
}
|
|
18956
18960
|
}
|
|
@@ -18967,6 +18971,8 @@ export namespace Service {
|
|
|
18967
18971
|
is_default?: boolean;
|
|
18968
18972
|
teams_populated: Pick<Team.TeamSchema, "name" | "_id">;
|
|
18969
18973
|
copied_from_populated?: ReportView.Data;
|
|
18974
|
+
report_view_favorite_id?: StringId;
|
|
18975
|
+
report_view_default_id?: StringId;
|
|
18970
18976
|
};
|
|
18971
18977
|
}
|
|
18972
18978
|
|
|
@@ -19103,6 +19109,214 @@ export namespace Service {
|
|
|
19103
19109
|
export type Result = ReportView.Data & { copied_from: StringId };
|
|
19104
19110
|
}
|
|
19105
19111
|
}
|
|
19112
|
+
|
|
19113
|
+
export namespace Presentation {
|
|
19114
|
+
export interface Data {
|
|
19115
|
+
_id: StringId;
|
|
19116
|
+
company_namespace: string[];
|
|
19117
|
+
name: string;
|
|
19118
|
+
disabled: boolean;
|
|
19119
|
+
teams: StringId[];
|
|
19120
|
+
createdAt: string;
|
|
19121
|
+
updatedAt: string;
|
|
19122
|
+
__v?: number;
|
|
19123
|
+
}
|
|
19124
|
+
export interface CreateBody {
|
|
19125
|
+
company_namespace?: string[];
|
|
19126
|
+
name: string;
|
|
19127
|
+
disabled?: boolean;
|
|
19128
|
+
teams?: StringId[];
|
|
19129
|
+
}
|
|
19130
|
+
export type UpdateBody = Partial<Data>;
|
|
19131
|
+
|
|
19132
|
+
export type PopulatedDoc = Data & {
|
|
19133
|
+
teams_populated?: Pick<Team.TeamSchema, "name" | "_id">[];
|
|
19134
|
+
};
|
|
19135
|
+
|
|
19136
|
+
type PopulatedKeys = "teams";
|
|
19137
|
+
type SortingKeys = "_id" | "createdAt" | "updatedAt";
|
|
19138
|
+
|
|
19139
|
+
export namespace Find {
|
|
19140
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
19141
|
+
sortBy?: { field: SortingKeys; type: "asc" | "desc" }[];
|
|
19142
|
+
populatedKeys?: PopulatedKeys | PopulatedKeys[];
|
|
19143
|
+
_id?: StringId | StringId[];
|
|
19144
|
+
search?: string;
|
|
19145
|
+
name?: string | string[];
|
|
19146
|
+
disabled?: boolean;
|
|
19147
|
+
teams?: StringId | StringId[];
|
|
19148
|
+
from_updatedAt?: number;
|
|
19149
|
+
to_updatedAt?: number;
|
|
19150
|
+
from_createdAt?: number;
|
|
19151
|
+
to_createdAt?: number;
|
|
19152
|
+
};
|
|
19153
|
+
export interface Result extends DefaultPaginationResult {
|
|
19154
|
+
data: PopulatedDoc[];
|
|
19155
|
+
}
|
|
19156
|
+
}
|
|
19157
|
+
export namespace Get {
|
|
19158
|
+
export type ID = string;
|
|
19159
|
+
export type Params = { populatedKeys?: PopulatedKeys[] };
|
|
19160
|
+
export type Result = PopulatedDoc;
|
|
19161
|
+
}
|
|
19162
|
+
export namespace Create {
|
|
19163
|
+
export type Body = CreateBody;
|
|
19164
|
+
export type Result = Data;
|
|
19165
|
+
}
|
|
19166
|
+
export namespace Update {
|
|
19167
|
+
export type ID = StringId;
|
|
19168
|
+
export type Body = UpdateBody;
|
|
19169
|
+
export type Result = Data;
|
|
19170
|
+
}
|
|
19171
|
+
export namespace Remove {
|
|
19172
|
+
export type ID = string;
|
|
19173
|
+
export type Result = Data;
|
|
19174
|
+
}
|
|
19175
|
+
}
|
|
19176
|
+
|
|
19177
|
+
export namespace Sequence {
|
|
19178
|
+
export interface Data {
|
|
19179
|
+
_id: StringId;
|
|
19180
|
+
company_namespace: string[];
|
|
19181
|
+
presentation: StringId;
|
|
19182
|
+
product: StringId;
|
|
19183
|
+
disabled: boolean;
|
|
19184
|
+
position: number;
|
|
19185
|
+
createdAt: string;
|
|
19186
|
+
updatedAt: string;
|
|
19187
|
+
__v?: number;
|
|
19188
|
+
}
|
|
19189
|
+
export interface CreateBody {
|
|
19190
|
+
company_namespace?: string[];
|
|
19191
|
+
presentation: StringId;
|
|
19192
|
+
product: StringId;
|
|
19193
|
+
disabled?: boolean;
|
|
19194
|
+
position: number;
|
|
19195
|
+
}
|
|
19196
|
+
export type UpdateBody = Partial<Data>;
|
|
19197
|
+
|
|
19198
|
+
export type PopulatedDoc = Data & {
|
|
19199
|
+
presentation_populated?: Pick<Presentation.Data, "name" | "_id">[];
|
|
19200
|
+
product_populated?: Pick<
|
|
19201
|
+
Product.Data,
|
|
19202
|
+
"name" | "_id" | "local_name" | "barcode" | "sku"
|
|
19203
|
+
>[];
|
|
19204
|
+
};
|
|
19205
|
+
|
|
19206
|
+
type PopulatedKeys = "presentation" | "product";
|
|
19207
|
+
type SortingKeys = "_id" | "position";
|
|
19208
|
+
|
|
19209
|
+
export namespace Find {
|
|
19210
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
19211
|
+
sortBy?: { field: SortingKeys; type: "asc" | "desc" }[];
|
|
19212
|
+
populatedKeys?: PopulatedKeys | PopulatedKeys[];
|
|
19213
|
+
_id?: StringId | StringId[];
|
|
19214
|
+
search?: string;
|
|
19215
|
+
product?: StringId | StringId[];
|
|
19216
|
+
presentation?: StringId | StringId[];
|
|
19217
|
+
disabled?: boolean;
|
|
19218
|
+
from_updatedAt?: number;
|
|
19219
|
+
to_updatedAt?: number;
|
|
19220
|
+
from_createdAt?: number;
|
|
19221
|
+
to_createdAt?: number;
|
|
19222
|
+
};
|
|
19223
|
+
export interface Result extends DefaultPaginationResult {
|
|
19224
|
+
data: PopulatedDoc[];
|
|
19225
|
+
}
|
|
19226
|
+
}
|
|
19227
|
+
export namespace Get {
|
|
19228
|
+
export type ID = string;
|
|
19229
|
+
export type Params = { populatedKeys?: PopulatedKeys[] };
|
|
19230
|
+
export type Result = PopulatedDoc;
|
|
19231
|
+
}
|
|
19232
|
+
export namespace Create {
|
|
19233
|
+
export type Body = CreateBody;
|
|
19234
|
+
export type Result = Data;
|
|
19235
|
+
}
|
|
19236
|
+
export namespace Update {
|
|
19237
|
+
export type ID = StringId;
|
|
19238
|
+
export type Body = UpdateBody;
|
|
19239
|
+
export type Result = Data;
|
|
19240
|
+
}
|
|
19241
|
+
export namespace Remove {
|
|
19242
|
+
export type ID = string;
|
|
19243
|
+
export type Result = Data;
|
|
19244
|
+
}
|
|
19245
|
+
}
|
|
19246
|
+
|
|
19247
|
+
export namespace Slide {
|
|
19248
|
+
export interface Data {
|
|
19249
|
+
_id: StringId;
|
|
19250
|
+
company_namespace: string[];
|
|
19251
|
+
sequence: StringId;
|
|
19252
|
+
photo_media: StringId;
|
|
19253
|
+
is_book_mark?: boolean;
|
|
19254
|
+
book_mark_key_message?: string;
|
|
19255
|
+
disabled: boolean;
|
|
19256
|
+
position: number;
|
|
19257
|
+
createdAt: string;
|
|
19258
|
+
updatedAt: string;
|
|
19259
|
+
__v?: number;
|
|
19260
|
+
}
|
|
19261
|
+
export interface CreateBody {
|
|
19262
|
+
company_namespace?: string[];
|
|
19263
|
+
sequence: StringId;
|
|
19264
|
+
photo_media: StringId;
|
|
19265
|
+
is_book_mark?: boolean;
|
|
19266
|
+
book_mark_key_message?: string;
|
|
19267
|
+
disabled?: boolean;
|
|
19268
|
+
position: number;
|
|
19269
|
+
}
|
|
19270
|
+
export type UpdateBody = Partial<Data>;
|
|
19271
|
+
|
|
19272
|
+
export type PopulatedDoc = Data & {
|
|
19273
|
+
sequence_populated?: Pick<
|
|
19274
|
+
Sequence.Data,
|
|
19275
|
+
"position" | "_id" | "product" | "presentation"
|
|
19276
|
+
>[];
|
|
19277
|
+
photo_media_populated?: PopulatedMediaStorage;
|
|
19278
|
+
};
|
|
19279
|
+
|
|
19280
|
+
type PopulatedKeys = "sequence" | "photo_media";
|
|
19281
|
+
type SortingKeys = "_id" | "position" | "is_book_mark";
|
|
19282
|
+
|
|
19283
|
+
export namespace Find {
|
|
19284
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
19285
|
+
sortBy?: { field: SortingKeys; type: "asc" | "desc" }[];
|
|
19286
|
+
populatedKeys?: PopulatedKeys | PopulatedKeys[];
|
|
19287
|
+
_id?: StringId | StringId[];
|
|
19288
|
+
search?: string;
|
|
19289
|
+
sequence?: StringId | StringId[];
|
|
19290
|
+
is_book_mark?: boolean | boolean[];
|
|
19291
|
+
disabled?: boolean;
|
|
19292
|
+
from_updatedAt?: number;
|
|
19293
|
+
to_updatedAt?: number;
|
|
19294
|
+
from_createdAt?: number;
|
|
19295
|
+
to_createdAt?: number;
|
|
19296
|
+
};
|
|
19297
|
+
export interface Result extends DefaultPaginationResult {
|
|
19298
|
+
data: PopulatedDoc[];
|
|
19299
|
+
}
|
|
19300
|
+
}
|
|
19301
|
+
export namespace Get {
|
|
19302
|
+
export type ID = string;
|
|
19303
|
+
export type Params = { populatedKeys?: PopulatedKeys[] };
|
|
19304
|
+
export type Result = PopulatedDoc;
|
|
19305
|
+
}
|
|
19306
|
+
export namespace Create {
|
|
19307
|
+
export type Body = CreateBody;
|
|
19308
|
+
export type Result = Data;
|
|
19309
|
+
}
|
|
19310
|
+
export namespace Update {
|
|
19311
|
+
export type ID = StringId;
|
|
19312
|
+
export type Body = UpdateBody;
|
|
19313
|
+
export type Result = Data;
|
|
19314
|
+
}
|
|
19315
|
+
export namespace Remove {
|
|
19316
|
+
export type ID = string;
|
|
19317
|
+
export type Result = Data;
|
|
19318
|
+
}
|
|
19319
|
+
}
|
|
19106
19320
|
}
|
|
19107
19321
|
|
|
19108
19322
|
export type StringId = string;
|