repzo 1.0.290 → 1.0.292

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";
@@ -3043,6 +3059,9 @@ export declare namespace Service {
3043
3059
  enable_auto_skip_activity_existence?: boolean;
3044
3060
  auto_skip_activity_slugs?: AutoSkipActivitySlugs[];
3045
3061
  auto_skip_activity_slugs_operator?: "and" | "or";
3062
+ enable_auto_skip_visit_duration?: boolean;
3063
+ skip_if_visit_duration_minutes_is_less_than?: number;
3064
+ skip_if_visit_duration_minutes_is_more_than?: number;
3046
3065
  };
3047
3066
  createdAt: string;
3048
3067
  updatedAt: string;
@@ -8056,6 +8075,88 @@ export declare namespace Service {
8056
8075
  }
8057
8076
  export {};
8058
8077
  }
8078
+ namespace DayShift {
8079
+ export type Weekday = "sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday";
8080
+ export interface ShiftRange {
8081
+ from: `${number}:${number}`;
8082
+ to: `${number}:${number}`;
8083
+ }
8084
+ export interface ShiftEntry {
8085
+ day: Weekday;
8086
+ work_time: ShiftRange[];
8087
+ }
8088
+ export type ShiftSchedule = ShiftEntry[] | null | undefined;
8089
+ export interface Data {
8090
+ _id: StringId;
8091
+ name: string;
8092
+ designation?: string;
8093
+ disabled: boolean;
8094
+ schedule: ShiftEntry[];
8095
+ total_working_hours: number;
8096
+ total_working_days: number;
8097
+ assigned_reps?: Pick<Rep.Data, "_id" | "name">[];
8098
+ company_namespace: string[];
8099
+ createdAt: Date;
8100
+ updatedAt: Date;
8101
+ }
8102
+ export interface CreateBody {
8103
+ name: string;
8104
+ designation?: string;
8105
+ schedule: ShiftEntry[];
8106
+ company_namespace?: string[];
8107
+ }
8108
+ export type UpdateBody = Partial<Data>;
8109
+ type SortingKeys = "_id";
8110
+ export namespace Find {
8111
+ type Params = DefaultPaginationQueryParams & {
8112
+ _id?: StringId | StringId[];
8113
+ name?: string | string[];
8114
+ designation?: string | string[];
8115
+ disabled?: boolean;
8116
+ from_updatedAt?: number;
8117
+ to_updatedAt?: number;
8118
+ from_createdAt?: number;
8119
+ to_createdAt?: number;
8120
+ from__id?: string;
8121
+ to__id?: string;
8122
+ from_total_working_hours?: number;
8123
+ to_total_working_hours?: number;
8124
+ total_working_hours?: number;
8125
+ from_total_working_days?: number;
8126
+ to_total_working_days?: number;
8127
+ total_working_days?: number;
8128
+ inject_assigned_reps?: boolean;
8129
+ sortBy?: {
8130
+ field: SortingKeys;
8131
+ type: "asc" | "desc";
8132
+ }[];
8133
+ };
8134
+ interface Result extends DefaultPaginationResult {
8135
+ data: Data[];
8136
+ }
8137
+ }
8138
+ export namespace Get {
8139
+ type ID = StringId;
8140
+ interface Params {
8141
+ inject_assigned_reps?: boolean;
8142
+ }
8143
+ type Result = Data;
8144
+ }
8145
+ export namespace Create {
8146
+ type Body = CreateBody;
8147
+ type Result = Data;
8148
+ }
8149
+ export namespace Update {
8150
+ type ID = StringId;
8151
+ type Body = UpdateBody;
8152
+ type Result = Data;
8153
+ }
8154
+ export namespace Remove {
8155
+ type ID = StringId;
8156
+ type Result = Data;
8157
+ }
8158
+ export {};
8159
+ }
8059
8160
  namespace Day {
8060
8161
  export interface DaySchema {
8061
8162
  _id: string;
@@ -8076,8 +8177,10 @@ export declare namespace Service {
8076
8177
  };
8077
8178
  timeZone?: string;
8078
8179
  EOD?: string;
8180
+ shift?: DayShift.Data | null;
8079
8181
  closed_by_system?: boolean;
8080
8182
  open: boolean;
8183
+ not_working_day?: boolean;
8081
8184
  paymentSnapShot_start?: any[];
8082
8185
  paymentSnapShot_end?: any[];
8083
8186
  inventorySnapShot?: any[];
@@ -8095,6 +8198,7 @@ export declare namespace Service {
8095
8198
  teams: string[];
8096
8199
  created_by_system?: boolean;
8097
8200
  previously_closed?: boolean;
8201
+ geoPoint?: GeoPoint;
8098
8202
  start_geoPoint?: {
8099
8203
  type: string;
8100
8204
  coordinates: number[];
@@ -8128,8 +8232,10 @@ export declare namespace Service {
8128
8232
  };
8129
8233
  timeZone?: string;
8130
8234
  EOD?: string;
8235
+ shift?: DayShift.Data | null;
8131
8236
  closed_by_system?: boolean;
8132
8237
  open: boolean;
8238
+ not_working_day?: boolean;
8133
8239
  paymentSnapShot_start?: any[];
8134
8240
  paymentSnapShot_end?: any[];
8135
8241
  inventorySnapShot?: any[];
@@ -8145,6 +8251,7 @@ export declare namespace Service {
8145
8251
  teams: string[];
8146
8252
  created_by_system?: boolean;
8147
8253
  previously_closed?: boolean;
8254
+ geoPoint?: GeoPoint;
8148
8255
  start_geoPoint?: {
8149
8256
  type: string;
8150
8257
  coordinates: number[];
@@ -8176,8 +8283,10 @@ export declare namespace Service {
8176
8283
  };
8177
8284
  timeZone?: string;
8178
8285
  EOD?: string;
8286
+ shift?: DayShift.Data | null;
8179
8287
  closed_by_system?: boolean;
8180
8288
  open?: boolean;
8289
+ not_working_day?: boolean;
8181
8290
  paymentSnapShot_start?: any[];
8182
8291
  paymentSnapShot_end?: any[];
8183
8292
  inventorySnapShot?: any[];
@@ -8195,6 +8304,7 @@ export declare namespace Service {
8195
8304
  teams?: string[];
8196
8305
  created_by_system?: boolean;
8197
8306
  previously_closed?: boolean;
8307
+ geoPoint?: GeoPoint;
8198
8308
  start_geoPoint?: {
8199
8309
  type: string;
8200
8310
  coordinates: number[];
@@ -8216,7 +8326,9 @@ export declare namespace Service {
8216
8326
  type Params = DefaultPaginationQueryParams & {
8217
8327
  _id?: string[] | string;
8218
8328
  "creator._id"?: string[] | string;
8329
+ reps?: string[] | string;
8219
8330
  open?: boolean;
8331
+ not_working_day?: boolean;
8220
8332
  day?: string;
8221
8333
  from_day?: string;
8222
8334
  to_day?: string;
@@ -12758,6 +12870,7 @@ export declare namespace Service {
12758
12870
  days_of_work: "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday";
12759
12871
  signUpMethod: "email" | "phone";
12760
12872
  calculate_target_for_absent_days: boolean;
12873
+ calculate_target_for_non_working_days?: boolean;
12761
12874
  disable_module_custom_validator: boolean;
12762
12875
  activate_ubl_integration: boolean;
12763
12876
  last_activate_ubl_integration_time?: number;
@@ -12826,6 +12939,8 @@ export declare namespace Service {
12826
12939
  enable_whatsapp_mfa: boolean;
12827
12940
  enable_authenticator_mfa: boolean;
12828
12941
  minimum_accepted_mfa: number;
12942
+ end_of_day_mode: "fixed_time" | "shift_based";
12943
+ automatic_end_day_minutes_after_shift_end: number;
12829
12944
  start_day_outside_active_zone_action: "monitor" | "warning" | "block";
12830
12945
  start_visit_outside_active_zone_action: "monitor" | "warning" | "block";
12831
12946
  work_outside_active_zone_action: "monitor" | "warning" | "block";
@@ -12955,6 +13070,7 @@ export declare namespace Service {
12955
13070
  days_of_work?: "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday";
12956
13071
  signUpMethod?: "email" | "phone";
12957
13072
  calculate_target_for_absent_days?: boolean;
13073
+ calculate_target_for_non_working_days?: boolean;
12958
13074
  disable_module_custom_validator?: boolean;
12959
13075
  activate_ubl_integration?: boolean;
12960
13076
  last_activate_ubl_integration_time?: number;
@@ -13024,6 +13140,10 @@ export declare namespace Service {
13024
13140
  enable_whatsapp_mfa: boolean;
13025
13141
  enable_authenticator_mfa: boolean;
13026
13142
  minimum_accepted_mfa: number;
13143
+ end_of_day?: string;
13144
+ time_zone?: string;
13145
+ end_of_day_mode?: "fixed_time" | "shift_based";
13146
+ automatic_end_day_minutes_after_shift_end?: number;
13027
13147
  start_day_outside_active_zone_action?: "monitor" | "warning" | "block";
13028
13148
  start_visit_outside_active_zone_action?: "monitor" | "warning" | "block";
13029
13149
  work_outside_active_zone_action?: "monitor" | "warning" | "block";
@@ -20577,7 +20697,7 @@ export interface ReportKey {
20577
20697
  [key: string]: any;
20578
20698
  }
20579
20699
  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"
20700
+ 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
20701
  /**
20582
20702
  * @deprecated representatives shall be used
20583
20703
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.290",
3
+ "version": "1.0.292",
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