repzo 1.0.157 → 1.0.158

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
@@ -92,6 +92,7 @@ export declare const end_points: {
92
92
  readonly TIMELINE_REPORT: "timeline-report";
93
93
  readonly RESET_COMPANY_NAMESPACE: "reset-company-namespace";
94
94
  readonly TEST_RESET_COMPANY_NAMESPACE: "test-reset-company-namespace";
95
+ readonly TIMELINE_TIME_LIST: "timeline-time-list";
95
96
  };
96
97
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
97
98
  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"];
@@ -195,6 +196,7 @@ export default class Repzo {
195
196
  readonly TIMELINE_REPORT: "timeline-report";
196
197
  readonly RESET_COMPANY_NAMESPACE: "reset-company-namespace";
197
198
  readonly TEST_RESET_COMPANY_NAMESPACE: "test-reset-company-namespace";
199
+ readonly TIMELINE_TIME_LIST: "timeline-time-list";
198
200
  };
199
201
  private _fetch;
200
202
  private _create;
@@ -930,4 +932,8 @@ export default class Repzo {
930
932
  create: (body: Service.TestResetCompanyNamespace.Create.Body) => Promise<Service.TestResetCompanyNamespace.Create.Result>;
931
933
  update: (id: Service.TestResetCompanyNamespace.Update.ID) => Promise<Service.TestResetCompanyNamespace.Update.Result>;
932
934
  };
935
+ timelineTimeList: {
936
+ _path: "timeline-time-list";
937
+ find: (params?: Service.TimelineTimeList.Find.Params) => Promise<Service.TimelineTimeList.Find.Result>;
938
+ };
933
939
  }
package/lib/index.js CHANGED
@@ -93,6 +93,7 @@ export const end_points = {
93
93
  TIMELINE_REPORT: "timeline-report",
94
94
  RESET_COMPANY_NAMESPACE: "reset-company-namespace",
95
95
  TEST_RESET_COMPANY_NAMESPACE: "test-reset-company-namespace",
96
+ TIMELINE_TIME_LIST: "timeline-time-list",
96
97
  };
97
98
  export const availableService = [
98
99
  "client",
@@ -1889,6 +1890,13 @@ class Repzo {
1889
1890
  return res;
1890
1891
  },
1891
1892
  };
1893
+ this.timelineTimeList = {
1894
+ _path: Repzo._end_points.TIMELINE_TIME_LIST,
1895
+ find: async (params) => {
1896
+ let res = await this._fetch(this.svAPIEndpoint, this.timelineTimeList._path, params);
1897
+ return res;
1898
+ },
1899
+ };
1892
1900
  this.svAPIEndpoint =
1893
1901
  !options?.env || options?.env == "production"
1894
1902
  ? "https://sv.api.repzo.me"
@@ -15161,6 +15161,458 @@ export declare namespace Service {
15161
15161
  type Result = ResetCompanyNamespace.Update.Result;
15162
15162
  }
15163
15163
  }
