@teincfood/core 0.7.9 → 0.8.1
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/README.md +26 -21
- package/dist/adapters/auth.d.ts +8 -0
- package/dist/adapters/auth.js +36 -0
- package/dist/adapters/devices.d.ts +3 -1
- package/dist/adapters/devices.js +187 -3
- package/dist/adapters/filesystem.d.ts +4 -0
- package/dist/adapters/kv.d.ts +10 -0
- package/dist/adapters/kv.js +23 -7
- package/dist/adapters/local-node.d.ts +4 -6
- package/dist/adapters/local-node.js +9 -32
- package/dist/adapters/notify.d.ts +12 -0
- package/dist/adapters/notify.js +33 -0
- package/dist/adapters/query-keys.d.ts +4 -0
- package/dist/adapters/query-keys.js +4 -0
- package/dist/adapters/services.d.ts +96 -15
- package/dist/adapters/services.js +241 -4
- package/dist/auth/session.d.ts +66 -0
- package/dist/auth/session.js +172 -0
- package/dist/catalog/hooks.d.ts +10 -0
- package/dist/catalog/hooks.js +82 -11
- package/dist/db/migrations.js +274 -0
- package/dist/db/operations.d.ts +53 -2
- package/dist/db/operations.js +177 -8
- package/dist/domain/business/index.d.ts +5 -0
- package/dist/domain/business/index.js +5 -0
- package/dist/domain/orders/lifecycle.d.ts +6 -0
- package/dist/domain/orders/lifecycle.js +6 -0
- package/dist/domain/orders/service.d.ts +24 -0
- package/dist/domain/orders/service.js +242 -0
- package/dist/domain/payments/index.d.ts +6 -0
- package/dist/domain/payments/index.js +5 -0
- package/dist/domain/reference/index.d.ts +8 -0
- package/dist/domain/reference/index.js +8 -0
- package/dist/e2e/harness.d.ts +1 -0
- package/dist/e2e/harness.js +61 -0
- package/dist/hooks/analytics.hooks.d.ts +25 -0
- package/dist/hooks/analytics.hooks.js +214 -0
- package/dist/hooks/business-hours.hooks.d.ts +8 -0
- package/dist/hooks/business-hours.hooks.js +45 -0
- package/dist/hooks/dashboard.hooks.d.ts +30 -0
- package/dist/hooks/dashboard.hooks.js +132 -0
- package/dist/hooks/delivery.hooks.d.ts +225 -0
- package/dist/hooks/delivery.hooks.js +80 -0
- package/dist/hooks/fleet.hooks.d.ts +37 -0
- package/dist/hooks/fleet.hooks.js +229 -0
- package/dist/hooks/image.hooks.d.ts +24 -0
- package/dist/hooks/image.hooks.js +66 -0
- package/dist/hooks/kiosk.hooks.d.ts +22 -5
- package/dist/hooks/kiosk.hooks.js +74 -5
- package/dist/hooks/members.hooks.d.ts +48 -0
- package/dist/hooks/members.hooks.js +302 -0
- package/dist/hooks/offline-orders.hooks.d.ts +9 -0
- package/dist/hooks/offline-orders.hooks.js +51 -0
- package/dist/hooks/orders.hooks.d.ts +18 -39
- package/dist/hooks/orders.hooks.js +124 -343
- package/dist/hooks/places.hooks.d.ts +21 -0
- package/dist/hooks/places.hooks.js +112 -0
- package/dist/hooks/realtime-stubs.d.ts +28 -0
- package/dist/hooks/realtime-stubs.js +85 -0
- package/dist/hooks/rider.hooks.d.ts +470 -0
- package/dist/hooks/rider.hooks.js +373 -0
- package/dist/hooks/use-infinite-list.d.ts +243 -0
- package/dist/hooks/use-infinite-list.js +58 -0
- package/dist/hooks/wallet.hooks.d.ts +219 -0
- package/dist/hooks/wallet.hooks.js +56 -0
- package/dist/image-cache/service.d.ts +28 -0
- package/dist/image-cache/service.js +51 -3
- package/dist/index.d.ts +56 -6
- package/dist/index.js +73 -6
- package/dist/local-node/adapters.d.ts +87 -0
- package/dist/local-node/adapters.js +4 -0
- package/dist/local-node/index.d.ts +5 -0
- package/dist/local-node/index.js +5 -0
- package/dist/local-node/security.d.ts +25 -0
- package/dist/local-node/security.js +149 -0
- package/dist/local-node/service.d.ts +83 -0
- package/dist/local-node/service.js +706 -0
- package/dist/local-node/store.d.ts +50 -0
- package/dist/local-node/store.js +284 -0
- package/dist/local-node/types.d.ts +92 -0
- package/dist/local-node/types.js +4 -0
- package/dist/printer/receipt.d.ts +4 -0
- package/dist/printer/receipt.js +75 -0
- package/dist/printer/service.js +1 -1
- package/dist/providers/query-client.d.ts +13 -0
- package/dist/providers/query-client.js +58 -0
- package/dist/realtime/phoenix-socket.js +30 -1
- package/dist/realtime/useEventsConnection.js +11 -2
- package/dist/reference/api.d.ts +2 -0
- package/dist/reference/api.js +2 -0
- package/dist/reference/capabilities.d.ts +12 -7
- package/dist/reference/capabilities.js +27 -13
- package/dist/reference/hooks.d.ts +34 -0
- package/dist/reference/hooks.js +124 -0
- package/dist/reference/menu-apply.d.ts +29 -0
- package/dist/reference/menu-apply.js +289 -0
- package/dist/reference/menu-record.d.ts +69 -0
- package/dist/reference/menu-record.js +168 -0
- package/dist/reference/operations.d.ts +3 -0
- package/dist/reference/operations.js +35 -1
- package/dist/reference/service.js +36 -9
- package/dist/reference/types.d.ts +1 -1
- package/dist/repositories/order.repository.d.ts +7 -0
- package/dist/repositories/order.repository.js +15 -2
- package/dist/repositories/pos.repository.d.ts +4 -0
- package/dist/repositories/pos.repository.js +4 -0
- package/dist/sync/backoff.d.ts +21 -0
- package/dist/sync/backoff.js +42 -0
- package/dist/sync/command-builder.js +10 -2
- package/dist/sync/command-queue.service.d.ts +12 -0
- package/dist/sync/command-queue.service.js +81 -16
- package/dist/sync/device-lease.service.d.ts +3 -3
- package/dist/sync/device-lease.service.js +80 -20
- package/dist/sync/engine.d.ts +3 -1
- package/dist/sync/engine.js +44 -4
- package/dist/sync/full-sync.d.ts +6 -0
- package/dist/sync/full-sync.js +72 -0
- package/dist/sync/health-probe.d.ts +24 -0
- package/dist/sync/health-probe.js +138 -0
- package/dist/sync/offline-capable.js +25 -0
- package/dist/sync/online-gates.d.ts +17 -0
- package/dist/sync/online-gates.js +55 -0
- package/dist/sync/order-number.d.ts +4 -4
- package/dist/sync/order-number.js +33 -13
- package/dist/sync/order-snapshots.service.js +18 -3
- package/dist/sync/pending-orders.service.d.ts +18 -0
- package/dist/sync/pending-orders.service.js +67 -1
- package/dist/sync/reconciliation/index.d.ts +5 -0
- package/dist/sync/reconciliation/index.js +5 -0
- package/dist/sync/snapshots/entity.d.ts +6 -0
- package/dist/sync/snapshots/entity.js +6 -0
- package/dist/sync/sync-jobs.service.d.ts +18 -0
- package/dist/sync/sync-jobs.service.js +539 -0
- package/dist/sync/transition-endpoints.d.ts +11 -0
- package/dist/sync/transition-endpoints.js +30 -0
- package/dist/sync/transport-local-node.js +3 -2
- package/dist/sync/transport-rest.d.ts +7 -0
- package/dist/sync/transport-rest.js +84 -26
- package/dist/sync/use-sync-reconciliation.js +15 -1
- package/dist/test-helpers/memory-driver.js +182 -4
- package/dist/test-helpers/seed-hours.d.ts +1 -0
- package/dist/test-helpers/seed-hours.js +23 -0
- package/dist/types/api/business.api.d.ts +42 -0
- package/dist/types/api/menu.api.d.ts +15 -0
- package/dist/types/api/seller.api.d.ts +20 -0
- package/dist/types/places.d.ts +19 -0
- package/dist/types/places.js +2 -0
- package/dist/types/rider.d.ts +67 -0
- package/dist/types/rider.js +2 -0
- package/dist/utils/attempt-stats.d.ts +23 -0
- package/dist/utils/attempt-stats.js +61 -0
- package/dist/utils/business-hours.d.ts +37 -0
- package/dist/utils/business-hours.js +96 -0
- package/dist/utils/debug-log.d.ts +23 -0
- package/dist/utils/debug-log.js +153 -0
- package/dist/utils/order-filter.d.ts +1 -1
- package/dist/utils/order-filter.js +1 -1
- package/dist/utils/order-transitions.d.ts +30 -0
- package/dist/utils/order-transitions.js +185 -0
- package/dist/utils/sync-logger.js +5 -4
- package/dist/validation/offline.d.ts +46 -0
- package/dist/validation/offline.js +79 -0
- package/package.json +6 -1
- package/dist/pricing/engine.test.d.ts +0 -1
- package/dist/pricing/engine.test.js +0 -142
- package/dist/reference/lww.test.d.ts +0 -1
- package/dist/reference/lww.test.js +0 -23
- package/dist/reference/operations.test.d.ts +0 -1
- package/dist/reference/operations.test.js +0 -66
- package/dist/standalone.integration.test.d.ts +0 -1
- package/dist/standalone.integration.test.js +0 -235
- package/dist/sync/device-lease.test.d.ts +0 -1
- package/dist/sync/device-lease.test.js +0 -38
- package/dist/sync/offline-integration.test.d.ts +0 -1
- package/dist/sync/offline-integration.test.js +0 -52
- package/dist/sync/order-number.test.d.ts +0 -1
- package/dist/sync/order-number.test.js +0 -51
- package/dist/sync/perms.test.d.ts +0 -1
- package/dist/sync/perms.test.js +0 -15
- package/dist/utils/currency.test.d.ts +0 -1
- package/dist/utils/currency.test.js +0 -17
- package/dist/utils/hlc.test.d.ts +0 -1
- package/dist/utils/hlc.test.js +0 -29
- package/dist/utils/phone.test.d.ts +0 -1
- package/dist/utils/phone.test.js +0 -19
- package/dist/utils/responsive.d.ts +0 -13
- package/dist/utils/responsive.js +0 -18
- package/dist/utils/uuid.test.d.ts +0 -1
- package/dist/utils/uuid.test.js +0 -13
- package/dist/utils/validation.test.d.ts +0 -1
- package/dist/utils/validation.test.js +0 -23
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rider hooks — single source for both apps (previously verbatim copies).
|
|
3
|
+
* Reads serve cache instantly; network refreshes silently when online.
|
|
4
|
+
*/
|
|
5
|
+
import type { RiderDelivery } from "../types/api/rider.api";
|
|
6
|
+
import type { DeliveryZone, NavigationSettings } from "../types/rider";
|
|
7
|
+
export declare const RIDER_KEYS: {
|
|
8
|
+
all: readonly ["rider"];
|
|
9
|
+
profile: () => readonly ["rider", "profile"];
|
|
10
|
+
metrics: () => readonly ["rider", "metrics"];
|
|
11
|
+
activeDelivery: () => readonly ["rider", "active-delivery"];
|
|
12
|
+
deliveries: () => readonly ["rider", "deliveries"];
|
|
13
|
+
deliveryDetail: (id: string) => readonly ["rider", "delivery", string];
|
|
14
|
+
earnings: () => readonly ["rider", "earnings"];
|
|
15
|
+
earningsBreakdown: () => readonly ["rider", "earnings-breakdown"];
|
|
16
|
+
earningsSummary: (period: string) => readonly ["rider", "earnings-summary", string];
|
|
17
|
+
transactions: () => readonly ["rider", "transactions"];
|
|
18
|
+
statistics: () => readonly ["rider", "statistics"];
|
|
19
|
+
vehicleInfo: () => readonly ["rider", "vehicle"];
|
|
20
|
+
deliveryZones: () => readonly ["rider", "zones"];
|
|
21
|
+
navigationSettings: () => readonly ["rider", "navigation"];
|
|
22
|
+
navigationApps: () => readonly ["rider", "navigation-apps"];
|
|
23
|
+
};
|
|
24
|
+
export declare function useAvailableOrdersQuery(enabled?: boolean): import("@tanstack/react-query").UseQueryResult<unknown, Error>;
|
|
25
|
+
export declare function useClaimOrderMutation(): import("@tanstack/react-query").UseMutationResult<unknown, Error, string, unknown>;
|
|
26
|
+
export declare function useSelfAssignMutation(): import("@tanstack/react-query").UseMutationResult<unknown, Error, string, unknown>;
|
|
27
|
+
export declare function useRiderProfileQuery(enabled?: boolean): import("@tanstack/react-query").UseQueryResult<unknown, Error>;
|
|
28
|
+
export declare function useRiderMetricsQuery(enabled?: boolean): import("@tanstack/react-query").UseQueryResult<unknown, Error>;
|
|
29
|
+
export declare function useActiveDeliveryQuery(enabled?: boolean): import("@tanstack/react-query").UseQueryResult<unknown, Error>;
|
|
30
|
+
export declare function useRiderDeliveriesQuery(enabled?: boolean, filters?: {
|
|
31
|
+
q?: string;
|
|
32
|
+
status?: string;
|
|
33
|
+
order_number?: string;
|
|
34
|
+
date_from?: string;
|
|
35
|
+
date_to?: string;
|
|
36
|
+
}): {
|
|
37
|
+
dataUpdatedAt: number;
|
|
38
|
+
errorUpdatedAt: number;
|
|
39
|
+
failureCount: number;
|
|
40
|
+
failureReason: Error | null;
|
|
41
|
+
errorUpdateCount: number;
|
|
42
|
+
isFetched: boolean;
|
|
43
|
+
isFetchedAfterMount: boolean;
|
|
44
|
+
isFetching: boolean;
|
|
45
|
+
isInitialLoading: boolean;
|
|
46
|
+
isPaused: boolean;
|
|
47
|
+
isRefetching: boolean;
|
|
48
|
+
isStale: boolean;
|
|
49
|
+
isEnabled: boolean;
|
|
50
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<RiderDelivery>, unknown>, Error>>;
|
|
51
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
52
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<RiderDelivery>, unknown>, Error>>;
|
|
53
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<RiderDelivery>, unknown>, Error>>;
|
|
54
|
+
hasNextPage: boolean;
|
|
55
|
+
hasPreviousPage: boolean;
|
|
56
|
+
isFetchingNextPage: boolean;
|
|
57
|
+
isFetchingPreviousPage: boolean;
|
|
58
|
+
error: Error;
|
|
59
|
+
isError: true;
|
|
60
|
+
isPending: false;
|
|
61
|
+
isLoading: false;
|
|
62
|
+
isLoadingError: true;
|
|
63
|
+
isRefetchError: false;
|
|
64
|
+
isFetchNextPageError: false;
|
|
65
|
+
isFetchPreviousPageError: false;
|
|
66
|
+
isSuccess: false;
|
|
67
|
+
isPlaceholderData: false;
|
|
68
|
+
status: 'error';
|
|
69
|
+
data: RiderDelivery[] | undefined;
|
|
70
|
+
} | {
|
|
71
|
+
dataUpdatedAt: number;
|
|
72
|
+
errorUpdatedAt: number;
|
|
73
|
+
failureCount: number;
|
|
74
|
+
failureReason: Error | null;
|
|
75
|
+
errorUpdateCount: number;
|
|
76
|
+
isFetched: boolean;
|
|
77
|
+
isFetchedAfterMount: boolean;
|
|
78
|
+
isFetching: boolean;
|
|
79
|
+
isInitialLoading: boolean;
|
|
80
|
+
isPaused: boolean;
|
|
81
|
+
isRefetching: boolean;
|
|
82
|
+
isStale: boolean;
|
|
83
|
+
isEnabled: boolean;
|
|
84
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<RiderDelivery>, unknown>, Error>>;
|
|
85
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
86
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<RiderDelivery>, unknown>, Error>>;
|
|
87
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<RiderDelivery>, unknown>, Error>>;
|
|
88
|
+
hasNextPage: boolean;
|
|
89
|
+
hasPreviousPage: boolean;
|
|
90
|
+
isFetchingNextPage: boolean;
|
|
91
|
+
isFetchingPreviousPage: boolean;
|
|
92
|
+
error: null;
|
|
93
|
+
isError: false;
|
|
94
|
+
isPending: true;
|
|
95
|
+
isLoading: true;
|
|
96
|
+
isLoadingError: false;
|
|
97
|
+
isRefetchError: false;
|
|
98
|
+
isFetchNextPageError: false;
|
|
99
|
+
isFetchPreviousPageError: false;
|
|
100
|
+
isSuccess: false;
|
|
101
|
+
isPlaceholderData: false;
|
|
102
|
+
status: 'pending';
|
|
103
|
+
data: RiderDelivery[] | undefined;
|
|
104
|
+
} | {
|
|
105
|
+
dataUpdatedAt: number;
|
|
106
|
+
errorUpdatedAt: number;
|
|
107
|
+
failureCount: number;
|
|
108
|
+
failureReason: Error | null;
|
|
109
|
+
errorUpdateCount: number;
|
|
110
|
+
isFetched: boolean;
|
|
111
|
+
isFetchedAfterMount: boolean;
|
|
112
|
+
isFetching: boolean;
|
|
113
|
+
isLoading: boolean;
|
|
114
|
+
isInitialLoading: boolean;
|
|
115
|
+
isPaused: boolean;
|
|
116
|
+
isRefetching: boolean;
|
|
117
|
+
isStale: boolean;
|
|
118
|
+
isEnabled: boolean;
|
|
119
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<RiderDelivery>, unknown>, Error>>;
|
|
120
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
121
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<RiderDelivery>, unknown>, Error>>;
|
|
122
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<RiderDelivery>, unknown>, Error>>;
|
|
123
|
+
hasNextPage: boolean;
|
|
124
|
+
hasPreviousPage: boolean;
|
|
125
|
+
isFetchingNextPage: boolean;
|
|
126
|
+
isFetchingPreviousPage: boolean;
|
|
127
|
+
error: null;
|
|
128
|
+
isError: false;
|
|
129
|
+
isPending: true;
|
|
130
|
+
isLoadingError: false;
|
|
131
|
+
isRefetchError: false;
|
|
132
|
+
isFetchNextPageError: false;
|
|
133
|
+
isFetchPreviousPageError: false;
|
|
134
|
+
isSuccess: false;
|
|
135
|
+
isPlaceholderData: false;
|
|
136
|
+
status: 'pending';
|
|
137
|
+
data: RiderDelivery[] | undefined;
|
|
138
|
+
} | {
|
|
139
|
+
dataUpdatedAt: number;
|
|
140
|
+
errorUpdatedAt: number;
|
|
141
|
+
failureCount: number;
|
|
142
|
+
failureReason: Error | null;
|
|
143
|
+
errorUpdateCount: number;
|
|
144
|
+
isFetched: boolean;
|
|
145
|
+
isFetchedAfterMount: boolean;
|
|
146
|
+
isFetching: boolean;
|
|
147
|
+
isInitialLoading: boolean;
|
|
148
|
+
isPaused: boolean;
|
|
149
|
+
isRefetching: boolean;
|
|
150
|
+
isStale: boolean;
|
|
151
|
+
isEnabled: boolean;
|
|
152
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<RiderDelivery>, unknown>, Error>>;
|
|
153
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
154
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<RiderDelivery>, unknown>, Error>>;
|
|
155
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<RiderDelivery>, unknown>, Error>>;
|
|
156
|
+
hasNextPage: boolean;
|
|
157
|
+
hasPreviousPage: boolean;
|
|
158
|
+
isFetchingNextPage: boolean;
|
|
159
|
+
isFetchingPreviousPage: boolean;
|
|
160
|
+
isError: false;
|
|
161
|
+
error: null;
|
|
162
|
+
isPending: false;
|
|
163
|
+
isLoading: false;
|
|
164
|
+
isLoadingError: false;
|
|
165
|
+
isRefetchError: false;
|
|
166
|
+
isSuccess: true;
|
|
167
|
+
isPlaceholderData: true;
|
|
168
|
+
isFetchNextPageError: false;
|
|
169
|
+
isFetchPreviousPageError: false;
|
|
170
|
+
status: 'success';
|
|
171
|
+
data: RiderDelivery[] | undefined;
|
|
172
|
+
} | {
|
|
173
|
+
dataUpdatedAt: number;
|
|
174
|
+
errorUpdatedAt: number;
|
|
175
|
+
failureCount: number;
|
|
176
|
+
failureReason: Error | null;
|
|
177
|
+
errorUpdateCount: number;
|
|
178
|
+
isFetched: boolean;
|
|
179
|
+
isFetchedAfterMount: boolean;
|
|
180
|
+
isFetching: boolean;
|
|
181
|
+
isInitialLoading: boolean;
|
|
182
|
+
isPaused: boolean;
|
|
183
|
+
isRefetching: boolean;
|
|
184
|
+
isStale: boolean;
|
|
185
|
+
isEnabled: boolean;
|
|
186
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<RiderDelivery>, unknown>, Error>>;
|
|
187
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
188
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<RiderDelivery>, unknown>, Error>>;
|
|
189
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<RiderDelivery>, unknown>, Error>>;
|
|
190
|
+
hasNextPage: boolean;
|
|
191
|
+
hasPreviousPage: boolean;
|
|
192
|
+
isFetchNextPageError: boolean;
|
|
193
|
+
isFetchingNextPage: boolean;
|
|
194
|
+
isFetchPreviousPageError: boolean;
|
|
195
|
+
isFetchingPreviousPage: boolean;
|
|
196
|
+
error: Error;
|
|
197
|
+
isError: true;
|
|
198
|
+
isPending: false;
|
|
199
|
+
isLoading: false;
|
|
200
|
+
isLoadingError: false;
|
|
201
|
+
isRefetchError: true;
|
|
202
|
+
isSuccess: false;
|
|
203
|
+
isPlaceholderData: false;
|
|
204
|
+
status: 'error';
|
|
205
|
+
data: RiderDelivery[] | undefined;
|
|
206
|
+
} | {
|
|
207
|
+
dataUpdatedAt: number;
|
|
208
|
+
errorUpdatedAt: number;
|
|
209
|
+
failureCount: number;
|
|
210
|
+
failureReason: Error | null;
|
|
211
|
+
errorUpdateCount: number;
|
|
212
|
+
isFetched: boolean;
|
|
213
|
+
isFetchedAfterMount: boolean;
|
|
214
|
+
isFetching: boolean;
|
|
215
|
+
isInitialLoading: boolean;
|
|
216
|
+
isPaused: boolean;
|
|
217
|
+
isRefetching: boolean;
|
|
218
|
+
isStale: boolean;
|
|
219
|
+
isEnabled: boolean;
|
|
220
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<RiderDelivery>, unknown>, Error>>;
|
|
221
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
222
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<RiderDelivery>, unknown>, Error>>;
|
|
223
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<RiderDelivery>, unknown>, Error>>;
|
|
224
|
+
hasNextPage: boolean;
|
|
225
|
+
hasPreviousPage: boolean;
|
|
226
|
+
isFetchingNextPage: boolean;
|
|
227
|
+
isFetchingPreviousPage: boolean;
|
|
228
|
+
error: null;
|
|
229
|
+
isError: false;
|
|
230
|
+
isPending: false;
|
|
231
|
+
isLoading: false;
|
|
232
|
+
isLoadingError: false;
|
|
233
|
+
isRefetchError: false;
|
|
234
|
+
isFetchNextPageError: false;
|
|
235
|
+
isFetchPreviousPageError: false;
|
|
236
|
+
isSuccess: true;
|
|
237
|
+
isPlaceholderData: false;
|
|
238
|
+
status: 'success';
|
|
239
|
+
data: RiderDelivery[] | undefined;
|
|
240
|
+
};
|
|
241
|
+
export declare function useRiderDeliveryDetailQuery(deliveryId: string, enabled?: boolean): import("@tanstack/react-query").UseQueryResult<unknown, Error>;
|
|
242
|
+
export declare function useUpdateDeliveryStatusMutation(): import("@tanstack/react-query").UseMutationResult<unknown, Error, {
|
|
243
|
+
deliveryId: string;
|
|
244
|
+
action: string;
|
|
245
|
+
}, unknown>;
|
|
246
|
+
export declare function useAcceptDeliveryMutation(): import("@tanstack/react-query").UseMutationResult<unknown, Error, string, unknown>;
|
|
247
|
+
export declare function useRiderEarningsQuery(enabled?: boolean): import("@tanstack/react-query").UseQueryResult<unknown, Error>;
|
|
248
|
+
export declare function useEarningsBreakdownQuery(enabled?: boolean): import("@tanstack/react-query").UseQueryResult<unknown, Error>;
|
|
249
|
+
export declare function useRiderEarningsSummaryQuery(period: "today" | "this_week" | "this_month", enabled?: boolean): import("@tanstack/react-query").UseQueryResult<unknown, Error>;
|
|
250
|
+
export declare function useRiderWalletHistoryQuery(enabled?: boolean): {
|
|
251
|
+
dataUpdatedAt: number;
|
|
252
|
+
errorUpdatedAt: number;
|
|
253
|
+
failureCount: number;
|
|
254
|
+
failureReason: Error | null;
|
|
255
|
+
errorUpdateCount: number;
|
|
256
|
+
isFetched: boolean;
|
|
257
|
+
isFetchedAfterMount: boolean;
|
|
258
|
+
isFetching: boolean;
|
|
259
|
+
isInitialLoading: boolean;
|
|
260
|
+
isPaused: boolean;
|
|
261
|
+
isRefetching: boolean;
|
|
262
|
+
isStale: boolean;
|
|
263
|
+
isEnabled: boolean;
|
|
264
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<Record<string, unknown>>, unknown>, Error>>;
|
|
265
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
266
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<Record<string, unknown>>, unknown>, Error>>;
|
|
267
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<Record<string, unknown>>, unknown>, Error>>;
|
|
268
|
+
hasNextPage: boolean;
|
|
269
|
+
hasPreviousPage: boolean;
|
|
270
|
+
isFetchingNextPage: boolean;
|
|
271
|
+
isFetchingPreviousPage: boolean;
|
|
272
|
+
error: Error;
|
|
273
|
+
isError: true;
|
|
274
|
+
isPending: false;
|
|
275
|
+
isLoading: false;
|
|
276
|
+
isLoadingError: true;
|
|
277
|
+
isRefetchError: false;
|
|
278
|
+
isFetchNextPageError: false;
|
|
279
|
+
isFetchPreviousPageError: false;
|
|
280
|
+
isSuccess: false;
|
|
281
|
+
isPlaceholderData: false;
|
|
282
|
+
status: 'error';
|
|
283
|
+
data: Record<string, unknown>[] | undefined;
|
|
284
|
+
} | {
|
|
285
|
+
dataUpdatedAt: number;
|
|
286
|
+
errorUpdatedAt: number;
|
|
287
|
+
failureCount: number;
|
|
288
|
+
failureReason: Error | null;
|
|
289
|
+
errorUpdateCount: number;
|
|
290
|
+
isFetched: boolean;
|
|
291
|
+
isFetchedAfterMount: boolean;
|
|
292
|
+
isFetching: boolean;
|
|
293
|
+
isInitialLoading: boolean;
|
|
294
|
+
isPaused: boolean;
|
|
295
|
+
isRefetching: boolean;
|
|
296
|
+
isStale: boolean;
|
|
297
|
+
isEnabled: boolean;
|
|
298
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<Record<string, unknown>>, unknown>, Error>>;
|
|
299
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
300
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<Record<string, unknown>>, unknown>, Error>>;
|
|
301
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<Record<string, unknown>>, unknown>, Error>>;
|
|
302
|
+
hasNextPage: boolean;
|
|
303
|
+
hasPreviousPage: boolean;
|
|
304
|
+
isFetchingNextPage: boolean;
|
|
305
|
+
isFetchingPreviousPage: boolean;
|
|
306
|
+
error: null;
|
|
307
|
+
isError: false;
|
|
308
|
+
isPending: true;
|
|
309
|
+
isLoading: true;
|
|
310
|
+
isLoadingError: false;
|
|
311
|
+
isRefetchError: false;
|
|
312
|
+
isFetchNextPageError: false;
|
|
313
|
+
isFetchPreviousPageError: false;
|
|
314
|
+
isSuccess: false;
|
|
315
|
+
isPlaceholderData: false;
|
|
316
|
+
status: 'pending';
|
|
317
|
+
data: Record<string, unknown>[] | undefined;
|
|
318
|
+
} | {
|
|
319
|
+
dataUpdatedAt: number;
|
|
320
|
+
errorUpdatedAt: number;
|
|
321
|
+
failureCount: number;
|
|
322
|
+
failureReason: Error | null;
|
|
323
|
+
errorUpdateCount: number;
|
|
324
|
+
isFetched: boolean;
|
|
325
|
+
isFetchedAfterMount: boolean;
|
|
326
|
+
isFetching: boolean;
|
|
327
|
+
isLoading: boolean;
|
|
328
|
+
isInitialLoading: boolean;
|
|
329
|
+
isPaused: boolean;
|
|
330
|
+
isRefetching: boolean;
|
|
331
|
+
isStale: boolean;
|
|
332
|
+
isEnabled: boolean;
|
|
333
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<Record<string, unknown>>, unknown>, Error>>;
|
|
334
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
335
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<Record<string, unknown>>, unknown>, Error>>;
|
|
336
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<Record<string, unknown>>, unknown>, Error>>;
|
|
337
|
+
hasNextPage: boolean;
|
|
338
|
+
hasPreviousPage: boolean;
|
|
339
|
+
isFetchingNextPage: boolean;
|
|
340
|
+
isFetchingPreviousPage: boolean;
|
|
341
|
+
error: null;
|
|
342
|
+
isError: false;
|
|
343
|
+
isPending: true;
|
|
344
|
+
isLoadingError: false;
|
|
345
|
+
isRefetchError: false;
|
|
346
|
+
isFetchNextPageError: false;
|
|
347
|
+
isFetchPreviousPageError: false;
|
|
348
|
+
isSuccess: false;
|
|
349
|
+
isPlaceholderData: false;
|
|
350
|
+
status: 'pending';
|
|
351
|
+
data: Record<string, unknown>[] | undefined;
|
|
352
|
+
} | {
|
|
353
|
+
dataUpdatedAt: number;
|
|
354
|
+
errorUpdatedAt: number;
|
|
355
|
+
failureCount: number;
|
|
356
|
+
failureReason: Error | null;
|
|
357
|
+
errorUpdateCount: number;
|
|
358
|
+
isFetched: boolean;
|
|
359
|
+
isFetchedAfterMount: boolean;
|
|
360
|
+
isFetching: boolean;
|
|
361
|
+
isInitialLoading: boolean;
|
|
362
|
+
isPaused: boolean;
|
|
363
|
+
isRefetching: boolean;
|
|
364
|
+
isStale: boolean;
|
|
365
|
+
isEnabled: boolean;
|
|
366
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<Record<string, unknown>>, unknown>, Error>>;
|
|
367
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
368
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<Record<string, unknown>>, unknown>, Error>>;
|
|
369
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<Record<string, unknown>>, unknown>, Error>>;
|
|
370
|
+
hasNextPage: boolean;
|
|
371
|
+
hasPreviousPage: boolean;
|
|
372
|
+
isFetchingNextPage: boolean;
|
|
373
|
+
isFetchingPreviousPage: boolean;
|
|
374
|
+
isError: false;
|
|
375
|
+
error: null;
|
|
376
|
+
isPending: false;
|
|
377
|
+
isLoading: false;
|
|
378
|
+
isLoadingError: false;
|
|
379
|
+
isRefetchError: false;
|
|
380
|
+
isSuccess: true;
|
|
381
|
+
isPlaceholderData: true;
|
|
382
|
+
isFetchNextPageError: false;
|
|
383
|
+
isFetchPreviousPageError: false;
|
|
384
|
+
status: 'success';
|
|
385
|
+
data: Record<string, unknown>[] | undefined;
|
|
386
|
+
} | {
|
|
387
|
+
dataUpdatedAt: number;
|
|
388
|
+
errorUpdatedAt: number;
|
|
389
|
+
failureCount: number;
|
|
390
|
+
failureReason: Error | null;
|
|
391
|
+
errorUpdateCount: number;
|
|
392
|
+
isFetched: boolean;
|
|
393
|
+
isFetchedAfterMount: boolean;
|
|
394
|
+
isFetching: boolean;
|
|
395
|
+
isInitialLoading: boolean;
|
|
396
|
+
isPaused: boolean;
|
|
397
|
+
isRefetching: boolean;
|
|
398
|
+
isStale: boolean;
|
|
399
|
+
isEnabled: boolean;
|
|
400
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<Record<string, unknown>>, unknown>, Error>>;
|
|
401
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
402
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<Record<string, unknown>>, unknown>, Error>>;
|
|
403
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<Record<string, unknown>>, unknown>, Error>>;
|
|
404
|
+
hasNextPage: boolean;
|
|
405
|
+
hasPreviousPage: boolean;
|
|
406
|
+
isFetchNextPageError: boolean;
|
|
407
|
+
isFetchingNextPage: boolean;
|
|
408
|
+
isFetchPreviousPageError: boolean;
|
|
409
|
+
isFetchingPreviousPage: boolean;
|
|
410
|
+
error: Error;
|
|
411
|
+
isError: true;
|
|
412
|
+
isPending: false;
|
|
413
|
+
isLoading: false;
|
|
414
|
+
isLoadingError: false;
|
|
415
|
+
isRefetchError: true;
|
|
416
|
+
isSuccess: false;
|
|
417
|
+
isPlaceholderData: false;
|
|
418
|
+
status: 'error';
|
|
419
|
+
data: Record<string, unknown>[] | undefined;
|
|
420
|
+
} | {
|
|
421
|
+
dataUpdatedAt: number;
|
|
422
|
+
errorUpdatedAt: number;
|
|
423
|
+
failureCount: number;
|
|
424
|
+
failureReason: Error | null;
|
|
425
|
+
errorUpdateCount: number;
|
|
426
|
+
isFetched: boolean;
|
|
427
|
+
isFetchedAfterMount: boolean;
|
|
428
|
+
isFetching: boolean;
|
|
429
|
+
isInitialLoading: boolean;
|
|
430
|
+
isPaused: boolean;
|
|
431
|
+
isRefetching: boolean;
|
|
432
|
+
isStale: boolean;
|
|
433
|
+
isEnabled: boolean;
|
|
434
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<Record<string, unknown>>, unknown>, Error>>;
|
|
435
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
436
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<Record<string, unknown>>, unknown>, Error>>;
|
|
437
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("./use-infinite-list").ListPage<Record<string, unknown>>, unknown>, Error>>;
|
|
438
|
+
hasNextPage: boolean;
|
|
439
|
+
hasPreviousPage: boolean;
|
|
440
|
+
isFetchingNextPage: boolean;
|
|
441
|
+
isFetchingPreviousPage: boolean;
|
|
442
|
+
error: null;
|
|
443
|
+
isError: false;
|
|
444
|
+
isPending: false;
|
|
445
|
+
isLoading: false;
|
|
446
|
+
isLoadingError: false;
|
|
447
|
+
isRefetchError: false;
|
|
448
|
+
isFetchNextPageError: false;
|
|
449
|
+
isFetchPreviousPageError: false;
|
|
450
|
+
isSuccess: true;
|
|
451
|
+
isPlaceholderData: false;
|
|
452
|
+
status: 'success';
|
|
453
|
+
data: Record<string, unknown>[] | undefined;
|
|
454
|
+
};
|
|
455
|
+
export declare function useRequestPayoutMutation(): import("@tanstack/react-query").UseMutationResult<never, Error, number, unknown>;
|
|
456
|
+
export declare function useRiderStatisticsQuery(enabled?: boolean): import("@tanstack/react-query").UseQueryResult<unknown, Error>;
|
|
457
|
+
export declare function useVehicleInfoQuery(enabled?: boolean): import("@tanstack/react-query").UseQueryResult<unknown, Error>;
|
|
458
|
+
export declare function useCreateVehicleMutation(): import("@tanstack/react-query").UseMutationResult<unknown, Error, unknown, unknown>;
|
|
459
|
+
export declare function useDeliveryZonesQuery(enabled?: boolean): import("@tanstack/react-query").UseQueryResult<unknown, Error>;
|
|
460
|
+
export declare function useUpdateDeliveryZonesMutation(): import("@tanstack/react-query").UseMutationResult<unknown, Error, DeliveryZone[], unknown>;
|
|
461
|
+
export declare function useToggleDeliveryZoneMutation(): import("@tanstack/react-query").UseMutationResult<unknown, Error, {
|
|
462
|
+
zoneId: string;
|
|
463
|
+
enabled: boolean;
|
|
464
|
+
}, unknown>;
|
|
465
|
+
export declare function useNavigationSettingsQuery(enabled?: boolean): import("@tanstack/react-query").UseQueryResult<unknown, Error>;
|
|
466
|
+
export declare function useUpdateNavigationSettingsMutation(): import("@tanstack/react-query").UseMutationResult<unknown, Error, Partial<NavigationSettings>, unknown>;
|
|
467
|
+
export declare function useUpdateOnlineStatusMutation(): import("@tanstack/react-query").UseMutationResult<unknown, Error, boolean, unknown>;
|
|
468
|
+
export declare function useNavigationAppsQuery(enabled?: boolean): import("@tanstack/react-query").UseQueryResult<unknown, Error>;
|
|
469
|
+
export declare function useVehicleTypesQuery(enabled?: boolean): import("@tanstack/react-query").UseQueryResult<unknown, Error>;
|
|
470
|
+
export declare function useToggleOnlineMutation(): import("@tanstack/react-query").UseMutationResult<unknown, Error, boolean, unknown>;
|