@isnap/sdk 1.1.0-next.52 → 1.1.0-next.54

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.
@@ -4420,7 +4420,13 @@ export interface paths {
4420
4420
  [name: string]: unknown;
4421
4421
  };
4422
4422
  content: {
4423
- "application/json": components["schemas"]["LineList"];
4423
+ "application/json": {
4424
+ /** @enum {boolean} */
4425
+ success: true;
4426
+ data: components["schemas"]["LineList"];
4427
+ trace_id: string;
4428
+ request_id: string;
4429
+ };
4424
4430
  };
4425
4431
  };
4426
4432
  /** @description Bad request — validation failed */
@@ -4469,7 +4475,7 @@ export interface paths {
4469
4475
  };
4470
4476
  /**
4471
4477
  * List the caller's own lines
4472
- * @description Return every line owned by the authenticated user that's in `active` or `reserved` status. Includes a `fulfillment_status` hint for lines whose hardware is still being procured.
4478
+ * @description Return every line owned by the authenticated user that's in `active` or `reserved` status. Includes a `fulfillment_status` hint for lines whose hardware is still being procured. Accepts an API key (`isnap_*`) or a dashboard JWT.
4473
4479
  */
4474
4480
  get: {
4475
4481
  parameters: {
@@ -4486,7 +4492,13 @@ export interface paths {
4486
4492
  [name: string]: unknown;
4487
4493
  };
4488
4494
  content: {
4489
- "application/json": components["schemas"]["MyLines"];
4495
+ "application/json": {
4496
+ /** @enum {boolean} */
4497
+ success: true;
4498
+ data: components["schemas"]["MyLines"];
4499
+ trace_id: string;
4500
+ request_id: string;
4501
+ };
4490
4502
  };
4491
4503
  };
4492
4504
  /** @description Bad request — validation failed */
@@ -4563,7 +4575,13 @@ export interface paths {
4563
4575
  [name: string]: unknown;
4564
4576
  };
4565
4577
  content: {
4566
- "application/json": components["schemas"]["Line"];
4578
+ "application/json": {
4579
+ /** @enum {boolean} */
4580
+ success: true;
4581
+ data: components["schemas"]["Line"];
4582
+ trace_id: string;
4583
+ request_id: string;
4584
+ };
4567
4585
  };
4568
4586
  };
4569
4587
  /** @description Bad request — validation failed */
@@ -4634,7 +4652,13 @@ export interface paths {
4634
4652
  [name: string]: unknown;
4635
4653
  };
4636
4654
  content: {
4637
- "application/json": components["schemas"]["Line"];
4655
+ "application/json": {
4656
+ /** @enum {boolean} */
4657
+ success: true;
4658
+ data: components["schemas"]["Line"];
4659
+ trace_id: string;
4660
+ request_id: string;
4661
+ };
4638
4662
  };
4639
4663
  };
4640
4664
  /** @description Bad request — validation failed */
@@ -4727,7 +4751,13 @@ export interface paths {
4727
4751
  [name: string]: unknown;
4728
4752
  };
4729
4753
  content: {
4730
- "application/json": components["schemas"]["Line"];
4754
+ "application/json": {
4755
+ /** @enum {boolean} */
4756
+ success: true;
4757
+ data: components["schemas"]["Line"];
4758
+ trace_id: string;
4759
+ request_id: string;
4760
+ };
4731
4761
  };
4732
4762
  };
4733
4763
  /** @description Bad request — validation failed */
@@ -4831,7 +4861,13 @@ export interface paths {
4831
4861
  [name: string]: unknown;
4832
4862
  };
4833
4863
  content: {
4834
- "application/json": components["schemas"]["Line"];
4864
+ "application/json": {
4865
+ /** @enum {boolean} */
4866
+ success: true;
4867
+ data: components["schemas"]["Line"];
4868
+ trace_id: string;
4869
+ request_id: string;
4870
+ };
4835
4871
  };
4836
4872
  };
4837
4873
  /** @description Bad request — validation failed */
@@ -4939,7 +4975,13 @@ export interface paths {
4939
4975
  [name: string]: unknown;
4940
4976
  };
4941
4977
  content: {
4942
- "application/json": components["schemas"]["Line"];
4978
+ "application/json": {
4979
+ /** @enum {boolean} */
4980
+ success: true;
4981
+ data: components["schemas"]["Line"];
4982
+ trace_id: string;
4983
+ request_id: string;
4984
+ };
4943
4985
  };
4944
4986
  };
4945
4987
  /** @description Bad request — validation failed */
@@ -5047,7 +5089,13 @@ export interface paths {
5047
5089
  [name: string]: unknown;
5048
5090
  };
5049
5091
  content: {
5050
- "application/json": components["schemas"]["Line"];
5092
+ "application/json": {
5093
+ /** @enum {boolean} */
5094
+ success: true;
5095
+ data: components["schemas"]["Line"];
5096
+ trace_id: string;
5097
+ request_id: string;
5098
+ };
5051
5099
  };
5052
5100
  };
5053
5101
  /** @description Bad request — validation failed */
@@ -5151,7 +5199,13 @@ export interface paths {
5151
5199
  [name: string]: unknown;
5152
5200
  };
5153
5201
  content: {
5154
- "application/json": components["schemas"]["Line"];
5202
+ "application/json": {
5203
+ /** @enum {boolean} */
5204
+ success: true;
5205
+ data: components["schemas"]["Line"];
5206
+ trace_id: string;
5207
+ request_id: string;
5208
+ };
5155
5209
  };
5156
5210
  };
5157
5211
  /** @description Bad request — validation failed */
@@ -5419,7 +5473,7 @@ export interface paths {
5419
5473
  };
