repzo 1.0.290 → 1.0.291

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 CHANGED
@@ -51,6 +51,7 @@ export declare const end_points: {
51
51
  readonly VOID_SETTLEMENT: "void-settlement";
52
52
  readonly CHECK: "checks";
53
53
  readonly DAY: "day";
54
+ readonly DAY_SHIFT: "day-shift";
54
55
  readonly RECEIVING_MATERIAL: "receiving-material";
55
56
  readonly ADJUST_ACCOUNT: "adjust-account";
56
57
  readonly TRANSFER: "transfer";
@@ -151,7 +152,7 @@ export declare const end_points: {
151
152
  readonly RESERVATION: "reservation";
152
153
  };
153
154
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
154
- 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", "geoZone", "productModifiersGroup", "channel", "speciality", "clientContact", "paymentTerm", "bank", "bank_list", "customStatus", "customList", "customListItem", "inventoryAdjustmentReason", "workorder", "workorderRequest", "supplier", "quickConvertToPdf", "visit", "activityFeedback", "activityFeedbackV2", "feedbackOption", "invoice", "proforma", "payment", "refund", "settlement", "voidSettlement", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "activityItemStatus", "itemStatusType", "adjustInventory", "inventory", "integrationApp", "joinActionsWebHook", "patchAction", "updateIntegrationMeta", "assetPartType", "assetPart", "assetPartUnit", "assetPartReceival", "assetPartTransfer", "returnAssetPartUnit", "storeAssetPartUnit", "ocrInvoiceJobTemplate", "ocrInvoiceJobGroup", "activityAiSalesOrder", "ocrInvoiceJob", "ocrInvoiceJobPage", "settings", "mailUnsubscribe", "approvalRequest", "safeInvoiceSerialCounter", "clientLocation", "assetType", "asset", "assetUnit", "workorderPortal", "approval", "workorderCategory", "contract", "contractInstallment", "repBalanceSummary", "workorderPortalLink", "customField", "salesAnalyticsReport", "clmPresentation", "clmSequence", "clmSlide", "clmFetch", "pdfMergeField", "visitReason", "targetRule", "plan", "calendar", "lineTarget", "bulkImport", "bulkExport"];
155
+ 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", "geoZone", "productModifiersGroup", "channel", "speciality", "clientContact", "paymentTerm", "bank", "bank_list", "customStatus", "customList", "customListItem", "inventoryAdjustmentReason", "workorder", "workorderRequest", "supplier", "quickConvertToPdf", "visit", "activityFeedback", "activityFeedbackV2", "feedbackOption", "invoice", "proforma", "payment", "refund", "settlement", "voidSettlement", "check", "day", "dayShift", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "activityItemStatus", "itemStatusType", "adjustInventory", "inventory", "integrationApp", "joinActionsWebHook", "patchAction", "updateIntegrationMeta", "assetPartType", "assetPart", "assetPartUnit", "assetPartReceival", "assetPartTransfer", "returnAssetPartUnit", "storeAssetPartUnit", "ocrInvoiceJobTemplate", "ocrInvoiceJobGroup", "activityAiSalesOrder", "ocrInvoiceJob", "ocrInvoiceJobPage", "settings", "mailUnsubscribe", "approvalRequest", "safeInvoiceSerialCounter", "clientLocation", "assetType", "asset", "assetUnit", "workorderPortal", "approval", "workorderCategory", "contract", "contractInstallment", "repBalanceSummary", "workorderPortalLink", "customField", "salesAnalyticsReport", "clmPresentation", "clmSequence", "clmSlide", "clmFetch", "pdfMergeField", "visitReason", "targetRule", "plan", "calendar", "lineTarget", "bulkImport", "bulkExport"];
155
156
  export type AvailableService = (typeof availableService)[number];
156
157
  export default class Repzo {
157
158
  private svAPIEndpoint;
@@ -215,6 +216,7 @@ export default class Repzo {
215
216
  readonly VOID_SETTLEMENT: "void-settlement";
216
217
  readonly CHECK: "checks";
217
218
  readonly DAY: "day";
219
+ readonly DAY_SHIFT: "day-shift";
218
220
  readonly RECEIVING_MATERIAL: "receiving-material";
219
221
  readonly ADJUST_ACCOUNT: "adjust-account";
220
222
  readonly TRANSFER: "transfer";
@@ -320,7 +322,7 @@ export default class Repzo {
320
322
  private _update;
321
323
  private _patch;
322
324
  private _delete;
323
- available_services: readonly ["client", "product", "variant", "category", "sub_category", "brand", "product_group", "tax", "measureunit", "measureunitFamily", "media", "priceList", "priceListItem", "team", "returnReason", "rep", "tag", "warehouse", "route", "geoZone", "productModifiersGroup", "channel", "speciality", "clientContact", "paymentTerm", "bank", "bank_list", "customStatus", "customList", "customListItem", "inventoryAdjustmentReason", "workorder", "workorderRequest", "supplier", "quickConvertToPdf", "visit", "activityFeedback", "activityFeedbackV2", "feedbackOption", "invoice", "proforma", "payment", "refund", "settlement", "voidSettlement", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "activityItemStatus", "itemStatusType", "adjustInventory", "inventory", "integrationApp", "joinActionsWebHook", "patchAction", "updateIntegrationMeta", "assetPartType", "assetPart", "assetPartUnit", "assetPartReceival", "assetPartTransfer", "returnAssetPartUnit", "storeAssetPartUnit", "ocrInvoiceJobTemplate", "ocrInvoiceJobGroup", "activityAiSalesOrder", "ocrInvoiceJob", "ocrInvoiceJobPage", "settings", "mailUnsubscribe", "approvalRequest", "safeInvoiceSerialCounter", "clientLocation", "assetType", "asset", "assetUnit", "workorderPortal", "approval", "workorderCategory", "contract", "contractInstallment", "repBalanceSummary", "workorderPortalLink", "customField", "salesAnalyticsReport", "clmPresentation", "clmSequence", "clmSlide", "clmFetch", "pdfMergeField", "visitReason", "targetRule", "plan", "calendar", "lineTarget", "bulkImport", "bulkExport"];
325
+ available_services: readonly ["client", "product", "variant", "category", "sub_category", "brand", "product_group", "tax", "measureunit", "measureunitFamily", "media", "priceList", "priceListItem", "team", "returnReason", "rep", "tag", "warehouse", "route", "geoZone", "productModifiersGroup", "channel", "speciality", "clientContact", "paymentTerm", "bank", "bank_list", "customStatus", "customList", "customListItem", "inventoryAdjustmentReason", "workorder", "workorderRequest", "supplier", "quickConvertToPdf", "visit", "activityFeedback", "activityFeedbackV2", "feedbackOption", "invoice", "proforma", "payment", "refund", "settlement", "voidSettlement", "check", "day", "dayShift", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "activityItemStatus", "itemStatusType", "adjustInventory", "inventory", "integrationApp", "joinActionsWebHook", "patchAction", "updateIntegrationMeta", "assetPartType", "assetPart", "assetPartUnit", "assetPartReceival", "assetPartTransfer", "returnAssetPartUnit", "storeAssetPartUnit", "ocrInvoiceJobTemplate", "ocrInvoiceJobGroup", "activityAiSalesOrder", "ocrInvoiceJob", "ocrInvoiceJobPage", "settings", "mailUnsubscribe", "approvalRequest", "safeInvoiceSerialCounter", "clientLocation", "assetType", "asset", "assetUnit", "workorderPortal", "approval", "workorderCategory", "contract", "contractInstallment", "repBalanceSummary", "workorderPortalLink", "customField", "salesAnalyticsReport", "clmPresentation", "clmSequence", "clmSlide", "clmFetch", "pdfMergeField", "visitReason", "targetRule", "plan", "calendar", "lineTarget", "bulkImport", "bulkExport"];
324
326
  generateUUID: ({ prefix, suffix, length, }: {
325
327
  prefix?: string;
326
328
  suffix?: string;
@@ -687,6 +689,14 @@ export default class Repzo {
687
689
  get: (id: Service.Day.Get.ID, params?: Service.Day.Get.Params) => Promise<Service.Day.Get.Result>;
688
690
  create: (body: Service.Day.Create.Body) => Promise<Service.Day.Create.Result>;
689
691
  };
692
+ dayShift: {
693
+ _path: "day-shift";
694
+ find: (params?: Service.DayShift.Find.Params) => Promise<Service.DayShift.Find.Result>;
695
+ get: (id: Service.DayShift.Get.ID, params?: Service.DayShift.Get.Params) => Promise<Service.DayShift.Get.Result>;
696
+ create: (body: Service.DayShift.Create.Body) => Promise<Service.DayShift.Create.Result>;
697
+ update: (id: Service.DayShift.Update.ID, body: Service.DayShift.Update.Body) => Promise<Service.DayShift.Update.Result>;
698
+ remove: (id: Service.DayShift.Remove.ID) => Promise<Service.DayShift.Remove.Result>;
699
+ };
690
700
  receivingMaterial: {
691
701
  _path: "receiving-material";
692
702
  find: (params?: Service.ReceivingMaterial.Find.Params) => Promise<Service.ReceivingMaterial.Find.Result>;
package/lib/index.js CHANGED
@@ -53,6 +53,7 @@ export const end_points = {
53
53
  VOID_SETTLEMENT: "void-settlement",
54
54
  CHECK: "checks",
55
55
  DAY: "day",
56
+ DAY_SHIFT: "day-shift",
56
57
  RECEIVING_MATERIAL: "receiving-material",
57
58
  ADJUST_ACCOUNT: "adjust-account",
58
59
  TRANSFER: "transfer",
@@ -200,6 +201,7 @@ export const availableService = [
200
201
  "voidSettlement",
201
202
  "check",
202
203
  "day",
204
+ "dayShift",
203
205
  "receivingMaterial",
204
206
  "adjustAccount",
205
207
  "transfer",
@@ -1245,6 +1247,28 @@ class Repzo {
1245
1247
  return res;
1246
1248
  },
1247
1249
  };
1250
+ this.dayShift = {
1251
+ _path: Repzo._end_points.DAY_SHIFT,
1252
+ find: async (params) => {
1253
+ let res = await this._fetch(this.svAPIEndpoint, this.dayShift._path, params);
1254
+ return res;
1255
+ },
1256
+ get: async (id, params) => {
1257
+ return await this._fetch(this.svAPIEndpoint, this.dayShift._path + `/${id}`, params);
1258
+ },
1259
+ create: async (body) => {
1260
+ let res = await this._create(this.svAPIEndpoint, this.dayShift._path, body);
1261
+ return res;
1262
+ },
1263
+ update: async (id, body) => {
1264
+ let res = await this._update(this.svAPIEndpoint, this.dayShift._path + `/${id}`, body);
1265
+ return res;
1266
+ },
1267
+ remove: async (id) => {
1268
+ let res = await this._delete(this.svAPIEndpoint, this.dayShift._path + `/${id}`);
1269
+ return res;
1270
+ },
1271
+ };
1248
1272
  this.receivingMaterial = {
1249
1273
  _path: Repzo._end_points.RECEIVING_MATERIAL,
1250
1274
  find: async (params) => {
@@ -318,7 +318,7 @@ export interface CalendarWeeklyGroup {
318
318
  note?: string;
319
319
  _id: string;
320
320
  }
321
- export type Model = "quickConvertToPdf" | "warehouses" | "transfers" | "transactions" | "taxes" | "productvariations" | "products" | "pricelistsitems" | "pricelists" | "payments" | "ledger_payments" | "mslsales" | "mslproducts" | "measureunits" | "measureunitfamilies" | "invoicesitems" | "invoices" | "ledger_goods" | "fullinvoices" | "checks" | "clients" | "activities" | "bigReports" | "admins";
321
+ export type Model = "quickConvertToPdf" | "warehouses" | "dayShift" | "transfers" | "transactions" | "taxes" | "productvariations" | "products" | "pricelistsitems" | "pricelists" | "payments" | "ledger_payments" | "mslsales" | "mslproducts" | "measureunits" | "measureunitfamilies" | "invoicesitems" | "invoices" | "ledger_goods" | "fullinvoices" | "checks" | "clients" | "activities" | "bigReports" | "admins";
322
322
  export type DocumentTypes = "form" | "quickConvertToPdf" | "clients" | "asset" | "assetUnit" | "workorder" | "clientLocation" | "clientContact" | "commentsThread" | "workorderRequest" | "workorderPortal" | "invoice" | "products" | "productvariations" | "representatives" | "productcategories" | "productSubCategory" | "speciality" | "line" | "banner" | "intgAvailableApps" | "availability_msl" | "reminders" | "audits" | "availability" | "photos" | "planogram" | "tasks" | "checks" | "notificationsCenter" | "admins" | "settings" | "printWorkorderPortalLink" | "bulkExport" | "generateRule" | "scheduleEmail" | "custom-list-item" | "days" | "bulkImport" | "sv.activitiesstorechecks" | "retailExecutionPreset" | "paymentMethod" | "approvalRequest" | "activityFormV2Result" | "formV2" | "payments" | "ocrInvoiceJob" | "contract" | "contractInstallment" | "form" | "paymentMethod" | "aiObjectDetectionModelVersion" | "aiObjectDetectionTask" | "assetPart" | "assetPartReceival" | "assetPartUnit" | "returnAssetPartUnit" | "storeAssetPartUnit" | "activityAiSalesOrder" | "ocrInvoiceJobGroup";
323
323
  export type PrintTypes = "workorder" | "form" | "invoice" | "proforma" | "settlement" | "formV2";
324
324
  export type InvoiceFontStyles = "InvoiceHeaderTitle" | "InvoiceTaxNumber" | "InvoiceType" | "InvoiceInfo" | "ItemsHeader" | "ItemLabel" | "ItemValue" | "ItemVariant" | "TotalItemsQty" | "TotalAmount" | "RepReciver" | "Address" | "PrintTime" | "InvoiceHeader" | "ClientBalance";
@@ -2632,6 +2632,9 @@ export declare namespace Service {
2632
2632
  rep_can_edit_client_location_at_create_client?: boolean;
2633
2633
  rep_can_start_visit_out_of_geofence?: boolean;
2634
2634
  rep_can_create_approval_request_to_start_visit_out_of_geofence?: boolean;
2635
+ rep_must_start_day_within_shift_window: boolean;
2636
+ rep_must_end_day_within_shift_window: boolean;
2637
+ rep_can_start_day_on_non_working_day?: boolean;
2635
2638
  }
2636
2639
  interface TargetResults {
2637
2640
  totalPoints: number;
@@ -2660,6 +2663,9 @@ export declare namespace Service {
2660
2663
  disable_auto_time_date_enforcement?: boolean;
2661
2664
  start_day_specific_time_frame_start: `${number}:${number}`;
2662
2665
  start_day_specific_time_frame_end: `${number}:${number}`;
2666
+ start_day_minutes_before_shift_start?: number;
2667
+ start_day_minutes_after_shift_start?: number;
2668
+ end_day_minutes_before_shift_end?: number;
2663
2669
  }
2664
2670
  type JobOption = 0 | 1 | 2;
2665
2671
  export interface RepSchema {
@@ -2690,6 +2696,7 @@ export declare namespace Service {
2690
2696
  assigned_warehouse?: string;
2691
2697
  assigned_main_warehouse?: string;
2692
2698
  assigned_plan?: string;
2699
+ assigned_shift?: string | Pick<DayShift.Data, "_id" | "name" | "designation">;
2693
2700
  integration_meta?: {
2694
2701
  [key: string]: any;
2695
2702
  };
@@ -2751,6 +2758,7 @@ export declare namespace Service {
2751
2758
  assigned_warehouse?: string;
2752
2759
  assigned_main_warehouse?: string;
2753
2760
  assigned_plan?: string;
2761
+ assigned_shift?: string | null;
2754
2762
  integration_meta?: {
2755
2763
  [key: string]: any;
2756
2764
  };
@@ -2781,13 +2789,14 @@ export declare namespace Service {
2781
2789
  handle_credit_limit?: boolean;
2782
2790
  credit_limit?: number;
2783
2791
  }
2784
- type PopulatedKeys = "line" | "lines" | "job_category" | "teams" | "assigned_forms_v2" | "job_category" | "cover_photo" | "assigned_plan" | "assigned_retail_execution_templates" | "assigned_clm_presentations" | "assigned_geo_zones" | "warehouse";
2792
+ type PopulatedKeys = "line" | "lines" | "job_category" | "teams" | "assigned_forms_v2" | "job_category" | "cover_photo" | "assigned_plan" | "assigned_retail_execution_templates" | "assigned_clm_presentations" | "assigned_geo_zones" | "assigned_shift" | "warehouse";
2785
2793
  export type RepWithPopulatedKeysSchema = RepSchema & {
2786
2794
  lines?: string[] | Line.LineSchema[];
2787
2795
  job_category?: string[] | JobCategory.JobCategorySchema[];
2788
2796
  teams?: string[] | Team.TeamSchema[];
2789
2797
  assigned_warehouse?: string | Pick<Warehouse.WarehouseSchema, "_id" | "name" | "code" | "type" | "integration_meta">;
2790
2798
  assigned_main_warehouse?: string | Pick<Warehouse.WarehouseSchema, "_id" | "name" | "code" | "type" | "integration_meta">;
2799
+ assigned_shift?: string | Pick<DayShift.Data, "_id" | "name" | "designation">;
2791
2800
  assigned_geo_zones?: (string | GeoZone.Data)[];
2792
2801
  };
2793
2802
  export namespace Find {
@@ -2808,6 +2817,7 @@ export declare namespace Service {
2808
2817
  assigned_warehouse?: string | string[];
2809
2818
  assigned_main_warehouse?: string | string[];
2810
2819
  assigned_plan?: string | string[];
2820
+ assigned_shift?: string | string[];
2811
2821
  force_online_connectivity?: boolean;
2812
2822
  assigned_targets?: string | string[];
2813
2823
  assigned_geo_zones?: string | string[];
@@ -2886,11 +2896,14 @@ export declare namespace Service {
2886
2896
  "permissions.rep_can_print_offline_sales_order"?: boolean;
2887
2897
  "permissions.rep_can_skip_exp_date_in_audit_stock"?: boolean;
2888
2898
  "permissions.rep_must_start_day_within_specific_time_frame"?: boolean;
2899
+ "permissions.rep_must_start_day_within_shift_window"?: boolean;
2889
2900
  "permissions.rep_can_skip_assigned_client_filter_on_workorder_assigned_to"?: boolean;
2890
2901
  "permissions.rep_can_assign_client_to_other_reps"?: boolean;
2891
2902
  "permissions.rep_must_enter_sales_order_external_serial_number"?: boolean;
2892
2903
  "permissions.rep_must_enter_invoice_external_serial_number"?: boolean;
2893
2904
  "permissions.rep_must_end_day_after_specific_time"?: boolean;
2905
+ "permissions.rep_must_end_day_within_shift_window"?: boolean;
2906
+ "permissions.rep_can_start_day_on_non_working_day"?: boolean;
2894
2907
  "permissions.rep_can_create_negative_invoices"?: boolean;
2895
2908
  "permissions.rep_can_upload_media_on_payment"?: boolean;
2896
2909
  "permissions.rep_can_access_sales_reports"?: boolean;
@@ -2921,6 +2934,9 @@ export declare namespace Service {
2921
2934
  "settings.disable_auto_time_date_enforcement"?: boolean;
2922
2935
  "settings.start_day_specific_time_frame_start"?: string;
2923
2936
  "settings.start_day_specific_time_frame_end"?: string;
2937
+ "settings.start_day_minutes_before_shift_start"?: number;
2938
+ "settings.start_day_minutes_after_shift_start"?: number;
2939
+ "settings.end_day_minutes_before_shift_end"?: number;
2924
2940
  "settings.treating_invoice_as_proforma_for_etax"?: boolean;
2925
2941
  is_test?: boolean;
2926
2942
  form_v2_option?: "all" | "none" | "assigned" | "client_assigned";
@@ -8056,6 +8072,88 @@ export declare namespace Service {
8056
8072
  }
8057
8073
  export {};
8058
8074
  }
8075
+ namespace DayShift {
8076
+ export type Weekday = "sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday";
8077
+ export interface ShiftRange {
8078
+ from: `${number}:${number}`;
8079
+ to: `${number}:${number}`;
8080
+ }
8081
+ export interface ShiftEntry {
8082
+ day: Weekday;
8083
+ work_time: ShiftRange[];
8084
+ }
8085
+ export type ShiftSchedule = ShiftEntry[] | null | undefined;
8086
+ export interface Data {
8087
+ _id: StringId;
8088
+ name: string;
8089
+ designation?: string;
8090
+ disabled: boolean;
8091
+ schedule: ShiftEntry[];
8092
+ total_working_hours: number;
8093
+ total_working_days: number;
8094
+ assigned_reps?: Pick<Rep.Data, "_id" | "name">[];
8095
+ company_namespace: string[];
8096
+ createdAt: Date;
8097
+ updatedAt: Date;
8098
+ }
8099
+ export interface CreateBody {
8100
+ name: string;
8101
+ designation?: string;
8102
+ schedule: ShiftEntry[];
8103
+ company_namespace?: string[];
8104
+ }
8105
+ export type UpdateBody = Partial<Data>;
8106
+ type SortingKeys = "_id";
8107
+ export namespace Find {
8108
+ type Params = DefaultPaginationQueryParams & {
8109
+ _id?: StringId | StringId[];
8110
+ name?: string | string[];
8111
+ designation?: string | string[];
8112
+ disabled?: boolean;
8113
+ from_updatedAt?: number;
8114
+ to_updatedAt?: number;
8115
+ from_createdAt?: number;
8116
+ to_createdAt?: number;
8117
+ from__id?: string;
8118
+ to__id?: string;
8119
+ from_total_working_hours?: number;
8120
+ to_total_working_hours?: number;
8121
+ total_working_hours?: number;
8122
+ from_total_working_days?: number;
8123
+ to_total_working_days?: number;
8124
+ total_working_days?: number;
8125
+ inject_assigned_reps?: boolean;
8126
+ sortBy?: {
8127
+ field: SortingKeys;
8128
+ type: "asc" | "desc";
8129
+ }[];
8130
+ };
8131
+ interface Result extends DefaultPaginationResult {
8132
+ data: Data[];
8133
+ }
8134
+ }
8135
+ export namespace Get {
8136
+ type ID = StringId;
8137
+ interface Params {
8138
+ inject_assigned_reps?: boolean;
8139
+ }
8140
+ type Result = Data;
8141
+ }
8142
+ export namespace Create {
8143
+ type Body = CreateBody;
8144
+ type Result = Data;
8145
+ }
8146
+ export namespace Update {
8147
+ type ID = StringId;
8148
+ type Body = UpdateBody;
8149
+ type Result = Data;
8150
+ }
8151
+ export namespace Remove {
8152
+ type ID = StringId;
8153
+ type Result = Data;
8154
+ }
8155
+ export {};
8156
+ }
8059
8157
  namespace Day {
8060
8158
  export interface DaySchema {
8061
8159
  _id: string;
@@ -8076,8 +8174,10 @@ export declare namespace Service {
8076
8174
  };
8077
8175
  timeZone?: string;
8078
8176
  EOD?: string;
8177
+ shift?: DayShift.Data | null;
8079
8178
  closed_by_system?: boolean;
8080
8179
  open: boolean;
8180
+ not_working_day?: boolean;
8081
8181
  paymentSnapShot_start?: any[];
8082
8182
  paymentSnapShot_end?: any[];
8083
8183
  inventorySnapShot?: any[];
@@ -8095,6 +8195,7 @@ export declare namespace Service {
8095
8195
  teams: string[];
8096
8196
  created_by_system?: boolean;
8097
8197
  previously_closed?: boolean;
8198
+ geoPoint?: GeoPoint;
8098
8199
  start_geoPoint?: {
8099
8200
  type: string;
8100
8201
  coordinates: number[];
@@ -8128,8 +8229,10 @@ export declare namespace Service {
8128
8229
  };
8129
8230
  timeZone?: string;
8130
8231
  EOD?: string;
8232
+ shift?: DayShift.Data | null;
8131
8233
  closed_by_system?: boolean;
8132
8234
  open: boolean;
8235
+ not_working_day?: boolean;
8133
8236
  paymentSnapShot_start?: any[];
8134
8237
  paymentSnapShot_end?: any[];
8135
8238
  inventorySnapShot?: any[];
@@ -8145,6 +8248,7 @@ export declare namespace Service {
8145
8248
  teams: string[];
8146
8249
  created_by_system?: boolean;
8147
8250
  previously_closed?: boolean;
8251
+ geoPoint?: GeoPoint;
8148
8252
  start_geoPoint?: {
8149
8253
  type: string;
8150
8254
  coordinates: number[];
@@ -8176,8 +8280,10 @@ export declare namespace Service {
8176
8280
  };
8177
8281
  timeZone?: string;
8178
8282
  EOD?: string;
8283
+ shift?: DayShift.Data | null;
8179
8284
  closed_by_system?: boolean;
8180
8285
  open?: boolean;
8286
+ not_working_day?: boolean;
8181
8287
  paymentSnapShot_start?: any[];
8182
8288
  paymentSnapShot_end?: any[];
8183
8289
  inventorySnapShot?: any[];
@@ -8195,6 +8301,7 @@ export declare namespace Service {
8195
8301
  teams?: string[];
8196
8302
  created_by_system?: boolean;
8197
8303
  previously_closed?: boolean;
8304
+ geoPoint?: GeoPoint;
8198
8305
  start_geoPoint?: {
8199
8306
  type: string;
8200
8307
  coordinates: number[];
@@ -8216,7 +8323,9 @@ export declare namespace Service {
8216
8323
  type Params = DefaultPaginationQueryParams & {
8217
8324
  _id?: string[] | string;
8218
8325
  "creator._id"?: string[] | string;
8326
+ reps?: string[] | string;
8219
8327
  open?: boolean;
8328
+ not_working_day?: boolean;
8220
8329
  day?: string;
8221
8330
  from_day?: string;
8222
8331
  to_day?: string;
@@ -12758,6 +12867,7 @@ export declare namespace Service {
12758
12867
  days_of_work: "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday";
12759
12868
  signUpMethod: "email" | "phone";
12760
12869
  calculate_target_for_absent_days: boolean;
12870
+ calculate_target_for_non_working_days?: boolean;
12761
12871
  disable_module_custom_validator: boolean;
12762
12872
  activate_ubl_integration: boolean;
12763
12873
  last_activate_ubl_integration_time?: number;
@@ -12826,6 +12936,8 @@ export declare namespace Service {
12826
12936
  enable_whatsapp_mfa: boolean;
12827
12937
  enable_authenticator_mfa: boolean;
12828
12938
  minimum_accepted_mfa: number;
12939
+ end_of_day_mode: "fixed_time" | "shift_based";
12940
+ automatic_end_day_minutes_after_shift_end: number;
12829
12941
  start_day_outside_active_zone_action: "monitor" | "warning" | "block";
12830
12942
  start_visit_outside_active_zone_action: "monitor" | "warning" | "block";
12831
12943
  work_outside_active_zone_action: "monitor" | "warning" | "block";
@@ -12955,6 +13067,7 @@ export declare namespace Service {
12955
13067
  days_of_work?: "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday";
12956
13068
  signUpMethod?: "email" | "phone";
12957
13069
  calculate_target_for_absent_days?: boolean;
13070
+ calculate_target_for_non_working_days?: boolean;
12958
13071
  disable_module_custom_validator?: boolean;
12959
13072
  activate_ubl_integration?: boolean;
12960
13073
  last_activate_ubl_integration_time?: number;
@@ -13024,6 +13137,10 @@ export declare namespace Service {
13024
13137
  enable_whatsapp_mfa: boolean;
13025
13138
  enable_authenticator_mfa: boolean;
13026
13139
  minimum_accepted_mfa: number;
13140
+ end_of_day?: string;
13141
+ time_zone?: string;
13142
+ end_of_day_mode?: "fixed_time" | "shift_based";
13143
+ automatic_end_day_minutes_after_shift_end?: number;
13027
13144
  start_day_outside_active_zone_action?: "monitor" | "warning" | "block";
13028
13145
  start_visit_outside_active_zone_action?: "monitor" | "warning" | "block";
13029
13146
  work_outside_active_zone_action?: "monitor" | "warning" | "block";
@@ -20577,7 +20694,7 @@ export interface ReportKey {
20577
20694
  [key: string]: any;
20578
20695
  }
20579
20696
  type MFA_Method = "email" | "whatsapp" | "authenticator" | "recovery_codes";
20580
- type RepzoModel = "socialPlatform" | "activityAiSalesOrder" | "reportUblInvoice" | "ublIntegrationSettings" | "ublIntegration" | "ublConnectionAttempts" | "quickConvertToPdf" | "warehouses" | "transfers" | "transactions" | "taxes" | "productvariations" | "products" | "pricelistsitems" | "pricelists" | "payments" | "ledger_payments" | "mslsales" | "mslproducts" | "measureunits" | "measureunitfamilies" | "invoice" | "ledger_goods" | "fullinvoices" | "checks" | "clients" | "activities" | "bigReports" | "admins"
20697
+ type RepzoModel = "socialPlatform" | "activityAiSalesOrder" | "reportUblInvoice" | "ublIntegrationSettings" | "ublIntegration" | "ublConnectionAttempts" | "quickConvertToPdf" | "warehouses" | "dayShift" | "transfers" | "transactions" | "taxes" | "productvariations" | "products" | "pricelistsitems" | "pricelists" | "payments" | "ledger_payments" | "mslsales" | "mslproducts" | "measureunits" | "measureunitfamilies" | "invoice" | "ledger_goods" | "fullinvoices" | "checks" | "clients" | "activities" | "bigReports" | "admins"
20581
20698
  /**
20582
20699
  * @deprecated representatives shall be used
20583
20700
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.290",
3
+ "version": "1.0.291",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
package/src/index.ts CHANGED
@@ -63,6 +63,7 @@ export const end_points = {
63
63
  VOID_SETTLEMENT: "void-settlement",
64
64
  CHECK: "checks",
65
65
  DAY: "day",
66
+ DAY_SHIFT: "day-shift",
66
67
  RECEIVING_MATERIAL: "receiving-material",
67
68
  ADJUST_ACCOUNT: "adjust-account",
68
69
  TRANSFER: "transfer",
@@ -212,6 +213,7 @@ export const availableService = [
212
213
  "voidSettlement",
213
214
  "check",
214
215
  "day",
216
+ "dayShift",
215
217
  "receivingMaterial",
216
218
  "adjustAccount",
217
219
  "transfer",
@@ -2807,6 +2809,65 @@ export default class Repzo {
2807
2809
  },
2808
2810
  };
2809
2811
 
2812
+ dayShift = {
2813
+ _path: Repzo._end_points.DAY_SHIFT,
2814
+
2815
+ find: async (
2816
+ params?: Service.DayShift.Find.Params,
2817
+ ): Promise<Service.DayShift.Find.Result> => {
2818
+ let res: Service.DayShift.Find.Result = await this._fetch(
2819
+ this.svAPIEndpoint,
2820
+ this.dayShift._path,
2821
+ params,
2822
+ );
2823
+ return res;
2824
+ },
2825
+
2826
+ get: async (
2827
+ id: Service.DayShift.Get.ID,
2828
+ params?: Service.DayShift.Get.Params,
2829
+ ): Promise<Service.DayShift.Get.Result> => {
2830
+ return await this._fetch(
2831
+ this.svAPIEndpoint,
2832
+ this.dayShift._path + `/${id}`,
2833
+ params,
2834
+ );
2835
+ },
2836
+
2837
+ create: async (
2838
+ body: Service.DayShift.Create.Body,
2839
+ ): Promise<Service.DayShift.Create.Result> => {
2840
+ let res = await this._create(
2841
+ this.svAPIEndpoint,
2842
+ this.dayShift._path,
2843
+ body,
2844
+ );
2845
+ return res;
2846
+ },
2847
+
2848
+ update: async (
2849
+ id: Service.DayShift.Update.ID,
2850
+ body: Service.DayShift.Update.Body,
2851
+ ): Promise<Service.DayShift.Update.Result> => {
2852
+ let res: Service.DayShift.Update.Result = await this._update(
2853
+ this.svAPIEndpoint,
2854
+ this.dayShift._path + `/${id}`,
2855
+ body,
2856
+ );
2857
+ return res;
2858
+ },
2859
+
2860
+ remove: async (
2861
+ id: Service.DayShift.Remove.ID,
2862
+ ): Promise<Service.DayShift.Remove.Result> => {
2863
+ let res: Service.DayShift.Remove.Result = await this._delete(
2864
+ this.svAPIEndpoint,
2865
+ this.dayShift._path + `/${id}`,
2866
+ );
2867
+ return res;
2868
+ },
2869
+ };
2870
+
2810
2871
  receivingMaterial = {
2811
2872
  _path: Repzo._end_points.RECEIVING_MATERIAL,
2812
2873