@mydoormot/app-types 2.2.2 → 2.2.4
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/.turbo/turbo-build.log +18 -18
- package/CHANGELOG.md +15 -0
- package/dist/index.d.cts +12 -1
- package/dist/index.d.ts +12 -1
- package/package.json +1 -1
- package/src/tracker.ts +7 -0
- package/src/vehicle.ts +2 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
> @mydoormot/app-types@2.2.
|
|
3
|
-
> tsup src/index.ts --format esm,cjs --dts
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
|
|
2
|
+
> @mydoormot/app-types@2.2.4 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
|
|
3
|
+
> tsup src/index.ts --format esm,cjs --dts
|
|
4
|
+
|
|
5
|
+
[34mCLI[39m Building entry: src/index.ts
|
|
6
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
|
+
[34mCLI[39m tsup v7.3.0
|
|
8
|
+
[34mCLI[39m Target: es2021
|
|
9
|
+
[34mESM[39m Build start
|
|
10
|
+
[34mCJS[39m Build start
|
|
11
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m18.21 KB[39m
|
|
12
|
+
[32mCJS[39m ⚡️ Build success in 77ms
|
|
13
|
+
[32mESM[39m [1mdist/index.js [22m[32m15.13 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 78ms
|
|
15
|
+
[34mDTS[39m Build start
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 1776ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m59.27 KB[39m
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.cts [22m[32m59.27 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @mydoormot/app-types
|
|
2
2
|
|
|
3
|
+
## 2.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Modified vehicles
|
|
8
|
+
- 88c575a: Added `vehicleAssignedAt` to trackers
|
|
9
|
+
Added `distance` (km this week and this month) to vehicles listed with `includeDistance`
|
|
10
|
+
|
|
11
|
+
## 2.2.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Modified tracker events'
|
|
16
|
+
- Modified tracker types'
|
|
17
|
+
|
|
3
18
|
## 2.2.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/index.d.cts
CHANGED
|
@@ -659,6 +659,11 @@ type Vehicle = {
|
|
|
659
659
|
};
|
|
660
660
|
type VehicleWithRider = Vehicle & {
|
|
661
661
|
riders: Rider[];
|
|
662
|
+
/** With `includeDistance`: GPS km from its tracker; null without one. */
|
|
663
|
+
distance?: {
|
|
664
|
+
thisWeekKm: number;
|
|
665
|
+
thisMonthKm: number;
|
|
666
|
+
} | null;
|
|
662
667
|
};
|
|
663
668
|
declare enum VehicleLogType {
|
|
664
669
|
REFUEL = "REFUEL"
|
|
@@ -1842,6 +1847,8 @@ type TrackerType = 'car' | 'bike';
|
|
|
1842
1847
|
/** `unbound`: no longer in the connected lynqone account. */
|
|
1843
1848
|
type TrackerStatus = 'active' | 'unbound';
|
|
1844
1849
|
type MotionState = 'moving' | 'stopped';
|
|
1850
|
+
/** Whether the device is talking to lynqone right now. */
|
|
1851
|
+
type ConnectionStatus = 'online' | 'offline' | 'unknown';
|
|
1845
1852
|
/**
|
|
1846
1853
|
* A trimmed-down Traccar position kept as the tracker's latest fix. Carries the
|
|
1847
1854
|
* scalar fields a GeoPoint can't — `speed`/`course` drive derived state
|
|
@@ -1882,6 +1889,8 @@ type Tracker = {
|
|
|
1882
1889
|
type?: TrackerType;
|
|
1883
1890
|
/** Unset means unassigned. A vehicle has at most one tracker. */
|
|
1884
1891
|
vehicleId?: string;
|
|
1892
|
+
/** ISO time it went on its current vehicle. */
|
|
1893
|
+
vehicleAssignedAt?: string;
|
|
1885
1894
|
/** The assigned vehicle, on list and assign. */
|
|
1886
1895
|
vehicleDetails?: Vehicle;
|
|
1887
1896
|
location?: GeoPoint;
|
|
@@ -1889,6 +1898,8 @@ type Tracker = {
|
|
|
1889
1898
|
lastSeenAt?: string;
|
|
1890
1899
|
motionState?: MotionState;
|
|
1891
1900
|
motionChangedAt?: string;
|
|
1901
|
+
connectionStatus?: ConnectionStatus;
|
|
1902
|
+
connectionChangedAt?: string;
|
|
1892
1903
|
batteryLevel?: number;
|
|
1893
1904
|
lowBatteryAt?: string;
|
|
1894
1905
|
status: TrackerStatus;
|
|
@@ -1929,4 +1940,4 @@ declare enum LinkDestination {
|
|
|
1929
1940
|
}
|
|
1930
1941
|
type NullOrUndefined = null | undefined;
|
|
1931
1942
|
|
|
1932
|
-
export { type AddonGroup, type AddonGroupItem, type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, BusinessCapability, type BusinessCategory, type BusinessCourierLink, BusinessCourierLinkStatus, type BusinessFuelSettings, type BusinessLimits, type BusinessMember, type BusinessModuleKey, type BusinessModuleStates, type BusinessModules, type BusinessPg, BusinessPlan, type BusinessPortal, type BusinessRiderPaySettings, BusinessRole, type BusinessSettings, BusinessStatus, BusinessType, type BusinessWhatsappConfig, type City, type Collection, type Customer, type CustomerAddress, type CustomerBilling, type CustomerTransactionStats, DEFAULT_BUSINESS_FUEL_SETTINGS, DEFAULT_BUSINESS_RIDER_PAY_SETTINGS, DEFAULT_BUSINESS_SETTINGS, DeliveryStatus, type DraftErrand, DraftErrandStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, ErrandFulfilment, ErrandInvoiceState, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, type ExpensePaidBy, FeePaymentStatus, FeeSettlement, type FuelDueData, type FuelDueItem, FuelDueStatus, type FuelDueTotals, type FuelPercentSuggestion, type FuelSinceLastRefuel, type FuelSuggestionConfidence, type GeoPoint, GlobalRoles, type IntegrationProvider, type IntegrationStatus, type Invoice, type InvoiceDrift, type InvoiceEvent, InvoiceEventType, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, type InvoicePayment, InvoicePaymentMethod, InvoiceStatus, type LatLng, LinkDestination, type LynqoneIntegrationSummary, type MaintenanceItem, type MaintenancePartUsage, type MaintenanceRecord, type MaintenanceStats, type MaintenanceStatsSummary, type MaintenanceTopItem, MembershipStatus, type ModuleState, type MotionState, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type OpeningHours, PLAN_LIMIT_REACHED, PLAN_REQUIRED, type PaginateResult, PaymentOptions, PayoutPeriodType, PayoutRateSource, type PendingErrand, type PlatformSettings, type PortalHandleAvailability, PortalStatus, type Product, type ProductCategory, type ProductImage, type ProductOption, type ProductOptionValue, type ProductStatus, type ProductTag, type ProductVariant, type ProductVariantPrice, type PublicPortal, type PublicPortalBusiness, RemittanceStatus, type Rider, type RiderPayout, type RiderPayoutAdjustment, type RiderPayoutPreview, type RiderPayoutPreviewItem, RiderPayoutStatus, type RiderPerformanceItem, type RiderPerformanceStats, type RiderPerformanceSummary, type RiderPerformanceTimeSeries, type RiderSettlement, type RiderWithUserDetails, RoleType, type State, SweepExclusionReason, type Tracker, type TrackerPosition, type TrackerStatus, type TrackerType, type Transaction, type TransactionCategory, type TransactionItem, type TransactionRiderUser, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, type VehicleErrandStats, type VehicleFuelStats, type VehicleLog, type VehicleLogStatsSummary, VehicleLogType, type VehicleLogWithErrands, type VehicleMaintenanceStats, type VehiclePerformanceData, type VehiclePerformanceFilters, type VehiclePerformanceItem, type VehiclePerformanceTotals, VehicleType, type VehicleWithRider, type Vendor, WhatsappButtonType, WhatsappComponentType, WhatsappEvent, WhatsappRecipient, type WhatsappSendLog, type WhatsappTemplate, type WhatsappTemplateButton, type WhatsappTemplateComponent, WhatsappTemplateMetaStatus, WhatsappTemplateParamSource, type WhatsappTemplateSource, errandTimeline };
|
|
1943
|
+
export { type AddonGroup, type AddonGroupItem, type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, BusinessCapability, type BusinessCategory, type BusinessCourierLink, BusinessCourierLinkStatus, type BusinessFuelSettings, type BusinessLimits, type BusinessMember, type BusinessModuleKey, type BusinessModuleStates, type BusinessModules, type BusinessPg, BusinessPlan, type BusinessPortal, type BusinessRiderPaySettings, BusinessRole, type BusinessSettings, BusinessStatus, BusinessType, type BusinessWhatsappConfig, type City, type Collection, type ConnectionStatus, type Customer, type CustomerAddress, type CustomerBilling, type CustomerTransactionStats, DEFAULT_BUSINESS_FUEL_SETTINGS, DEFAULT_BUSINESS_RIDER_PAY_SETTINGS, DEFAULT_BUSINESS_SETTINGS, DeliveryStatus, type DraftErrand, DraftErrandStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, ErrandFulfilment, ErrandInvoiceState, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, type ExpensePaidBy, FeePaymentStatus, FeeSettlement, type FuelDueData, type FuelDueItem, FuelDueStatus, type FuelDueTotals, type FuelPercentSuggestion, type FuelSinceLastRefuel, type FuelSuggestionConfidence, type GeoPoint, GlobalRoles, type IntegrationProvider, type IntegrationStatus, type Invoice, type InvoiceDrift, type InvoiceEvent, InvoiceEventType, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, type InvoicePayment, InvoicePaymentMethod, InvoiceStatus, type LatLng, LinkDestination, type LynqoneIntegrationSummary, type MaintenanceItem, type MaintenancePartUsage, type MaintenanceRecord, type MaintenanceStats, type MaintenanceStatsSummary, type MaintenanceTopItem, MembershipStatus, type ModuleState, type MotionState, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type OpeningHours, PLAN_LIMIT_REACHED, PLAN_REQUIRED, type PaginateResult, PaymentOptions, PayoutPeriodType, PayoutRateSource, type PendingErrand, type PlatformSettings, type PortalHandleAvailability, PortalStatus, type Product, type ProductCategory, type ProductImage, type ProductOption, type ProductOptionValue, type ProductStatus, type ProductTag, type ProductVariant, type ProductVariantPrice, type PublicPortal, type PublicPortalBusiness, RemittanceStatus, type Rider, type RiderPayout, type RiderPayoutAdjustment, type RiderPayoutPreview, type RiderPayoutPreviewItem, RiderPayoutStatus, type RiderPerformanceItem, type RiderPerformanceStats, type RiderPerformanceSummary, type RiderPerformanceTimeSeries, type RiderSettlement, type RiderWithUserDetails, RoleType, type State, SweepExclusionReason, type Tracker, type TrackerPosition, type TrackerStatus, type TrackerType, type Transaction, type TransactionCategory, type TransactionItem, type TransactionRiderUser, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, type VehicleErrandStats, type VehicleFuelStats, type VehicleLog, type VehicleLogStatsSummary, VehicleLogType, type VehicleLogWithErrands, type VehicleMaintenanceStats, type VehiclePerformanceData, type VehiclePerformanceFilters, type VehiclePerformanceItem, type VehiclePerformanceTotals, VehicleType, type VehicleWithRider, type Vendor, WhatsappButtonType, WhatsappComponentType, WhatsappEvent, WhatsappRecipient, type WhatsappSendLog, type WhatsappTemplate, type WhatsappTemplateButton, type WhatsappTemplateComponent, WhatsappTemplateMetaStatus, WhatsappTemplateParamSource, type WhatsappTemplateSource, errandTimeline };
|
package/dist/index.d.ts
CHANGED
|
@@ -659,6 +659,11 @@ type Vehicle = {
|
|
|
659
659
|
};
|
|
660
660
|
type VehicleWithRider = Vehicle & {
|
|
661
661
|
riders: Rider[];
|
|
662
|
+
/** With `includeDistance`: GPS km from its tracker; null without one. */
|
|
663
|
+
distance?: {
|
|
664
|
+
thisWeekKm: number;
|
|
665
|
+
thisMonthKm: number;
|
|
666
|
+
} | null;
|
|
662
667
|
};
|
|
663
668
|
declare enum VehicleLogType {
|
|
664
669
|
REFUEL = "REFUEL"
|
|
@@ -1842,6 +1847,8 @@ type TrackerType = 'car' | 'bike';
|
|
|
1842
1847
|
/** `unbound`: no longer in the connected lynqone account. */
|
|
1843
1848
|
type TrackerStatus = 'active' | 'unbound';
|
|
1844
1849
|
type MotionState = 'moving' | 'stopped';
|
|
1850
|
+
/** Whether the device is talking to lynqone right now. */
|
|
1851
|
+
type ConnectionStatus = 'online' | 'offline' | 'unknown';
|
|
1845
1852
|
/**
|
|
1846
1853
|
* A trimmed-down Traccar position kept as the tracker's latest fix. Carries the
|
|
1847
1854
|
* scalar fields a GeoPoint can't — `speed`/`course` drive derived state
|
|
@@ -1882,6 +1889,8 @@ type Tracker = {
|
|
|
1882
1889
|
type?: TrackerType;
|
|
1883
1890
|
/** Unset means unassigned. A vehicle has at most one tracker. */
|
|
1884
1891
|
vehicleId?: string;
|
|
1892
|
+
/** ISO time it went on its current vehicle. */
|
|
1893
|
+
vehicleAssignedAt?: string;
|
|
1885
1894
|
/** The assigned vehicle, on list and assign. */
|
|
1886
1895
|
vehicleDetails?: Vehicle;
|
|
1887
1896
|
location?: GeoPoint;
|
|
@@ -1889,6 +1898,8 @@ type Tracker = {
|
|
|
1889
1898
|
lastSeenAt?: string;
|
|
1890
1899
|
motionState?: MotionState;
|
|
1891
1900
|
motionChangedAt?: string;
|
|
1901
|
+
connectionStatus?: ConnectionStatus;
|
|
1902
|
+
connectionChangedAt?: string;
|
|
1892
1903
|
batteryLevel?: number;
|
|
1893
1904
|
lowBatteryAt?: string;
|
|
1894
1905
|
status: TrackerStatus;
|
|
@@ -1929,4 +1940,4 @@ declare enum LinkDestination {
|
|
|
1929
1940
|
}
|
|
1930
1941
|
type NullOrUndefined = null | undefined;
|
|
1931
1942
|
|
|
1932
|
-
export { type AddonGroup, type AddonGroupItem, type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, BusinessCapability, type BusinessCategory, type BusinessCourierLink, BusinessCourierLinkStatus, type BusinessFuelSettings, type BusinessLimits, type BusinessMember, type BusinessModuleKey, type BusinessModuleStates, type BusinessModules, type BusinessPg, BusinessPlan, type BusinessPortal, type BusinessRiderPaySettings, BusinessRole, type BusinessSettings, BusinessStatus, BusinessType, type BusinessWhatsappConfig, type City, type Collection, type Customer, type CustomerAddress, type CustomerBilling, type CustomerTransactionStats, DEFAULT_BUSINESS_FUEL_SETTINGS, DEFAULT_BUSINESS_RIDER_PAY_SETTINGS, DEFAULT_BUSINESS_SETTINGS, DeliveryStatus, type DraftErrand, DraftErrandStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, ErrandFulfilment, ErrandInvoiceState, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, type ExpensePaidBy, FeePaymentStatus, FeeSettlement, type FuelDueData, type FuelDueItem, FuelDueStatus, type FuelDueTotals, type FuelPercentSuggestion, type FuelSinceLastRefuel, type FuelSuggestionConfidence, type GeoPoint, GlobalRoles, type IntegrationProvider, type IntegrationStatus, type Invoice, type InvoiceDrift, type InvoiceEvent, InvoiceEventType, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, type InvoicePayment, InvoicePaymentMethod, InvoiceStatus, type LatLng, LinkDestination, type LynqoneIntegrationSummary, type MaintenanceItem, type MaintenancePartUsage, type MaintenanceRecord, type MaintenanceStats, type MaintenanceStatsSummary, type MaintenanceTopItem, MembershipStatus, type ModuleState, type MotionState, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type OpeningHours, PLAN_LIMIT_REACHED, PLAN_REQUIRED, type PaginateResult, PaymentOptions, PayoutPeriodType, PayoutRateSource, type PendingErrand, type PlatformSettings, type PortalHandleAvailability, PortalStatus, type Product, type ProductCategory, type ProductImage, type ProductOption, type ProductOptionValue, type ProductStatus, type ProductTag, type ProductVariant, type ProductVariantPrice, type PublicPortal, type PublicPortalBusiness, RemittanceStatus, type Rider, type RiderPayout, type RiderPayoutAdjustment, type RiderPayoutPreview, type RiderPayoutPreviewItem, RiderPayoutStatus, type RiderPerformanceItem, type RiderPerformanceStats, type RiderPerformanceSummary, type RiderPerformanceTimeSeries, type RiderSettlement, type RiderWithUserDetails, RoleType, type State, SweepExclusionReason, type Tracker, type TrackerPosition, type TrackerStatus, type TrackerType, type Transaction, type TransactionCategory, type TransactionItem, type TransactionRiderUser, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, type VehicleErrandStats, type VehicleFuelStats, type VehicleLog, type VehicleLogStatsSummary, VehicleLogType, type VehicleLogWithErrands, type VehicleMaintenanceStats, type VehiclePerformanceData, type VehiclePerformanceFilters, type VehiclePerformanceItem, type VehiclePerformanceTotals, VehicleType, type VehicleWithRider, type Vendor, WhatsappButtonType, WhatsappComponentType, WhatsappEvent, WhatsappRecipient, type WhatsappSendLog, type WhatsappTemplate, type WhatsappTemplateButton, type WhatsappTemplateComponent, WhatsappTemplateMetaStatus, WhatsappTemplateParamSource, type WhatsappTemplateSource, errandTimeline };
|
|
1943
|
+
export { type AddonGroup, type AddonGroupItem, type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, BusinessCapability, type BusinessCategory, type BusinessCourierLink, BusinessCourierLinkStatus, type BusinessFuelSettings, type BusinessLimits, type BusinessMember, type BusinessModuleKey, type BusinessModuleStates, type BusinessModules, type BusinessPg, BusinessPlan, type BusinessPortal, type BusinessRiderPaySettings, BusinessRole, type BusinessSettings, BusinessStatus, BusinessType, type BusinessWhatsappConfig, type City, type Collection, type ConnectionStatus, type Customer, type CustomerAddress, type CustomerBilling, type CustomerTransactionStats, DEFAULT_BUSINESS_FUEL_SETTINGS, DEFAULT_BUSINESS_RIDER_PAY_SETTINGS, DEFAULT_BUSINESS_SETTINGS, DeliveryStatus, type DraftErrand, DraftErrandStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, ErrandFulfilment, ErrandInvoiceState, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, type ExpensePaidBy, FeePaymentStatus, FeeSettlement, type FuelDueData, type FuelDueItem, FuelDueStatus, type FuelDueTotals, type FuelPercentSuggestion, type FuelSinceLastRefuel, type FuelSuggestionConfidence, type GeoPoint, GlobalRoles, type IntegrationProvider, type IntegrationStatus, type Invoice, type InvoiceDrift, type InvoiceEvent, InvoiceEventType, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, type InvoicePayment, InvoicePaymentMethod, InvoiceStatus, type LatLng, LinkDestination, type LynqoneIntegrationSummary, type MaintenanceItem, type MaintenancePartUsage, type MaintenanceRecord, type MaintenanceStats, type MaintenanceStatsSummary, type MaintenanceTopItem, MembershipStatus, type ModuleState, type MotionState, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type OpeningHours, PLAN_LIMIT_REACHED, PLAN_REQUIRED, type PaginateResult, PaymentOptions, PayoutPeriodType, PayoutRateSource, type PendingErrand, type PlatformSettings, type PortalHandleAvailability, PortalStatus, type Product, type ProductCategory, type ProductImage, type ProductOption, type ProductOptionValue, type ProductStatus, type ProductTag, type ProductVariant, type ProductVariantPrice, type PublicPortal, type PublicPortalBusiness, RemittanceStatus, type Rider, type RiderPayout, type RiderPayoutAdjustment, type RiderPayoutPreview, type RiderPayoutPreviewItem, RiderPayoutStatus, type RiderPerformanceItem, type RiderPerformanceStats, type RiderPerformanceSummary, type RiderPerformanceTimeSeries, type RiderSettlement, type RiderWithUserDetails, RoleType, type State, SweepExclusionReason, type Tracker, type TrackerPosition, type TrackerStatus, type TrackerType, type Transaction, type TransactionCategory, type TransactionItem, type TransactionRiderUser, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, type VehicleErrandStats, type VehicleFuelStats, type VehicleLog, type VehicleLogStatsSummary, VehicleLogType, type VehicleLogWithErrands, type VehicleMaintenanceStats, type VehiclePerformanceData, type VehiclePerformanceFilters, type VehiclePerformanceItem, type VehiclePerformanceTotals, VehicleType, type VehicleWithRider, type Vendor, WhatsappButtonType, WhatsappComponentType, WhatsappEvent, WhatsappRecipient, type WhatsappSendLog, type WhatsappTemplate, type WhatsappTemplateButton, type WhatsappTemplateComponent, WhatsappTemplateMetaStatus, WhatsappTemplateParamSource, type WhatsappTemplateSource, errandTimeline };
|
package/package.json
CHANGED
package/src/tracker.ts
CHANGED
|
@@ -14,6 +14,9 @@ export type TrackerStatus = 'active' | 'unbound';
|
|
|
14
14
|
|
|
15
15
|
export type MotionState = 'moving' | 'stopped';
|
|
16
16
|
|
|
17
|
+
/** Whether the device is talking to lynqone right now. */
|
|
18
|
+
export type ConnectionStatus = 'online' | 'offline' | 'unknown';
|
|
19
|
+
|
|
17
20
|
/**
|
|
18
21
|
* A trimmed-down Traccar position kept as the tracker's latest fix. Carries the
|
|
19
22
|
* scalar fields a GeoPoint can't — `speed`/`course` drive derived state
|
|
@@ -55,6 +58,8 @@ export type Tracker = {
|
|
|
55
58
|
type?: TrackerType;
|
|
56
59
|
/** Unset means unassigned. A vehicle has at most one tracker. */
|
|
57
60
|
vehicleId?: string;
|
|
61
|
+
/** ISO time it went on its current vehicle. */
|
|
62
|
+
vehicleAssignedAt?: string;
|
|
58
63
|
/** The assigned vehicle, on list and assign. */
|
|
59
64
|
vehicleDetails?: Vehicle;
|
|
60
65
|
location?: GeoPoint;
|
|
@@ -62,6 +67,8 @@ export type Tracker = {
|
|
|
62
67
|
lastSeenAt?: string;
|
|
63
68
|
motionState?: MotionState;
|
|
64
69
|
motionChangedAt?: string;
|
|
70
|
+
connectionStatus?: ConnectionStatus;
|
|
71
|
+
connectionChangedAt?: string;
|
|
65
72
|
batteryLevel?: number;
|
|
66
73
|
lowBatteryAt?: string;
|
|
67
74
|
status: TrackerStatus;
|
package/src/vehicle.ts
CHANGED
|
@@ -21,6 +21,8 @@ export type Vehicle = {
|
|
|
21
21
|
|
|
22
22
|
export type VehicleWithRider = Vehicle & {
|
|
23
23
|
riders: Rider[];
|
|
24
|
+
/** With `includeDistance`: GPS km from its tracker; null without one. */
|
|
25
|
+
distance?: { thisWeekKm: number; thisMonthKm: number } | null;
|
|
24
26
|
};
|
|
25
27
|
|
|
26
28
|
export enum VehicleLogType {
|