15164
+ namespace TimelineTimeList {
15165
+ 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"];
15166
+ type ActivityType = (typeof activity_types)[number];
15167
+ export interface Data {
15168
+ _id: StringId;
15169
+ company_namespace: string[];
15170
+ activity_type: ActivityType;
15171
+ activity_id: StringId | StringId[];
15172
+ time: number;
15173
+ business_day?: string;
15174
+ user: {
15175
+ _id: StringId;
15176
+ type: "admin" | "rep";
15177
+ name?: string;
15178
+ rep?: StringId;
15179
+ admin?: StringId;
15180
+ };
15181
+ action: Method;
15182
+ teams?: StringId[];
15183
+ visit_id?: string;
15184
+ sync_id?: string;
15185
+ client?: StringId;
15186
+ client_name?: string;
15187
+ geoPoint?: {
15188
+ coordinates: [number, number];
15189
+ type: "Point";
15190
+ };
15191
+ details: VisitDetails | DayDetails | PaymentDetails | RefundDetails | ActivityPhotoDetails | ActivityAuditDetails | ActivityNoteDetails | ActivityTaskDetails | ActivityAvailabilityDetails | ActivityCheckoutDisplayDetails | ActivityFeedbackDetails | ActivityFormResultDetails | ActivityFormV2ResultDetails | ActivityItemStatusDetails | ActivityPlanogramDetails | ActivitySecondaryDisplayDetails | ActivityShelfshareDetails | ActivityStorecheckDetails | ApprovalRequestDetails | AssetPartReceivalDetails | AssetPartTransferDetails | AssetDetails | AssetPartDetails | AssetUnitDetails | ReminderDetails | ReturnAssetPartUnitDetails | StoreAssetPartUnitDetails | SettlementDetails | ConvertProformaDetails | TransferDetails | ReceivingMaterialDetails | FullInvoiceDetails | ProformaDetails | WorkorderDetails | WorkorderRequestDetails | ReturnWholeInvoiceDetails | VoidInvoiceDetails | CycleDetails | ClientDetails;
15192
+ createdAt: Date;
15193
+ updatedAt: Date;
15194
+ }
15195
+ export type VisitDetails = {
15196
+ activity_type: "visit";
15197
+ activities: (ActivityAuditVisitDetails | ActivityPhotoVisitDetails | ActivityAvailabilityVisitDetails | ActivityNoteVisitDetails | ActivityTaskVisitDetails | ActivityPlanogramVisitDetails | ActivityShelfshareVisitDetails | ActivitySecondaryDisplayVisitDetails | ActivityCheckoutDisplayVisitDetails | ActivityItemStatusVisitDetails | ActivityFormResultVisitDetails | ActivityFormV2ResultVisitDetails | ActivityStorecheckVisitDetails | ActivityFeedbackVisitDetails | ApprovalRequestVisitDetails | AssetPartReceivalVisitDetails | AssetPartTransferVisitDetails | ReturnAssetPartUnitVisitDetails | StoreAssetPartUnitVisitDetails | PaymentVisitDetails | RefundVisitDetails | ConvertProformaVisitDetails | SettlementVisitDetails | FullInvoiceVisitDetails | ProformaVisitDetails | ReturnWholeInvoiceVisitDetails | VoidInvoiceVisitDetails)[];
15198
+ } & Pick<Visit.Data, "closed_by_system" | "geoPoint" | "start_time" | "end_time" | "total_time" | "battery_level" | "version_name" | "device_brand" | "start_out_of_geofence" | "end_out_of_geofence" | "auto_closed_by_geofence" | "auto_closed_by_geofence_reason" | "client_geo_location" | "delta_distance">;
15199
+ export type ActivityPhotoDetails = {
15200
+ activity_type: "activity-photo";
15201
+ media: StringId[] | PopulatedMediaStorage[];
15202
+ };
15203
+ export type ActivityPhotoVisitDetails = {
15204
+ activity_type: "activity-photo";
15205
+ activity_id: StringId;
15206
+ media: StringId[] | PopulatedMediaStorage[];
15207
+ time: number;
15208
+ };
15209
+ export type ActivityAuditDetails = {
15210
+ activity_type: "activity-audit";
15211
+ audits_length: number;
15212
+ };
15213
+ export type ActivityAuditVisitDetails = {
15214
+ activity_type: "activity-audit";
15215
+ activity_id: StringId;
15216
+ audits_length: number;
15217
+ } & Pick<ActivityAudit.Data, "time">;
15218
+ export type ActivityAvailabilityDetails = {
15219
+ activity_type: "activity-availability";
15220
+ products_available_length: number;
15221
+ msl_name: string;
15222
+ media?: StringId[] | PopulatedMediaStorage[];
15223
+ } & Pick<ActivityAvailability.Data, "msl_id">;
15224
+ export type ActivityAvailabilityVisitDetails = {
15225
+ activity_type: "activity-availability";
15226
+ activity_id: StringId;
15227
+ products_available_length: number;
15228
+ msl_name: string;
15229
+ media?: StringId[] | PopulatedMediaStorage[];
15230
+ } & Pick<ActivityAvailability.Data, "time" | "msl_id">;
15231
+ export type ActivityNoteDetails = {
15232
+ activity_type: "activity-note";
15233
+ } & Pick<ActivityNote.Data, "content">;
15234
+ export type ActivityNoteVisitDetails = {
15235
+ activity_type: "activity-note";
15236
+ activity_id: StringId;
15237
+ } & Pick<ActivityNote.Data, "content" | "time">;
15238
+ export type ActivityTaskDetails = {
15239
+ activity_type: "activity-task";
15240
+ start_media?: StringId[] | PopulatedMediaStorage[];
15241
+ end_media?: StringId[] | PopulatedMediaStorage[];
15242
+ };
15243
+ export type ActivityTaskVisitDetails = {
15244
+ activity_type: "activity-task";
15245
+ activity_id: StringId;
15246
+ start_media?: StringId[] | PopulatedMediaStorage[];
15247
+ end_media?: StringId[] | PopulatedMediaStorage[];
15248
+ } & Pick<ActivityTask.Data, "time">;
15249
+ export type ActivityPlanogramDetails = {
15250
+ activity_type: "activity-planogram";
15251
+ msl_name: string;
15252
+ media?: StringId[] | PopulatedMediaStorage[];
15253
+ } & Pick<ActivityPlanogram.Data, "planogram_reason" | "msl_id">;
15254
+ export type ActivityPlanogramVisitDetails = {
15255
+ activity_type: "activity-planogram";
15256
+ activity_id: StringId;
15257
+ msl_name: string;
15258
+ media?: StringId[] | PopulatedMediaStorage[];
15259
+ } & Pick<ActivityPlanogram.Data, "planogram_reason" | "time" | "msl_id">;
15260
+ export type ActivityShelfshareDetails = {
15261
+ activity_type: "activity-shelfshare";
15262
+ results: (Pick<ActivityShelfshare.Data, "msl_length" | "total_msl_length" | "msl_id"> & {
15263
+ activity_id: StringId;
15264
+ msl_name: string;
15265
+ })[];
15266
+ };
15267
+ export type ActivityShelfshareVisitDetails = {
15268
+ activity_type: "activity-shelfshare";
15269
+ activity_id: StringId[];
15270
+ time: number;
15271
+ results: (Pick<ActivityShelfshare.Data, "msl_length" | "total_msl_length" | "msl_id"> & {
15272
+ activity_id: StringId;
15273
+ msl_name: string;
15274
+ })[];
15275
+ };
15276
+ export type ActivitySecondaryDisplayDetails = {
15277
+ activity_type: "activity-secondary-display";
15278
+ results: (Pick<ActivitySecondaryDisplay.Data, "secondary_count" | "msl_id"> & {
15279
+ activity_id: StringId;
15280
+ msl_name: string;
15281
+ })[];
15282
+ };
15283
+ export type ActivitySecondaryDisplayVisitDetails = {
15284
+ activity_type: "activity-secondary-display";
15285
+ activity_id: StringId[];
15286
+ time: number;
15287
+ results: (Pick<ActivitySecondaryDisplay.Data, "secondary_count" | "msl_id"> & {
15288
+ activity_id: StringId;
15289
+ msl_name: string;
15290
+ })[];
15291
+ };
15292
+ export type ActivityCheckoutDisplayDetails = {
15293
+ activity_type: "activity-checkout-display";
15294
+ results: (Pick<ActivityCheckoutDisplay.Data, "checkout_count" | "msl_id"> & {
15295
+ activity_id: StringId;
15296
+ msl_name: string;
15297
+ })[];
15298
+ };
15299
+ export type ActivityCheckoutDisplayVisitDetails = {
15300
+ activity_type: "activity-checkout-display";
15301
+ activity_id: StringId[];
15302
+ time: number;
15303
+ results: (Pick<ActivityCheckoutDisplay.Data, "checkout_count" | "msl_id"> & {
15304
+ activity_id: StringId;
15305
+ msl_name: string;
15306
+ })[];
15307
+ };
15308
+ export type ActivityItemStatusDetails = {
15309
+ activity_type: "activity-item-status";
15310
+ items_length?: number;
15311
+ };
15312
+ export type ActivityItemStatusVisitDetails = {
15313
+ activity_type: "activity-item-status";
15314
+ activity_id: StringId;
15315
+ items_length?: number;
15316
+ } & Pick<ActivityItemStatus.Data, "time">;
15317
+ export type ActivityFormResultDetails = {
15318
+ activity_type: "activity-form-result";
15319
+ form_name?: string;
15320
+ } & Pick<ActivityFormResult.Data, "form_id">;
15321
+ export type ActivityFormResultVisitDetails = {
15322
+ activity_type: "activity-form-result";
15323
+ activity_id: StringId;
15324
+ form_name?: string;
15325
+ } & Pick<ActivityFormResult.Data, "form_id" | "time">;
15326
+ export type ActivityFormV2ResultDetails = {
15327
+ activity_type: "activity-form-v2-result";
15328
+ form_name?: string;
15329
+ } & Pick<ActivityFormV2Result.Data, "form_id" | "serial_number">;
15330
+ export type ActivityFormV2ResultVisitDetails = {
15331
+ activity_type: "activity-form-v2-result";
15332
+ activity_id: StringId;
15333
+ form_name?: string;
15334
+ } & Pick<ActivityFormV2Result.Data, "form_id" | "serial_number" | "time">;
15335
+ export type ActivityStorecheckDetails = {
15336
+ activity_type: "activity-storecheck";
15337
+ template_name?: string;
15338
+ } & Pick<ActivityStorecheck.ActivityStoreCheckWithPopulatedKeysSchema, "template_id" | "serial_number">;
15339
+ export type ActivityStorecheckVisitDetails = {
15340
+ activity_type: "activity-storecheck";
15341
+ activity_id: StringId;
15342
+ template_name?: string;
15343
+ } & Pick<ActivityStorecheck.ActivityStoreCheckWithPopulatedKeysSchema, "template_id" | "serial_number" | "time">;
15344
+ export type ActivityFeedbackDetails = {
15345
+ activity_type: "activity-feedback";
15346
+ feed_back_option_label?: string;
15347
+ } & Pick<ActivityFeedback.Data, "feed_back_option">;
15348
+ export type ActivityFeedbackVisitDetails = {
15349
+ activity_type: "activity-feedback";
15350
+ activity_id: StringId;
15351
+ time?: number;
15352
+ feed_back_option_label?: string;
15353
+ } & Pick<ActivityFeedback.Data, "feed_back_option">;
15354
+ export type ApprovalRequestDetails = {
15355
+ activity_type: "approval-request";
15356
+ } & Pick<ApprovalRequest.Data, "serial_number" | "type" | "subtype">;
15357
+ export type ApprovalRequestVisitDetails = {
15358
+ activity_type: "approval-request";
15359
+ activity_id: StringId;
15360
+ } & Pick<ApprovalRequest.Data, "serial_number" | "type" | "subtype" | "time">;
15361
+ export type ReminderDetails = {
15362
+ activity_type: "reminders";
15363
+ cover_photo?: StringId | PopulatedMediaStorage;
15364
+ } & Pick<Reminder.Data, "content" | "from" | "to" | "name">;
15365
+ export type AssetDetails = {
15366
+ activity_type: "asset";
15367
+ asset_types?: string;
15368
+ } & Pick<Asset.Data, "name">;
15369
+ export type AssetUnitDetails = {
15370
+ activity_type: "asset-unit";
15371
+ asset?: string;
15372
+ } & Pick<AssetUnit.Data, "name">;
15373
+ export type AssetPartDetails = {
15374
+ activity_type: "asset-part";
15375
+ } & Pick<AssetPart.Data, "name">;
15376
+ export type AssetPartReceivalDetails = {
15377
+ activity_type: "asset-part-receival";
15378
+ } & Pick<AssetPartReceival.Data, "serial_number" | "warehouse" | "warehouse_name" | "asset_parts_count" | "total_asset_parts_qty">;
15379
+ export type AssetPartReceivalVisitDetails = {
15380
+ activity_type: "asset-part-receival";
15381
+ activity_id: StringId;
15382
+ } & Pick<AssetPartReceival.Data, "serial_number" | "warehouse" | "warehouse_name" | "time" | "asset_parts_count" | "total_asset_parts_qty">;
15383
+ export type AssetPartTransferDetails = {
15384
+ activity_type: "asset-part-transfer";
15385
+ } & Pick<AssetPartTransfer.Data, "serial_number" | "from" | "from_name" | "to" | "to_name" | "asset_part_units_count" | "total_asset_part_units_qty">;
15386
+ export type AssetPartTransferVisitDetails = {
15387
+ activity_type: "asset-part-transfer";
15388
+ activity_id: StringId;
15389
+ } & Pick<AssetPartTransfer.Data, "serial_number" | "from" | "from_name" | "to" | "to_name" | "asset_part_units_count" | "total_asset_part_units_qty" | "time">;
15390
+ export type ReturnAssetPartUnitDetails = {
15391
+ activity_type: "return-asset-part-unit";
15392
+ } & Pick<ReturnAssetPartUnit.Data, "serial_number" | "warehouse" | "warehouse_name" | "asset_part_units_count" | "total_asset_part_units_qty">;
15393
+ export type ReturnAssetPartUnitVisitDetails = {
15394
+ activity_type: "return-asset-part-unit";
15395
+ activity_id: StringId;
15396
+ } & Pick<ReturnAssetPartUnit.Data, "serial_number" | "warehouse" | "warehouse_name" | "asset_part_units_count" | "total_asset_part_units_qty" | "time">;
15397
+ export type StoreAssetPartUnitDetails = {
15398
+ activity_type: "store-asset-part-unit";
15399
+ } & Pick<StoreAssetPartUnit.Data, "serial_number" | "warehouse" | "warehouse_name" | "asset_part_units_count" | "total_asset_part_units_qty">;
15400
+ export type StoreAssetPartUnitVisitDetails = {
15401
+ activity_type: "store-asset-part-unit";
15402
+ activity_id: StringId;
15403
+ } & Pick<StoreAssetPartUnit.Data, "serial_number" | "warehouse" | "warehouse_name" | "asset_part_units_count" | "total_asset_part_units_qty" | "time">;
15404
+ export type PaymentDetails = {
15405
+ activity_type: "payment";
15406
+ } & Pick<Payment.Data, "amount" | "serial_number" | "paytime" | "currency" | "payment_type">;
15407
+ export type PaymentVisitDetails = {
15408
+ activity_type: "payment";
15409
+ activity_id: StringId;
15410
+ } & Pick<Payment.Data, "amount" | "serial_number" | "currency" | "payment_type" | "time">;
15411
+ export type RefundDetails = {
15412
+ activity_type: "refund";
15413
+ } & Pick<Refund.Data, "amount" | "serial_number" | "paytime" | "currency" | "transaction_type">;
15414
+ export type RefundVisitDetails = {
15415
+ activity_type: "refund";
15416
+ activity_id: StringId;
15417
+ } & Pick<Refund.Data, "amount" | "serial_number" | "currency" | "transaction_type" | "time">;
15418
+ export type SettlementDetails = {
15419
+ activity_type: "settlement";
15420
+ } & Pick<Settlement.Data, "amount" | "serial_number" | "paytime" | "origin" | "payment_type">;
15421
+ export type SettlementVisitDetails = {
15422
+ activity_type: "settlement";
15423
+ activity_id: StringId;
15424
+ } & Pick<Settlement.Data, "amount" | "serial_number" | "origin" | "payment_type" | "time">;
15425
+ export type ConvertProformaDetails = {
15426
+ activity_type: "convert-proforma";
15427
+ proforma_reference: FullInvoice.Data["proforma_reference"];
15428
+ proforma_serial_number: Proforma.Data["serial_number"];
15429
+ invoice_serial_number: FullInvoice.Data["serial_number"];
15430
+ total: FullInvoice.Data["total"];
15431
+ currency: FullInvoice.Data["currency"];
15432
+ };
15433
+ export type ConvertProformaVisitDetails = {
15434
+ activity_type: "convert-proforma";
15435
+ activity_id: StringId;
15436
+ proforma_serial_number: Proforma.Data["serial_number"];
15437
+ invoice_serial_number: FullInvoice.Data["serial_number"];
15438
+ time: number;
15439
+ proforma_reference: FullInvoice.Data["proforma_reference"];
15440
+ total: FullInvoice.Data["total"];
15441
+ currency: FullInvoice.Data["currency"];
15442
+ };
15443
+ export type TransferDetails = {
15444
+ activity_type: "transfer";
15445
+ from_name: string;
15446
+ to_name: string;
15447
+ } & Pick<Transfer.Data, "type" | "serial_number" | "from" | "to" | "items_count" | "comment">;
15448
+ export type ReceivingMaterialDetails = {
15449
+ activity_type: "receiving-material";
15450
+ to_name: string;
15451
+ } & Pick<ReceivingMaterial.Data, "serial_number" | "to" | "items_count" | "comment">;
15452
+ export type FullInvoiceDetails = {
15453
+ activity_type: "fullinvoices";
15454
+ } & Pick<FullInvoice.Data, "total" | "serial_number" | "currency" | "issue_date" | "due_date" | "external_serial_number">;
15455
+ export type FullInvoiceVisitDetails = {
15456
+ activity_type: "fullinvoices";
15457
+ activity_id: StringId;
15458
+ } & Pick<FullInvoice.Data, "total" | "serial_number" | "currency" | "time" | "issue_date" | "due_date" | "external_serial_number">;
15459
+ export type ProformaDetails = {
15460
+ activity_type: "proforma";
15461
+ } & Pick<Proforma.Data, "total" | "serial_number" | "currency" | "issue_date" | "external_serial_number">;
15462
+ export type ProformaVisitDetails = {
15463
+ activity_type: "proforma";
15464
+ activity_id: StringId;
15465
+ } & Pick<Proforma.Data, "total" | "serial_number" | "currency" | "time" | "issue_date" | "external_serial_number">;
15466
+ export type WorkorderDetails = {
15467
+ activity_type: "workorder";
15468
+ } & Pick<Workorder.Data, "name" | "serial_number" | "due_date">;
15469
+ export type WorkorderRequestDetails = {
15470
+ activity_type: "workorder-request";
15471
+ } & Pick<WorkorderRequest.Data, "name">;
15472
+ export type ReturnWholeInvoiceDetails = {
15473
+ activity_type: "return-whole-invoice";
15474
+ returned_from_serial_number: FullInvoice.Data["returned_from_serial_number"];
15475
+ } & Pick<FullInvoice.Data, "returned_from" | "returned_to_serial_number">;
15476
+ export type ReturnWholeInvoiceVisitDetails = {
15477
+ activity_type: "return-whole-invoice";
15478
+ activity_id: StringId;
15479
+ returned_from_serial_number: FullInvoice.Data["returned_from_serial_number"];
15480
+ } & Pick<FullInvoice.Data, "returned_from" | "returned_to_serial_number" | "time">;
15481
+ export type VoidInvoiceDetails = {
15482
+ activity_type: "void-invoice";
15483
+ returned_from_serial_number: FullInvoice.Data["returned_from_serial_number"];
15484
+ } & Pick<FullInvoice.Data, "returned_from" | "returned_to_serial_number">;
15485
+ export type VoidInvoiceVisitDetails = {
15486
+ activity_type: "void-invoice";
15487
+ activity_id: StringId;
15488
+ returned_from_serial_number: FullInvoice.Data["returned_from_serial_number"];
15489
+ } & Pick<FullInvoice.Data, "returned_from" | "returned_to_serial_number" | "time">;
15490
+ export type CycleDetails = {
15491
+ activity_type: "cycle";
15492
+ stage_name?: string;
15493
+ } & Pick<Cycle.Data, "document_type" | "serial_number" | "document_id" | "status">;
15494
+ export type ClientDetails = {
15495
+ activity_type: "client";
15496
+ } & Pick<Client.Data, "name" | "client_code" | "local_name" | "lat" | "lng" | "location_verified">;
15497
+ export type StartDayDetails = {
15498
+ activity_type: "day";
15499
+ startTime: string;
15500
+ } & Pick<Day.Data, "day" | "open" | "created_by_system" | "start_geoPoint" | "timeZone">;
15501
+ export type EndDayDetails = {
15502
+ activity_type: "day";
15503
+ startTime: string;
15504
+ endTime: string;
15505
+ } & Pick<Day.Data, "day" | "open" | "breaksTime" | "created_by_system" | "timeInVisits" | "end_geoPoint" | "start_geoPoint" | "travelTimeBetweenVisists" | "totalTravelTime" | "breaksTime" | "timeOnDuty" | "timeZone">;
15506
+ export type DayDetails = StartDayDetails | EndDayDetails;
15507
+ export type PopulatedDoc = Data & {
15508
+ client_populated?: Pick<Client.Data, "_id" | "name" | "client_code" | "local_name" | "lat" | "lng" | "location_verified" | "chain" | "channel" | "city" | "state" | "country" | "tags" | "customFields" | "teams">;
15509
+ client_name?: string;
15510
+ client_code?: string;
15511
+ client_local_name?: string;
15512
+ client_lat?: number;
15513
+ client_lng?: number;
15514
+ client_location_verified?: boolean;
15515
+ user_profile_photo?: string | null;
15516
+ client_customFields?: {
15517
+ [key: string]: any;
15518
+ };
15519
+ chain?: StringId;
15520
+ chain_name?: string;
15521
+ chain_populated?: {
15522
+ _id: StringId;
15523
+ name: string;
15524
+ };
15525
+ channel?: StringId;
15526
+ channel_name?: string;
15527
+ channel_populated?: {
15528
+ _id: StringId;
15529
+ name: string;
15530
+ };
15531
+ area_tags?: StringId[];
15532
+ area_tags_populated?: {
15533
+ _id?: StringId[];
15534
+ name?: string[];
15535
+ };
15536
+ area_tags_names?: string[];
15537
+ client_tags?: StringId[];
15538
+ client_tags_populated?: {
15539
+ _id?: StringId[];
15540
+ name?: string[];
15541
+ };
15542
+ client_tags_names?: string[];
15543
+ city?: string;
15544
+ state?: string;
15545
+ country?: string;
15546
+ rep_populated?: Pick<Rep.Data, "_id" | "name" | "username" | "customFields">;
15547
+ rep_username?: string;
15548
+ rep_customFields: {
15549
+ [key: string]: any;
15550
+ };
15551
+ teams_populated?: {
15552
+ _id?: StringId[];
15553
+ name?: string[];
15554
+ };
15555
+ teams?: string[];
15556
+ admin_populated?: {
15557
+ _id: StringId;
15558
+ name: string;
15559
+ };
15560
+ };
15561
+ export type SortingKeys = "_id";
15562
+ export namespace Find {
15563
+ type Params = DefaultPaginationQueryParams & {
15564
+ visit_mode?: boolean;
15565
+ admin?: StringId | StringId[];
15566
+ rep?: StringId | StringId[];
15567
+ sortBy?: {
15568
+ field: SortingKeys;
15569
+ type: "asc" | "desc";
15570
+ }[];
15571
+ _id?: StringId | StringId[];
15572
+ "user._id"?: StringId | StringId[];
15573
+ user?: StringId | StringId[];
15574
+ "user.type"?: Data["user"]["type"] | Data["user"]["type"][];
15575
+ user_type?: Data["user"]["type"] | Data["user"]["type"][];
15576
+ from_createdAt?: number;
15577
+ to_createdAt?: number;
15578
+ teams?: StringId | StringId[];
15579
+ activity_type?: Data["activity_type"] | Data["activity_type"][];
15580
+ action?: Data["action"] | Data["action"][];
15581
+ visit_id?: string | string[];
15582
+ activity_id?: StringId | StringId[];
15583
+ time?: number;
15584
+ from_time?: number;
15585
+ to_time?: number;
15586
+ sync_id?: string | string[];
15587
+ client?: StringId | StringId[];
15588
+ "details.activities.activity_type"?: VisitDetails["activities"][0]["activity_type"] | VisitDetails["activities"][0]["activity_type"][];
15589
+ chain?: StringId | StringId[];
15590
+ channel?: StringId | StringId[];
15591
+ city?: string | string[];
15592
+ region?: string | string[];
15593
+ state?: string | string[];
15594
+ country?: string | string[];
15595
+ tags?: StringId | StringId[];
15596
+ CLIENT_TAGS?: StringId | StringId[];
15597
+ AREA_TAGS?: StringId | StringId[];
15598
+ with_media?: boolean;
15599
+ with_client_customFields?: boolean;
15600
+ with_client_details?: boolean;
15601
+ with_chain?: boolean;
15602
+ with_channel?: boolean;
15603
+ with_area_tags?: boolean;
15604
+ with_tags?: boolean;
15605
+ with_client_tags?: boolean;
15606
+ with_teams?: boolean;
15607
+ with_rep_details?: boolean;
15608
+ with_rep_customFields?: boolean;
15609
+ };
15610
+ interface Result extends DefaultPaginationResult {
15611
+ data: PopulatedDoc[];
15612
+ }
15613
+ }
15614
+ export {};
15615
+ }
15164
15616
  }