5420
5474
  /**
5421
5475
  * Get a BYOD line's health snapshot
5422
- * @description BYOD-only health rollup: device-session state (`active` / `degraded` / `offline`), last heartbeat timestamp, daily quota headroom, Apple-ID-flagged flag, last-error string, bridge version. Rental tiers receive 403 `rental_health_not_exposed` — they don't own the hardware and surfacing transient state creates support-ticket noise.
5476
+ * @description BYOD-only health rollup. `state` (`active` / `degraded` / `offline`) is derived from the device's fundamental capabilities — min(send_text, imessage) — with offline (no heartbeat) taking precedence. Also returns `runtime_capabilities` (the per-key tri-valued descriptor the device last reported), last heartbeat timestamp, daily quota headroom, Apple-ID-flagged flag, last-error string, bridge version. Rental tiers receive 403 `rental_health_not_exposed` — they don't own the hardware and surfacing transient state creates support-ticket noise.
5423
5477
  */
5424
5478
  get: {
5425
5479
  parameters: {
@@ -5785,7 +5839,13 @@ export interface paths {
5785
5839
  [name: string]: unknown;
5786
5840
  };
5787
5841
  content: {
5788
- "application/json": components["schemas"]["PreOrder"];
5842
+ "application/json": {
5843
+ /** @enum {boolean} */
5844
+ success: true;
5845
+ data: components["schemas"]["PreOrder"];
5846
+ trace_id: string;
5847
+ request_id: string;
5848
+ };
5789
5849
  };
5790
5850
  };
5791
5851
  /** @description Bad request — validation failed */
@@ -5862,7 +5922,13 @@ export interface paths {
5862
5922
  [name: string]: unknown;
5863
5923
  };
5864
5924
  content: {
5865
- "application/json": components["schemas"]["PreOrder"];
5925
+ "application/json": {
5926
+ /** @enum {boolean} */
5927
+ success: true;
5928
+ data: components["schemas"]["PreOrder"];
5929
+ trace_id: string;
5930
+ request_id: string;
5931
+ };
5866
5932
  };
5867
5933
  };
5868
5934
  /** @description Bad request — validation failed */
@@ -5946,7 +6012,13 @@ export interface paths {
5946
6012
  [name: string]: unknown;
5947
6013
  };
5948
6014
  content: {
5949
- "application/json": components["schemas"]["PreOrder"];
6015
+ "application/json": {
6016
+ /** @enum {boolean} */
6017
+ success: true;
6018
+ data: components["schemas"]["PreOrder"];
6019
+ trace_id: string;
6020
+ request_id: string;
6021
+ };
5950
6022
  };
5951
6023
  };
5952
6024
  /** @description Bad request — validation failed */
@@ -6034,7 +6106,13 @@ export interface paths {
6034
6106
  [name: string]: unknown;
6035
6107
  };
6036
6108
  content: {
6037
- "application/json": components["schemas"]["PreOrder"];
6109
+ "application/json": {
6110
+ /** @enum {boolean} */
6111
+ success: true;
6112
+ data: components["schemas"]["PreOrder"];
6113
+ trace_id: string;
6114
+ request_id: string;
6115
+ };
6038
6116
  };
6039
6117
  };
6040
6118
  /** @description Bad request — validation failed */
@@ -7411,7 +7489,7 @@ export interface paths {
7411
7489
  };
7412
7490
  /**
7413
7491
  * List webhook subscriptions
7414
- * @description Return every webhook subscription owned by the authenticated user. Each entry surfaces the URL, the subscribed event list, the line allowlist, the active flag, the failure counter, and the last success / failure timestamps.
7492
+ * @description Return every webhook subscription owned by the authenticated user. Each entry surfaces the URL, the subscribed event list, the line allowlist, the active flag, the failure counter, and the last success / failure timestamps. Accepts an API key (`isnap_*`) or a dashboard JWT.
7415
7493
  */
