repzo 1.0.63 → 1.0.64
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 +13 -0
- package/lib/index.js +18 -0
- package/lib/types/index.d.ts +185 -2
- package/package.json +1 -1
- package/src/index.ts +33 -0
- package/src/types/index.ts +164 -2
package/lib/index.d.ts
CHANGED
|
@@ -640,6 +640,19 @@ export default class Repzo {
|
|
|
640
640
|
body: Service.Check.Create.Body
|
|
641
641
|
) => Promise<Service.Check.Create.Result>;
|
|
642
642
|
};
|
|
643
|
+
day: {
|
|
644
|
+
_path: string;
|
|
645
|
+
find: (
|
|
646
|
+
params?: Service.Day.Find.Params
|
|
647
|
+
) => Promise<Service.Day.Find.Result>;
|
|
648
|
+
get: (
|
|
649
|
+
id: Service.Day.Get.ID,
|
|
650
|
+
params?: Service.Day.Get.Params
|
|
651
|
+
) => Promise<Service.Day.Get.Result>;
|
|
652
|
+
create: (
|
|
653
|
+
body: Service.Day.Create.Body
|
|
654
|
+
) => Promise<Service.Day.Create.Result>;
|
|
655
|
+
};
|
|
643
656
|
transfer: {
|
|
644
657
|
_path: string;
|
|
645
658
|
find: (
|
package/lib/index.js
CHANGED
|
@@ -1316,6 +1316,24 @@ export default class Repzo {
|
|
|
1316
1316
|
return res;
|
|
1317
1317
|
},
|
|
1318
1318
|
};
|
|
1319
|
+
this.day = {
|
|
1320
|
+
_path: "/day",
|
|
1321
|
+
find: async (params) => {
|
|
1322
|
+
let res = await this._fetch(this.svAPIEndpoint, this.day._path, params);
|
|
1323
|
+
return res;
|
|
1324
|
+
},
|
|
1325
|
+
get: async (id, params) => {
|
|
1326
|
+
return await this._fetch(
|
|
1327
|
+
this.svAPIEndpoint,
|
|
1328
|
+
this.day._path + `/${id}`,
|
|
1329
|
+
params
|
|
1330
|
+
);
|
|
1331
|
+
},
|
|
1332
|
+
create: async (body) => {
|
|
1333
|
+
let res = await this._create(this.svAPIEndpoint, this.day._path, body);
|
|
1334
|
+
return res;
|
|
1335
|
+
},
|
|
1336
|
+
};
|
|
1319
1337
|
this.transfer = {
|
|
1320
1338
|
_path: "/transfer",
|
|
1321
1339
|
find: async (params) => {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -5128,7 +5128,7 @@ export declare namespace Service {
|
|
|
5128
5128
|
check?: Check;
|
|
5129
5129
|
LinkedTxn?: {
|
|
5130
5130
|
Txn_serial_number: SerialNumber;
|
|
5131
|
-
|
|
5131
|
+
Txn_total: number;
|
|
5132
5132
|
TxnType: "return_invoice" | "payment" | "invoice";
|
|
5133
5133
|
};
|
|
5134
5134
|
company_namespace: string[];
|
|
@@ -5172,7 +5172,7 @@ export declare namespace Service {
|
|
|
5172
5172
|
check?: Check;
|
|
5173
5173
|
LinkedTxn?: {
|
|
5174
5174
|
Txn_serial_number: SerialNumber;
|
|
5175
|
-
|
|
5175
|
+
Txn_total: number;
|
|
5176
5176
|
TxnType: "return_invoice" | "payment" | "invoice";
|
|
5177
5177
|
};
|
|
5178
5178
|
company_namespace?: string[];
|
|
@@ -5475,6 +5475,189 @@ export declare namespace Service {
|
|
|
5475
5475
|
}
|
|
5476
5476
|
export {};
|
|
5477
5477
|
}
|
|
5478
|
+
namespace Day {
|
|
5479
|
+
export interface DaySchema {
|
|
5480
|
+
_id: string;
|
|
5481
|
+
creator: RepCreator;
|
|
5482
|
+
startTime: string[];
|
|
5483
|
+
endTime: string[];
|
|
5484
|
+
plan: {
|
|
5485
|
+
[key: string]: any;
|
|
5486
|
+
};
|
|
5487
|
+
groupedPlan?: {
|
|
5488
|
+
[key: string]: any;
|
|
5489
|
+
};
|
|
5490
|
+
day: string;
|
|
5491
|
+
timeFrame: {
|
|
5492
|
+
startOfDay?: number;
|
|
5493
|
+
endOfDay?: number;
|
|
5494
|
+
};
|
|
5495
|
+
timeZone?: string;
|
|
5496
|
+
EOD?: string;
|
|
5497
|
+
closed_by_system?: boolean;
|
|
5498
|
+
open: boolean;
|
|
5499
|
+
paymentSnapShot_start?: any[];
|
|
5500
|
+
paymentSnapShot_end?: any[];
|
|
5501
|
+
inventorySnapShot?: any[];
|
|
5502
|
+
target?: {
|
|
5503
|
+
scheduled: any[];
|
|
5504
|
+
unscheduled: any[];
|
|
5505
|
+
missed: any[];
|
|
5506
|
+
};
|
|
5507
|
+
timeOnDuty?: number;
|
|
5508
|
+
breaksTime?: number;
|
|
5509
|
+
timeInVisits?: number;
|
|
5510
|
+
totalTime?: number;
|
|
5511
|
+
totalTravelTime?: number;
|
|
5512
|
+
travelTimeBetweenVisists?: number;
|
|
5513
|
+
teams: string[];
|
|
5514
|
+
created_by_system?: boolean;
|
|
5515
|
+
previously_closed?: boolean;
|
|
5516
|
+
start_geoPoint?: {
|
|
5517
|
+
type: string;
|
|
5518
|
+
coordinates: number[];
|
|
5519
|
+
};
|
|
5520
|
+
end_geoPoint?: {
|
|
5521
|
+
type: string;
|
|
5522
|
+
coordinates: number[];
|
|
5523
|
+
};
|
|
5524
|
+
odometer?: number;
|
|
5525
|
+
startTime_unix?: number[];
|
|
5526
|
+
endTime_unix?: number[];
|
|
5527
|
+
company_namespace: string[];
|
|
5528
|
+
createdAt: Date;
|
|
5529
|
+
updatedAt: Date;
|
|
5530
|
+
}
|
|
5531
|
+
export interface CreateBody {
|
|
5532
|
+
startTime: string[];
|
|
5533
|
+
endTime: string[];
|
|
5534
|
+
plan: {
|
|
5535
|
+
[key: string]: any;
|
|
5536
|
+
};
|
|
5537
|
+
groupedPlan?: {
|
|
5538
|
+
[key: string]: any;
|
|
5539
|
+
};
|
|
5540
|
+
day: string;
|
|
5541
|
+
timeFrame: {
|
|
5542
|
+
startOfDay?: number;
|
|
5543
|
+
endOfDay?: number;
|
|
5544
|
+
};
|
|
5545
|
+
timeZone?: string;
|
|
5546
|
+
EOD?: string;
|
|
5547
|
+
closed_by_system?: boolean;
|
|
5548
|
+
open: boolean;
|
|
5549
|
+
paymentSnapShot_start?: any[];
|
|
5550
|
+
paymentSnapShot_end?: any[];
|
|
5551
|
+
inventorySnapShot?: any[];
|
|
5552
|
+
target?: {
|
|
5553
|
+
[key: string]: any;
|
|
5554
|
+
};
|
|
5555
|
+
timeOnDuty?: number;
|
|
5556
|
+
breaksTime?: number;
|
|
5557
|
+
timeInVisits?: number;
|
|
5558
|
+
totalTime?: number;
|
|
5559
|
+
totalTravelTime?: number;
|
|
5560
|
+
travelTimeBetweenVisists?: number;
|
|
5561
|
+
teams: string[];
|
|
5562
|
+
created_by_system?: boolean;
|
|
5563
|
+
previously_closed?: boolean;
|
|
5564
|
+
start_geoPoint?: {
|
|
5565
|
+
type: string;
|
|
5566
|
+
coordinates: number[];
|
|
5567
|
+
};
|
|
5568
|
+
end_geoPoint?: {
|
|
5569
|
+
type: string;
|
|
5570
|
+
coordinates: number[];
|
|
5571
|
+
};
|
|
5572
|
+
odometer?: number;
|
|
5573
|
+
startTime_unix?: number[];
|
|
5574
|
+
endTime_unix?: number[];
|
|
5575
|
+
company_namespace: string[];
|
|
5576
|
+
}
|
|
5577
|
+
export interface UpdateBody {
|
|
5578
|
+
_id?: string;
|
|
5579
|
+
startTime?: string[];
|
|
5580
|
+
endTime?: string[];
|
|
5581
|
+
plan?: {
|
|
5582
|
+
[key: string]: any;
|
|
5583
|
+
};
|
|
5584
|
+
groupedPlan?: {
|
|
5585
|
+
[key: string]: any;
|
|
5586
|
+
};
|
|
5587
|
+
day?: string;
|
|
5588
|
+
timeFrame?: {
|
|
5589
|
+
startOfDay?: number;
|
|
5590
|
+
endOfDay?: number;
|
|
5591
|
+
};
|
|
5592
|
+
timeZone?: string;
|
|
5593
|
+
EOD?: string;
|
|
5594
|
+
closed_by_system?: boolean;
|
|
5595
|
+
open?: boolean;
|
|
5596
|
+
paymentSnapShot_start?: any[];
|
|
5597
|
+
paymentSnapShot_end?: any[];
|
|
5598
|
+
inventorySnapShot?: any[];
|
|
5599
|
+
target?: {
|
|
5600
|
+
scheduled: any[];
|
|
5601
|
+
unscheduled: any[];
|
|
5602
|
+
missed: any[];
|
|
5603
|
+
};
|
|
5604
|
+
timeOnDuty?: number;
|
|
5605
|
+
breaksTime?: number;
|
|
5606
|
+
timeInVisits?: number;
|
|
5607
|
+
totalTime?: number;
|
|
5608
|
+
totalTravelTime?: number;
|
|
5609
|
+
travelTimeBetweenVisists?: number;
|
|
5610
|
+
teams?: string[];
|
|
5611
|
+
created_by_system?: boolean;
|
|
5612
|
+
previously_closed?: boolean;
|
|
5613
|
+
start_geoPoint?: {
|
|
5614
|
+
type: string;
|
|
5615
|
+
coordinates: number[];
|
|
5616
|
+
};
|
|
5617
|
+
end_geoPoint?: {
|
|
5618
|
+
type: string;
|
|
5619
|
+
coordinates: number[];
|
|
5620
|
+
};
|
|
5621
|
+
odometer?: number;
|
|
5622
|
+
startTime_unix?: number[];
|
|
5623
|
+
endTime_unix?: number[];
|
|
5624
|
+
company_namespace?: string[];
|
|
5625
|
+
}
|
|
5626
|
+
type DaySchemaWithPopulatedKeys = DaySchema & {
|
|
5627
|
+
teams_populated?: string[] | Team.TeamSchema[];
|
|
5628
|
+
};
|
|
5629
|
+
type PopulatedKeys = "teams";
|
|
5630
|
+
export namespace Find {
|
|
5631
|
+
type Params = DefaultPaginationQueryParams & {
|
|
5632
|
+
_id?: string[] | string;
|
|
5633
|
+
"creator._id"?: string[] | string;
|
|
5634
|
+
open?: boolean;
|
|
5635
|
+
day?: string;
|
|
5636
|
+
from_day?: string;
|
|
5637
|
+
to_day?: string;
|
|
5638
|
+
from_updatedAt?: number;
|
|
5639
|
+
[key: string]: any;
|
|
5640
|
+
populatedKeys?: PopulatedKeys[];
|
|
5641
|
+
};
|
|
5642
|
+
interface Result extends DefaultPaginationResult {
|
|
5643
|
+
data: DaySchemaWithPopulatedKeys[];
|
|
5644
|
+
absolute_total: number;
|
|
5645
|
+
page_total: number;
|
|
5646
|
+
}
|
|
5647
|
+
}
|
|
5648
|
+
export namespace Get {
|
|
5649
|
+
type ID = string;
|
|
5650
|
+
interface Params {
|
|
5651
|
+
populatedKeys?: PopulatedKeys[];
|
|
5652
|
+
}
|
|
5653
|
+
type Result = DaySchemaWithPopulatedKeys;
|
|
5654
|
+
}
|
|
5655
|
+
export namespace Create {
|
|
5656
|
+
type Body = CreateBody;
|
|
5657
|
+
type Result = DaySchema;
|
|
5658
|
+
}
|
|
5659
|
+
export {};
|
|
5660
|
+
}
|
|
5478
5661
|
namespace Cycle {
|
|
5479
5662
|
type CycleStatus = "pending" | "approved" | "processing" | "rejected";
|
|
5480
5663
|
export interface Schema {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1874,6 +1874,39 @@ export default class Repzo {
|
|
|
1874
1874
|
},
|
|
1875
1875
|
};
|
|
1876
1876
|
|
|
1877
|
+
day = {
|
|
1878
|
+
_path: "/day",
|
|
1879
|
+
|
|
1880
|
+
find: async (
|
|
1881
|
+
params?: Service.Day.Find.Params
|
|
1882
|
+
): Promise<Service.Day.Find.Result> => {
|
|
1883
|
+
let res: Service.Day.Find.Result = await this._fetch(
|
|
1884
|
+
this.svAPIEndpoint,
|
|
1885
|
+
this.day._path,
|
|
1886
|
+
params
|
|
1887
|
+
);
|
|
1888
|
+
return res;
|
|
1889
|
+
},
|
|
1890
|
+
|
|
1891
|
+
get: async (
|
|
1892
|
+
id: Service.Day.Get.ID,
|
|
1893
|
+
params?: Service.Day.Get.Params
|
|
1894
|
+
): Promise<Service.Day.Get.Result> => {
|
|
1895
|
+
return await this._fetch(
|
|
1896
|
+
this.svAPIEndpoint,
|
|
1897
|
+
this.day._path + `/${id}`,
|
|
1898
|
+
params
|
|
1899
|
+
);
|
|
1900
|
+
},
|
|
1901
|
+
|
|
1902
|
+
create: async (
|
|
1903
|
+
body: Service.Day.Create.Body
|
|
1904
|
+
): Promise<Service.Day.Create.Result> => {
|
|
1905
|
+
let res = await this._create(this.svAPIEndpoint, this.day._path, body);
|
|
1906
|
+
return res;
|
|
1907
|
+
},
|
|
1908
|
+
};
|
|
1909
|
+
|
|
1877
1910
|
transfer = {
|
|
1878
1911
|
_path: "/transfer",
|
|
1879
1912
|
find: async (
|
package/src/types/index.ts
CHANGED
|
@@ -5135,7 +5135,7 @@ export namespace Service {
|
|
|
5135
5135
|
check?: Check;
|
|
5136
5136
|
LinkedTxn?: {
|
|
5137
5137
|
Txn_serial_number: SerialNumber;
|
|
5138
|
-
|
|
5138
|
+
Txn_total: number;
|
|
5139
5139
|
TxnType: "return_invoice" | "payment" | "invoice";
|
|
5140
5140
|
};
|
|
5141
5141
|
company_namespace: string[];
|
|
@@ -5177,7 +5177,7 @@ export namespace Service {
|
|
|
5177
5177
|
check?: Check;
|
|
5178
5178
|
LinkedTxn?: {
|
|
5179
5179
|
Txn_serial_number: SerialNumber;
|
|
5180
|
-
|
|
5180
|
+
Txn_total: number;
|
|
5181
5181
|
TxnType: "return_invoice" | "payment" | "invoice";
|
|
5182
5182
|
};
|
|
5183
5183
|
company_namespace?: string[];
|
|
@@ -5483,6 +5483,168 @@ export namespace Service {
|
|
|
5483
5483
|
}
|
|
5484
5484
|
}
|
|
5485
5485
|
|
|
5486
|
+
export namespace Day {
|
|
5487
|
+
export interface DaySchema {
|
|
5488
|
+
_id: string;
|
|
5489
|
+
creator: RepCreator;
|
|
5490
|
+
startTime: string[];
|
|
5491
|
+
endTime: string[];
|
|
5492
|
+
plan: { [key: string]: any };
|
|
5493
|
+
groupedPlan?: { [key: string]: any };
|
|
5494
|
+
day: string;
|
|
5495
|
+
timeFrame: { startOfDay?: number; endOfDay?: number };
|
|
5496
|
+
timeZone?: string;
|
|
5497
|
+
EOD?: string;
|
|
5498
|
+
closed_by_system?: boolean;
|
|
5499
|
+
open: boolean;
|
|
5500
|
+
paymentSnapShot_start?: any[];
|
|
5501
|
+
paymentSnapShot_end?: any[];
|
|
5502
|
+
inventorySnapShot?: any[];
|
|
5503
|
+
target?: {
|
|
5504
|
+
scheduled: any[];
|
|
5505
|
+
unscheduled: any[];
|
|
5506
|
+
missed: any[];
|
|
5507
|
+
};
|
|
5508
|
+
timeOnDuty?: number;
|
|
5509
|
+
breaksTime?: number;
|
|
5510
|
+
timeInVisits?: number;
|
|
5511
|
+
totalTime?: number;
|
|
5512
|
+
totalTravelTime?: number;
|
|
5513
|
+
travelTimeBetweenVisists?: number;
|
|
5514
|
+
teams: string[];
|
|
5515
|
+
created_by_system?: boolean;
|
|
5516
|
+
previously_closed?: boolean;
|
|
5517
|
+
start_geoPoint?: {
|
|
5518
|
+
type: string;
|
|
5519
|
+
coordinates: number[];
|
|
5520
|
+
};
|
|
5521
|
+
end_geoPoint?: {
|
|
5522
|
+
type: string;
|
|
5523
|
+
coordinates: number[];
|
|
5524
|
+
};
|
|
5525
|
+
odometer?: number;
|
|
5526
|
+
startTime_unix?: number[];
|
|
5527
|
+
endTime_unix?: number[];
|
|
5528
|
+
company_namespace: string[];
|
|
5529
|
+
createdAt: Date;
|
|
5530
|
+
updatedAt: Date;
|
|
5531
|
+
}
|
|
5532
|
+
|
|
5533
|
+
export interface CreateBody {
|
|
5534
|
+
startTime: string[];
|
|
5535
|
+
endTime: string[];
|
|
5536
|
+
plan: { [key: string]: any };
|
|
5537
|
+
groupedPlan?: { [key: string]: any };
|
|
5538
|
+
day: string;
|
|
5539
|
+
timeFrame: { startOfDay?: number; endOfDay?: number };
|
|
5540
|
+
timeZone?: string;
|
|
5541
|
+
EOD?: string;
|
|
5542
|
+
closed_by_system?: boolean;
|
|
5543
|
+
open: boolean;
|
|
5544
|
+
paymentSnapShot_start?: any[];
|
|
5545
|
+
paymentSnapShot_end?: any[];
|
|
5546
|
+
inventorySnapShot?: any[];
|
|
5547
|
+
target?: { [key: string]: any };
|
|
5548
|
+
timeOnDuty?: number;
|
|
5549
|
+
breaksTime?: number;
|
|
5550
|
+
timeInVisits?: number;
|
|
5551
|
+
totalTime?: number;
|
|
5552
|
+
totalTravelTime?: number;
|
|
5553
|
+
travelTimeBetweenVisists?: number;
|
|
5554
|
+
teams: string[];
|
|
5555
|
+
created_by_system?: boolean;
|
|
5556
|
+
previously_closed?: boolean;
|
|
5557
|
+
start_geoPoint?: {
|
|
5558
|
+
type: string;
|
|
5559
|
+
coordinates: number[];
|
|
5560
|
+
};
|
|
5561
|
+
end_geoPoint?: {
|
|
5562
|
+
type: string;
|
|
5563
|
+
coordinates: number[];
|
|
5564
|
+
};
|
|
5565
|
+
odometer?: number;
|
|
5566
|
+
startTime_unix?: number[];
|
|
5567
|
+
endTime_unix?: number[];
|
|
5568
|
+
company_namespace: string[];
|
|
5569
|
+
}
|
|
5570
|
+
|
|
5571
|
+
export interface UpdateBody {
|
|
5572
|
+
_id?: string;
|
|
5573
|
+
startTime?: string[];
|
|
5574
|
+
endTime?: string[];
|
|
5575
|
+
plan?: { [key: string]: any };
|
|
5576
|
+
groupedPlan?: { [key: string]: any };
|
|
5577
|
+
day?: string;
|
|
5578
|
+
timeFrame?: { startOfDay?: number; endOfDay?: number };
|
|
5579
|
+
timeZone?: string;
|
|
5580
|
+
EOD?: string;
|
|
5581
|
+
closed_by_system?: boolean;
|
|
5582
|
+
open?: boolean;
|
|
5583
|
+
paymentSnapShot_start?: any[];
|
|
5584
|
+
paymentSnapShot_end?: any[];
|
|
5585
|
+
inventorySnapShot?: any[];
|
|
5586
|
+
target?: {
|
|
5587
|
+
scheduled: any[];
|
|
5588
|
+
unscheduled: any[];
|
|
5589
|
+
missed: any[];
|
|
5590
|
+
};
|
|
5591
|
+
timeOnDuty?: number;
|
|
5592
|
+
breaksTime?: number;
|
|
5593
|
+
timeInVisits?: number;
|
|
5594
|
+
totalTime?: number;
|
|
5595
|
+
totalTravelTime?: number;
|
|
5596
|
+
travelTimeBetweenVisists?: number;
|
|
5597
|
+
teams?: string[];
|
|
5598
|
+
created_by_system?: boolean;
|
|
5599
|
+
previously_closed?: boolean;
|
|
5600
|
+
start_geoPoint?: {
|
|
5601
|
+
type: string;
|
|
5602
|
+
coordinates: number[];
|
|
5603
|
+
};
|
|
5604
|
+
end_geoPoint?: {
|
|
5605
|
+
type: string;
|
|
5606
|
+
coordinates: number[];
|
|
5607
|
+
};
|
|
5608
|
+
odometer?: number;
|
|
5609
|
+
startTime_unix?: number[];
|
|
5610
|
+
endTime_unix?: number[];
|
|
5611
|
+
company_namespace?: string[];
|
|
5612
|
+
}
|
|
5613
|
+
type DaySchemaWithPopulatedKeys = DaySchema & {
|
|
5614
|
+
teams_populated?: string[] | Team.TeamSchema[];
|
|
5615
|
+
};
|
|
5616
|
+
type PopulatedKeys = "teams";
|
|
5617
|
+
export namespace Find {
|
|
5618
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
5619
|
+
_id?: string[] | string;
|
|
5620
|
+
"creator._id"?: string[] | string;
|
|
5621
|
+
open?: boolean;
|
|
5622
|
+
day?: string;
|
|
5623
|
+
from_day?: string;
|
|
5624
|
+
to_day?: string;
|
|
5625
|
+
from_updatedAt?: number;
|
|
5626
|
+
[key: string]: any; // integration_meta.
|
|
5627
|
+
populatedKeys?: PopulatedKeys[];
|
|
5628
|
+
};
|
|
5629
|
+
export interface Result extends DefaultPaginationResult {
|
|
5630
|
+
data: DaySchemaWithPopulatedKeys[];
|
|
5631
|
+
absolute_total: number;
|
|
5632
|
+
page_total: number;
|
|
5633
|
+
}
|
|
5634
|
+
}
|
|
5635
|
+
export namespace Get {
|
|
5636
|
+
export type ID = string;
|
|
5637
|
+
export interface Params {
|
|
5638
|
+
populatedKeys?: PopulatedKeys[];
|
|
5639
|
+
}
|
|
5640
|
+
export type Result = DaySchemaWithPopulatedKeys;
|
|
5641
|
+
}
|
|
5642
|
+
|
|
5643
|
+
export namespace Create {
|
|
5644
|
+
export type Body = CreateBody;
|
|
5645
|
+
export type Result = DaySchema;
|
|
5646
|
+
}
|
|
5647
|
+
}
|
|
5486
5648
|
export namespace Cycle {
|
|
5487
5649
|
type CycleStatus = "pending" | "approved" | "processing" | "rejected";
|
|
5488
5650
|
export interface Schema {
|