@axivoy/api 1.49.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.
@@ -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;
@@ -53199,9 +53243,25 @@ export interface operations {
53199
53243
  eta_at?: string | null;
53200
53244
  /** @description Road time to the stop. */
53201
53245
  road_seconds?: number | null;
53202
- /** @description Hours left at arrival; negative when he runs out first. */
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. */
53203
53263
  clock_left_seconds?: number | null;
53204
- /** @description Stopped while his limiting clock still runs. */
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). */
53205
53265
  clock_dropping: boolean;
53206
53266
  /** @description appointment, window or none. */
53207
53267
  appointment_kind: string;
@@ -53210,9 +53270,9 @@ export interface operations {
53210
53270
  * @description The instant the on-time rule judges against.
53211
53271
  */
53212
53272
  expected_at?: string | null;
53213
- /** @description Projected arrival minus expected_at in minutes; negative is early. */
53273
+ /** @description projected_at minus expected_at in minutes; negative is early. */
53214
53274
  minutes_vs_appointment?: number | null;
53215
- /** @description early, on_time or late; null without an appointment or a trustworthy arrival. */
53275
+ /** @description early, on_time or late, judged from projected_at; null without an appointment or a projected_at. */
53216
53276
  on_time?: string | null;
53217
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. */
53218
53278
  split_plan?: {
@@ -53243,7 +53303,7 @@ export interface operations {
53243
53303
  rest_after_stop_minutes?: number | null;
53244
53304
  /**
53245
53305
  * Format: date-time
53246
- * @description Arrival without a split (with a full reset where his clock ends).
53306
+ * @description Arrival without a split: projected_at, with every rest the road needs.
53247
53307
  */
53248
53308
  full_reset_arrives_at?: string | null;
53249
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). */
@@ -53253,6 +53313,13 @@ export interface operations {
53253
53313
  /** @description Axivoy minus the ELD for that figure. */
53254
53314
  unconfirmed_difference_seconds?: number | null;
53255
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;
53256
53323
  } | null;
53257
53324
  /** @description True on a tombstone (the row was deleted or recycled); other fields are absent. */
53258
53325
  deleted?: boolean | null;
@@ -151939,6 +152006,8 @@ export interface operations {
151939
152006
  "application/json": {
151940
152007
  /** @description The phone number (from voice.numbers.list) */
151941
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;
151942
152011
  };
151943
152012
  };
151944
152013
  };
@@ -152077,11 +152146,17 @@ export interface operations {
152077
152146
  * "items": [
152078
152147
  * {
152079
152148
  * "id": 1,
152080
- * "number": "+13125551505",
152149
+ * "number": "+13125558041",
152081
152150
  * "source": "sms_registration",
152082
152151
  * "status": "calls_off",
152083
152152
  * "status_label": "Calls not turned on",
152084
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",
152085
152160
  * "deleted": null
152086
152161
  * }
152087
152162
  * ],
@@ -152105,6 +152180,18 @@ export interface operations {
152105
152180
  status_label: string;
152106
152181
  /** @description Whether calls from Axivoy show this number */
152107
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;
152108
152195
  /** @description True on a tombstone (the row was deleted or recycled); other fields are absent. */
152109
152196
  deleted?: boolean | null;
152110
152197
  }[];
@@ -152325,7 +152412,7 @@ export interface operations {
152325
152412
  content: {
152326
152413
  /**
152327
152414
  * @example {
152328
- * "number_id": 1
152415
+ * "number_id": 2
152329
152416
  * }
152330
152417
  */
152331
152418
  "application/json": {
@@ -152344,9 +152431,10 @@ export interface operations {
152344
152431
  /**
152345
152432
  * @example {
152346
152433
  * "result": {
152347
- * "number_id": 1,
152434
+ * "number_id": 2,
152348
152435
  * "is_main": true,
152349
- * "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."
152350
152438
  * }
152351
152439
  * }
152352
152440
  */
@@ -152356,6 +152444,246 @@ export interface operations {
152356
152444
  number_id: number;
152357
152445
  /** @description Always true on success */
152358
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;
152359
152687
  /** @description What happened, in the operator's words */
152360
152688
  message: string;
152361
152689
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axivoy/api",
3
- "version": "1.49.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",