7416
7494
  get: {
7417
7495
  parameters: {
@@ -7428,7 +7506,13 @@ export interface paths {
7428
7506
  [name: string]: unknown;
7429
7507
  };
7430
7508
  content: {
7431
- "application/json": components["schemas"]["WebhookList"];
7509
+ "application/json": {
7510
+ /** @enum {boolean} */
7511
+ success: true;
7512
+ data: components["schemas"]["WebhookList"];
7513
+ trace_id: string;
7514
+ request_id: string;
7515
+ };
7432
7516
  };
7433
7517
  };
7434
7518
  /** @description Bad request — validation failed */
@@ -7472,7 +7556,7 @@ export interface paths {
7472
7556
  put?: never;
7473
7557
  /**
7474
7558
  * Register a webhook subscription
7475
- * @description Subscribe a URL to a list of event types and (optionally) a line allowlist. The server signs deliveries with an HMAC-SHA256 secret returned once here. Retries follow exponential backoff; 10 consecutive failures auto-disable the subscription.
7559
+ * @description Subscribe a URL to a list of event types and (optionally) a line allowlist. The server signs deliveries with an HMAC-SHA256 secret returned once here. Retries follow exponential backoff; 10 consecutive failures auto-disable the subscription. Accepts an API key (`isnap_*`) or a dashboard JWT.
7476
7560
  */
7477
7561
  post: {
7478
7562
  parameters: {
@@ -7498,7 +7582,13 @@ export interface paths {
7498
7582
  [name: string]: unknown;
7499
7583
  };
7500
7584
  content: {
7501
- "application/json": components["schemas"]["Webhook"];
7585
+ "application/json": {
7586
+ /** @enum {boolean} */
7587
+ success: true;
7588
+ data: components["schemas"]["Webhook"];
7589
+ trace_id: string;
7590
+ request_id: string;
7591
+ };
7502
7592
  };
7503
7593
  };
7504
7594
  /** @description Bad request — validation failed */
@@ -7627,7 +7717,7 @@ export interface paths {
7627
7717
  post?: never;
7628
7718
  /**
7629
7719
  * Delete a webhook subscription
7630
- * @description Permanently delete the webhook subscription. In-flight deliveries already enqueued will still attempt — the deletion only stops new event matching.
7720
+ * @description Permanently delete the webhook subscription. In-flight deliveries already enqueued will still attempt — the deletion only stops new event matching. Accepts an API key (`isnap_*`) or a dashboard JWT.
7631
7721
  */
7632
7722
  delete: {
7633
7723
  parameters: {
@@ -8161,7 +8251,13 @@ export interface paths {
8161
8251
  [name: string]: unknown;
8162
8252
  };
8163
8253
  content: {
8164
- "application/json": components["schemas"]["CreateAttachmentResponse"];
8254
+ "application/json": {
8255
+ /** @enum {boolean} */
8256
+ success: true;
8257
+ data: components["schemas"]["CreateAttachmentResponse"];
8258
+ trace_id: string;
8259
+ request_id: string;
8260
+ };
8165
8261
  };
8166
8262
  };
8167
8263
  /** @description Bad request — validation failed */
@@ -8236,7 +8332,13 @@ export interface paths {
8236
8332
  [name: string]: unknown;
8237
8333
  };
8238
8334
  content: {
8239
- "application/json": components["schemas"]["Attachment"];
8335
+ "application/json": {
8336
+ /** @enum {boolean} */
8337
+ success: true;
8338
+ data: components["schemas"]["Attachment"];
8339
+ trace_id: string;
8340
+ request_id: string;
8341
+ };
8240
8342
  };
8241
8343
  };
8242
8344
  /** @description Bad request — validation failed */
@@ -8373,6 +8475,75 @@ export interface paths {
8373
8475
  patch?: never;
8374
8476
  trace?: never;
8375
8477
  };
8478
+ "/v1/area-codes": {
8479
+ parameters: {
8480
+ query?: never;
8481
+ header?: never;
8482
+ path?: never;
8483
+ cookie?: never;
8484
+ };
8485
+ /**
8486
+ * List selectable area codes (public)
8487
+ * @description Enumerate the area codes a customer can request as `preferred_area_codes` on `POST /v1/pre-orders`, for rendering a pre-order area-code picker. Optional `?country=US` filters the list. Also returns the selectable countries so the same response can drive a country dropdown. Unauthenticated — mirrors `GET /v1/lines` and `GET /pricing`. The list is the *selectable* set (a curated subset of NANP), not a guarantee of immediate inventory: pre-orders are precisely for tiers with no in-stock line.
8488
+ */
8489
+ get: {
8490
+ parameters: {
8491
+ query?: {
8492
+ /** @description ISO 3166-1 alpha-2 country filter (case-insensitive). Omit for all countries. */
8493
+ country?: string;
8494
+ };
8495
+ header?: never;
8496
+ path?: never;
8497
+ cookie?: never;
8498
+ };
8499
+ requestBody?: never;
8500
+ responses: {
8501
+ /** @description Selectable area codes + countries */
8502
+ 200: {
8503
+ headers: {
8504
+ [name: string]: unknown;
8505
+ };
8506
+ content: {
8507
+ "application/json": components["schemas"]["AreaCodesEnvelope"];
8508
+ };
8509
+ };
8510
+ /** @description Bad request — validation failed */
8511
+ 400: {
8512
+ headers: {
8513
+ [name: string]: unknown;
8514
+ };
8515
+ content: {
8516
+ "application/json": components["schemas"]["ErrorEnvelope"];
8517
+ };
8518
+ };
8519
+ /** @description Too many requests — rate limit exceeded */
8520
+ 429: {
8521
+ headers: {
8522
+ [name: string]: unknown;
8523
+ };
8524
+ content: {
8525
+ "application/json": components["schemas"]["ErrorEnvelope"];
8526
+ };
8527
+ };
8528
+ /** @description Internal server error */
8529
+ 500: {
8530
+ headers: {
8531
+ [name: string]: unknown;
8532
+ };
8533
+ content: {
8534
+ "application/json": components["schemas"]["ErrorEnvelope"];
8535
+ };
8536
+ };
8537
+ };
8538
+ };
8539
+ put?: never;
8540
+ post?: never;
8541
+ delete?: never;
8542
+ options?: never;
8543
+ head?: never;
8544
+ patch?: never;
8545
+ trace?: never;
8546
+ };
8376
8547
  "/v1/chats/{chat_id}/share-contact-card": {
8377
8548
  parameters: {
8378
8549
  query?: never;
@@ -9079,127 +9250,197 @@ export interface paths {
9079
9250
  patch?: never;
9080
9251
  trace?: never;
9081
9252
  };
9082
- "/internal/messages": {
9253
+ "/v1/device/pair": {
9083
9254
  parameters: {
9084
9255
  query?: never;
9085
9256
  header?: never;
9086
9257
  path?: never;
9087
9258
  cookie?: never;
9088
9259
  };
9089
- get: {
9260
+ get?: never;
9261
+ put?: never;
9262
+ post: {
9090
9263
  parameters: {
9091
- query?: {
9092
- line_id?: string;
9093
- status?: "queued" | "sent" | "delivered" | "read" | "failed";
9094
- direction?: "outbound" | "inbound";
9095
- page?: number;
9096
- limit?: number;
9097
- };
9264
+ query?: never;
9098
9265
  header?: never;
9099
9266
  path?: never;
9100
9267
  cookie?: never;
9101
9268
  };
9102
- requestBody?: never;
9269
+ requestBody?: {
9270
+ content: {
9271
+ "application/json": {
9272
+ code: string;
9273
+ /** @enum {string} */
9274
+ device_type: "android" | "macos";
9275
+ device_name?: string;
9276
+ phone_number?: string;
9277
+ };
9278
+ };
9279
+ };
9103
9280
  responses: {
9104
- /** @description Message list */
9105
- 200: {
9281
+ /** @description Device paired */
9282
+ 201: {
9106
9283
  headers: {
9107
9284
  [name: string]: unknown;
9108
9285
  };
9109
9286
  content: {
9110
- "application/json": components["schemas"]["MessageList"];
9287
+ "application/json": components["schemas"]["DevicePair"];
9288
+ };
9289
+ };
9290
+ /** @description Bad request — validation failed */
9291
+ 400: {
9292
+ headers: {
9293
+ [name: string]: unknown;
9294
+ };
9295
+ content: {
9296
+ "application/json": components["schemas"]["ErrorEnvelope"];
9297
+ };
9298
+ };
9299
+ /** @description Gone — a single-use resource has already been spent */
9300
+ 410: {
9301
+ headers: {
9302
+ [name: string]: unknown;
9303
+ };
9304
+ content: {
9305
+ "application/json": components["schemas"]["ErrorEnvelope"];
9306
+ };
9307
+ };
9308
+ /** @description Too many requests — rate limit exceeded */
9309
+ 429: {
9310
+ headers: {
9311
+ [name: string]: unknown;
9312
+ };
9313
+ content: {
9314
+ "application/json": components["schemas"]["ErrorEnvelope"];
9315
+ };
9316
+ };
9317
+ /** @description Internal server error */
9318
+ 500: {
9319
+ headers: {
9320
+ [name: string]: unknown;
9321
+ };
9322
+ content: {
9323
+ "application/json": components["schemas"]["ErrorEnvelope"];
9111
9324
  };
9112
9325
  };
9113
9326
  };
9114
9327
  };
9115
- put?: never;
9116
- post?: never;
9117
9328
  delete?: never;
9118
9329
  options?: never;
9119
9330
  head?: never;
9120
9331
  patch?: never;
9121
9332
  trace?: never;
9122
9333
  };
9123
- "/internal/messages/conversations": {
9334
+ "/v1/device/heartbeat": {
9124
9335
  parameters: {
9125
9336
  query?: never;
9126
9337
  header?: never;
9127
9338
  path?: never;
9128
9339
  cookie?: never;
9129
9340
  };
9130
- get: {
9341
+ get?: never;
9342
+ put?: never;
9343
+ post: {
9131
9344
  parameters: {
9132
- query?: {
9133
- line_id?: string;
9134
- page?: number;
9135
- limit?: number;
9136
- };
9345
+ query?: never;
9137
9346
  header?: never;
9138
9347
  path?: never;
9139
9348
  cookie?: never;
9140
9349
  };
9141
- requestBody?: never;
9350
+ requestBody?: {
9351
+ content: {
9352
+ "application/json": {
9353
+ phone_number?: string;
9354
+ battery?: number;
9355
+ signal?: number;
9356
+ app_version?: string;
9357
+ os_version?: string;
9358
+ /** @enum {string} */
9359
+ device_state?: "online" | "degraded" | "offline" | "initializing" | "blocked";
9360
+ storage_free_bytes?: number;
9361
+ bridge_version?: string;
9362
+ runtime_capabilities?: {
9363
+ /** @enum {string} */
9364
+ imessage?: "active" | "degraded" | "disabled";
9365
+ /** @enum {string} */
9366
+ sms_fallback?: "active" | "degraded" | "disabled";
9367
+ /** @enum {string} */
9368
+ reactions_out?: "active" | "degraded" | "disabled";
9369
+ /** @enum {string} */
9370
+ mark_read_out?: "active" | "degraded" | "disabled";
9371
+ /** @enum {string} */
9372
+ typing_out?: "active" | "degraded" | "disabled";
9373
+ /** @enum {string} */
9374
+ effects?: "active" | "degraded" | "disabled";
9375
+ /** @enum {string} */
9376
+ reactions_in?: "active" | "degraded" | "disabled";
9377
+ /** @enum {string} */
9378
+ read_receipts_in?: "active" | "degraded" | "disabled";
9379
+ /** @enum {string} */
9380
+ typing_in?: "active" | "degraded" | "disabled";
9381
+ /** @enum {string} */
9382
+ send_text?: "active" | "degraded" | "disabled";
9383
+ /** @enum {string} */
9384
+ send_attachment?: "active" | "degraded" | "disabled";
9385
+ };
9386
+ };
9387
+ };
9388
+ };
9142
9389
  responses: {
9143
- /** @description Conversation list */
9390
+ /** @description Heartbeat accepted */
9144
9391
  200: {
9145
9392
  headers: {
9146
9393
  [name: string]: unknown;
9147
9394
  };
9148
9395
  content: {
9149
- "application/json": components["schemas"]["ConversationList"];
9396
+ "application/json": components["schemas"]["DeviceHeartbeatV1"];
9150
9397
  };
9151
9398
  };
9152
- };
9153
- };
9154
- put?: never;
9155
- post?: never;
9156
- delete?: never;
9157
- options?: never;
9158
- head?: never;
9159
- patch?: never;
9160
- trace?: never;
9161
- };
9162
- "/internal/messages/conversations/{id}": {
9163
- parameters: {
9164
- query?: never;
9165
- header?: never;
9166
- path?: never;
9167
- cookie?: never;
9168
- };
9169
- get: {
9170
- parameters: {
9171
- query?: {
9172
- page?: number;
9173
- limit?: number;
9399
+ /** @description Bad request — validation failed */
9400
+ 400: {
9401
+ headers: {
9402
+ [name: string]: unknown;
9403
+ };
9404
+ content: {
9405
+ "application/json": components["schemas"]["ErrorEnvelope"];
9406
+ };
9174
9407
  };
9175
- header?: never;
9176
- path: {
9177
- id: string;
9408
+ /** @description Unauthenticated — missing or invalid bearer token */
9409
+ 401: {
9410
+ headers: {
9411
+ [name: string]: unknown;
9412
+ };
9413
+ content: {
9414
+ "application/json": components["schemas"]["ErrorEnvelope"];
9415
+ };
9178
9416
  };
9179
- cookie?: never;
9180
- };
9181
- requestBody?: never;
9182
- responses: {
9183
- /** @description Conversation thread */
9184
- 200: {
9417
+ /** @description Too many requests — rate limit exceeded */
9418
+ 429: {
9185
9419
  headers: {
9186
9420
  [name: string]: unknown;
9187
9421
  };
9188
9422
  content: {
9189
- "application/json": components["schemas"]["ConversationThread"];
9423
+ "application/json": components["schemas"]["ErrorEnvelope"];
9424
+ };
9425
+ };
9426
+ /** @description Internal server error */
9427
+ 500: {
9428
+ headers: {
9429
+ [name: string]: unknown;
9430
+ };
9431
+ content: {
9432
+ "application/json": components["schemas"]["ErrorEnvelope"];
9190
9433
  };
9191
9434
  };
9192
9435
  };
9193
9436
  };
9194
- put?: never;
9195
- post?: never;
9196
9437
  delete?: never;
9197
9438
  options?: never;
9198
9439
  head?: never;
9199
9440
  patch?: never;
9200
9441
  trace?: never;
9201
9442
  };
9202
- "/internal/webhooks/{id}/deliveries": {
9443
+ "/v1/device/outbound": {
9203
9444
  parameters: {
9204
9445
  query?: never;
9205
9446
  header?: never;
@@ -9209,33 +9450,555 @@ export interface paths {
9209
9450
  get: {
9210
9451
  parameters: {
9211
9452
  query?: {
9212
- page?: number;
9213
9453
  limit?: number;
9214
9454
  };
9215
9455
  header?: never;
9216
- path: {
9217
- id: string;
9218
- };
9456
+ path?: never;
9219
9457
  cookie?: never;
9220
9458
  };
9221
9459
  requestBody?: never;
9222
9460
  responses: {
9223
- /** @description Delivery list */
9461
+ /** @description Claimed outbound rows */
9224
9462
  200: {
9225
9463
  headers: {
9226
9464
  [name: string]: unknown;
9227
9465
  };
9228
9466
  content: {
9229
- "application/json": components["schemas"]["WebhookDeliveryList"];
9467
+ "application/json": components["schemas"]["DeviceOutboundPoll"];
9230
9468
  };
9231
9469
  };
9232
- };
9233
- };
9234
- put?: never;
9235
- post?: never;
9236
- delete?: never;
9237
- options?: never;
9238
- head?: never;
9470
+ /** @description Bad request — validation failed */
9471
+ 400: {
9472
+ headers: {
9473
+ [name: string]: unknown;
9474
+ };
9475
+ content: {
9476
+ "application/json": components["schemas"]["ErrorEnvelope"];
9477
+ };
9478
+ };
9479
+ /** @description Unauthenticated — missing or invalid bearer token */
9480
+ 401: {
9481
+ headers: {
9482
+ [name: string]: unknown;
9483
+ };
9484
+ content: {
9485
+ "application/json": components["schemas"]["ErrorEnvelope"];
9486
+ };
9487
+ };
9488
+ /** @description Too many requests — rate limit exceeded */
9489
+ 429: {
9490
+ headers: {
9491
+ [name: string]: unknown;
9492
+ };
9493
+ content: {
9494
+ "application/json": components["schemas"]["ErrorEnvelope"];
9495
+ };
9496
+ };
9497
+ /** @description Internal server error */
9498
+ 500: {
9499
+ headers: {
9500
+ [name: string]: unknown;
9501
+ };
9502
+ content: {
9503
+ "application/json": components["schemas"]["ErrorEnvelope"];
9504
+ };
9505
+ };
9506
+ };
9507
+ };
9508
+ put?: never;
9509
+ post?: never;
9510
+ delete?: never;
9511
+ options?: never;
9512
+ head?: never;
9513
+ patch?: never;
9514
+ trace?: never;
9515
+ };
9516
+ "/v1/device/outbound/{id}/ack": {
9517
+ parameters: {
9518
+ query?: never;
9519
+ header?: never;
9520
+ path?: never;
9521
+ cookie?: never;
9522
+ };
9523
+ get?: never;
9524
+ put?: never;
9525
+ post: {
9526
+ parameters: {
9527
+ query?: never;
9528
+ header?: never;
9529
+ path: {
9530
+ id: string;
9531
+ };
9532
+ cookie?: never;
9533
+ };
9534
+ requestBody?: {
9535
+ content: {
9536
+ "application/json": {
9537
+ /** @enum {string} */
9538
+ status: "sent" | "failed" | "sent_via_sms_fallback" | "failed_both";
9539
+ /** @enum {string} */
9540
+ service?: "iMessage" | "SMS" | "RCS";
9541
+ native_message_id?: string;
9542
+ error_message?: string;
9543
+ };
9544
+ };
9545
+ };
9546
+ responses: {
9547
+ /** @description Acknowledged */
9548
+ 200: {
9549
+ headers: {
9550
+ [name: string]: unknown;
9551
+ };
9552
+ content: {
9553
+ "application/json": components["schemas"]["DeviceOutboundAck"];
9554
+ };
9555
+ };
9556
+ /** @description Bad request — validation failed */
9557
+ 400: {
9558
+ headers: {
9559
+ [name: string]: unknown;
9560
+ };
9561
+ content: {
9562
+ "application/json": components["schemas"]["ErrorEnvelope"];
9563
+ };
9564
+ };
9565
+ /** @description Unauthenticated — missing or invalid bearer token */
9566
+ 401: {
9567
+ headers: {
9568
+ [name: string]: unknown;
9569
+ };
9570
+ content: {
9571
+ "application/json": components["schemas"]["ErrorEnvelope"];
9572
+ };
9573
+ };
9574
+ /** @description Too many requests — rate limit exceeded */
9575
+ 429: {
9576
+ headers: {
9577
+ [name: string]: unknown;
9578
+ };
9579
+ content: {
9580
+ "application/json": components["schemas"]["ErrorEnvelope"];
9581
+ };
9582
+ };
9583
+ /** @description Internal server error */
9584
+ 500: {
9585
+ headers: {
9586
+ [name: string]: unknown;
9587
+ };
9588
+ content: {
9589
+ "application/json": components["schemas"]["ErrorEnvelope"];
9590
+ };
9591
+ };
9592
+ };
9593
+ };
9594
+ delete?: never;
9595
+ options?: never;
9596
+ head?: never;
9597
+ patch?: never;
9598
+ trace?: never;
9599
+ };
9600
+ "/v1/device/inbound-events": {
9601
+ parameters: {
9602
+ query?: never;
9603
+ header?: never;
9604
+ path?: never;
9605
+ cookie?: never;
9606
+ };
9607
+ get?: never;
9608
+ put?: never;
9609
+ post: {
9610
+ parameters: {
9611
+ query?: never;
9612
+ header?: {
9613
+ /** @description REQUIRED idempotency key — dedupes retries in a 24h window (missing → 400 idempotency_key_required). Alias: `X-Idempotency-Key`. */
9614
+ "idempotency-key"?: string;
9615
+ };
9616
+ path?: never;
9617
+ cookie?: never;
9618
+ };
9619
+ requestBody?: {
9620
+ content: {
9621
+ "application/json": {
9622
+ /** @enum {string} */
9623
+ type: "reaction_received";
9624
+ /** Format: date-time */
9625
+ occurred_at: string;
9626
+ parent_message_id: string;
9627
+ from_handle: string;
9628
+ /** @enum {string} */
9629
+ reaction_type: "love" | "like" | "dislike" | "laugh" | "emphasize" | "question";
9630
+ /** @enum {string} */
9631
+ operation: "add" | "remove";
9632
+ } | {
9633
+ /** @enum {string} */
9634
+ type: "apple_id_flagged";
9635
+ /** Format: date-time */
9636
+ occurred_at: string;
9637
+ reason: string;
9638
+ /** @enum {string} */
9639
+ detected_via: "macos_dialog" | "android_notification" | "heuristic";
9640
+ error?: string;
9641
+ } | {
9642
+ /** @enum {string} */
9643
+ type: "read_receipt";
9644
+ /** Format: date-time */
9645
+ occurred_at: string;
9646
+ parent_message_id: string;
9647
+ /** Format: date-time */
9648
+ read_at: string;
9649
+ } | {
9650
+ /** @enum {string} */
9651
+ type: "message_received";
9652
+ /** Format: date-time */
9653
+ occurred_at: string;
9654
+ native_message_id: string;
9655
+ native_chat_guid: string;
9656
+ from_handle: string;
9657
+ /** @enum {string} */
9658
+ service: "iMessage" | "SMS" | "RCS";
9659
+ /**
9660
+ * @default inbound
9661
+ * @enum {string}
9662
+ */
9663
+ direction?: "inbound" | "outbound_from_me";
9664
+ body?: string;
9665
+ contact_name?: string;
9666
+ attachments?: string[];
9667
+ } | {
9668
+ /** @enum {string} */
9669
+ type: "typing_started";
9670
+ /** Format: date-time */
9671
+ occurred_at: string;
9672
+ native_chat_guid: string;
9673
+ from_handle: string;
9674
+ } | {
9675
+ /** @enum {string} */
9676
+ type: "typing_stopped";
9677
+ /** Format: date-time */
9678
+ occurred_at: string;
9679
+ native_chat_guid: string;
9680
+ from_handle: string;
9681
+ } | {
9682
+ /** @enum {string} */
9683
+ type: "message_status";
9684
+ /** Format: date-time */
9685
+ occurred_at: string;
9686
+ parent_message_id: string;
9687
+ /** @enum {string} */
9688
+ status_change: "delivered" | "read" | "failed";
9689
+ error?: string;
9690
+ };
9691
+ };
9692
+ };
9693
+ responses: {
9694
+ /** @description Event accepted */
9695
+ 202: {
9696
+ headers: {
9697
+ [name: string]: unknown;
9698
+ };
9699
+ content: {
9700
+ "application/json": components["schemas"]["InboundEventEnvelope"];
9701
+ };
9702
+ };
9703
+ /** @description Bad request — validation failed */
9704
+ 400: {
9705
+ headers: {
9706
+ [name: string]: unknown;
9707
+ };
9708
+ content: {
9709
+ "application/json": components["schemas"]["ErrorEnvelope"];
9710
+ };
9711
+ };
9712
+ /** @description Unauthenticated — missing or invalid bearer token */
9713
+ 401: {
9714
+ headers: {
9715
+ [name: string]: unknown;
9716
+ };
9717
+ content: {
9718
+ "application/json": components["schemas"]["ErrorEnvelope"];
9719
+ };
9720
+ };
9721
+ /** @description Not found */
9722
+ 404: {
9723
+ headers: {
9724
+ [name: string]: unknown;
9725
+ };
9726
+ content: {
9727
+ "application/json": components["schemas"]["ErrorEnvelope"];
9728
+ };
9729
+ };
9730
+ /** @description Conflict — concurrent or terminal state */
9731
+ 409: {
9732
+ headers: {
9733
+ [name: string]: unknown;
9734
+ };
9735
+ content: {
9736
+ "application/json": components["schemas"]["ErrorEnvelope"];
9737
+ };
9738
+ };
9739
+ /** @description Too many requests — rate limit exceeded */
9740
+ 429: {
9741
+ headers: {
9742
+ [name: string]: unknown;
9743
+ };
9744
+ content: {
9745
+ "application/json": components["schemas"]["ErrorEnvelope"];
9746
+ };
9747
+ };
9748
+ /** @description Internal server error */
9749
+ 500: {
9750
+ headers: {
9751
+ [name: string]: unknown;
9752
+ };
9753
+ content: {
9754
+ "application/json": components["schemas"]["ErrorEnvelope"];
9755
+ };
9756
+ };
9757
+ /** @description Service unavailable — a concurrent request is in flight */
9758
+ 503: {
9759
+ headers: {
9760
+ [name: string]: unknown;
9761
+ };
9762
+ content: {
9763
+ "application/json": components["schemas"]["ErrorEnvelope"];
9764
+ };
9765
+ };
9766
+ };
9767
+ };
9768
+ delete?: never;
9769
+ options?: never;
9770
+ head?: never;
9771
+ patch?: never;
9772
+ trace?: never;
9773
+ };
9774
+ "/v1/device/sessions/{id}": {
9775
+ parameters: {
9776
+ query?: never;
9777
+ header?: never;
9778
+ path?: never;
9779
+ cookie?: never;
9780
+ };
9781
+ get?: never;
9782
+ put?: never;
9783
+ post?: never;
9784
+ delete: {
9785
+ parameters: {
9786
+ query?: never;
9787
+ header?: never;
9788
+ path: {
9789
+ id: string;
9790
+ };
9791
+ cookie?: never;
9792
+ };
9793
+ requestBody?: never;
9794
+ responses: {
9795
+ /** @description Session deleted (logged out) */
9796
+ 204: {
9797
+ headers: {
9798
+ [name: string]: unknown;
9799
+ };
9800
+ content?: never;
9801
+ };
9802
+ /** @description Unauthenticated — missing or invalid bearer token */
9803
+ 401: {
9804
+ headers: {
9805
+ [name: string]: unknown;
9806
+ };
9807
+ content: {
9808
+ "application/json": components["schemas"]["ErrorEnvelope"];
9809
+ };
9810
+ };
9811
+ /** @description Not found */
9812
+ 404: {
9813
+ headers: {
9814
+ [name: string]: unknown;
9815
+ };
9816
+ content: {
9817
+ "application/json": components["schemas"]["ErrorEnvelope"];
9818
+ };
9819
+ };
9820
+ /** @description Too many requests — rate limit exceeded */
9821
+ 429: {
9822
+ headers: {
9823
+ [name: string]: unknown;
9824
+ };
9825
+ content: {
9826
+ "application/json": components["schemas"]["ErrorEnvelope"];
9827
+ };
9828
+ };
9829
+ /** @description Internal server error */
9830
+ 500: {
9831
+ headers: {
9832
+ [name: string]: unknown;
9833
+ };
9834
+ content: {
9835
+ "application/json": components["schemas"]["ErrorEnvelope"];
9836
+ };
9837
+ };
9838
+ };
9839
+ };
9840
+ options?: never;
9841
+ head?: never;
9842
+ patch?: never;
9843
+ trace?: never;
9844
+ };
9845
+ "/internal/messages": {
9846
+ parameters: {
9847
+ query?: never;
9848
+ header?: never;
9849
+ path?: never;
9850
+ cookie?: never;
9851
+ };
9852
+ get: {
9853
+ parameters: {
9854
+ query?: {
9855
+ line_id?: string;
9856
+ status?: "queued" | "sent" | "delivered" | "read" | "failed";
9857
+ direction?: "outbound" | "inbound";
9858
+ page?: number;
9859
+ limit?: number;
9860
+ };
9861
+ header?: never;
9862
+ path?: never;
9863
+ cookie?: never;
9864
+ };
9865
+ requestBody?: never;
9866
+ responses: {
9867
+ /** @description Message list */
9868
+ 200: {
9869
+ headers: {
9870
+ [name: string]: unknown;
9871
+ };
9872
+ content: {
9873
+ "application/json": components["schemas"]["MessageList"];
9874
+ };
9875
+ };
9876
+ };
9877
+ };
9878
+ put?: never;
9879
+ post?: never;
9880
+ delete?: never;
9881
+ options?: never;
9882
+ head?: never;
9883
+ patch?: never;
9884
+ trace?: never;
9885
+ };
9886
+ "/internal/messages/conversations": {
9887
+ parameters: {
9888
+ query?: never;
9889
+ header?: never;
9890
+ path?: never;
9891
+ cookie?: never;
9892
+ };
9893
+ get: {
9894
+ parameters: {
9895
+ query?: {
9896
+ line_id?: string;
9897
+ page?: number;
9898
+ limit?: number;
9899
+ };
9900
+ header?: never;
9901
+ path?: never;
9902
+ cookie?: never;
9903
+ };
9904
+ requestBody?: never;
9905
+ responses: {
9906
+ /** @description Conversation list */
9907
+ 200: {
9908
+ headers: {
9909
+ [name: string]: unknown;
9910
+ };
9911
+ content: {
9912
+ "application/json": components["schemas"]["ConversationList"];
9913
+ };
9914
+ };
9915
+ };
9916
+ };
9917
+ put?: never;
9918
+ post?: never;
9919
+ delete?: never;
9920
+ options?: never;
9921
+ head?: never;
9922
+ patch?: never;
9923
+ trace?: never;
9924
+ };
9925
+ "/internal/messages/conversations/{id}": {
9926
+ parameters: {
9927
+ query?: never;
9928
+ header?: never;
9929
+ path?: never;
9930
+ cookie?: never;
9931
+ };
9932
+ get: {
9933
+ parameters: {
9934
+ query?: {
9935
+ page?: number;
9936
+ limit?: number;
9937
+ };
9938
+ header?: never;
9939
+ path: {
9940
+ id: string;
9941
+ };
9942
+ cookie?: never;
9943
+ };
9944
+ requestBody?: never;
9945
+ responses: {
9946
+ /** @description Conversation thread */
9947
+ 200: {
9948
+ headers: {
9949
+ [name: string]: unknown;
9950
+ };
9951
+ content: {
9952
+ "application/json": components["schemas"]["ConversationThread"];
9953
+ };
9954
+ };
9955
+ };
9956
+ };
9957
+ put?: never;
9958
+ post?: never;
9959
+ delete?: never;
9960
+ options?: never;
9961
+ head?: never;
9962
+ patch?: never;
9963
+ trace?: never;
9964
+ };
9965
+ "/internal/webhooks/{id}/deliveries": {
9966
+ parameters: {
9967
+ query?: never;
9968
+ header?: never;
9969
+ path?: never;
9970
+ cookie?: never;
9971
+ };
9972
+ get: {
9973
+ parameters: {
9974
+ query?: {
9975
+ page?: number;
9976
+ limit?: number;
9977
+ };
9978
+ header?: never;
9979
+ path: {
9980
+ id: string;
9981
+ };
9982
+ cookie?: never;
9983
+ };
9984
+ requestBody?: never;
9985
+ responses: {
9986
+ /** @description Delivery list */
9987
+ 200: {
9988
+ headers: {
9989
+ [name: string]: unknown;
9990
+ };
9991
+ content: {
9992
+ "application/json": components["schemas"]["WebhookDeliveryList"];
9993
+ };
9994
+ };
9995
+ };
9996
+ };
9997
+ put?: never;
9998
+ post?: never;
9999
+ delete?: never;
10000
+ options?: never;
10001
+ head?: never;
9239
10002
  patch?: never;
9240
10003
  trace?: never;
9241
10004
  };
@@ -10411,6 +11174,9 @@ export interface components {
10411
11174
  last_error: string | null;
10412
11175
  last_offline_at: string | null;
10413
11176
  bridge_version: string | null;
11177
+ runtime_capabilities: {
11178
+ [key: string]: "active" | "degraded" | "disabled";
11179
+ } | null;
10414
11180
  };
10415
11181
  LineConfigEnvelope: {
10416
11182
  /** @enum {boolean} */
@@ -10717,7 +11483,7 @@ export interface components {
10717
11483
  * @description A concrete event type (e.g. `message.received`), a family wildcard (`line.*`), or the catch-all `*`.
10718
11484
  * @enum {string}
10719
11485
  */
10720
- WebhookEventName: "message.queued" | "message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.received" | "message.scheduled" | "message.cancelled" | "reaction.added" | "reaction.received" | "reaction.removed" | "line.connected" | "line.disconnected" | "line.offline" | "line.degraded" | "line.apple_id_flagged" | "line.quota_warning" | "line.quota_exceeded" | "typing_indicator.started" | "typing_indicator.stopped" | "trial.linked" | "trial.dormant" | "trial.reactivated" | "pre_order.fulfilled" | "pre_order.cancelled" | "pre_order.refunded" | "webhook.test" | "*" | "message.*" | "reaction.*" | "line.*" | "typing_indicator.*" | "trial.*" | "webhook.*";
11486
+ WebhookEventName: "message.queued" | "message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.received" | "message.scheduled" | "message.cancelled" | "message.fallback_triggered" | "reaction.added" | "reaction.received" | "reaction.removed" | "line.connected" | "line.disconnected" | "line.offline" | "line.degraded" | "line.apple_id_flagged" | "line.quota_warning" | "line.quota_exceeded" | "line.capability_changed" | "typing_indicator.started" | "typing_indicator.stopped" | "trial.linked" | "trial.dormant" | "trial.reactivated" | "pre_order.fulfilled" | "pre_order.cancelled" | "pre_order.refunded" | "webhook.test" | "*" | "message.*" | "reaction.*" | "line.*" | "typing_indicator.*" | "trial.*" | "webhook.*";
10721
11487
  WebhookList: {
10722
11488
  webhooks: components["schemas"]["Webhook"][];
10723
11489
  };
@@ -10863,6 +11629,33 @@ export interface components {
10863
11629
  /** Format: uuid */
10864
11630
  from_line_id?: string;
10865
11631
  };
11632
+ AreaCodesEnvelope: {
11633
+ /** @enum {boolean} */
11634
+ success: true;
11635
+ data: components["schemas"]["AreaCodes"];
11636
+ trace_id: string;
11637
+ request_id: string;
11638
+ };
11639
+ AreaCodes: {
11640
+ area_codes: components["schemas"]["AreaCode"][];
11641
+ countries: components["schemas"]["Country"][];
11642
+ };
11643
+ AreaCode: {
11644
+ /** @example 212 */
11645
+ area_code: string;
11646
+ /** @example New York, NY */
11647
+ region: string;
11648
+ /** @example US */
11649
+ country_code: string;
11650
+ };
11651
+ Country: {
11652
+ /** @example US */
11653
+ country_code: string;
11654
+ /** @example United States */
11655
+ name: string;
11656
+ /** @example 1 */
11657
+ calling_code: string;
11658
+ };
10866
11659
  ShareContactCardEnvelope: {
10867
11660
  /** @enum {boolean} */
10868
11661
  success: true;
@@ -11017,6 +11810,47 @@ export interface components {
11017
11810
  [key: string]: unknown;
11018
11811
  };
11019
11812
  };
11813
+ DevicePair: {
11814
+ device_session_id: string;
11815
+ session_key: string;
11816
+ line_id: string | null;
11817
+ sse_url: string;
11818
+ /** @enum {string} */
11819
+ transport_preferred: "sse";
11820
+ polling_interval_ms: number;
11821
+ heartbeat_interval_ms: number;
11822
+ metadata: {
11823
+ [key: string]: unknown;
11824
+ } | null;
11825
+ };
11826
+ DeviceHeartbeatV1: {
11827
+ /** @enum {boolean} */
11828
+ ok: true;
11829
+ polling_interval_ms: number;
11830
+ heartbeat_interval_ms: number;
11831
+ device_flags: string[];
11832
+ };
11833
+ DeviceOutboundPoll: {
11834
+ messages: {
11835
+ /** Format: uuid */
11836
+ id: string;
11837
+ /** Format: uuid */
11838
+ message_id: string | null;
11839
+ kind: string;
11840
+ parent_native_message_id: string | null;
11841
+ recipient: string;
11842
+ body: string | null;
11843
+ channel: string | null;
11844
+ effect?: unknown;
11845
+ reply_to_message_id: string | null;
11846
+ attachments?: unknown;
11847
+ created_at: string;
11848
+ }[];
11849
+ };
11850
+ DeviceOutboundAck: {
11851
+ /** @enum {boolean} */
11852
+ ok: true;
11853
+ };
11020
11854
  MessageList: {
11021
11855
  messages: components["schemas"]["Message"][];
11022
11856
  total: number;