15165
15617
  export type StringId = string;
15166
15618
  export type NameSpaces = string[];
@@ -89,4 +89,48 @@ export var Service;
89
89
  "cycle",
90
90
  ];
91
91
  })(TimelineReport = Service.TimelineReport || (Service.TimelineReport = {}));
92
+ let TimelineTimeList;
93
+ (function (TimelineTimeList) {
94
+ TimelineTimeList.activity_types = [
95
+ "day",
96
+ "client",
97
+ "visit",
98
+ "payment",
99
+ "activity-photo",
100
+ "activity-audit",
101
+ "activity-availability",
102
+ "activity-checkout-display",
103
+ "activity-feedback",
104
+ "activity-form-result",
105
+ "activity-form-v2-result",
106
+ "activity-item-status",
107
+ "activity-note",
108
+ "activity-planogram",
109
+ "activity-secondary-display",
110
+ "activity-shelfshare",
111
+ "activity-storecheck",
112
+ "activity-task",
113
+ "approval-request",
114
+ "asset-part-receival",
115
+ "asset-part-transfer",
116
+ "asset",
117
+ "asset-part",
118
+ "asset-unit",
119
+ "reminders",
120
+ "return-asset-part-unit",
121
+ "store-asset-part-unit",
122
+ "refund",
123
+ "settlement",
124
+ "convert-proforma",
125
+ "transfer",
126
+ "proforma",
127
+ "receiving-material",
128
+ "void-invoice",
129
+ "fullinvoices",
130
+ "workorder",
131
+ "workorder-request",
132
+ "return-whole-invoice",
133
+ "cycle",
134
+ ];
135
+ })(TimelineTimeList = Service.TimelineTimeList || (Service.TimelineTimeList = {}));
92
136
  })(Service || (Service = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.157",
3
+ "version": "1.0.158",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
package/src/index.ts CHANGED
@@ -103,6 +103,7 @@ export const end_points = {
103
103
  TIMELINE_REPORT: "timeline-report",
104
104
  RESET_COMPANY_NAMESPACE: "reset-company-namespace",
105
105
  TEST_RESET_COMPANY_NAMESPACE: "test-reset-company-namespace",
106
+ TIMELINE_TIME_LIST: "timeline-time-list",
106
107
  } as const;
107
108
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
108
109
 
@@ -4865,6 +4866,20 @@ export default class Repzo {
4865
4866
  return res;
4866
4867
  },
4867
4868
  };
4869
+
4870
+ timelineTimeList = {
4871
+ _path: Repzo._end_points.TIMELINE_TIME_LIST,
4872
+ find: async (
4873
+ params?: Service.TimelineTimeList.Find.Params,
4874
+ ): Promise<Service.TimelineTimeList.Find.Result> => {
4875
+ let res: Service.TimelineTimeList.Find.Result = await this._fetch(
4876
+ this.svAPIEndpoint,
4877
+ this.timelineTimeList._path,
4878
+ params,
4879
+ );
4880
+ return res;
4881
+ },
4882
+ };
4868
4883
  }
4869
4884
 
4870
4885
  function normalizeParams(params: Params): { [key: string]: any } {