@axivoy/api 1.47.0 → 1.55.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.
@@ -4678,7 +4678,7 @@ export interface paths {
4678
4678
  put?: never;
4679
4679
  /**
4680
4680
  * Driver live status
4681
- * @description For each driver: is the truck moving or stopped (from GPS) and what the driver's log says (Driving, On duty, Off duty, Sleeper, Yard move, Personal conveyance, ELD app offline), with drive, shift and week hours left, an active violation flag and any disagreement between truck and log. No coordinates.
4681
+ * @description For each driver: is the truck moving or stopped (from GPS) and what the driver's log says (Driving, On duty, Off duty, Sleeper, Yard move, Personal conveyance, ELD app offline), with drive, shift and week hours left, the clock left now and when he is ready again while resting, an active violation flag and any disagreement between truck and log. For a driver on a load with a Live ETA: road time, clock left at arrival and the margin against the next stop's appointment, and, where the tenant has split sleeper suggestions on and he is at risk of being late, whether a split sleeper would get him there on time (a suggestion; the driver decides when he rests). No coordinates.
4682
4682
  *
4683
4683
  * Kind: `read`. Errors use the envelope `{error: {code, reason, message, fields}}`.
4684
4684
  */
@@ -17812,7 +17812,7 @@ export interface paths {
17812
17812
  put?: never;
17813
17813
  /**
17814
17814
  * Turn on calls for a phone number
17815
- * @description Sends calls for one of the company's phone numbers to Axivoy. A number at another provider is marked as needing manual setup.
17815
+ * @description Sends calls for one of the company's phone numbers to Axivoy. A number at another provider is marked as needing manual setup. A number whose calls go somewhere else today needs replace_elsewhere.
17816
17816
  *
17817
17817
  * Kind: `mutate`. Errors use the envelope `{error: {code, reason, message, fields}}`.
17818
17818
  */
@@ -17834,7 +17834,7 @@ export interface paths {
17834
17834
  put?: never;
17835
17835
  /**
17836
17836
  * Phone numbers
17837
- * @description The company's phone numbers for calls, with where each came from (texting number, rented, transferred in, added manually), its status and whether it is the main number callers see.
17837
+ * @description The company's phone numbers, with where each came from (texting number, rented, transferred in, added manually), its status, what happens to calls and texts to it, and whether it is the main number callers see.
17838
17838
  *
17839
17839
  * Kind: `read`. Errors use the envelope `{error: {code, reason, message, fields}}`.
17840
17840
  */
@@ -17878,7 +17878,7 @@ export interface paths {
17878
17878
  put?: never;
17879
17879
  /**
17880
17880
  * Set the main phone number
17881
- * @description Makes an active phone number the main number, the one people see when the company calls them from Axivoy.
17881
+ * @description Makes an active phone number the main number, the one people see when the company calls them from Axivoy. When its texts are on, new texts go from it too.
17882
17882
  *
17883
17883
  * Kind: `mutate`. Errors use the envelope `{error: {code, reason, message, fields}}`.
17884
17884
  */
@@ -17889,6 +17889,50 @@ export interface paths {
17889
17889
  patch?: never;
17890
17890
  trace?: never;
17891
17891
  };
17892
+ "/ops/voice.numbers.texting.disable": {
17893
+ parameters: {
17894
+ query?: never;
17895
+ header?: never;
17896
+ path?: never;
17897
+ cookie?: never;
17898
+ };
17899
+ get?: never;
17900
+ put?: never;
17901
+ /**
17902
+ * Turn off texting for a phone number
17903
+ * @description Stops texts going out from one of the company's phone numbers. Texts to it still reach the Inbox, and replies go from the main texting number. Refused for the main texting number; make another texting number main first.
17904
+ *
17905
+ * Kind: `mutate`. Errors use the envelope `{error: {code, reason, message, fields}}`.
17906
+ */
17907
+ post: operations["ops.voice.numbers.texting.disable"];
17908
+ delete?: never;
17909
+ options?: never;
17910
+ head?: never;
17911
+ patch?: never;
17912
+ trace?: never;
17913
+ };
17914
+ "/ops/voice.numbers.texting.enable": {
17915
+ parameters: {
17916
+ query?: never;
17917
+ header?: never;
17918
+ path?: never;
17919
+ cookie?: never;
17920
+ };
17921
+ get?: never;
17922
+ put?: never;
17923
+ /**
17924
+ * Turn on texting for a phone number
17925
+ * @description Lets one of the company's phone numbers send and receive texts under the company's approved texting registration. Refused while the registration is not active, when the number is in another calling account, or when the registration is at its number limit.
17926
+ *
17927
+ * Kind: `mutate`. Errors use the envelope `{error: {code, reason, message, fields}}`.
17928
+ */
17929
+ post: operations["ops.voice.numbers.texting.enable"];
17930
+ delete?: never;
17931
+ options?: never;
17932
+ head?: never;
17933
+ patch?: never;
17934
+ trace?: never;
17935
+ };
17892
17936
  "/ops/voice.port_in.cancel": {
17893
17937
  parameters: {
17894
17938
  query?: never;
@@ -53120,6 +53164,163 @@ export interface operations {
53120
53164
  * @description When the hours were last read from the ELD.
53121
53165
  */
53122
53166
  as_of?: string | null;
53167
+ /** @description Clock left now: the smallest of drive, shift and week left, carried from as_of to now. */
53168
+ drive_available_seconds?: number | null;
53169
+ /** @description drive, shift or week: the clock that ends first. */
53170
+ drive_limited_by?: string | null;
53171
+ /** @description The limiting clock is burning now, so drive_available_seconds falls one second per second. */
53172
+ clock_running?: boolean | null;
53173
+ /** @description violation, resting or break_due: the one alert the screens show. */
53174
+ hos_alert?: string | null;
53175
+ /**
53176
+ * Format: date-time
53177
+ * @description While he rests and needs a milestone: when his hours cover the road to the stop (or let him drive at all without a load).
53178
+ */
53179
+ ready_at?: string | null;
53180
+ /** @description break, reset, after_midnight or restart. */
53181
+ ready_reason?: string | null;
53182
+ /** @description Set while he is in a rest stretch or taking a needed break. */
53183
+ rest?: {
53184
+ /**
53185
+ * Format: date-time
53186
+ * @description When this rest began.
53187
+ */
53188
+ started_at?: string | null;
53189
+ /** @description Log statuses in this rest, in order. */
53190
+ statuses: unknown[];
53191
+ /**
53192
+ * Format: date-time
53193
+ * @description When the 30-minute break completes.
53194
+ */
53195
+ break_done_at?: string | null;
53196
+ /**
53197
+ * Format: date-time
53198
+ * @description Property only: when this rest would complete a split sleeper pair.
53199
+ */
53200
+ split_at?: string | null;
53201
+ /**
53202
+ * Format: date-time
53203
+ * @description When a full reset completes.
53204
+ */
53205
+ reset_at?: string | null;
53206
+ /**
53207
+ * Format: date-time
53208
+ * @description Property rulesets that name it: when a 34-hour restart completes.
53209
+ */
53210
+ restart_at?: string | null;
53211
+ /** @description Week hours that come back at the next midnight in the home terminal zone. */
53212
+ hours_back_after_midnight_seconds?: number | null;
53213
+ } | null;
53214
+ /** @description Qualifying rest stretches since the last full reset; null when no split is in use or the ledger is behind the clocks. */
53215
+ split_sleeper?: {
53216
+ /** @description sleeper or off_duty. */
53217
+ status: string;
53218
+ /**
53219
+ * Format: date-time
53220
+ * @description When the stretch began.
53221
+ */
53222
+ started_at: string;
53223
+ /**
53224
+ * Format: date-time
53225
+ * @description When it ended; null while open.
53226
+ */
53227
+ ended_at?: string | null;
53228
+ /** @description Length in minutes. */
53229
+ minutes: number;
53230
+ }[] | null;
53231
+ /** @description Set for a driver on an in-progress load with a Live ETA. */
53232
+ arrival?: {
53233
+ /** @description The in-progress load. */
53234
+ load_id?: number | null;
53235
+ /** @description The next stop. */
53236
+ stop_id?: number | null;
53237
+ /** @description live, stopped, on_site, off_route or stale. */
53238
+ eta_state: string;
53239
+ /**
53240
+ * Format: date-time
53241
+ * @description Projected arrival.
53242
+ */
53243
+ eta_at?: string | null;
53244
+ /** @description Road time to the stop. */
53245
+ road_seconds?: number | null;
53246
+ /**
53247
+ * Format: date-time
53248
+ * @description The arrival the margin is judged from. When drive, shift and week left at departure each cover road_seconds: the Live ETA while live, else departure (now, or ready_at while he rests) plus road time. Otherwise the earliest legal arrival with every reset, 34-hour restart and 30-minute break the road needs (an estimate, never his hours). Null without road time, while Stale or Off route, on site, or with no plan (unknown ruleset, or the week runs out with no restart).
53249
+ */
53250
+ projected_at?: string | null;
53251
+ /** @description The rests in projected_at, set only when it plans a reset or restart. Conservative: no split sleeper, no hours back after midnight, no exemptions. */
53252
+ rests_on_the_way?: {
53253
+ /** @description Full resets (10-hour property, 8-hour passenger) planned before the stop. */
53254
+ resets: number;
53255
+ /** @description 30-minute breaks planned before the stop. */
53256
+ breaks: number;
53257
+ /** @description A 34-hour restart is planned before the stop. */
53258
+ restart: boolean;
53259
+ /** @description The smallest of drive, shift and week left at arrival after those rests. */
53260
+ clock_left_after_rests_seconds: number;
53261
+ } | null;
53262
+ /** @description Hours left at arrival without a reset; negative when he runs out first. */
53263
+ clock_left_seconds?: number | null;
53264
+ /** @description Stopped while his limiting clock still runs and he is not resting toward a ready time (clock_left_seconds then counts from after that rest and holds still). */
53265
+ clock_dropping: boolean;
53266
+ /** @description appointment, window or none. */
53267
+ appointment_kind: string;
53268
+ /**
53269
+ * Format: date-time
53270
+ * @description The instant the on-time rule judges against.
53271
+ */
53272
+ expected_at?: string | null;
53273
+ /** @description projected_at minus expected_at in minutes; negative is early. */
53274
+ minutes_vs_appointment?: number | null;
53275
+ /** @description early, on_time or late, judged from projected_at; null without an appointment or a projected_at. */
53276
+ on_time?: string | null;
53277
+ /** @description Split sleeper suggestion, set only when the tenant setting is on and he is at risk of being late. A suggestion to talk through with the driver; he decides when he rests. */
53278
+ split_plan?: {
53279
+ /** @description The plan to the stop, in order; empty when there is no plan. */
53280
+ steps: {
53281
+ /** @description drive or rest. */
53282
+ kind: string;
53283
+ /** @description For a rest: sleeper or off_duty. */
53284
+ status?: string | null;
53285
+ /**
53286
+ * Format: date-time
53287
+ * @description When the step starts.
53288
+ */
53289
+ starts_at: string;
53290
+ /** @description Length in minutes. */
53291
+ minutes: number;
53292
+ }[];
53293
+ /**
53294
+ * Format: date-time
53295
+ * @description Arrival with the plan.
53296
+ */
53297
+ arrives_at?: string | null;
53298
+ /** @description Plan arrival minus expected_at in minutes; negative is early. */
53299
+ minutes_vs_appointment?: number | null;
53300
+ /** @description Hours left at arrival with the plan. */
53301
+ clock_left_seconds?: number | null;
53302
+ /** @description The other half of the pair, taken after unloading. */
53303
+ rest_after_stop_minutes?: number | null;
53304
+ /**
53305
+ * Format: date-time
53306
+ * @description Arrival without a split: projected_at, with every rest the road needs.
53307
+ */
53308
+ full_reset_arrives_at?: string | null;
53309
+ /** @description no_plan (no split arrives on time) or hours_not_confirmed (Axivoy's replay of his hours does not match the ELD's, or has not checked the latest snapshot). */
53310
+ not_suggested_reason?: string | null;
53311
+ /** @description With hours_not_confirmed: drive, shift or week, the figure that differed most. */
53312
+ unconfirmed_figure?: string | null;
53313
+ /** @description Axivoy minus the ELD for that figure. */
53314
+ unconfirmed_difference_seconds?: number | null;
53315
+ } | null;
53316
+ /**
53317
+ * Format: date-time
53318
+ * @description On site: when he arrived at the stop. Null otherwise, or before the stop records an arrival.
53319
+ */
53320
+ arrived_at?: string | null;
53321
+ /** @description On site: arrived_at minus expected_at in minutes, judged by the on-time rule with the tenant grace; negative is early. Null without an appointment or arrived_at. */
53322
+ arrived_minutes_vs_appointment?: number | null;
53323
+ } | null;
53123
53324
  /** @description True on a tombstone (the row was deleted or recycled); other fields are absent. */
53124
53325
  deleted?: boolean | null;
53125
53326
  }[];
@@ -151805,6 +152006,8 @@ export interface operations {
151805
152006
  "application/json": {
151806
152007
  /** @description The phone number (from voice.numbers.list) */
151807
152008
  number_id: number;
152009
+ /** @description True replaces call handling set up outside Axivoy (the number's calls go to another host today); default false */
152010
+ replace_elsewhere?: boolean | null;
151808
152011
  };
151809
152012
  };
151810
152013
  };
@@ -151943,11 +152146,17 @@ export interface operations {
151943
152146
  * "items": [
151944
152147
  * {
151945
152148
  * "id": 1,
151946
- * "number": "+13125551505",
152149
+ * "number": "+13125558041",
151947
152150
  * "source": "sms_registration",
151948
152151
  * "status": "calls_off",
151949
152152
  * "status_label": "Calls not turned on",
151950
152153
  * "is_main": false,
152154
+ * "calls": "off",
152155
+ * "calls_elsewhere_host": null,
152156
+ * "texts": "needs_registration",
152157
+ * "texting_error": null,
152158
+ * "is_main_texting_number": false,
152159
+ * "texting_registration": "none",
151951
152160
  * "deleted": null
151952
152161
  * }
151953
152162
  * ],
@@ -151971,6 +152180,18 @@ export interface operations {
151971
152180
  status_label: string;
151972
152181
  /** @description Whether calls from Axivoy show this number */
151973
152182
  is_main: boolean;
152183
+ /** @description What Axivoy does with calls to it: on, off, needs_setup or elsewhere */
152184
+ calls: string;
152185
+ /** @description Where its calls go today when calls is elsewhere (host only) */
152186
+ calls_elsewhere_host?: string | null;
152187
+ /** @description What Axivoy does with texts: on, failed, needs_registration, receive_only (texts reach the Inbox, replies go from the main number) or not_connected */
152188
+ texts: string;
152189
+ /** @description Why turning on texting failed, when texts is failed */
152190
+ texting_error?: string | null;
152191
+ /** @description Whether new texts go from this number */
152192
+ is_main_texting_number: boolean;
152193
+ /** @description The company's texting registration: none, in_progress or active (the same on every number) */
152194
+ texting_registration: string;
151974
152195
  /** @description True on a tombstone (the row was deleted or recycled); other fields are absent. */
151975
152196
  deleted?: boolean | null;
151976
152197
  }[];
@@ -152191,7 +152412,7 @@ export interface operations {
152191
152412
  content: {
152192
152413
  /**
152193
152414
  * @example {
152194
- * "number_id": 1
152415
+ * "number_id": 2
152195
152416
  * }
152196
152417
  */
152197
152418
  "application/json": {
@@ -152210,9 +152431,10 @@ export interface operations {
152210
152431
  /**
152211
152432
  * @example {
152212
152433
  * "result": {
152213
- * "number_id": 1,
152434
+ * "number_id": 2,
152214
152435
  * "is_main": true,
152215
- * "message": "(312) 555-1505 is now the main number."
152436
+ * "texts_from_this_number": true,
152437
+ * "message": "(312) 555-0141 is now the main number. New texts go from this number."
152216
152438
  * }
152217
152439
  * }
152218
152440
  */
@@ -152222,6 +152444,246 @@ export interface operations {
152222
152444
  number_id: number;
152223
152445
  /** @description Always true on success */
152224
152446
  is_main: boolean;
152447
+ /** @description Whether new texts now go from this number (true only when its texts are on) */
152448
+ texts_from_this_number: boolean;
152449
+ /** @description What happened, in the operator's words */
152450
+ message: string;
152451
+ };
152452
+ };
152453
+ };
152454
+ };
152455
+ 202: components["responses"]["Proposal"];
152456
+ /** @description Refused: credits_exhausted. */
152457
+ 402: {
152458
+ headers: {
152459
+ [name: string]: unknown;
152460
+ };
152461
+ content: {
152462
+ "application/json": components["schemas"]["OperationError"];
152463
+ };
152464
+ };
152465
+ /** @description Refused: not_permitted, not_available, authority_off, data_class_blocked. */
152466
+ 403: {
152467
+ headers: {
152468
+ [name: string]: unknown;
152469
+ };
152470
+ content: {
152471
+ "application/json": components["schemas"]["OperationError"];
152472
+ };
152473
+ };
152474
+ /** @description Refused: not_found. */
152475
+ 404: {
152476
+ headers: {
152477
+ [name: string]: unknown;
152478
+ };
152479
+ content: {
152480
+ "application/json": components["schemas"]["OperationError"];
152481
+ };
152482
+ };
152483
+ /** @description Refused: idempotency_conflict, stale_state. */
152484
+ 409: {
152485
+ headers: {
152486
+ [name: string]: unknown;
152487
+ };
152488
+ content: {
152489
+ "application/json": components["schemas"]["OperationError"];
152490
+ };
152491
+ };
152492
+ /** @description Refused: operation_retired. */
152493
+ 410: {
152494
+ headers: {
152495
+ [name: string]: unknown;
152496
+ };
152497
+ content: {
152498
+ "application/json": components["schemas"]["OperationError"];
152499
+ };
152500
+ };
152501
+ /** @description Refused: invalid_input, domain_rule. */
152502
+ 422: {
152503
+ headers: {
152504
+ [name: string]: unknown;
152505
+ };
152506
+ content: {
152507
+ "application/json": components["schemas"]["OperationError"];
152508
+ };
152509
+ };
152510
+ /** @description Refused: rate_limited. */
152511
+ 429: {
152512
+ headers: {
152513
+ [name: string]: unknown;
152514
+ };
152515
+ content: {
152516
+ "application/json": components["schemas"]["OperationError"];
152517
+ };
152518
+ };
152519
+ };
152520
+ };
152521
+ "ops.voice.numbers.texting.disable": {
152522
+ parameters: {
152523
+ query?: never;
152524
+ header?: {
152525
+ /** @description Replays the first result when the same call is retried. Send one per user intent on writes. */
152526
+ "Idempotency-Key"?: string;
152527
+ /** @description Send `true` to run every check without changing anything. The answer is `{"dry_run": {"outcome": "would_run" | "would_propose", "input": {...}}}`. */
152528
+ "Axivoy-Dry-Run"?: "true" | "false";
152529
+ };
152530
+ path?: never;
152531
+ cookie?: never;
152532
+ };
152533
+ requestBody?: {
152534
+ content: {
152535
+ /**
152536
+ * @example {
152537
+ * "number_id": 2
152538
+ * }
152539
+ */
152540
+ "application/json": {
152541
+ /** @description The phone number (from voice.numbers.list) */
152542
+ number_id: number;
152543
+ };
152544
+ };
152545
+ };
152546
+ responses: {
152547
+ /** @description The operation ran. */
152548
+ 200: {
152549
+ headers: {
152550
+ [name: string]: unknown;
152551
+ };
152552
+ content: {
152553
+ /**
152554
+ * @example {
152555
+ * "result": {
152556
+ * "number_id": 2,
152557
+ * "texts": "receive_only",
152558
+ * "message": "Texts from (312) 555-0141 stopped. Texts to it still reach your Inbox; replies go from your main number."
152559
+ * }
152560
+ * }
152561
+ */
152562
+ "application/json": {
152563
+ result: {
152564
+ /** @description The phone number */
152565
+ number_id: number;
152566
+ /** @description The number's texts state after the change: on, failed, needs_registration, receive_only or not_connected */
152567
+ texts: string;
152568
+ /** @description What happened, in the operator's words */
152569
+ message: string;
152570
+ };
152571
+ };
152572
+ };
152573
+ };
152574
+ 202: components["responses"]["Proposal"];
152575
+ /** @description Refused: credits_exhausted. */
152576
+ 402: {
152577
+ headers: {
152578
+ [name: string]: unknown;
152579
+ };
152580
+ content: {
152581
+ "application/json": components["schemas"]["OperationError"];
152582
+ };
152583
+ };
152584
+ /** @description Refused: not_permitted, not_available, authority_off, data_class_blocked. */
152585
+ 403: {
152586
+ headers: {
152587
+ [name: string]: unknown;
152588
+ };
152589
+ content: {
152590
+ "application/json": components["schemas"]["OperationError"];
152591
+ };
152592
+ };
152593
+ /** @description Refused: not_found. */
152594
+ 404: {
152595
+ headers: {
152596
+ [name: string]: unknown;
152597
+ };
152598
+ content: {
152599
+ "application/json": components["schemas"]["OperationError"];
152600
+ };
152601
+ };
152602
+ /** @description Refused: idempotency_conflict, stale_state. */
152603
+ 409: {
152604
+ headers: {
152605
+ [name: string]: unknown;
152606
+ };
152607
+ content: {
152608
+ "application/json": components["schemas"]["OperationError"];
152609
+ };
152610
+ };
152611
+ /** @description Refused: operation_retired. */
152612
+ 410: {
152613
+ headers: {
152614
+ [name: string]: unknown;
152615
+ };
152616
+ content: {
152617
+ "application/json": components["schemas"]["OperationError"];
152618
+ };
152619
+ };
152620
+ /** @description Refused: invalid_input, domain_rule. */
152621
+ 422: {
152622
+ headers: {
152623
+ [name: string]: unknown;
152624
+ };
152625
+ content: {
152626
+ "application/json": components["schemas"]["OperationError"];
152627
+ };
152628
+ };
152629
+ /** @description Refused: rate_limited. */
152630
+ 429: {
152631
+ headers: {
152632
+ [name: string]: unknown;
152633
+ };
152634
+ content: {
152635
+ "application/json": components["schemas"]["OperationError"];
152636
+ };
152637
+ };
152638
+ };
152639
+ };
152640
+ "ops.voice.numbers.texting.enable": {
152641
+ parameters: {
152642
+ query?: never;
152643
+ header?: {
152644
+ /** @description Replays the first result when the same call is retried. Send one per user intent on writes. */
152645
+ "Idempotency-Key"?: string;
152646
+ /** @description Send `true` to run every check without changing anything. The answer is `{"dry_run": {"outcome": "would_run" | "would_propose", "input": {...}}}`. */
152647
+ "Axivoy-Dry-Run"?: "true" | "false";
152648
+ };
152649
+ path?: never;
152650
+ cookie?: never;
152651
+ };
152652
+ requestBody?: {
152653
+ content: {
152654
+ /**
152655
+ * @example {
152656
+ * "number_id": 2
152657
+ * }
152658
+ */
152659
+ "application/json": {
152660
+ /** @description The phone number (from voice.numbers.list) */
152661
+ number_id: number;
152662
+ };
152663
+ };
152664
+ };
152665
+ responses: {
152666
+ /** @description The operation ran. */
152667
+ 200: {
152668
+ headers: {
152669
+ [name: string]: unknown;
152670
+ };
152671
+ content: {
152672
+ /**
152673
+ * @example {
152674
+ * "result": {
152675
+ * "number_id": 2,
152676
+ * "texts": "on",
152677
+ * "message": "Texts on for (312) 555-0141."
152678
+ * }
152679
+ * }
152680
+ */
152681
+ "application/json": {
152682
+ result: {
152683
+ /** @description The phone number */
152684
+ number_id: number;
152685
+ /** @description The number's texts state after the change: on, failed, needs_registration, receive_only or not_connected */
152686
+ texts: string;
152225
152687
  /** @description What happened, in the operator's words */
152226
152688
  message: string;
152227
152689
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axivoy/api",
3
- "version": "1.47.0",
3
+ "version": "1.55.0",
4
4
  "description": "Typed client for the Axivoy API: operations, webhooks and errors.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://app.axivoy.ai/developers",