@jsm-mit/tigi-sharded-package 0.16.0 → 0.18.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 +2 -2
- package/declarations/core/core.did +116 -59
- package/declarations/core/core.did.d.ts +98 -57
- package/declarations/core/core.did.js +91 -55
- package/declarations/tigi-driver/tigi-driver.did +15 -1
- package/declarations/tigi-driver/tigi-driver.did.d.ts +28 -0
- package/declarations/tigi-driver/tigi-driver.did.js +24 -0
- package/declarations/tigi-simulator/tigi-simulator.did +25 -2
- package/declarations/tigi-simulator/tigi-simulator.did.d.ts +33 -4
- package/declarations/tigi-simulator/tigi-simulator.did.js +24 -0
- package/declarations/worker/worker.did +39 -2
- package/declarations/worker/worker.did.d.ts +34 -2
- package/declarations/worker/worker.did.js +36 -2
- package/dist/actors/driver-canisters-actor.d.ts +9 -4
- package/dist/actors/driver-canisters-actor.d.ts.map +1 -1
- package/dist/actors/driver-canisters-actor.js +13 -1
- package/dist/actors/scheduled-ride.js +2 -2
- package/dist/interfaces.d.ts +25 -0
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/mappers.d.ts +11 -3
- package/dist/mappers.d.ts.map +1 -1
- package/dist/mappers.js +17 -2
- package/package.json +3 -3
|
@@ -210,6 +210,19 @@ export interface FeeUsage {
|
|
|
210
210
|
'registrations' : bigint,
|
|
211
211
|
'rides' : bigint,
|
|
212
212
|
}
|
|
213
|
+
export type FleetDriverChange = { 'active' : null } |
|
|
214
|
+
{ 'suspended' : null } |
|
|
215
|
+
{ 'removed' : null };
|
|
216
|
+
export type FleetDriverState = { 'active' : null } |
|
|
217
|
+
{ 'suspended' : null };
|
|
218
|
+
export interface FleetMembership {
|
|
219
|
+
'role' : FleetRole,
|
|
220
|
+
'state' : FleetDriverState,
|
|
221
|
+
'driverKey' : string,
|
|
222
|
+
'drives' : boolean,
|
|
223
|
+
}
|
|
224
|
+
export type FleetRole = { 'boss' : null } |
|
|
225
|
+
{ 'driver' : null };
|
|
213
226
|
export interface Geo { 'lat' : number, 'lng' : number }
|
|
214
227
|
export interface InitArgs {
|
|
215
228
|
'mode' : Mode,
|
|
@@ -250,6 +263,17 @@ export type Mode = { 'localTest' : null } |
|
|
|
250
263
|
{ 'test' : null } |
|
|
251
264
|
{ 'stage' : null };
|
|
252
265
|
export interface Money { 'currency' : string, 'amount' : bigint }
|
|
266
|
+
export interface MyDriverCanister {
|
|
267
|
+
'fleet' : [] | [FleetMembership],
|
|
268
|
+
'moduleHash' : [] | [Uint8Array | number[]],
|
|
269
|
+
'owner' : Principal,
|
|
270
|
+
'blocked' : boolean,
|
|
271
|
+
'kind' : DriverCanisterKind,
|
|
272
|
+
'createdAtNs' : bigint,
|
|
273
|
+
'canister' : Principal,
|
|
274
|
+
'installedAtNs' : [] | [bigint],
|
|
275
|
+
'leaseUntilNs' : [] | [bigint],
|
|
276
|
+
}
|
|
253
277
|
export interface PageArgs { 'offset' : bigint, 'limit' : bigint }
|
|
254
278
|
export interface PrincipalArgs { 'principal' : Principal }
|
|
255
279
|
export interface Profile {
|
|
@@ -259,6 +283,12 @@ export interface Profile {
|
|
|
259
283
|
}
|
|
260
284
|
export interface ProfileEntry { 'principal' : Principal, 'name' : string }
|
|
261
285
|
export interface ProfilesArgs { 'principals' : Array<Principal> }
|
|
286
|
+
export interface PutFleetDriverAck { 'drivers' : bigint }
|
|
287
|
+
export interface PutFleetDriverArgs {
|
|
288
|
+
'driverKey' : string,
|
|
289
|
+
'change' : FleetDriverChange,
|
|
290
|
+
'driver' : Principal,
|
|
291
|
+
}
|
|
262
292
|
export interface RateRideArgs { 'requestId' : string, 'stars' : number }
|
|
263
293
|
export type RateRideOutcome = { 'notRatable' : string } |
|
|
264
294
|
{ 'rated' : null } |
|
|
@@ -288,27 +318,29 @@ export type Result_10 = { 'ok' : RateRideOutcome } |
|
|
|
288
318
|
{ 'err' : Error };
|
|
289
319
|
export type Result_11 = { 'ok' : DriverCanisterQuote } |
|
|
290
320
|
{ 'err' : Error };
|
|
291
|
-
export type Result_12 = { 'ok' :
|
|
321
|
+
export type Result_12 = { 'ok' : PutFleetDriverAck } |
|
|
292
322
|
{ 'err' : Error };
|
|
293
|
-
export type Result_13 = { 'ok' :
|
|
323
|
+
export type Result_13 = { 'ok' : MapTicket } |
|
|
294
324
|
{ 'err' : Error };
|
|
295
|
-
export type Result_14 = { 'ok' :
|
|
325
|
+
export type Result_14 = { 'ok' : FeePaid } |
|
|
296
326
|
{ 'err' : Error };
|
|
297
|
-
export type Result_15 = { 'ok' :
|
|
327
|
+
export type Result_15 = { 'ok' : ClaimCode } |
|
|
298
328
|
{ 'err' : Error };
|
|
299
|
-
export type Result_16 = { 'ok' : Array<
|
|
329
|
+
export type Result_16 = { 'ok' : Array<DriverRoomView> } |
|
|
300
330
|
{ 'err' : Error };
|
|
301
|
-
export type Result_17 = { 'ok' :
|
|
331
|
+
export type Result_17 = { 'ok' : Array<DriverFeeAccountView> } |
|
|
302
332
|
{ 'err' : Error };
|
|
303
|
-
export type Result_18 = { 'ok' :
|
|
333
|
+
export type Result_18 = { 'ok' : DriverCanistersPage } |
|
|
304
334
|
{ 'err' : Error };
|
|
305
|
-
export type Result_19 = { 'ok' :
|
|
335
|
+
export type Result_19 = { 'ok' : Array<Block> } |
|
|
306
336
|
{ 'err' : Error };
|
|
307
337
|
export type Result_2 = { 'ok' : boolean } |
|
|
308
338
|
{ 'err' : Error };
|
|
309
|
-
export type Result_20 = { 'ok' :
|
|
339
|
+
export type Result_20 = { 'ok' : LeaseAnswer } |
|
|
340
|
+
{ 'err' : Error };
|
|
341
|
+
export type Result_21 = { 'ok' : RideBatchResult } |
|
|
310
342
|
{ 'err' : Error };
|
|
311
|
-
export type
|
|
343
|
+
export type Result_22 = {
|
|
312
344
|
'ok' : {
|
|
313
345
|
'subjects' : bigint,
|
|
314
346
|
'headSeq' : bigint,
|
|
@@ -317,39 +349,41 @@ export type Result_21 = {
|
|
|
317
349
|
}
|
|
318
350
|
} |
|
|
319
351
|
{ 'err' : Error };
|
|
320
|
-
export type
|
|
352
|
+
export type Result_23 = { 'ok' : Wiring } |
|
|
321
353
|
{ 'err' : Error };
|
|
322
|
-
export type
|
|
354
|
+
export type Result_24 = { 'ok' : Array<ProfileEntry> } |
|
|
323
355
|
{ 'err' : Error };
|
|
324
|
-
export type
|
|
356
|
+
export type Result_25 = { 'ok' : RidesPage } |
|
|
325
357
|
{ 'err' : Error };
|
|
326
|
-
export type
|
|
358
|
+
export type Result_26 = { 'ok' : RideView } |
|
|
327
359
|
{ 'err' : Error };
|
|
328
|
-
export type
|
|
360
|
+
export type Result_27 = { 'ok' : [] | [Rating] } |
|
|
329
361
|
{ 'err' : Error };
|
|
330
|
-
export type
|
|
362
|
+
export type Result_28 = { 'ok' : MyDriverCanister } |
|
|
331
363
|
{ 'err' : Error };
|
|
332
|
-
export type
|
|
333
|
-
{ 'err' : Error };
|
|
334
|
-
export type Result_29 = { 'ok' : [] | [RolloutView] } |
|
|
364
|
+
export type Result_29 = { 'ok' : FeeStatus } |
|
|
335
365
|
{ 'err' : Error };
|
|
336
366
|
export type Result_3 = { 'ok' : RolloutView } |
|
|
337
367
|
{ 'err' : Error };
|
|
338
|
-
export type Result_30 = { 'ok' :
|
|
368
|
+
export type Result_30 = { 'ok' : FactoryStatus } |
|
|
369
|
+
{ 'err' : Error };
|
|
370
|
+
export type Result_31 = { 'ok' : [] | [RolloutView] } |
|
|
371
|
+
{ 'err' : Error };
|
|
372
|
+
export type Result_32 = { 'ok' : FeeBillAnswer } |
|
|
339
373
|
{ 'err' : Error };
|
|
340
|
-
export type
|
|
374
|
+
export type Result_33 = { 'ok' : DriverFeeAccountView } |
|
|
341
375
|
{ 'err' : Error };
|
|
342
|
-
export type
|
|
376
|
+
export type Result_34 = { 'ok' : ChatRoomsStatus } |
|
|
343
377
|
{ 'err' : Error };
|
|
344
|
-
export type
|
|
378
|
+
export type Result_35 = { 'ok' : Array<Principal> } |
|
|
345
379
|
{ 'err' : Error };
|
|
346
|
-
export type
|
|
380
|
+
export type Result_36 = { 'ok' : Principal } |
|
|
347
381
|
{ 'err' : Error };
|
|
348
|
-
export type
|
|
382
|
+
export type Result_37 = { 'ok' : WasmInfo } |
|
|
349
383
|
{ 'err' : Error };
|
|
350
|
-
export type
|
|
384
|
+
export type Result_38 = { 'ok' : ApkInfo } |
|
|
351
385
|
{ 'err' : Error };
|
|
352
|
-
export type
|
|
386
|
+
export type Result_39 = { 'ok' : ChatSharesAck } |
|
|
353
387
|
{ 'err' : Error };
|
|
354
388
|
export type Result_4 = { 'ok' : Profile } |
|
|
355
389
|
{ 'err' : Error };
|
|
@@ -445,7 +479,7 @@ export interface TigiCore {
|
|
|
445
479
|
* / it; no multiplier). A pool canister's share and a room of no canister of the registry
|
|
446
480
|
* / are absorbed (the coordinator keeps paying them). Once per `batchId`.
|
|
447
481
|
*/
|
|
448
|
-
'addChatShares' : ActorMethod<[ChatSharesArgs],
|
|
482
|
+
'addChatShares' : ActorMethod<[ChatSharesArgs], Result_39>,
|
|
449
483
|
/**
|
|
450
484
|
* / Admins: a canister the core controls joins the demo pool (U-35).
|
|
451
485
|
*/
|
|
@@ -469,12 +503,12 @@ export interface TigiCore {
|
|
|
469
503
|
/**
|
|
470
504
|
* / Admins (F-24): the chunks become THE app; drivers' canisters take it at their "Aktualizuj".
|
|
471
505
|
*/
|
|
472
|
-
'commitDriverApk' : ActorMethod<[ApkCommitArgs],
|
|
506
|
+
'commitDriverApk' : ActorMethod<[ApkCommitArgs], Result_38>,
|
|
473
507
|
/**
|
|
474
508
|
* / Admins: the chunks become THE module of their kind. A new driver wasm is released
|
|
475
509
|
* / (F-11) and its hash goes to the workers.
|
|
476
510
|
*/
|
|
477
|
-
'commitDriverWasm' : ActorMethod<[WasmCommitArgs],
|
|
511
|
+
'commitDriverWasm' : ActorMethod<[WasmCommitArgs], Result_37>,
|
|
478
512
|
/**
|
|
479
513
|
* / Admins, localTest: an empty canister from the core's cycles joins the demo pool.
|
|
480
514
|
*/
|
|
@@ -483,12 +517,12 @@ export interface TigiCore {
|
|
|
483
517
|
/**
|
|
484
518
|
* / Admins: the simulator, created once (F-18).
|
|
485
519
|
*/
|
|
486
|
-
'ensureSimulator' : ActorMethod<[],
|
|
520
|
+
'ensureSimulator' : ActorMethod<[], Result_36>,
|
|
487
521
|
/**
|
|
488
522
|
* / F-8: 15 min more for the holder of a demo canister.
|
|
489
523
|
*/
|
|
490
524
|
'extendDemoLease' : ActorMethod<[], Result_8>,
|
|
491
|
-
'getAdmins' : ActorMethod<[],
|
|
525
|
+
'getAdmins' : ActorMethod<[], Result_35>,
|
|
492
526
|
/**
|
|
493
527
|
* / For the fronts (through the package): where the chat of this environment is. Null =
|
|
494
528
|
* / no chat here yet. The room of a driver is `ChatRoomFunctions.driverRoomId`.
|
|
@@ -497,7 +531,7 @@ export interface TigiCore {
|
|
|
497
531
|
/**
|
|
498
532
|
* / Admins: how far the driver rooms are (C-15).
|
|
499
533
|
*/
|
|
500
|
-
'getChatRoomsStatus' : ActorMethod<[],
|
|
534
|
+
'getChatRoomsStatus' : ActorMethod<[], Result_34>,
|
|
501
535
|
/**
|
|
502
536
|
* / F-24 (public): the current app — what a driver canister compares its own with.
|
|
503
537
|
*/
|
|
@@ -513,52 +547,53 @@ export interface TigiCore {
|
|
|
513
547
|
/**
|
|
514
548
|
* / Admins: the account of one driver canister (C-17 … C-20).
|
|
515
549
|
*/
|
|
516
|
-
'getDriverFeeAccount' : ActorMethod<[CanisterArgs],
|
|
550
|
+
'getDriverFeeAccount' : ActorMethod<[CanisterArgs], Result_33>,
|
|
517
551
|
/**
|
|
518
552
|
* / C-19: a driver canister of the registry asks for its bill — the events since its
|
|
519
553
|
* / last settlement, priced on the fee's day. Called by the canister at its first
|
|
520
554
|
* / "Przyjmuję zlecenia" of a day. A pool canister owes nothing (C-18).
|
|
521
555
|
*/
|
|
522
|
-
'getDriverFeeBill' : ActorMethod<[],
|
|
556
|
+
'getDriverFeeBill' : ActorMethod<[], Result_32>,
|
|
523
557
|
/**
|
|
524
558
|
* / Admins (stage 7): the aggregated rating of one driver (sum and count of stars; null =
|
|
525
559
|
* / no rating yet) — the value the workers get through the outbox (C-6).
|
|
526
560
|
*/
|
|
527
|
-
'getDriverRating' : ActorMethod<[DriverRatingArgs],
|
|
528
|
-
'getDriverRollout' : ActorMethod<[],
|
|
529
|
-
'getFactoryStatus' : ActorMethod<[],
|
|
561
|
+
'getDriverRating' : ActorMethod<[DriverRatingArgs], Result_27>,
|
|
562
|
+
'getDriverRollout' : ActorMethod<[], Result_31>,
|
|
563
|
+
'getFactoryStatus' : ActorMethod<[], Result_30>,
|
|
530
564
|
/**
|
|
531
565
|
* / C-22: the rates, the day, the multiplier cached, the totals.
|
|
532
566
|
*/
|
|
533
|
-
'getFeeStatus' : ActorMethod<[],
|
|
567
|
+
'getFeeStatus' : ActorMethod<[], Result_29>,
|
|
534
568
|
'getLogs' : ActorMethod<[], string>,
|
|
535
569
|
'getMapPlacesConfig' : ActorMethod<[], [] | [MapPlacesConfig]>,
|
|
536
570
|
'getMapRoutesConfig' : ActorMethod<[], [] | [MapRoutesConfig]>,
|
|
537
571
|
/**
|
|
538
|
-
* / The caller's own canister, or the demo canister the caller holds now
|
|
572
|
+
* / The caller's own canister, or the demo canister the caller holds now, or the canister
|
|
573
|
+
* / of the fleet the caller drives for (C-N12) — with the caller's place in the fleet.
|
|
539
574
|
*/
|
|
540
|
-
'getMyDriverCanister' : ActorMethod<[],
|
|
575
|
+
'getMyDriverCanister' : ActorMethod<[], Result_28>,
|
|
541
576
|
'getMyProfile' : ActorMethod<[], Result_4>,
|
|
542
577
|
/**
|
|
543
578
|
* / C-16, PF-4: the caller's own rating as a rider (sum and count of stars; null = no
|
|
544
579
|
* / rating yet). Ratings reach the core in the workers' batches, up to a minute late.
|
|
545
580
|
*/
|
|
546
|
-
'getMyRating' : ActorMethod<[],
|
|
581
|
+
'getMyRating' : ActorMethod<[], Result_27>,
|
|
547
582
|
/**
|
|
548
583
|
* / C-8 (KU-4, stage 7): one line of the caller's history by its requestId — for the
|
|
549
584
|
* / details screen after a reload and to show the rating after `rateMyRide`. Another
|
|
550
585
|
* / rider's ride → `NotAuthorized`; not in the core (yet, K-9) → `NotFound`.
|
|
551
586
|
*/
|
|
552
|
-
'getMyRide' : ActorMethod<[RequestIdArgs],
|
|
587
|
+
'getMyRide' : ActorMethod<[RequestIdArgs], Result_26>,
|
|
553
588
|
/**
|
|
554
589
|
* / C-8: the caller's rides, newest first, with the places (KU-4) and whether the driver
|
|
555
590
|
* / can still be rated (KU-5, C-23).
|
|
556
591
|
*/
|
|
557
|
-
'getMyRides' : ActorMethod<[RidesPageArgs],
|
|
592
|
+
'getMyRides' : ActorMethod<[RidesPageArgs], Result_25>,
|
|
558
593
|
/**
|
|
559
594
|
* / C-3: the names of up to MAX_PROFILES_PER_CALL principals; unknown ones are left out.
|
|
560
595
|
*/
|
|
561
|
-
'getProfiles' : ActorMethod<[ProfilesArgs],
|
|
596
|
+
'getProfiles' : ActorMethod<[ProfilesArgs], Result_24>,
|
|
562
597
|
/**
|
|
563
598
|
* / F-11: the driver wasms released so far, oldest first.
|
|
564
599
|
*/
|
|
@@ -570,11 +605,11 @@ export interface TigiCore {
|
|
|
570
605
|
/**
|
|
571
606
|
* / Admins: the coordinator, the workers confirmed so far, the mode.
|
|
572
607
|
*/
|
|
573
|
-
'getWiring' : ActorMethod<[],
|
|
608
|
+
'getWiring' : ActorMethod<[], Result_23>,
|
|
574
609
|
/**
|
|
575
610
|
* / Admins: how far the outbox to the workers is (C-6, C-7).
|
|
576
611
|
*/
|
|
577
|
-
'getWorkerOutbox' : ActorMethod<[],
|
|
612
|
+
'getWorkerOutbox' : ActorMethod<[], Result_22>,
|
|
578
613
|
/**
|
|
579
614
|
* / Workers of the group: the core asks the coordinator once and remembers the worker,
|
|
580
615
|
* / which then gets the network state through the outbox. A worker calls it once after
|
|
@@ -586,7 +621,7 @@ export interface TigiCore {
|
|
|
586
621
|
* / Idempotent: a known requestId and a counted rating count once. Invalid entries are
|
|
587
622
|
* / rejected and logged; the worker drops the whole batch after an ok.
|
|
588
623
|
*/
|
|
589
|
-
'ingestRideBatch' : ActorMethod<[RideBatch],
|
|
624
|
+
'ingestRideBatch' : ActorMethod<[RideBatch], Result_21>,
|
|
590
625
|
/**
|
|
591
626
|
* / C-14: the accounts gate of the chat (U-43). The chat core asks this group's
|
|
592
627
|
* / coordinator WHERE (`accountsCanisterFor` → this core) and asks here: true = an
|
|
@@ -597,17 +632,17 @@ export interface TigiCore {
|
|
|
597
632
|
* / F-5 … F-7: a demo canister for 15 min (outside prod). A fresh lease comes with a
|
|
598
633
|
* / one-time claim code (F-20, U-45).
|
|
599
634
|
*/
|
|
600
|
-
'leaseDemoDriverCanister' : ActorMethod<[],
|
|
601
|
-
'listBlocks' : ActorMethod<[PageArgs],
|
|
602
|
-
'listDriverCanisters' : ActorMethod<[PageArgs],
|
|
635
|
+
'leaseDemoDriverCanister' : ActorMethod<[], Result_20>,
|
|
636
|
+
'listBlocks' : ActorMethod<[PageArgs], Result_19>,
|
|
637
|
+
'listDriverCanisters' : ActorMethod<[PageArgs], Result_18>,
|
|
603
638
|
/**
|
|
604
639
|
* / Admins: the accounts, 100 a page at most.
|
|
605
640
|
*/
|
|
606
|
-
'listDriverFeeAccounts' : ActorMethod<[PageArgs],
|
|
641
|
+
'listDriverFeeAccounts' : ActorMethod<[PageArgs], Result_17>,
|
|
607
642
|
/**
|
|
608
643
|
* / Admins: the driver rooms as the core wants them, 100 a page at most.
|
|
609
644
|
*/
|
|
610
|
-
'listDriverRooms' : ActorMethod<[PageArgs],
|
|
645
|
+
'listDriverRooms' : ActorMethod<[PageArgs], Result_16>,
|
|
611
646
|
/**
|
|
612
647
|
* / C-29, C-30: the map ticket of the calling driver (own or demo driver canister, not
|
|
613
648
|
* / blocked), for an area and a bbox. The core asks the map coordinator WHERE (once, kept)
|
|
@@ -615,24 +650,30 @@ export interface TigiCore {
|
|
|
615
650
|
* / tried once more. A refusal of the map group comes back as `RemoteCanisterError` with
|
|
616
651
|
* / its variant first ("Blocked: …").
|
|
617
652
|
*/
|
|
618
|
-
'mapTicket' : ActorMethod<[MapTicketArgs],
|
|
653
|
+
'mapTicket' : ActorMethod<[MapTicketArgs], Result_13>,
|
|
619
654
|
/**
|
|
620
655
|
* / F-20: a fresh claim code for the caller's running demo lease; the old one stops
|
|
621
656
|
* / working.
|
|
622
657
|
*/
|
|
623
|
-
'newClaimCode' : ActorMethod<[],
|
|
658
|
+
'newClaimCode' : ActorMethod<[], Result_15>,
|
|
624
659
|
/**
|
|
625
660
|
* / C-20: the driver canister pays the bill of `day` with the cycles attached to this
|
|
626
661
|
* / call. The core takes exactly the bill (the rest goes back), or nothing when less is
|
|
627
662
|
* / attached (`FEE_SHORT`); a day paid already answers `accepted = 0`.
|
|
628
663
|
*/
|
|
629
|
-
'payDriverFee' : ActorMethod<[FeePayArgs],
|
|
664
|
+
'payDriverFee' : ActorMethod<[FeePayArgs], Result_14>,
|
|
630
665
|
/**
|
|
631
666
|
* / C-32, C-33: the map-places ticket of the calling rider (signed in, not blocked) for an
|
|
632
667
|
* / area and a bbox — the search of Skąd / Dokąd while the copy of signed-out users does not
|
|
633
668
|
* / serve. As `mapTicket` (C-29): WHERE from the coordinator (kept), then the ticket core.
|
|
634
669
|
*/
|
|
635
|
-
'placesTicket' : ActorMethod<[MapTicketArgs],
|
|
670
|
+
'placesTicket' : ActorMethod<[MapTicketArgs], Result_13>,
|
|
671
|
+
/**
|
|
672
|
+
* / C-N11 (D-32): a driver canister reports a driver of its fleet — joined or active again,
|
|
673
|
+
* / suspended, removed. Idempotent; the canister repeats it until it gets an answer. The
|
|
674
|
+
* / driver's room follows (C-N13).
|
|
675
|
+
*/
|
|
676
|
+
'putFleetDriver' : ActorMethod<[PutFleetDriverArgs], Result_12>,
|
|
636
677
|
/**
|
|
637
678
|
* / F-2 … F-4, F-10: the caller's own driver canister (localTest: from the core's cycles).
|
|
638
679
|
* / F-1 (user 2026-10-31): what a driver canister costs now and the caller's account to pay to.
|
|
@@ -61,7 +61,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
61
61
|
'addedCycles' : IDL.Nat,
|
|
62
62
|
'unknown' : IDL.Nat,
|
|
63
63
|
});
|
|
64
|
-
const
|
|
64
|
+
const Result_39 = IDL.Variant({ 'ok' : ChatSharesAck, 'err' : Error });
|
|
65
65
|
const CanisterArgs = IDL.Record({ 'canister' : IDL.Principal });
|
|
66
66
|
const DriverCanisterKind = IDL.Variant({
|
|
67
67
|
'own' : IDL.Null,
|
|
@@ -105,7 +105,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
105
105
|
'versionCode' : IDL.Nat32,
|
|
106
106
|
'versionName' : IDL.Text,
|
|
107
107
|
});
|
|
108
|
-
const
|
|
108
|
+
const Result_38 = IDL.Variant({ 'ok' : ApkInfo, 'err' : Error });
|
|
109
109
|
const WasmKind = IDL.Variant({ 'simulator' : IDL.Null, 'driver' : IDL.Null });
|
|
110
110
|
const WasmCommitArgs = IDL.Record({
|
|
111
111
|
'sha256' : IDL.Vec(IDL.Nat8),
|
|
@@ -118,9 +118,9 @@ export const idlFactory = ({ IDL }) => {
|
|
|
118
118
|
'size' : IDL.Nat,
|
|
119
119
|
'committedAtNs' : IDL.Int,
|
|
120
120
|
});
|
|
121
|
-
const
|
|
122
|
-
const
|
|
123
|
-
const
|
|
121
|
+
const Result_37 = IDL.Variant({ 'ok' : WasmInfo, 'err' : Error });
|
|
122
|
+
const Result_36 = IDL.Variant({ 'ok' : IDL.Principal, 'err' : Error });
|
|
123
|
+
const Result_35 = IDL.Variant({
|
|
124
124
|
'ok' : IDL.Vec(IDL.Principal),
|
|
125
125
|
'err' : Error,
|
|
126
126
|
});
|
|
@@ -136,7 +136,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
136
136
|
'pendingSinceNs' : IDL.Opt(IDL.Int),
|
|
137
137
|
'rooms' : IDL.Nat,
|
|
138
138
|
});
|
|
139
|
-
const
|
|
139
|
+
const Result_34 = IDL.Variant({ 'ok' : ChatRoomsStatus, 'err' : Error });
|
|
140
140
|
const DriverCanisterStatus = IDL.Record({
|
|
141
141
|
'moduleHash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
142
142
|
'blocked' : IDL.Bool,
|
|
@@ -180,7 +180,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
180
180
|
'paidTotal' : IDL.Nat,
|
|
181
181
|
'lastFee' : IDL.Opt(FeeRecord),
|
|
182
182
|
});
|
|
183
|
-
const
|
|
183
|
+
const Result_33 = IDL.Variant({ 'ok' : DriverFeeAccountView, 'err' : Error });
|
|
184
184
|
const FeeBillAnswer = IDL.Record({
|
|
185
185
|
'day' : IDL.Nat,
|
|
186
186
|
'settled' : IDL.Bool,
|
|
@@ -190,14 +190,14 @@ export const idlFactory = ({ IDL }) => {
|
|
|
190
190
|
'multiplierPermille' : IDL.Nat,
|
|
191
191
|
'rates' : FeeRates,
|
|
192
192
|
});
|
|
193
|
-
const
|
|
193
|
+
const Result_32 = IDL.Variant({ 'ok' : FeeBillAnswer, 'err' : Error });
|
|
194
194
|
const DriverRatingArgs = IDL.Record({
|
|
195
195
|
'driverKey' : IDL.Text,
|
|
196
196
|
'canister' : IDL.Principal,
|
|
197
197
|
});
|
|
198
198
|
const Rating = IDL.Record({ 'sum' : IDL.Nat, 'count' : IDL.Nat });
|
|
199
|
-
const
|
|
200
|
-
const
|
|
199
|
+
const Result_27 = IDL.Variant({ 'ok' : IDL.Opt(Rating), 'err' : Error });
|
|
200
|
+
const Result_31 = IDL.Variant({ 'ok' : IDL.Opt(RolloutView), 'err' : Error });
|
|
201
201
|
const FactoryStatus = IDL.Record({
|
|
202
202
|
'simulator' : IDL.Opt(IDL.Principal),
|
|
203
203
|
'mode' : Mode,
|
|
@@ -209,7 +209,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
209
209
|
'driverWasm' : IDL.Opt(WasmInfo),
|
|
210
210
|
'registered' : IDL.Nat,
|
|
211
211
|
});
|
|
212
|
-
const
|
|
212
|
+
const Result_30 = IDL.Variant({ 'ok' : FactoryStatus, 'err' : Error });
|
|
213
213
|
const FeeStatus = IDL.Record({
|
|
214
214
|
'multiplier' : IDL.Opt(
|
|
215
215
|
IDL.Record({ 'day' : IDL.Nat, 'permille' : IDL.Nat })
|
|
@@ -229,9 +229,32 @@ export const idlFactory = ({ IDL }) => {
|
|
|
229
229
|
'paidTotal' : IDL.Nat,
|
|
230
230
|
'rates' : FeeRates,
|
|
231
231
|
});
|
|
232
|
-
const
|
|
232
|
+
const Result_29 = IDL.Variant({ 'ok' : FeeStatus, 'err' : Error });
|
|
233
233
|
const MapPlacesConfig = IDL.Record({ 'coordinatorId' : IDL.Principal });
|
|
234
234
|
const MapRoutesConfig = IDL.Record({ 'coordinatorId' : IDL.Principal });
|
|
235
|
+
const FleetRole = IDL.Variant({ 'boss' : IDL.Null, 'driver' : IDL.Null });
|
|
236
|
+
const FleetDriverState = IDL.Variant({
|
|
237
|
+
'active' : IDL.Null,
|
|
238
|
+
'suspended' : IDL.Null,
|
|
239
|
+
});
|
|
240
|
+
const FleetMembership = IDL.Record({
|
|
241
|
+
'role' : FleetRole,
|
|
242
|
+
'state' : FleetDriverState,
|
|
243
|
+
'driverKey' : IDL.Text,
|
|
244
|
+
'drives' : IDL.Bool,
|
|
245
|
+
});
|
|
246
|
+
const MyDriverCanister = IDL.Record({
|
|
247
|
+
'fleet' : IDL.Opt(FleetMembership),
|
|
248
|
+
'moduleHash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
249
|
+
'owner' : IDL.Principal,
|
|
250
|
+
'blocked' : IDL.Bool,
|
|
251
|
+
'kind' : DriverCanisterKind,
|
|
252
|
+
'createdAtNs' : IDL.Int,
|
|
253
|
+
'canister' : IDL.Principal,
|
|
254
|
+
'installedAtNs' : IDL.Opt(IDL.Int),
|
|
255
|
+
'leaseUntilNs' : IDL.Opt(IDL.Int),
|
|
256
|
+
});
|
|
257
|
+
const Result_28 = IDL.Variant({ 'ok' : MyDriverCanister, 'err' : Error });
|
|
235
258
|
const Profile = IDL.Record({
|
|
236
259
|
'updatedAtNs' : IDL.Int,
|
|
237
260
|
'name' : IDL.Text,
|
|
@@ -259,7 +282,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
259
282
|
'rider' : IDL.Principal,
|
|
260
283
|
'myRating' : IDL.Opt(IDL.Nat8),
|
|
261
284
|
});
|
|
262
|
-
const
|
|
285
|
+
const Result_26 = IDL.Variant({ 'ok' : RideView, 'err' : Error });
|
|
263
286
|
const RidesPageArgs = IDL.Record({
|
|
264
287
|
'beforeIndex' : IDL.Opt(IDL.Nat),
|
|
265
288
|
'limit' : IDL.Nat,
|
|
@@ -268,13 +291,13 @@ export const idlFactory = ({ IDL }) => {
|
|
|
268
291
|
'nextBeforeIndex' : IDL.Opt(IDL.Nat),
|
|
269
292
|
'rides' : IDL.Vec(RideView),
|
|
270
293
|
});
|
|
271
|
-
const
|
|
294
|
+
const Result_25 = IDL.Variant({ 'ok' : RidesPage, 'err' : Error });
|
|
272
295
|
const ProfilesArgs = IDL.Record({ 'principals' : IDL.Vec(IDL.Principal) });
|
|
273
296
|
const ProfileEntry = IDL.Record({
|
|
274
297
|
'principal' : IDL.Principal,
|
|
275
298
|
'name' : IDL.Text,
|
|
276
299
|
});
|
|
277
|
-
const
|
|
300
|
+
const Result_24 = IDL.Variant({
|
|
278
301
|
'ok' : IDL.Vec(ProfileEntry),
|
|
279
302
|
'err' : Error,
|
|
280
303
|
});
|
|
@@ -288,8 +311,8 @@ export const idlFactory = ({ IDL }) => {
|
|
|
288
311
|
'knownWorkers' : IDL.Vec(IDL.Principal),
|
|
289
312
|
'coordinator' : IDL.Opt(IDL.Principal),
|
|
290
313
|
});
|
|
291
|
-
const
|
|
292
|
-
const
|
|
314
|
+
const Result_23 = IDL.Variant({ 'ok' : Wiring, 'err' : Error });
|
|
315
|
+
const Result_22 = IDL.Variant({
|
|
293
316
|
'ok' : IDL.Record({
|
|
294
317
|
'subjects' : IDL.Nat,
|
|
295
318
|
'headSeq' : IDL.Nat64,
|
|
@@ -342,7 +365,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
342
365
|
'rejected' : IDL.Nat,
|
|
343
366
|
'ratingsCounted' : IDL.Nat,
|
|
344
367
|
});
|
|
345
|
-
const
|
|
368
|
+
const Result_21 = IDL.Variant({ 'ok' : RideBatchResult, 'err' : Error });
|
|
346
369
|
const ClaimCode = IDL.Record({
|
|
347
370
|
'expiresAtNs' : IDL.Int,
|
|
348
371
|
'code' : IDL.Text,
|
|
@@ -363,7 +386,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
363
386
|
'busy' : IDL.Record({ 'untilNs' : IDL.Int }),
|
|
364
387
|
'leased' : LeasedCanister,
|
|
365
388
|
});
|
|
366
|
-
const
|
|
389
|
+
const Result_20 = IDL.Variant({ 'ok' : LeaseAnswer, 'err' : Error });
|
|
367
390
|
const PageArgs = IDL.Record({ 'offset' : IDL.Nat, 'limit' : IDL.Nat });
|
|
368
391
|
const BlockTarget = IDL.Variant({
|
|
369
392
|
'driverCanister' : IDL.Principal,
|
|
@@ -379,13 +402,13 @@ export const idlFactory = ({ IDL }) => {
|
|
|
379
402
|
'target' : BlockTarget,
|
|
380
403
|
'reason' : IDL.Text,
|
|
381
404
|
});
|
|
382
|
-
const
|
|
405
|
+
const Result_19 = IDL.Variant({ 'ok' : IDL.Vec(Block), 'err' : Error });
|
|
383
406
|
const DriverCanistersPage = IDL.Record({
|
|
384
407
|
'total' : IDL.Nat,
|
|
385
408
|
'canisters' : IDL.Vec(DriverCanister),
|
|
386
409
|
});
|
|
387
|
-
const
|
|
388
|
-
const
|
|
410
|
+
const Result_18 = IDL.Variant({ 'ok' : DriverCanistersPage, 'err' : Error });
|
|
411
|
+
const Result_17 = IDL.Variant({
|
|
389
412
|
'ok' : IDL.Vec(DriverFeeAccountView),
|
|
390
413
|
'err' : Error,
|
|
391
414
|
});
|
|
@@ -397,7 +420,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
397
420
|
'roomId' : IDL.Text,
|
|
398
421
|
'synced' : IDL.Bool,
|
|
399
422
|
});
|
|
400
|
-
const
|
|
423
|
+
const Result_16 = IDL.Variant({
|
|
401
424
|
'ok' : IDL.Vec(DriverRoomView),
|
|
402
425
|
'err' : Error,
|
|
403
426
|
});
|
|
@@ -415,15 +438,27 @@ export const idlFactory = ({ IDL }) => {
|
|
|
415
438
|
'copy' : IDL.Principal,
|
|
416
439
|
'validUntilNs' : IDL.Nat64,
|
|
417
440
|
});
|
|
418
|
-
const
|
|
419
|
-
const
|
|
441
|
+
const Result_13 = IDL.Variant({ 'ok' : MapTicket, 'err' : Error });
|
|
442
|
+
const Result_15 = IDL.Variant({ 'ok' : ClaimCode, 'err' : Error });
|
|
420
443
|
const FeePayArgs = IDL.Record({ 'day' : IDL.Nat });
|
|
421
444
|
const FeePaid = IDL.Record({
|
|
422
445
|
'day' : IDL.Nat,
|
|
423
446
|
'accepted' : IDL.Nat,
|
|
424
447
|
'amount' : IDL.Nat,
|
|
425
448
|
});
|
|
426
|
-
const
|
|
449
|
+
const Result_14 = IDL.Variant({ 'ok' : FeePaid, 'err' : Error });
|
|
450
|
+
const FleetDriverChange = IDL.Variant({
|
|
451
|
+
'active' : IDL.Null,
|
|
452
|
+
'suspended' : IDL.Null,
|
|
453
|
+
'removed' : IDL.Null,
|
|
454
|
+
});
|
|
455
|
+
const PutFleetDriverArgs = IDL.Record({
|
|
456
|
+
'driverKey' : IDL.Text,
|
|
457
|
+
'change' : FleetDriverChange,
|
|
458
|
+
'driver' : IDL.Principal,
|
|
459
|
+
});
|
|
460
|
+
const PutFleetDriverAck = IDL.Record({ 'drivers' : IDL.Nat });
|
|
461
|
+
const Result_12 = IDL.Variant({ 'ok' : PutFleetDriverAck, 'err' : Error });
|
|
427
462
|
const DriverCanisterQuote = IDL.Record({
|
|
428
463
|
'accountId' : IDL.Vec(IDL.Nat8),
|
|
429
464
|
'minimumE8s' : IDL.Nat,
|
|
@@ -474,21 +509,21 @@ export const idlFactory = ({ IDL }) => {
|
|
|
474
509
|
const TigiCore = IDL.Service({
|
|
475
510
|
'abortDriverRollout' : IDL.Func([], [Result_3], []),
|
|
476
511
|
'addAdmin' : IDL.Func([PrincipalArgs], [Result_2], []),
|
|
477
|
-
'addChatShares' : IDL.Func([ChatSharesArgs], [
|
|
512
|
+
'addChatShares' : IDL.Func([ChatSharesArgs], [Result_39], []),
|
|
478
513
|
'addPoolCanister' : IDL.Func([CanisterArgs], [Result_8], []),
|
|
479
514
|
'blockDriver' : IDL.Func([BlockDriverArgs], [Result_2], []),
|
|
480
515
|
'blockRider' : IDL.Func([BlockRiderArgs], [Result_2], []),
|
|
481
516
|
'claimDriverCanister' : IDL.Func([ClaimArgs], [Result_8], []),
|
|
482
517
|
'clearLogs' : IDL.Func([], [], []),
|
|
483
|
-
'commitDriverApk' : IDL.Func([ApkCommitArgs], [
|
|
484
|
-
'commitDriverWasm' : IDL.Func([WasmCommitArgs], [
|
|
518
|
+
'commitDriverApk' : IDL.Func([ApkCommitArgs], [Result_38], []),
|
|
519
|
+
'commitDriverWasm' : IDL.Func([WasmCommitArgs], [Result_37], []),
|
|
485
520
|
'createLocalPoolCanister' : IDL.Func([], [Result_8], []),
|
|
486
521
|
'createMyDriverCanister' : IDL.Func([], [Result_8], []),
|
|
487
|
-
'ensureSimulator' : IDL.Func([], [
|
|
522
|
+
'ensureSimulator' : IDL.Func([], [Result_36], []),
|
|
488
523
|
'extendDemoLease' : IDL.Func([], [Result_8], []),
|
|
489
|
-
'getAdmins' : IDL.Func([], [
|
|
524
|
+
'getAdmins' : IDL.Func([], [Result_35], ['query']),
|
|
490
525
|
'getChatConfig' : IDL.Func([], [IDL.Opt(ChatConfig)], ['query']),
|
|
491
|
-
'getChatRoomsStatus' : IDL.Func([], [
|
|
526
|
+
'getChatRoomsStatus' : IDL.Func([], [Result_34], ['query']),
|
|
492
527
|
'getDriverApk' : IDL.Func([], [IDL.Opt(ApkInfo)], ['query']),
|
|
493
528
|
'getDriverApkChunk' : IDL.Func(
|
|
494
529
|
[IDL.Nat32],
|
|
@@ -500,37 +535,38 @@ export const idlFactory = ({ IDL }) => {
|
|
|
500
535
|
[DriverCanisterStatus],
|
|
501
536
|
['query'],
|
|
502
537
|
),
|
|
503
|
-
'getDriverFeeAccount' : IDL.Func([CanisterArgs], [
|
|
504
|
-
'getDriverFeeBill' : IDL.Func([], [
|
|
505
|
-
'getDriverRating' : IDL.Func([DriverRatingArgs], [
|
|
506
|
-
'getDriverRollout' : IDL.Func([], [
|
|
507
|
-
'getFactoryStatus' : IDL.Func([], [
|
|
508
|
-
'getFeeStatus' : IDL.Func([], [
|
|
538
|
+
'getDriverFeeAccount' : IDL.Func([CanisterArgs], [Result_33], ['query']),
|
|
539
|
+
'getDriverFeeBill' : IDL.Func([], [Result_32], []),
|
|
540
|
+
'getDriverRating' : IDL.Func([DriverRatingArgs], [Result_27], ['query']),
|
|
541
|
+
'getDriverRollout' : IDL.Func([], [Result_31], ['query']),
|
|
542
|
+
'getFactoryStatus' : IDL.Func([], [Result_30], ['query']),
|
|
543
|
+
'getFeeStatus' : IDL.Func([], [Result_29], ['query']),
|
|
509
544
|
'getLogs' : IDL.Func([], [IDL.Text], ['query']),
|
|
510
545
|
'getMapPlacesConfig' : IDL.Func([], [IDL.Opt(MapPlacesConfig)], ['query']),
|
|
511
546
|
'getMapRoutesConfig' : IDL.Func([], [IDL.Opt(MapRoutesConfig)], ['query']),
|
|
512
|
-
'getMyDriverCanister' : IDL.Func([], [
|
|
547
|
+
'getMyDriverCanister' : IDL.Func([], [Result_28], ['query']),
|
|
513
548
|
'getMyProfile' : IDL.Func([], [Result_4], ['query']),
|
|
514
|
-
'getMyRating' : IDL.Func([], [
|
|
515
|
-
'getMyRide' : IDL.Func([RequestIdArgs], [
|
|
516
|
-
'getMyRides' : IDL.Func([RidesPageArgs], [
|
|
517
|
-
'getProfiles' : IDL.Func([ProfilesArgs], [
|
|
549
|
+
'getMyRating' : IDL.Func([], [Result_27], ['query']),
|
|
550
|
+
'getMyRide' : IDL.Func([RequestIdArgs], [Result_26], ['query']),
|
|
551
|
+
'getMyRides' : IDL.Func([RidesPageArgs], [Result_25], ['query']),
|
|
552
|
+
'getProfiles' : IDL.Func([ProfilesArgs], [Result_24], ['query']),
|
|
518
553
|
'getReleasedDriverWasms' : IDL.Func([], [IDL.Vec(ReleasedWasm)], ['query']),
|
|
519
554
|
'getSimulator' : IDL.Func([], [IDL.Opt(IDL.Principal)], ['query']),
|
|
520
|
-
'getWiring' : IDL.Func([], [
|
|
521
|
-
'getWorkerOutbox' : IDL.Func([], [
|
|
555
|
+
'getWiring' : IDL.Func([], [Result_23], ['query']),
|
|
556
|
+
'getWorkerOutbox' : IDL.Func([], [Result_22], ['query']),
|
|
522
557
|
'helloFromWorker' : IDL.Func([], [Result_2], []),
|
|
523
|
-
'ingestRideBatch' : IDL.Func([RideBatch], [
|
|
558
|
+
'ingestRideBatch' : IDL.Func([RideBatch], [Result_21], []),
|
|
524
559
|
'isUser' : IDL.Func([IDL.Principal], [IDL.Bool], ['query']),
|
|
525
|
-
'leaseDemoDriverCanister' : IDL.Func([], [
|
|
526
|
-
'listBlocks' : IDL.Func([PageArgs], [
|
|
527
|
-
'listDriverCanisters' : IDL.Func([PageArgs], [
|
|
528
|
-
'listDriverFeeAccounts' : IDL.Func([PageArgs], [
|
|
529
|
-
'listDriverRooms' : IDL.Func([PageArgs], [
|
|
530
|
-
'mapTicket' : IDL.Func([MapTicketArgs], [
|
|
531
|
-
'newClaimCode' : IDL.Func([], [
|
|
532
|
-
'payDriverFee' : IDL.Func([FeePayArgs], [
|
|
533
|
-
'placesTicket' : IDL.Func([MapTicketArgs], [
|
|
560
|
+
'leaseDemoDriverCanister' : IDL.Func([], [Result_20], []),
|
|
561
|
+
'listBlocks' : IDL.Func([PageArgs], [Result_19], ['query']),
|
|
562
|
+
'listDriverCanisters' : IDL.Func([PageArgs], [Result_18], ['query']),
|
|
563
|
+
'listDriverFeeAccounts' : IDL.Func([PageArgs], [Result_17], ['query']),
|
|
564
|
+
'listDriverRooms' : IDL.Func([PageArgs], [Result_16], ['query']),
|
|
565
|
+
'mapTicket' : IDL.Func([MapTicketArgs], [Result_13], []),
|
|
566
|
+
'newClaimCode' : IDL.Func([], [Result_15], []),
|
|
567
|
+
'payDriverFee' : IDL.Func([FeePayArgs], [Result_14], []),
|
|
568
|
+
'placesTicket' : IDL.Func([MapTicketArgs], [Result_13], []),
|
|
569
|
+
'putFleetDriver' : IDL.Func([PutFleetDriverArgs], [Result_12], []),
|
|
534
570
|
'quoteMyDriverCanister' : IDL.Func([], [Result_11], []),
|
|
535
571
|
'rateMyRide' : IDL.Func([RateRideArgs], [Result_10], []),
|
|
536
572
|
'removeAdmin' : IDL.Func([PrincipalArgs], [Result_2], []),
|