@jsm-mit/tigi-sharded-package 0.9.0 → 0.11.0
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 +8 -0
- package/declarations/tigi-driver/tigi-driver.did +46 -0
- package/declarations/tigi-driver/tigi-driver.did.d.ts +51 -0
- package/declarations/tigi-driver/tigi-driver.did.js +33 -1
- package/declarations/tigi-simulator/tigi-simulator.did +41 -1
- package/declarations/tigi-simulator/tigi-simulator.did.d.ts +74 -3
- package/declarations/tigi-simulator/tigi-simulator.did.js +29 -1
- package/declarations/worker/worker.did +116 -25
- package/declarations/worker/worker.did.d.ts +119 -25
- package/declarations/worker/worker.did.js +94 -26
- package/dist/actors/rides-actor.d.ts +38 -1
- package/dist/actors/rides-actor.d.ts.map +1 -1
- package/dist/actors/rides-actor.js +85 -0
- package/dist/actors/scheduled-ride.d.ts +100 -0
- package/dist/actors/scheduled-ride.d.ts.map +1 -0
- package/dist/actors/scheduled-ride.js +179 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/interfaces.d.ts +16 -0
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/mappers.d.ts.map +1 -1
- package/dist/mappers.js +5 -0
- package/package.json +4 -3
|
@@ -27,56 +27,75 @@ type TigiWorker =
|
|
|
27
27
|
/// driver wasms. Answers the seq this worker holds after the call; the core sends again
|
|
28
28
|
/// from there. Blocks act at once (WO-2); ratings go into offers and orders (P-12).
|
|
29
29
|
applyCoreChanges: (batch: CoreChanges) -> (Result);
|
|
30
|
+
/// ZT-18 (P-22): the booked driver gives the booking up.
|
|
31
|
+
bookingDropped: (ref: BookingRef) -> ();
|
|
32
|
+
/// ZT-17 (P-22): the booked driver's "Jadę" — the ride starts here as an accepted request.
|
|
33
|
+
bookingStarted: (ref: BookingRef) -> (ProtocolResult);
|
|
34
|
+
/// ZT-13: the rider gives the ride at a chosen time up.
|
|
35
|
+
cancelScheduled: (ref: RequestRef) -> (Result_3);
|
|
30
36
|
/// ZO-13, ZO-14, ZO-17.
|
|
31
|
-
chooseOffer: (ref: OfferRef) -> (
|
|
37
|
+
chooseOffer: (ref: OfferRef) -> (Result_10);
|
|
38
|
+
/// ZT-14: "Wybierz" on an offer for a ride at a chosen time — a booking order.
|
|
39
|
+
chooseScheduledOffer: (ref: OfferRef) -> (Result_10);
|
|
32
40
|
clearLogs: () -> ();
|
|
33
41
|
/// ZO-15 (otherOfferChosen after an acceptance in another worker), ZO-18 (riderGaveUp).
|
|
34
|
-
closeRequest: (args: CloseRequestArgs) -> (
|
|
42
|
+
closeRequest: (args: CloseRequestArgs) -> (Result_3);
|
|
43
|
+
/// ZT-21: the copies in the other workers close once one booked.
|
|
44
|
+
closeScheduled: (args: CloseRequestArgs) -> (Result_3);
|
|
35
45
|
/// The coordinator only: the settings it computes for every worker.
|
|
36
|
-
configure: (args: ConfigureArgs) -> (
|
|
46
|
+
configure: (args: ConfigureArgs) -> (Result_9);
|
|
37
47
|
/// ZO-6.
|
|
38
48
|
declineQuote: (decline: QuoteDecline) -> ();
|
|
39
49
|
/// What this worker holds of the core's network state.
|
|
40
50
|
getCoreCopyStatus: () -> (CoreCopyStatus) query;
|
|
41
51
|
/// The flow's numbers (scripts, the coordinator's front).
|
|
42
|
-
getFlowStatus: () -> (
|
|
52
|
+
getFlowStatus: () -> (Result_8) query;
|
|
43
53
|
getLogs: () -> (text) query;
|
|
44
54
|
/// ZO-21 (2026-10-24, route line): the route line of one offer, for the rider of the
|
|
45
55
|
/// request only (the package asks after a tap on the offer).
|
|
46
|
-
getOfferRoute: (ref: OfferRef) -> (
|
|
56
|
+
getOfferRoute: (ref: OfferRef) -> (Result_7) query;
|
|
47
57
|
/// The load this worker counts per geohash prefix of the given length (1–6): the
|
|
48
58
|
/// coordinator picks from it what to give another worker on a split (KO-5).
|
|
49
|
-
getPrefixCounts: (length: nat) -> (
|
|
59
|
+
getPrefixCounts: (length: nat) -> (Result_6) query;
|
|
50
60
|
/// ZO-11: the state and the offers (the package polls it every second).
|
|
51
|
-
getRequest: (ref: RequestRef) -> (
|
|
61
|
+
getRequest: (ref: RequestRef) -> (Result_2) query;
|
|
62
|
+
/// ZT-12: the state and the offers of a ride at a chosen time.
|
|
63
|
+
getScheduled: (ref: RequestRef) -> (Result_1) query;
|
|
52
64
|
/// The worker's own view of itself — for the coordinator and its front.
|
|
53
|
-
getStatus: () -> (
|
|
65
|
+
getStatus: () -> (Result_5) query;
|
|
54
66
|
/// The coordinator only, before it deletes the worker: what a deleted canister still
|
|
55
67
|
/// holds is burned.
|
|
56
|
-
giveBackCycles: () -> (
|
|
68
|
+
giveBackCycles: () -> (Result_4);
|
|
57
69
|
/// ZO-18: the rider gives up.
|
|
58
|
-
giveUp: (ref: RequestRef) -> (
|
|
70
|
+
giveUp: (ref: RequestRef) -> (Result_3);
|
|
59
71
|
/// WO-20 (stage and the test modes): simulated drivers within 3 km of the point?
|
|
60
|
-
hasSimulatedDrivers: (args: HasSimulatedDriversArgs) -> (
|
|
72
|
+
hasSimulatedDrivers: (args: HasSimulatedDriversArgs) -> (Result_3) query;
|
|
61
73
|
/// The coordinator only, in a test mode only (prod and stage refuse, and so does the
|
|
62
74
|
/// coordinator): a load put on this worker. The cells' counters grow, and the worker
|
|
63
75
|
/// reports `reportLevel` as a real minute would — what a local script uses to force a
|
|
64
76
|
/// split.
|
|
65
|
-
injectTestLoad: (args: TestLoadArgs) -> (
|
|
77
|
+
injectTestLoad: (args: TestLoadArgs) -> (Result_3);
|
|
66
78
|
/// WO-3: the geohash lies in this worker's area (by the coordinator's newest map).
|
|
67
79
|
isMyArea: (geohash: text) -> (bool) query;
|
|
68
80
|
/// K-8: the rider rates the driver.
|
|
69
|
-
rateDriver: (args: RateDriverArgs) -> (
|
|
81
|
+
rateDriver: (args: RateDriverArgs) -> (Result_3);
|
|
70
82
|
/// K-8.
|
|
71
83
|
rateRider: (rating: RiderRating) -> (ProtocolResult);
|
|
72
84
|
/// ZO-10: a stale offer asks its driver again.
|
|
73
|
-
refreshOffer: (ref: OfferRef) -> (
|
|
85
|
+
refreshOffer: (ref: OfferRef) -> (Result_3);
|
|
86
|
+
/// ZT-1 … ZT-3 (P-21): a driver's base — on a change and once a day, whether the driver
|
|
87
|
+
/// works or not.
|
|
88
|
+
registerBase: (args: RegisterBase) -> (ProtocolResult);
|
|
74
89
|
/// WO-1 … WO-8: a driver reports itself — on a cell change and every 60 s (U-27).
|
|
75
90
|
registerDriver: (args: RegisterDriver) -> (ProtocolResult);
|
|
76
91
|
/// ZO-12: ✕.
|
|
77
|
-
rejectOffer: (ref: OfferRef) -> (
|
|
92
|
+
rejectOffer: (ref: OfferRef) -> (Result_3);
|
|
93
|
+
/// ZT-9: ✕ on one offer.
|
|
94
|
+
rejectScheduledOffer: (ref: OfferRef) -> (Result_3);
|
|
78
95
|
/// ZO-1 … ZO-4, ZO-8: a request in this worker; the drivers are asked after the answer.
|
|
79
|
-
requestRide: (args: RequestRideArgs) -> (
|
|
96
|
+
requestRide: (args: RequestRideArgs) -> (Result_2);
|
|
97
|
+
/// ZT-4: a ride at a chosen time in this worker (kurs-na-termin.md).
|
|
98
|
+
requestScheduled: (args: ScheduledRideArgs) -> (Result_1);
|
|
80
99
|
/// K-2, K-6, K-7.
|
|
81
100
|
rideStatusChanged: (change: RideStatusChange) -> (ProtocolResult);
|
|
82
101
|
/// The coordinator only (KO-6): the whole prefix map. The newest version wins; answers
|
|
@@ -84,6 +103,8 @@ type TigiWorker =
|
|
|
84
103
|
setAreaMap: (map: AreaMap) -> (Result);
|
|
85
104
|
/// ZO-9, ZO-10.
|
|
86
105
|
submitQuote: (quote: Quote) -> (ProtocolResult);
|
|
106
|
+
/// ZT-2 (P-21).
|
|
107
|
+
unregisterBase: (driverKey: DriverKey) -> ();
|
|
87
108
|
/// WO-6.
|
|
88
109
|
unregisterDriver: (driverKey: DriverKey) -> ();
|
|
89
110
|
};
|
|
@@ -92,6 +113,54 @@ type TestLoadArgs =
|
|
|
92
113
|
cells: vec PrefixCount;
|
|
93
114
|
reportLevel: opt nat;
|
|
94
115
|
};
|
|
116
|
+
type ScheduledView =
|
|
117
|
+
record {
|
|
118
|
+
asOfNs: nat64;
|
|
119
|
+
asked: nat32;
|
|
120
|
+
closesNs: nat64;
|
|
121
|
+
createdNs: nat64;
|
|
122
|
+
lastOrderRefused: bool;
|
|
123
|
+
nextStageNs: opt nat64;
|
|
124
|
+
offers: vec OfferView;
|
|
125
|
+
pickupAtNs: nat64;
|
|
126
|
+
radiusMeters: nat32;
|
|
127
|
+
requestId: RequestId;
|
|
128
|
+
state: ScheduledStateView;
|
|
129
|
+
waiting: nat32;
|
|
130
|
+
};
|
|
131
|
+
type ScheduledStateView =
|
|
132
|
+
variant {
|
|
133
|
+
booked:
|
|
134
|
+
record {
|
|
135
|
+
card: DriverCard;
|
|
136
|
+
driverCanister: principal;
|
|
137
|
+
driverKey: DriverKey;
|
|
138
|
+
driverRating: opt nat16;
|
|
139
|
+
price: Money;
|
|
140
|
+
};
|
|
141
|
+
booking:
|
|
142
|
+
record {
|
|
143
|
+
answerByNs: nat64;
|
|
144
|
+
driverCanister: principal;
|
|
145
|
+
driverKey: DriverKey;
|
|
146
|
+
};
|
|
147
|
+
closed: record {reason: CloseReason;};
|
|
148
|
+
collecting;
|
|
149
|
+
rescue: record {reason: RescueReason;};
|
|
150
|
+
started: record {
|
|
151
|
+
driverCanister: principal;
|
|
152
|
+
driverKey: DriverKey;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
type ScheduledRideArgs =
|
|
156
|
+
record {
|
|
157
|
+
destination: Geo;
|
|
158
|
+
maxRadiusMeters: nat32;
|
|
159
|
+
pickup: Geo;
|
|
160
|
+
pickupAtNs: nat64;
|
|
161
|
+
requestId: RequestId;
|
|
162
|
+
riderName: text;
|
|
163
|
+
};
|
|
95
164
|
type RouteLine =
|
|
96
165
|
record {
|
|
97
166
|
ride: text;
|
|
@@ -122,53 +191,63 @@ type RideStatus =
|
|
|
122
191
|
type Result_9 =
|
|
123
192
|
variant {
|
|
124
193
|
err: Error;
|
|
125
|
-
ok:
|
|
194
|
+
ok: WorkerConfig;
|
|
126
195
|
};
|
|
127
196
|
type Result_8 =
|
|
128
197
|
variant {
|
|
129
198
|
err: Error;
|
|
130
|
-
ok:
|
|
199
|
+
ok: FlowStatus;
|
|
131
200
|
};
|
|
132
201
|
type Result_7 =
|
|
133
202
|
variant {
|
|
134
203
|
err: Error;
|
|
135
|
-
ok:
|
|
204
|
+
ok: RouteLine;
|
|
136
205
|
};
|
|
137
206
|
type Result_6 =
|
|
138
207
|
variant {
|
|
139
208
|
err: Error;
|
|
140
|
-
ok:
|
|
209
|
+
ok: vec PrefixCount;
|
|
141
210
|
};
|
|
142
211
|
type Result_5 =
|
|
143
212
|
variant {
|
|
144
213
|
err: Error;
|
|
145
|
-
ok:
|
|
214
|
+
ok: WorkerStatus;
|
|
146
215
|
};
|
|
147
216
|
type Result_4 =
|
|
148
217
|
variant {
|
|
149
218
|
err: Error;
|
|
150
|
-
ok:
|
|
219
|
+
ok: nat;
|
|
151
220
|
};
|
|
152
221
|
type Result_3 =
|
|
153
222
|
variant {
|
|
154
223
|
err: Error;
|
|
155
|
-
ok:
|
|
224
|
+
ok: bool;
|
|
156
225
|
};
|
|
157
226
|
type Result_2 =
|
|
158
227
|
variant {
|
|
159
228
|
err: Error;
|
|
160
|
-
ok:
|
|
229
|
+
ok: RequestView;
|
|
230
|
+
};
|
|
231
|
+
type Result_10 =
|
|
232
|
+
variant {
|
|
233
|
+
err: Error;
|
|
234
|
+
ok: ChooseOutcome;
|
|
161
235
|
};
|
|
162
236
|
type Result_1 =
|
|
163
237
|
variant {
|
|
164
238
|
err: Error;
|
|
165
|
-
ok:
|
|
239
|
+
ok: ScheduledView;
|
|
166
240
|
};
|
|
167
241
|
type Result =
|
|
168
242
|
variant {
|
|
169
243
|
err: Error;
|
|
170
244
|
ok: nat64;
|
|
171
245
|
};
|
|
246
|
+
type RescueReason =
|
|
247
|
+
variant {
|
|
248
|
+
driverDropped;
|
|
249
|
+
noChoice;
|
|
250
|
+
};
|
|
172
251
|
type RequestView =
|
|
173
252
|
record {
|
|
174
253
|
asOfNs: opt nat64;
|
|
@@ -219,6 +298,13 @@ type RegisterDriver =
|
|
|
219
298
|
geohash: Geohash;
|
|
220
299
|
validUntilNs: opt nat64;
|
|
221
300
|
};
|
|
301
|
+
type RegisterBase =
|
|
302
|
+
record {
|
|
303
|
+
card: DriverCard;
|
|
304
|
+
cardVersion: nat32;
|
|
305
|
+
driverKey: DriverKey;
|
|
306
|
+
geohash: Geohash;
|
|
307
|
+
};
|
|
222
308
|
type RateDriverArgs =
|
|
223
309
|
record {
|
|
224
310
|
requestId: RequestId;
|
|
@@ -464,6 +550,11 @@ type CarrierKind =
|
|
|
464
550
|
rideHailing;
|
|
465
551
|
taxi;
|
|
466
552
|
};
|
|
553
|
+
type BookingRef =
|
|
554
|
+
record {
|
|
555
|
+
driverKey: DriverKey;
|
|
556
|
+
requestId: RequestId;
|
|
557
|
+
};
|
|
467
558
|
type AreaMap =
|
|
468
559
|
record {
|
|
469
560
|
entries: vec PrefixEntry;
|
|
@@ -3,6 +3,7 @@ import type { ActorMethod } from '@icp-sdk/core/agent';
|
|
|
3
3
|
import type { IDL } from '@icp-sdk/core/candid';
|
|
4
4
|
|
|
5
5
|
export interface AreaMap { 'entries' : Array<PrefixEntry>, 'version' : bigint }
|
|
6
|
+
export interface BookingRef { 'requestId' : RequestId, 'driverKey' : DriverKey }
|
|
6
7
|
export type CarrierKind = { 'other' : string } |
|
|
7
8
|
{ 'taxi' : null } |
|
|
8
9
|
{ 'rideHailing' : null } |
|
|
@@ -180,6 +181,12 @@ export interface QuoteDecline {
|
|
|
180
181
|
'driverKey' : DriverKey,
|
|
181
182
|
}
|
|
182
183
|
export interface RateDriverArgs { 'requestId' : RequestId, 'stars' : number }
|
|
184
|
+
export interface RegisterBase {
|
|
185
|
+
'card' : DriverCard,
|
|
186
|
+
'cardVersion' : number,
|
|
187
|
+
'geohash' : Geohash,
|
|
188
|
+
'driverKey' : DriverKey,
|
|
189
|
+
}
|
|
183
190
|
export interface RegisterDriver {
|
|
184
191
|
'card' : DriverCard,
|
|
185
192
|
'cardVersion' : number,
|
|
@@ -226,25 +233,29 @@ export interface RequestView {
|
|
|
226
233
|
'radiusMeters' : number,
|
|
227
234
|
'waiting' : number,
|
|
228
235
|
}
|
|
236
|
+
export type RescueReason = { 'driverDropped' : null } |
|
|
237
|
+
{ 'noChoice' : null };
|
|
229
238
|
export type Result = { 'ok' : bigint } |
|
|
230
239
|
{ 'err' : Error };
|
|
231
|
-
export type Result_1 = { 'ok' :
|
|
240
|
+
export type Result_1 = { 'ok' : ScheduledView } |
|
|
241
|
+
{ 'err' : Error };
|
|
242
|
+
export type Result_10 = { 'ok' : ChooseOutcome } |
|
|
232
243
|
{ 'err' : Error };
|
|
233
|
-
export type Result_2 = { 'ok' :
|
|
244
|
+
export type Result_2 = { 'ok' : RequestView } |
|
|
234
245
|
{ 'err' : Error };
|
|
235
|
-
export type Result_3 = { 'ok' :
|
|
246
|
+
export type Result_3 = { 'ok' : boolean } |
|
|
236
247
|
{ 'err' : Error };
|
|
237
|
-
export type Result_4 = { 'ok' :
|
|
248
|
+
export type Result_4 = { 'ok' : bigint } |
|
|
238
249
|
{ 'err' : Error };
|
|
239
|
-
export type Result_5 = { 'ok' :
|
|
250
|
+
export type Result_5 = { 'ok' : WorkerStatus } |
|
|
240
251
|
{ 'err' : Error };
|
|
241
|
-
export type Result_6 = { 'ok' :
|
|
252
|
+
export type Result_6 = { 'ok' : Array<PrefixCount> } |
|
|
242
253
|
{ 'err' : Error };
|
|
243
|
-
export type Result_7 = { 'ok' :
|
|
254
|
+
export type Result_7 = { 'ok' : RouteLine } |
|
|
244
255
|
{ 'err' : Error };
|
|
245
|
-
export type Result_8 = { 'ok' :
|
|
256
|
+
export type Result_8 = { 'ok' : FlowStatus } |
|
|
246
257
|
{ 'err' : Error };
|
|
247
|
-
export type Result_9 = { 'ok' :
|
|
258
|
+
export type Result_9 = { 'ok' : WorkerConfig } |
|
|
248
259
|
{ 'err' : Error };
|
|
249
260
|
export type RideStatus = { 'completed' : { 'price' : Money } } |
|
|
250
261
|
{ 'cancelledByRider' : null } |
|
|
@@ -264,6 +275,48 @@ export interface RiderRating {
|
|
|
264
275
|
'driverKey' : DriverKey,
|
|
265
276
|
}
|
|
266
277
|
export interface RouteLine { 'ride' : string, 'toPickup' : string }
|
|
278
|
+
export interface ScheduledRideArgs {
|
|
279
|
+
'destination' : Geo,
|
|
280
|
+
'requestId' : RequestId,
|
|
281
|
+
'maxRadiusMeters' : number,
|
|
282
|
+
'pickup' : Geo,
|
|
283
|
+
'pickupAtNs' : bigint,
|
|
284
|
+
'riderName' : string,
|
|
285
|
+
}
|
|
286
|
+
export type ScheduledStateView = { 'rescue' : { 'reason' : RescueReason } } |
|
|
287
|
+
{ 'closed' : { 'reason' : CloseReason } } |
|
|
288
|
+
{ 'collecting' : null } |
|
|
289
|
+
{ 'started' : { 'driverKey' : DriverKey, 'driverCanister' : Principal } } |
|
|
290
|
+
{
|
|
291
|
+
'booked' : {
|
|
292
|
+
'driverRating' : [] | [number],
|
|
293
|
+
'card' : DriverCard,
|
|
294
|
+
'driverKey' : DriverKey,
|
|
295
|
+
'driverCanister' : Principal,
|
|
296
|
+
'price' : Money,
|
|
297
|
+
}
|
|
298
|
+
} |
|
|
299
|
+
{
|
|
300
|
+
'booking' : {
|
|
301
|
+
'driverKey' : DriverKey,
|
|
302
|
+
'answerByNs' : bigint,
|
|
303
|
+
'driverCanister' : Principal,
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
export interface ScheduledView {
|
|
307
|
+
'nextStageNs' : [] | [bigint],
|
|
308
|
+
'requestId' : RequestId,
|
|
309
|
+
'asked' : number,
|
|
310
|
+
'asOfNs' : bigint,
|
|
311
|
+
'createdNs' : bigint,
|
|
312
|
+
'offers' : Array<OfferView>,
|
|
313
|
+
'state' : ScheduledStateView,
|
|
314
|
+
'closesNs' : bigint,
|
|
315
|
+
'pickupAtNs' : bigint,
|
|
316
|
+
'lastOrderRefused' : boolean,
|
|
317
|
+
'radiusMeters' : number,
|
|
318
|
+
'waiting' : number,
|
|
319
|
+
}
|
|
267
320
|
export interface TestLoadArgs {
|
|
268
321
|
'reportLevel' : [] | [bigint],
|
|
269
322
|
'cells' : Array<PrefixCount>,
|
|
@@ -279,19 +332,39 @@ export interface TigiWorker {
|
|
|
279
332
|
* / from there. Blocks act at once (WO-2); ratings go into offers and orders (P-12).
|
|
280
333
|
*/
|
|
281
334
|
'applyCoreChanges' : ActorMethod<[CoreChanges], Result>,
|
|
335
|
+
/**
|
|
336
|
+
* / ZT-18 (P-22): the booked driver gives the booking up.
|
|
337
|
+
*/
|
|
338
|
+
'bookingDropped' : ActorMethod<[BookingRef], undefined>,
|
|
339
|
+
/**
|
|
340
|
+
* / ZT-17 (P-22): the booked driver's "Jadę" — the ride starts here as an accepted request.
|
|
341
|
+
*/
|
|
342
|
+
'bookingStarted' : ActorMethod<[BookingRef], ProtocolResult>,
|
|
343
|
+
/**
|
|
344
|
+
* / ZT-13: the rider gives the ride at a chosen time up.
|
|
345
|
+
*/
|
|
346
|
+
'cancelScheduled' : ActorMethod<[RequestRef], Result_3>,
|
|
282
347
|
/**
|
|
283
348
|
* / ZO-13, ZO-14, ZO-17.
|
|
284
349
|
*/
|
|
285
|
-
'chooseOffer' : ActorMethod<[OfferRef],
|
|
350
|
+
'chooseOffer' : ActorMethod<[OfferRef], Result_10>,
|
|
351
|
+
/**
|
|
352
|
+
* / ZT-14: "Wybierz" on an offer for a ride at a chosen time — a booking order.
|
|
353
|
+
*/
|
|
354
|
+
'chooseScheduledOffer' : ActorMethod<[OfferRef], Result_10>,
|
|
286
355
|
'clearLogs' : ActorMethod<[], undefined>,
|
|
287
356
|
/**
|
|
288
357
|
* / ZO-15 (otherOfferChosen after an acceptance in another worker), ZO-18 (riderGaveUp).
|
|
289
358
|
*/
|
|
290
|
-
'closeRequest' : ActorMethod<[CloseRequestArgs],
|
|
359
|
+
'closeRequest' : ActorMethod<[CloseRequestArgs], Result_3>,
|
|
360
|
+
/**
|
|
361
|
+
* / ZT-21: the copies in the other workers close once one booked.
|
|
362
|
+
*/
|
|
363
|
+
'closeScheduled' : ActorMethod<[CloseRequestArgs], Result_3>,
|
|
291
364
|
/**
|
|
292
365
|
* / The coordinator only: the settings it computes for every worker.
|
|
293
366
|
*/
|
|
294
|
-
'configure' : ActorMethod<[ConfigureArgs],
|
|
367
|
+
'configure' : ActorMethod<[ConfigureArgs], Result_9>,
|
|
295
368
|
/**
|
|
296
369
|
* / ZO-6.
|
|
297
370
|
*/
|
|
@@ -303,46 +376,50 @@ export interface TigiWorker {
|
|
|
303
376
|
/**
|
|
304
377
|
* / The flow's numbers (scripts, the coordinator's front).
|
|
305
378
|
*/
|
|
306
|
-
'getFlowStatus' : ActorMethod<[],
|
|
379
|
+
'getFlowStatus' : ActorMethod<[], Result_8>,
|
|
307
380
|
'getLogs' : ActorMethod<[], string>,
|
|
308
381
|
/**
|
|
309
382
|
* / ZO-21 (2026-10-24, route line): the route line of one offer, for the rider of the
|
|
310
383
|
* / request only (the package asks after a tap on the offer).
|
|
311
384
|
*/
|
|
312
|
-
'getOfferRoute' : ActorMethod<[OfferRef],
|
|
385
|
+
'getOfferRoute' : ActorMethod<[OfferRef], Result_7>,
|
|
313
386
|
/**
|
|
314
387
|
* / The load this worker counts per geohash prefix of the given length (1–6): the
|
|
315
388
|
* / coordinator picks from it what to give another worker on a split (KO-5).
|
|
316
389
|
*/
|
|
317
|
-
'getPrefixCounts' : ActorMethod<[bigint],
|
|
390
|
+
'getPrefixCounts' : ActorMethod<[bigint], Result_6>,
|
|
318
391
|
/**
|
|
319
392
|
* / ZO-11: the state and the offers (the package polls it every second).
|
|
320
393
|
*/
|
|
321
|
-
'getRequest' : ActorMethod<[RequestRef],
|
|
394
|
+
'getRequest' : ActorMethod<[RequestRef], Result_2>,
|
|
395
|
+
/**
|
|
396
|
+
* / ZT-12: the state and the offers of a ride at a chosen time.
|
|
397
|
+
*/
|
|
398
|
+
'getScheduled' : ActorMethod<[RequestRef], Result_1>,
|
|
322
399
|
/**
|
|
323
400
|
* / The worker's own view of itself — for the coordinator and its front.
|
|
324
401
|
*/
|
|
325
|
-
'getStatus' : ActorMethod<[],
|
|
402
|
+
'getStatus' : ActorMethod<[], Result_5>,
|
|
326
403
|
/**
|
|
327
404
|
* / The coordinator only, before it deletes the worker: what a deleted canister still
|
|
328
405
|
* / holds is burned.
|
|
329
406
|
*/
|
|
330
|
-
'giveBackCycles' : ActorMethod<[],
|
|
407
|
+
'giveBackCycles' : ActorMethod<[], Result_4>,
|
|
331
408
|
/**
|
|
332
409
|
* / ZO-18: the rider gives up.
|
|
333
410
|
*/
|
|
334
|
-
'giveUp' : ActorMethod<[RequestRef],
|
|
411
|
+
'giveUp' : ActorMethod<[RequestRef], Result_3>,
|
|
335
412
|
/**
|
|
336
413
|
* / WO-20 (stage and the test modes): simulated drivers within 3 km of the point?
|
|
337
414
|
*/
|
|
338
|
-
'hasSimulatedDrivers' : ActorMethod<[HasSimulatedDriversArgs],
|
|
415
|
+
'hasSimulatedDrivers' : ActorMethod<[HasSimulatedDriversArgs], Result_3>,
|
|
339
416
|
/**
|
|
340
417
|
* / The coordinator only, in a test mode only (prod and stage refuse, and so does the
|
|
341
418
|
* / coordinator): a load put on this worker. The cells' counters grow, and the worker
|
|
342
419
|
* / reports `reportLevel` as a real minute would — what a local script uses to force a
|
|
343
420
|
* / split.
|
|
344
421
|
*/
|
|
345
|
-
'injectTestLoad' : ActorMethod<[TestLoadArgs],
|
|
422
|
+
'injectTestLoad' : ActorMethod<[TestLoadArgs], Result_3>,
|
|
346
423
|
/**
|
|
347
424
|
* / WO-3: the geohash lies in this worker's area (by the coordinator's newest map).
|
|
348
425
|
*/
|
|
@@ -350,7 +427,7 @@ export interface TigiWorker {
|
|
|
350
427
|
/**
|
|
351
428
|
* / K-8: the rider rates the driver.
|
|
352
429
|
*/
|
|
353
|
-
'rateDriver' : ActorMethod<[RateDriverArgs],
|
|
430
|
+
'rateDriver' : ActorMethod<[RateDriverArgs], Result_3>,
|
|
354
431
|
/**
|
|
355
432
|
* / K-8.
|
|
356
433
|
*/
|
|
@@ -358,7 +435,12 @@ export interface TigiWorker {
|
|
|
358
435
|
/**
|
|
359
436
|
* / ZO-10: a stale offer asks its driver again.
|
|
360
437
|
*/
|
|
361
|
-
'refreshOffer' : ActorMethod<[OfferRef],
|
|
438
|
+
'refreshOffer' : ActorMethod<[OfferRef], Result_3>,
|
|
439
|
+
/**
|
|
440
|
+
* / ZT-1 … ZT-3 (P-21): a driver's base — on a change and once a day, whether the driver
|
|
441
|
+
* / works or not.
|
|
442
|
+
*/
|
|
443
|
+
'registerBase' : ActorMethod<[RegisterBase], ProtocolResult>,
|
|
362
444
|
/**
|
|
363
445
|
* / WO-1 … WO-8: a driver reports itself — on a cell change and every 60 s (U-27).
|
|
364
446
|
*/
|
|
@@ -366,11 +448,19 @@ export interface TigiWorker {
|
|
|
366
448
|
/**
|
|
367
449
|
* / ZO-12: ✕.
|
|
368
450
|
*/
|
|
369
|
-
'rejectOffer' : ActorMethod<[OfferRef],
|
|
451
|
+
'rejectOffer' : ActorMethod<[OfferRef], Result_3>,
|
|
452
|
+
/**
|
|
453
|
+
* / ZT-9: ✕ on one offer.
|
|
454
|
+
*/
|
|
455
|
+
'rejectScheduledOffer' : ActorMethod<[OfferRef], Result_3>,
|
|
370
456
|
/**
|
|
371
457
|
* / ZO-1 … ZO-4, ZO-8: a request in this worker; the drivers are asked after the answer.
|
|
372
458
|
*/
|
|
373
|
-
'requestRide' : ActorMethod<[RequestRideArgs],
|
|
459
|
+
'requestRide' : ActorMethod<[RequestRideArgs], Result_2>,
|
|
460
|
+
/**
|
|
461
|
+
* / ZT-4: a ride at a chosen time in this worker (kurs-na-termin.md).
|
|
462
|
+
*/
|
|
463
|
+
'requestScheduled' : ActorMethod<[ScheduledRideArgs], Result_1>,
|
|
374
464
|
/**
|
|
375
465
|
* / K-2, K-6, K-7.
|
|
376
466
|
*/
|
|
@@ -384,6 +474,10 @@ export interface TigiWorker {
|
|
|
384
474
|
* / ZO-9, ZO-10.
|
|
385
475
|
*/
|
|
386
476
|
'submitQuote' : ActorMethod<[Quote], ProtocolResult>,
|
|
477
|
+
/**
|
|
478
|
+
* / ZT-2 (P-21).
|
|
479
|
+
*/
|
|
480
|
+
'unregisterBase' : ActorMethod<[DriverKey], undefined>,
|
|
387
481
|
/**
|
|
388
482
|
* / WO-6.
|
|
389
483
|
*/
|