@isnap/sdk 2.3.1 → 2.4.0-next.43962151956.1
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/CHANGELOG.md +15 -0
- package/README.md +92 -7
- package/dist/chat-sdk/adapter.d.ts +175 -0
- package/dist/chat-sdk/adapter.d.ts.map +1 -0
- package/dist/chat-sdk/adapter.js +395 -0
- package/dist/chat-sdk/adapter.js.map +1 -0
- package/dist/chat-sdk/format.d.ts +12 -0
- package/dist/chat-sdk/format.d.ts.map +1 -0
- package/dist/chat-sdk/format.js +15 -0
- package/dist/chat-sdk/format.js.map +1 -0
- package/dist/chat-sdk/index.d.ts +14 -0
- package/dist/chat-sdk/index.d.ts.map +1 -0
- package/dist/chat-sdk/index.js +11 -0
- package/dist/chat-sdk/index.js.map +1 -0
- package/dist/chat-sdk/reactions.d.ts +10 -0
- package/dist/chat-sdk/reactions.d.ts.map +1 -0
- package/dist/chat-sdk/reactions.js +34 -0
- package/dist/chat-sdk/reactions.js.map +1 -0
- package/dist/chat-sdk/thread-id.d.ts +16 -0
- package/dist/chat-sdk/thread-id.d.ts.map +1 -0
- package/dist/chat-sdk/thread-id.js +20 -0
- package/dist/chat-sdk/thread-id.js.map +1 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +3 -0
- package/dist/client.js.map +1 -1
- package/dist/generated/openapi.d.ts +599 -10
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/resources/chats.d.ts +3 -1
- package/dist/resources/chats.d.ts.map +1 -1
- package/dist/resources/chats.js +3 -1
- package/dist/resources/chats.js.map +1 -1
- package/dist/resources/fleet.d.ts +23 -0
- package/dist/resources/fleet.d.ts.map +1 -0
- package/dist/resources/fleet.js +20 -0
- package/dist/resources/fleet.js.map +1 -0
- package/dist/resources/lines.d.ts +32 -2
- package/dist/resources/lines.d.ts.map +1 -1
- package/dist/resources/lines.js +24 -0
- package/dist/resources/lines.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/webhooks/types.d.ts +1 -1
- package/dist/webhooks/types.d.ts.map +1 -1
- package/dist/webhooks/types.js.map +1 -1
- package/examples/chat-sdk-bot.ts +91 -0
- package/package.json +18 -2
|
@@ -505,7 +505,7 @@ export interface paths {
|
|
|
505
505
|
};
|
|
506
506
|
/**
|
|
507
507
|
* List your active and reserved lines
|
|
508
|
-
* @description Returns the lines you own whose `status` is `active` or `reserved`, of every kind: rented, BYOD, shared and test lines, and dedicated pool lines. Accepts an API key. Lines that are `suspended`, `provisioning` or `cancelled` are not returned. Lines are ordered by `created_at`, oldest first, with full phone numbers. The whole list comes in one response: there is no pagination and no filter, and the API sets no limit on its length. A line-scoped key gets only the lines in its list. `fulfillment_status` is present on this operation only. Each line carries its full phone number: this is personal data. Its `metadata` can contain personal data too.
|
|
508
|
+
* @description Returns the lines you own whose `status` is `active` or `reserved`, of every kind: rented, BYOD, shared and test lines, and dedicated pool lines. Accepts an API key. Lines that are `suspended`, `provisioning` or `cancelled` are not returned. Lines are ordered by `created_at`, oldest first, with full phone numbers. The whole list comes in one response: there is no pagination and no filter, and the API sets no limit on its length. A line-scoped key gets only the lines in its list. `fulfillment_status` is present on this operation only. Each line carries `health_score`: the latest stored health score of the line, or `null` when none is stored yet. Each line carries its full phone number: this is personal data. Its `metadata` can contain personal data too.
|
|
509
509
|
*/
|
|
510
510
|
get: {
|
|
511
511
|
parameters: {
|
|
@@ -591,7 +591,7 @@ export interface paths {
|
|
|
591
591
|
};
|
|
592
592
|
/**
|
|
593
593
|
* Get a line
|
|
594
|
-
* @description Returns one rented or BYOD line, in any status. Needs no credential: any caller that has the id gets the line object, `metadata` and billing dates included, with `phone_number` masked. Send an API key of the account that owns the line to get the full number; a line-scoped key gets it for any line of its account. A credential that is invalid, or that belongs to another account, gets the masked number and never a `401`. Shared lines, test lines and dedicated pool lines return `404 not_found` here, even to their owner: read them with `GET /v1/lines/my`.
|
|
594
|
+
* @description Returns one rented or BYOD line, in any status. Needs no credential: any caller that has the id gets the line object, `metadata` and billing dates included, with `phone_number` masked. Send an API key of the account that owns the line to get the full number; a line-scoped key gets it for any line of its account. A credential that is invalid, or that belongs to another account, gets the masked number and never a `401`. Shared lines, test lines and dedicated pool lines return `404 not_found` here, even to their owner: read them with `GET /v1/lines/my`. The line carries `health_score` only for the account that owns it (for a line-scoped key, only for a line in its list): the latest stored health score of the line, or `null` when none is stored yet. Any other caller gets the line without the `health_score` key.
|
|
595
595
|
*/
|
|
596
596
|
get: {
|
|
597
597
|
parameters: {
|
|
@@ -2496,7 +2496,7 @@ export interface paths {
|
|
|
2496
2496
|
};
|
|
2497
2497
|
/**
|
|
2498
2498
|
* Get the sending limits of a line
|
|
2499
|
-
* @description Returns the five sending limits of a line you own with their counters, the reply-lane allowance, the time at which each full counter drops back under its limit,
|
|
2499
|
+
* @description Returns the five sending limits of a line you own with their counters, the reply-lane allowance, the priority allowance (`priority`), the time at which each full counter drops back under its limit, a flag per counter that is `true` from 80% of its limit, the stage of the line on its warm-up ramp (`warming`, which also says whether the ramp is paused while the health of the line is degraded) and the four sending limits that apply now (`effective_caps`). A new line sends less than an established one until it has accumulated enough active days. Accepts an API key. Every counter covers a rolling window: the last 60 seconds, the last 60 minutes or the last 24 hours. No counter resets at midnight. A held message counts when it is released, not when it is accepted.
|
|
2500
2500
|
*/
|
|
2501
2501
|
get: {
|
|
2502
2502
|
parameters: {
|
|
@@ -2784,6 +2784,201 @@ export interface paths {
|
|
|
2784
2784
|
patch?: never;
|
|
2785
2785
|
trace?: never;
|
|
2786
2786
|
};
|
|
2787
|
+
"/v1/lines/{id}/health-score": {
|
|
2788
|
+
parameters: {
|
|
2789
|
+
query?: never;
|
|
2790
|
+
header?: never;
|
|
2791
|
+
path?: never;
|
|
2792
|
+
cookie?: never;
|
|
2793
|
+
};
|
|
2794
|
+
/**
|
|
2795
|
+
* Get the hourly health scores of a line
|
|
2796
|
+
* @description Returns the stored hourly health scores of a line you own, of any kind, with `hour` at or after `since`, oldest first. Accepts an API key. `since` defaults to 24 hours ago and goes back at most 30 days, so a call returns at most 720 items. Each item is the `health_score` object (see "The `health_score` object") with the `hour` it stands for. A line with no stored score in the window returns an empty `items`, never an error. A score is a risk score: a higher number is worse.
|
|
2797
|
+
*/
|
|
2798
|
+
get: {
|
|
2799
|
+
parameters: {
|
|
2800
|
+
query?: {
|
|
2801
|
+
/** @description Inclusive lower bound on `hour`: an ISO 8601 timestamp with a UTC offset, for example `2026-11-13T00:00:00Z`. Defaults to 24 hours ago. A value that does not parse, or one earlier than 30 days ago, is refused with `400 validation_failed`; a value in the future returns an empty `items`. */
|
|
2802
|
+
since?: string;
|
|
2803
|
+
};
|
|
2804
|
+
header?: never;
|
|
2805
|
+
path: {
|
|
2806
|
+
/** @description Id of a line: `line_` followed by 25 letters or digits. */
|
|
2807
|
+
id: string;
|
|
2808
|
+
};
|
|
2809
|
+
cookie?: never;
|
|
2810
|
+
};
|
|
2811
|
+
requestBody?: never;
|
|
2812
|
+
responses: {
|
|
2813
|
+
/** @description The hourly health scores of the line. */
|
|
2814
|
+
200: {
|
|
2815
|
+
headers: {
|
|
2816
|
+
[name: string]: unknown;
|
|
2817
|
+
};
|
|
2818
|
+
content: {
|
|
2819
|
+
"application/json": components["schemas"]["LineHealthScoreHistoryEnvelope"];
|
|
2820
|
+
};
|
|
2821
|
+
};
|
|
2822
|
+
/** @description Invalid request. `validation_failed`: `since` is not an ISO 8601 timestamp with a UTC offset, or is earlier than 30 days ago. `error.issues` lists each problem. */
|
|
2823
|
+
400: {
|
|
2824
|
+
headers: {
|
|
2825
|
+
[name: string]: unknown;
|
|
2826
|
+
};
|
|
2827
|
+
content: {
|
|
2828
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2829
|
+
};
|
|
2830
|
+
};
|
|
2831
|
+
/** @description No valid credential. `error.code` is `unauthorized`. */
|
|
2832
|
+
401: {
|
|
2833
|
+
headers: {
|
|
2834
|
+
[name: string]: unknown;
|
|
2835
|
+
};
|
|
2836
|
+
content: {
|
|
2837
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2838
|
+
};
|
|
2839
|
+
};
|
|
2840
|
+
/** @description Refused. `forbidden`: the key is line-scoped and this line is outside its list. */
|
|
2841
|
+
403: {
|
|
2842
|
+
headers: {
|
|
2843
|
+
[name: string]: unknown;
|
|
2844
|
+
};
|
|
2845
|
+
content: {
|
|
2846
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2847
|
+
};
|
|
2848
|
+
};
|
|
2849
|
+
/** @description Not found. `not_found`: the line does not exist, or it is not yours. */
|
|
2850
|
+
404: {
|
|
2851
|
+
headers: {
|
|
2852
|
+
[name: string]: unknown;
|
|
2853
|
+
};
|
|
2854
|
+
content: {
|
|
2855
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2856
|
+
};
|
|
2857
|
+
};
|
|
2858
|
+
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came in 60 seconds from the same account, for requests authenticated by an API key, or from the same network address, for any other request. An account can have a different limit. Wait `error.retry_after` seconds. */
|
|
2859
|
+
429: {
|
|
2860
|
+
headers: {
|
|
2861
|
+
[name: string]: unknown;
|
|
2862
|
+
};
|
|
2863
|
+
content: {
|
|
2864
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2865
|
+
};
|
|
2866
|
+
};
|
|
2867
|
+
/** @description Unexpected failure. `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
2868
|
+
500: {
|
|
2869
|
+
headers: {
|
|
2870
|
+
[name: string]: unknown;
|
|
2871
|
+
};
|
|
2872
|
+
content: {
|
|
2873
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2874
|
+
};
|
|
2875
|
+
};
|
|
2876
|
+
};
|
|
2877
|
+
};
|
|
2878
|
+
put?: never;
|
|
2879
|
+
post?: never;
|
|
2880
|
+
delete?: never;
|
|
2881
|
+
options?: never;
|
|
2882
|
+
head?: never;
|
|
2883
|
+
patch?: never;
|
|
2884
|
+
trace?: never;
|
|
2885
|
+
};
|
|
2886
|
+
"/v1/lines/{id}/health-score/report": {
|
|
2887
|
+
parameters: {
|
|
2888
|
+
query?: never;
|
|
2889
|
+
header?: never;
|
|
2890
|
+
path?: never;
|
|
2891
|
+
cookie?: never;
|
|
2892
|
+
};
|
|
2893
|
+
/**
|
|
2894
|
+
* Get the health score report of a line
|
|
2895
|
+
* @description Returns, in plain language, why the latest health score of a line you own is what it is and what to do about it: the `score` and `band` as last computed, a `summary` sentence, and up to 3 `items`, the factors that add the most risk, largest first, each with an `explanation` and an `action`. Accepts an API key. Works for every line you own. On a BYOD line the factors include the ones about your own device; on any other line only the factors you can act on are listed, and the ones iSnap resolves say so. A line with no stored score yet, or with too little traffic to judge, returns `200` with `band` `unknown`, no `items` and `score` `null`. A `low` band with no item means no risk is observed.
|
|
2896
|
+
*/
|
|
2897
|
+
get: {
|
|
2898
|
+
parameters: {
|
|
2899
|
+
query?: never;
|
|
2900
|
+
header?: never;
|
|
2901
|
+
path: {
|
|
2902
|
+
/** @description Id of a line: `line_` followed by 25 letters or digits. */
|
|
2903
|
+
id: string;
|
|
2904
|
+
};
|
|
2905
|
+
cookie?: never;
|
|
2906
|
+
};
|
|
2907
|
+
requestBody?: never;
|
|
2908
|
+
responses: {
|
|
2909
|
+
/** @description The report of the latest health score of the line. */
|
|
2910
|
+
200: {
|
|
2911
|
+
headers: {
|
|
2912
|
+
[name: string]: unknown;
|
|
2913
|
+
};
|
|
2914
|
+
content: {
|
|
2915
|
+
"application/json": components["schemas"]["LineHealthReportEnvelope"];
|
|
2916
|
+
};
|
|
2917
|
+
};
|
|
2918
|
+
/** @description Invalid request. `error.code` is `validation_failed` when a parameter, a header or the body does not match its schema: `error.issues` then lists each problem. */
|
|
2919
|
+
400: {
|
|
2920
|
+
headers: {
|
|
2921
|
+
[name: string]: unknown;
|
|
2922
|
+
};
|
|
2923
|
+
content: {
|
|
2924
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2925
|
+
};
|
|
2926
|
+
};
|
|
2927
|
+
/** @description No valid credential. `error.code` is `unauthorized`. */
|
|
2928
|
+
401: {
|
|
2929
|
+
headers: {
|
|
2930
|
+
[name: string]: unknown;
|
|
2931
|
+
};
|
|
2932
|
+
content: {
|
|
2933
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2934
|
+
};
|
|
2935
|
+
};
|
|
2936
|
+
/** @description Refused. `forbidden`: the key is line-scoped and this line is outside its list. */
|
|
2937
|
+
403: {
|
|
2938
|
+
headers: {
|
|
2939
|
+
[name: string]: unknown;
|
|
2940
|
+
};
|
|
2941
|
+
content: {
|
|
2942
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2943
|
+
};
|
|
2944
|
+
};
|
|
2945
|
+
/** @description Not found. `not_found`: the line does not exist, or it is not yours. */
|
|
2946
|
+
404: {
|
|
2947
|
+
headers: {
|
|
2948
|
+
[name: string]: unknown;
|
|
2949
|
+
};
|
|
2950
|
+
content: {
|
|
2951
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2952
|
+
};
|
|
2953
|
+
};
|
|
2954
|
+
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came in 60 seconds from the same account, for requests authenticated by an API key, or from the same network address, for any other request. An account can have a different limit. Wait `error.retry_after` seconds. */
|
|
2955
|
+
429: {
|
|
2956
|
+
headers: {
|
|
2957
|
+
[name: string]: unknown;
|
|
2958
|
+
};
|
|
2959
|
+
content: {
|
|
2960
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2961
|
+
};
|
|
2962
|
+
};
|
|
2963
|
+
/** @description Unexpected failure. `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
2964
|
+
500: {
|
|
2965
|
+
headers: {
|
|
2966
|
+
[name: string]: unknown;
|
|
2967
|
+
};
|
|
2968
|
+
content: {
|
|
2969
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2970
|
+
};
|
|
2971
|
+
};
|
|
2972
|
+
};
|
|
2973
|
+
};
|
|
2974
|
+
put?: never;
|
|
2975
|
+
post?: never;
|
|
2976
|
+
delete?: never;
|
|
2977
|
+
options?: never;
|
|
2978
|
+
head?: never;
|
|
2979
|
+
patch?: never;
|
|
2980
|
+
trace?: never;
|
|
2981
|
+
};
|
|
2787
2982
|
"/v1/lines/{id}/config": {
|
|
2788
2983
|
parameters: {
|
|
2789
2984
|
query?: never;
|
|
@@ -2793,7 +2988,7 @@ export interface paths {
|
|
|
2793
2988
|
};
|
|
2794
2989
|
/**
|
|
2795
2990
|
* Get the configuration of a line
|
|
2796
|
-
* @description Returns the sending configuration of a line you own, of any kind. Accepts an API key. `config` holds the value in force for every key, `overridden_keys` lists the keys that have an override on this line, `default_activity_curve` is the sending curve the line has without an override, and `knobs` gives, for
|
|
2991
|
+
* @description Returns the sending configuration of a line you own, of any kind. Accepts an API key. `config` holds the value in force for every key, `overridden_keys` lists the keys that have an override on this line, `default_activity_curve` is the sending curve the line has without an override, and `knobs` gives, for nine limits, the value in force (`current`), the `default`, and the bounds `min` and `max`. A value above `default` is accepted only for the five message limits of a BYOD line, up to `max`: for the three reply limits and the priority limit, and for the five message limits of any other line, `PATCH /v1/lines/{id}/config` returns `403 cannot_increase_limit`. A value above `max` is refused first, on every line, with `422 limit_out_of_bounds` or `400 validation_failed`. Default values depend on whether the line is an iMessage line or an Android line, and iSnap can change them: read them here instead of storing them.
|
|
2797
2992
|
*/
|
|
2798
2993
|
get: {
|
|
2799
2994
|
parameters: {
|
|
@@ -5166,6 +5361,8 @@ export interface paths {
|
|
|
5166
5361
|
use_typing_indicator?: boolean;
|
|
5167
5362
|
/** @description `true` to let this message leave during the quiet hours of the line: the hours whose weight is 0 in the line's `activity_curve`, counted in the recipient's local time. Use it for a recipient of your own, such as an alert to your own phone number. The default is `false`. The message still waits for the sending limits of the line, for the spacing between messages and behind an earlier message to the same recipient that iSnap holds. No effect on a shared line. The response returns the value in effect. */
|
|
5168
5363
|
ignore_quiet_hours?: boolean;
|
|
5364
|
+
/** @description `true` to let this message skip the hourly sending limit of the line, within a small reserve per rolling 24 hours (`daily_priority_limit` in `GET /v1/lines/{id}/config`, 3 by default, `GET /v1/lines/{id}/quota` reports `priority`). The reserve is part of the line's daily limit, not added to it, and a message is counted against it only when the hourly limit would have held the message. The message still waits for the per-minute limit, for the spacing between messages, behind an earlier message to the same recipient that iSnap holds, and for `daily_new_contact_limit` and `daily_known_contact_limit`. When the reply lane already carries the message, the reply lane is used and the reserve is not. Once the reserve is spent, the message is held or refused like any other message, and a held message leaves before the messages of the line that are not priority. The default is `false`. The response returns the value in effect in `priority`. */
|
|
5365
|
+
priority?: boolean;
|
|
5169
5366
|
/** @description `true` to cancel the message if its recipient writes to the line before the message is with the line's device. iSnap then cancels it as `DELETE /v1/messages/{message_id}` does (status `cancelled`, one `message.cancelled` event) and never sends it. A message that the device already holds, or that was sent, is not cancelled. Use it for a follow-up that is pointless once the recipient has answered. Only a message created before the recipient's message was received is cancelled. The default is `false`. The response returns the value in effect. */
|
|
5170
5367
|
cancel_on_reply?: boolean;
|
|
5171
5368
|
/**
|
|
@@ -6928,6 +7125,8 @@ export interface paths {
|
|
|
6928
7125
|
since?: string;
|
|
6929
7126
|
/** @description Inclusive upper bound on `last_message_at`: an ISO 8601 timestamp with a UTC offset, for example `2026-01-15T15:00:00Z`. */
|
|
6930
7127
|
until?: string;
|
|
7128
|
+
/** @description Only the chats whose `health.status` is one of these statuses: a comma-separated list of `healthy`, `at_risk`, `critical` and `opted_out`. A chat whose `health` is `null`, a group or a chat of a trial line, is never returned. Any other value returns `400 validation_failed`. Omit it, or leave it blank, for no filter. */
|
|
7129
|
+
health?: string;
|
|
6931
7130
|
};
|
|
6932
7131
|
header?: never;
|
|
6933
7132
|
path?: never;
|
|
@@ -8226,7 +8425,7 @@ export interface paths {
|
|
|
8226
8425
|
put?: never;
|
|
8227
8426
|
/**
|
|
8228
8427
|
* Rent a hosted macOS session
|
|
8229
|
-
* @description Rents one hosted macOS session from the
|
|
8428
|
+
* @description Rents one hosted macOS session from the hosted pool of iSnap. Wholesale partners only: any other account is refused with `403 not_a_wholesale_partner`, and no other operation that an API key can call rents a session. Accepts an API key. A line-scoped key is not limited to its list on this operation. A hosted macOS session is a macOS user account on a Mac that iSnap hosts, signed in to no Apple ID when you receive it. It is not a line: it has no number and sends nothing. It runs the bridge app of a BYOD line. A session is rented once from the pool: one that was released is not offered again. The rental starts immediately and `anniversary_at` is set to the time of the call: the session is billed every month on that day of the month, at that time of day, in UTC; in a shorter month, on its last day.
|
|
8230
8429
|
*
|
|
8231
8430
|
* Returns `409 no_macos_session_in_stock` when no session is free. Nothing is recorded in that case; iSnap can assign a session to your account later, which `macos_session.rented` announces, and that assignment is not linked to the refused call. Send an `Idempotency-Key` header: without one, every call rents another billable session, a retry included.
|
|
8232
8431
|
*
|
|
@@ -8750,6 +8949,72 @@ export interface paths {
|
|
|
8750
8949
|
patch?: never;
|
|
8751
8950
|
trace?: never;
|
|
8752
8951
|
};
|
|
8952
|
+
"/v1/fleet/health": {
|
|
8953
|
+
parameters: {
|
|
8954
|
+
query?: never;
|
|
8955
|
+
header?: never;
|
|
8956
|
+
path?: never;
|
|
8957
|
+
cookie?: never;
|
|
8958
|
+
};
|
|
8959
|
+
/**
|
|
8960
|
+
* Get the fleet health report
|
|
8961
|
+
* @description Returns the latest daily two-way rate report of the iSnap fleet (`two-way-rate/1`): the share of the people each line texted first who wrote back, as figures for the whole fleet and one anonymous row per rated line. No row names a line, a phone number, a customer or an area code, and the rows come in an order that carries nothing: it changes each day and is the same on every read of one day. `as_of` is `null` and `lines` is empty until the first report is published. Needs no credential. The API keeps the answer for 5 minutes: read it again after 5 minutes.
|
|
8962
|
+
*/
|
|
8963
|
+
get: {
|
|
8964
|
+
parameters: {
|
|
8965
|
+
query?: never;
|
|
8966
|
+
header?: never;
|
|
8967
|
+
path?: never;
|
|
8968
|
+
cookie?: never;
|
|
8969
|
+
};
|
|
8970
|
+
requestBody?: never;
|
|
8971
|
+
responses: {
|
|
8972
|
+
/** @description The latest fleet health report. */
|
|
8973
|
+
200: {
|
|
8974
|
+
headers: {
|
|
8975
|
+
[name: string]: unknown;
|
|
8976
|
+
};
|
|
8977
|
+
content: {
|
|
8978
|
+
"application/json": components["schemas"]["FleetHealthEnvelope"];
|
|
8979
|
+
};
|
|
8980
|
+
};
|
|
8981
|
+
/** @description Invalid request. `error.code` is `validation_failed` when a parameter, a header or the body does not match its schema: `error.issues` then lists each problem. */
|
|
8982
|
+
400: {
|
|
8983
|
+
headers: {
|
|
8984
|
+
[name: string]: unknown;
|
|
8985
|
+
};
|
|
8986
|
+
content: {
|
|
8987
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
8988
|
+
};
|
|
8989
|
+
};
|
|
8990
|
+
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came in 60 seconds from the same account, for requests authenticated by an API key, or from the same network address, for any other request. An account can have a different limit. Wait `error.retry_after` seconds. */
|
|
8991
|
+
429: {
|
|
8992
|
+
headers: {
|
|
8993
|
+
[name: string]: unknown;
|
|
8994
|
+
};
|
|
8995
|
+
content: {
|
|
8996
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
8997
|
+
};
|
|
8998
|
+
};
|
|
8999
|
+
/** @description Unexpected failure. `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
9000
|
+
500: {
|
|
9001
|
+
headers: {
|
|
9002
|
+
[name: string]: unknown;
|
|
9003
|
+
};
|
|
9004
|
+
content: {
|
|
9005
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9006
|
+
};
|
|
9007
|
+
};
|
|
9008
|
+
};
|
|
9009
|
+
};
|
|
9010
|
+
put?: never;
|
|
9011
|
+
post?: never;
|
|
9012
|
+
delete?: never;
|
|
9013
|
+
options?: never;
|
|
9014
|
+
head?: never;
|
|
9015
|
+
patch?: never;
|
|
9016
|
+
trace?: never;
|
|
9017
|
+
};
|
|
8753
9018
|
"/v1/sandbox/inbound": {
|
|
8754
9019
|
parameters: {
|
|
8755
9020
|
query?: never;
|
|
@@ -8983,6 +9248,51 @@ export interface paths {
|
|
|
8983
9248
|
export type webhooks = Record<string, never>;
|
|
8984
9249
|
export interface components {
|
|
8985
9250
|
schemas: {
|
|
9251
|
+
/** @description The health score of a line: a risk score and its band, with the factors that raise it. `null` where it is served means no score is computed for the line yet. */
|
|
9252
|
+
LineHealthScore: {
|
|
9253
|
+
/**
|
|
9254
|
+
* @description The risk score, from 0 (no risk observed) to 100 (most at risk). A higher number is worse. `null` exactly when `band` is `unknown`.
|
|
9255
|
+
* @example 24
|
|
9256
|
+
*/
|
|
9257
|
+
score: number | null;
|
|
9258
|
+
/**
|
|
9259
|
+
* @description The band of the score: `low` (0 to 29), `medium` (30 to 59), `high` (60 to 100), or `unknown` when the line has too little data to be scored.
|
|
9260
|
+
* @example low
|
|
9261
|
+
* @enum {string}
|
|
9262
|
+
*/
|
|
9263
|
+
band: "low" | "medium" | "high" | "unknown";
|
|
9264
|
+
/**
|
|
9265
|
+
* @description The version of the scoring that produced the score.
|
|
9266
|
+
* @example 1
|
|
9267
|
+
*/
|
|
9268
|
+
version: number;
|
|
9269
|
+
/**
|
|
9270
|
+
* Format: date-time
|
|
9271
|
+
* @description When the score was computed, ISO 8601 UTC. Use it to judge how fresh the score is.
|
|
9272
|
+
* @example 2026-11-14T10:00:12.000Z
|
|
9273
|
+
*/
|
|
9274
|
+
computed_at: string;
|
|
9275
|
+
/** @description Up to 3 factors that raise the score, largest contribution first. Empty when no factor adds to the score. */
|
|
9276
|
+
top_factors: components["schemas"]["LineHealthScoreFactor"][];
|
|
9277
|
+
};
|
|
9278
|
+
/** @description One factor behind a line health score. */
|
|
9279
|
+
LineHealthScoreFactor: {
|
|
9280
|
+
/**
|
|
9281
|
+
* @description The factor id. An open list: ignore the ids you do not know. The ids a customer can receive are listed in the API contract.
|
|
9282
|
+
* @example delivery_outcome
|
|
9283
|
+
*/
|
|
9284
|
+
id: string;
|
|
9285
|
+
/**
|
|
9286
|
+
* @description A short English name for the factor, fit to show to an end user.
|
|
9287
|
+
* @example Failed sends
|
|
9288
|
+
*/
|
|
9289
|
+
label: string;
|
|
9290
|
+
/**
|
|
9291
|
+
* @description How many points of the score the factor adds. Always above 0 in `top_factors`.
|
|
9292
|
+
* @example 12.5
|
|
9293
|
+
*/
|
|
9294
|
+
contribution: number;
|
|
9295
|
+
};
|
|
8986
9296
|
/** @description The health of the API. This body is returned as is, without the standard envelope. */
|
|
8987
9297
|
HealthResponse: {
|
|
8988
9298
|
/**
|
|
@@ -9053,7 +9363,7 @@ export interface components {
|
|
|
9053
9363
|
/** @description Id of the request that produced this response: `req_` followed by 25 letters or digits. */
|
|
9054
9364
|
request_id: string;
|
|
9055
9365
|
};
|
|
9056
|
-
/** @description A line. `billing_tier`, `byod`, `shared`, `test_line` and `inbound_only` tell the kinds of line apart: a rented line (two-way or inbound-only), a BYOD line, a shared line, a test line. */
|
|
9366
|
+
/** @description A line. `billing_tier`, `byod`, `shared`, `test_line` and `inbound_only` tell the kinds of line apart: a rented line (two-way or inbound-only), a BYOD line, a shared line, a test line. `health_score` is present only on `GET /v1/lines/my` and on `GET /v1/lines/{id}` when the caller owns the line (for a line-scoped key, a line in its list), and absent on every other operation and webhook that returns a line. It is `null` when no score is stored for the line yet. */
|
|
9057
9367
|
Line: {
|
|
9058
9368
|
/** @description Id of a line: `line_` followed by 25 letters or digits. */
|
|
9059
9369
|
id: string;
|
|
@@ -9118,6 +9428,7 @@ export interface components {
|
|
|
9118
9428
|
shared: boolean;
|
|
9119
9429
|
/** @description Present only on `GET /v1/lines/my`. `open` while an order for this line is still being fulfilled, `null` otherwise. */
|
|
9120
9430
|
fulfillment_status?: string | null;
|
|
9431
|
+
health_score?: components["schemas"]["LineHealthScore"] & unknown;
|
|
9121
9432
|
};
|
|
9122
9433
|
/** @description A hosted macOS session that the account rents. */
|
|
9123
9434
|
MacosSession: {
|
|
@@ -9374,7 +9685,19 @@ export interface components {
|
|
|
9374
9685
|
daily_known_frees_at: string | null;
|
|
9375
9686
|
/** @description Timestamp at which `daily_replies_used` drops back under its limit (ISO 8601, UTC). `null` when the counter is under its limit, when the limit is 0, or when the time is not known: read `null` as no known wait. */
|
|
9376
9687
|
daily_reply_frees_at: string | null;
|
|
9688
|
+
priority: components["schemas"]["PriorityMeter"];
|
|
9377
9689
|
buckets_warning: components["schemas"]["BucketsWarning"];
|
|
9690
|
+
warming: components["schemas"]["WarmingProgress"];
|
|
9691
|
+
effective_caps: components["schemas"]["EffectiveCaps"];
|
|
9692
|
+
};
|
|
9693
|
+
/** @description The priority allowance of the line: a message sent with `priority: true` can pass the hourly limit while `remaining` is above 0. */
|
|
9694
|
+
PriorityMeter: {
|
|
9695
|
+
/** @description Priority allowance: the number of messages sent with `priority: true` per rolling 24 hours that can pass the hourly limit. The allowance is part of `daily_total_message_limit`, not added to it. 0 means priority is off for the line. */
|
|
9696
|
+
limit: number;
|
|
9697
|
+
/** @description Messages that used the priority allowance to pass the hourly limit in the last 24 hours. A priority message sent under every limit does not use it. */
|
|
9698
|
+
used: number;
|
|
9699
|
+
/** @description `limit` minus `used`, never below 0. */
|
|
9700
|
+
remaining: number;
|
|
9378
9701
|
};
|
|
9379
9702
|
/** @description One flag per sending limit: `true` from 80% of the limit. A flag is `false` when its limit is 0. */
|
|
9380
9703
|
BucketsWarning: {
|
|
@@ -9389,6 +9712,36 @@ export interface components {
|
|
|
9389
9712
|
/** @description `true` when `minute_messages_used` is at 80% of `minute_message_limit` or more. */
|
|
9390
9713
|
minute_at_80_percent: boolean;
|
|
9391
9714
|
};
|
|
9715
|
+
/** @description Where the line is on its warm-up ramp. Stages count active days, not calendar days: a line that sits idle does not warm up, and the ramp pauses while the health of the line is degraded. */
|
|
9716
|
+
WarmingProgress: {
|
|
9717
|
+
/**
|
|
9718
|
+
* @description The stage of the line: `new`, `ramping_1`, `ramping_2`, `ramping_3` or `warm`. A new line sends less than an established one and moves up a stage as it accumulates active days. `not_applicable` on a shared line, which has no ramp of its own.
|
|
9719
|
+
* @enum {string}
|
|
9720
|
+
*/
|
|
9721
|
+
stage: "new" | "ramping_1" | "ramping_2" | "ramping_3" | "warm" | "not_applicable";
|
|
9722
|
+
/** @description Active days the line has accumulated. An active day is a day, in the line timezone, on which the line sent at least one message that the device confirmed. A day without a send does not count. */
|
|
9723
|
+
active_days: number;
|
|
9724
|
+
/** @description Active days still needed to reach `warm`. 0 once the line is `warm`. `null` when `stage` is `not_applicable`. */
|
|
9725
|
+
active_days_until_warm: number | null;
|
|
9726
|
+
/** @description `true` while the ramp is paused because the health of the line is degraded: `active_days` does not grow until `band` is back to `low`. `false` when the line is not degraded, has no health score yet, or when `stage` is `not_applicable`. */
|
|
9727
|
+
held: boolean;
|
|
9728
|
+
/**
|
|
9729
|
+
* @description The health band of the line that decides `held`: `low`, `medium` or `high`. `null` when the line has no health score yet, or when `stage` is `not_applicable`.
|
|
9730
|
+
* @enum {string|null}
|
|
9731
|
+
*/
|
|
9732
|
+
band: "low" | "medium" | "high" | null;
|
|
9733
|
+
};
|
|
9734
|
+
/** @description The four sending limits that apply to the line now: the limits of its stage and any limit you lowered, whichever is lower. Each equals the matching `*_limit` field of this object. */
|
|
9735
|
+
EffectiveCaps: {
|
|
9736
|
+
/** @description Distinct new contacts the line can message per rolling 24 hours. Equals `daily_new_contact_limit`. */
|
|
9737
|
+
daily_new: number;
|
|
9738
|
+
/** @description Messages the line can send per rolling 24 hours. Equals `daily_total_message_limit`. */
|
|
9739
|
+
daily_total: number;
|
|
9740
|
+
/** @description Messages the line can send per rolling 60 minutes. Equals `hourly_message_limit`. */
|
|
9741
|
+
hourly: number;
|
|
9742
|
+
/** @description Messages the line can send per rolling 60 seconds. Equals `minute_message_limit`. */
|
|
9743
|
+
minute: number;
|
|
9744
|
+
};
|
|
9392
9745
|
QueueEnvelope: {
|
|
9393
9746
|
/**
|
|
9394
9747
|
* @description Always `true` on a success response.
|
|
@@ -9531,6 +9884,77 @@ export interface components {
|
|
|
9531
9884
|
/** @description The reason codes of the warnings the device currently raises, each a setting of the Mac that the customer can change: `messages_spam_filter_on` means Filter spam is on in Messages, so iMessages from new contacts can be held back. An open list: ignore the values you do not know. `[]` means no warning among the checks the device reports. `null` means not measured: the line has no active device session, the device is not reporting (it has not reported since it was paired, or for 5 minutes or more), it has sent no diagnostics, or the line is suspended or cancelled. `null` is never "no warning". */
|
|
9532
9885
|
warnings: string[] | null;
|
|
9533
9886
|
};
|
|
9887
|
+
LineHealthScoreHistoryEnvelope: {
|
|
9888
|
+
/**
|
|
9889
|
+
* @description Always `true` on a success response.
|
|
9890
|
+
* @enum {boolean}
|
|
9891
|
+
*/
|
|
9892
|
+
success: true;
|
|
9893
|
+
data: components["schemas"]["LineHealthScoreHistory"];
|
|
9894
|
+
/** @description Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap. */
|
|
9895
|
+
trace_id: string;
|
|
9896
|
+
/** @description Id of the request that produced this response: `req_` followed by 25 letters or digits. */
|
|
9897
|
+
request_id: string;
|
|
9898
|
+
};
|
|
9899
|
+
/** @description The hourly health scores of a line. */
|
|
9900
|
+
LineHealthScoreHistory: {
|
|
9901
|
+
/** @description Id of a line: `line_` followed by 25 letters or digits. */
|
|
9902
|
+
line_id: string;
|
|
9903
|
+
/** @description The stored hourly scores with `hour` at or after `since`, oldest first. At most 720 items. Empty when the line has no stored score in the window. */
|
|
9904
|
+
items: components["schemas"]["LineHealthScoreHistoryItem"][];
|
|
9905
|
+
};
|
|
9906
|
+
/** @description The health score of a line for one clock hour. */
|
|
9907
|
+
LineHealthScoreHistoryItem: components["schemas"]["LineHealthScore"] & {
|
|
9908
|
+
/**
|
|
9909
|
+
* Format: date-time
|
|
9910
|
+
* @description The clock hour the score stands for, ISO 8601 UTC, on the hour. `computed_at` says when the score was computed.
|
|
9911
|
+
* @example 2026-11-14T10:00:00.000Z
|
|
9912
|
+
*/
|
|
9913
|
+
hour: string;
|
|
9914
|
+
};
|
|
9915
|
+
LineHealthReportEnvelope: {
|
|
9916
|
+
/**
|
|
9917
|
+
* @description Always `true` on a success response.
|
|
9918
|
+
* @enum {boolean}
|
|
9919
|
+
*/
|
|
9920
|
+
success: true;
|
|
9921
|
+
data: components["schemas"]["LineHealthReport"];
|
|
9922
|
+
/** @description Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap. */
|
|
9923
|
+
trace_id: string;
|
|
9924
|
+
/** @description Id of the request that produced this response: `req_` followed by 25 letters or digits. */
|
|
9925
|
+
request_id: string;
|
|
9926
|
+
};
|
|
9927
|
+
/** @description Why the latest health score of a line is what it is, and what to do about it. */
|
|
9928
|
+
LineHealthReport: {
|
|
9929
|
+
/** @description Id of a line: `line_` followed by 25 letters or digits. */
|
|
9930
|
+
line_id: string;
|
|
9931
|
+
/** @description The version of the scoring that produced the stored score. `null` when the line has no stored score yet. */
|
|
9932
|
+
version: number | null;
|
|
9933
|
+
/** @description When the stored score was computed (ISO 8601, UTC). `null` when the line has no stored score yet. */
|
|
9934
|
+
computed_at: string | null;
|
|
9935
|
+
/** @description The score, from 0 (no risk observed) to 100 (most at risk): a higher number is worse. `null` when `band` is `unknown`. */
|
|
9936
|
+
score: number | null;
|
|
9937
|
+
/**
|
|
9938
|
+
* @description `low` (0 to 29): no action needed. `medium` (30 to 59): worth watching. `high` (60 to 100): the line is at risk. `unknown`: not enough traffic to judge.
|
|
9939
|
+
* @enum {string}
|
|
9940
|
+
*/
|
|
9941
|
+
band: "low" | "medium" | "high" | "unknown";
|
|
9942
|
+
/** @description One sentence that reads the band. */
|
|
9943
|
+
summary: string;
|
|
9944
|
+
/** @description The factors that add the most risk, largest first, at most 3, each with what to do. Empty when `band` is `unknown` or when no factor adds risk. */
|
|
9945
|
+
items: components["schemas"]["LineHealthReportItem"][];
|
|
9946
|
+
};
|
|
9947
|
+
LineHealthReportItem: {
|
|
9948
|
+
/**
|
|
9949
|
+
* @description The factor that adds risk. An open list: ignore the values you do not know. `delivery_outcome`: sends that fail. `first_contact_reply_rate`: few first messages get a reply. `reply_rate_drop`: the reply rate fell below its earlier level. `inbound_outbound_balance`: few messages received for the messages sent. `burstiness`: sends are not spread like the activity of the line. `quota_headroom`: the sending limits are almost used. `apple_id_flag`: the Apple ID of the line is flagged. `suspected_dead`, `phone_drift`, `private_api_attention`, `open_incidents` and `line_proof`: device factors, listed on a BYOD line only.
|
|
9950
|
+
* @enum {string}
|
|
9951
|
+
*/
|
|
9952
|
+
factor_id: "delivery_outcome" | "first_contact_reply_rate" | "reply_rate_drop" | "inbound_outbound_balance" | "burstiness" | "quota_headroom" | "apple_id_flag" | "suspected_dead" | "phone_drift" | "private_api_attention" | "open_incidents" | "line_proof";
|
|
9953
|
+
/** @description What the factor means for this line, in a sentence. */
|
|
9954
|
+
explanation: string;
|
|
9955
|
+
/** @description What to do about it. On a line that is not a BYOD line, a factor that iSnap resolves says so. */
|
|
9956
|
+
action: string;
|
|
9957
|
+
};
|
|
9534
9958
|
LineConfigEnvelope: {
|
|
9535
9959
|
/**
|
|
9536
9960
|
* @description Always `true` on a success response.
|
|
@@ -9590,6 +10014,8 @@ export interface components {
|
|
|
9590
10014
|
reply_max_per_inbound: number;
|
|
9591
10015
|
/** @description Reply-lane allowance: the number of replies per rolling 24 hours that can pass a sending limit through the reply lane. 0 means the reply lane is off. */
|
|
9592
10016
|
daily_reply_limit: number;
|
|
10017
|
+
/** @description Priority allowance: the number of messages sent with `priority: true` per rolling 24 hours that can pass the hourly limit. It is part of `daily_total_message_limit`, not added to it. 0 means priority is off. */
|
|
10018
|
+
daily_priority_limit: number;
|
|
9593
10019
|
/** @description IANA time zone of the line. Without an override, iSnap derives it from the North American area code of the line, else from its country when that country has a single time zone; otherwise it is `Europe/London` for a `+44` number and `America/Chicago` for any other number. */
|
|
9594
10020
|
timezone: string;
|
|
9595
10021
|
/** @description The sending hours in force on the line, as a list of hours with a weight: the override of the line where it has one, `default_activity_curve` otherwise. Never empty. An hour with weight 0, or with no entry, is a quiet hour. */
|
|
@@ -9600,7 +10026,7 @@ export interface components {
|
|
|
9600
10026
|
weight: number;
|
|
9601
10027
|
}[];
|
|
9602
10028
|
};
|
|
9603
|
-
/** @description The
|
|
10029
|
+
/** @description The nine limits that have a default and bounds: the five message limits, the three reply limits and the priority limit. Each has its value in force, its default and its bounds `min` and `max`. A value above `default` is accepted only for the five message limits of a BYOD line, up to `max`. */
|
|
9604
10030
|
LineConfigKnobs: {
|
|
9605
10031
|
daily_new_contact_limit: components["schemas"]["LineConfigKnobBounds"];
|
|
9606
10032
|
daily_known_contact_limit: components["schemas"]["LineConfigKnobBounds"];
|
|
@@ -9610,6 +10036,7 @@ export interface components {
|
|
|
9610
10036
|
reply_window_hours: components["schemas"]["LineConfigKnobBounds"];
|
|
9611
10037
|
reply_max_per_inbound: components["schemas"]["LineConfigKnobBounds"];
|
|
9612
10038
|
daily_reply_limit: components["schemas"]["LineConfigKnobBounds"];
|
|
10039
|
+
daily_priority_limit: components["schemas"]["LineConfigKnobBounds"];
|
|
9613
10040
|
};
|
|
9614
10041
|
/** @description One limit of the line: the value in force, its default, and its bounds. A value above the default is accepted only for the five message limits of a BYOD line. */
|
|
9615
10042
|
LineConfigKnobBounds: {
|
|
@@ -9619,7 +10046,7 @@ export interface components {
|
|
|
9619
10046
|
default: number;
|
|
9620
10047
|
/** @description The smallest value the API accepts for this key. */
|
|
9621
10048
|
min: number;
|
|
9622
|
-
/** @description The upper bound of this key. A value above `default` is accepted, up to `max`, only on a BYOD line and only for `daily_new_contact_limit`, `daily_known_contact_limit`, `daily_total_message_limit`, `hourly_message_limit` and `minute_message_limit`. On any other line, and for the three reply limits on every line, a value above `default` returns `403 cannot_increase_limit`. A value above `max` is refused first, on every line, with `422 limit_out_of_bounds` or `400 validation_failed`. */
|
|
10049
|
+
/** @description The upper bound of this key. A value above `default` is accepted, up to `max`, only on a BYOD line and only for `daily_new_contact_limit`, `daily_known_contact_limit`, `daily_total_message_limit`, `hourly_message_limit` and `minute_message_limit`. On any other line, and for the three reply limits and `daily_priority_limit` on every line, a value above `default` returns `403 cannot_increase_limit`. A value above `max` is refused first, on every line, with `422 limit_out_of_bounds` or `400 validation_failed`. */
|
|
9623
10050
|
max: number;
|
|
9624
10051
|
};
|
|
9625
10052
|
/** @description The keys to override on this line. Send a key with its default value to remove its override. `null` and unknown keys return `400 validation_failed`. */
|
|
@@ -9653,6 +10080,8 @@ export interface components {
|
|
|
9653
10080
|
reply_max_per_inbound?: number;
|
|
9654
10081
|
/** @description Reply-lane allowance: the number of replies per rolling 24 hours that can pass a sending limit through the reply lane. 0 turns the reply lane off. Accepted values: 0 to 1,000. It can only be lowered below the default (`403 cannot_increase_limit`). */
|
|
9655
10082
|
daily_reply_limit?: number;
|
|
10083
|
+
/** @description Priority allowance: the number of messages sent with `priority: true` per rolling 24 hours that can pass the hourly limit. It is part of `daily_total_message_limit`, not added to it. 0 turns priority off. Accepted values: 0 to 50. It can only be lowered below the default (`403 cannot_increase_limit`), on a BYOD line too. */
|
|
10084
|
+
daily_priority_limit?: number;
|
|
9656
10085
|
/** @description IANA time zone name of the line, for example `America/New_York` (`400 validation_failed` otherwise). iSnap reads quiet hours in it for a recipient whose own time zone it does not know. Once set, it can be replaced but not removed. */
|
|
9657
10086
|
timezone?: string;
|
|
9658
10087
|
/** @description The sending hours of the line, as a list of hours with a weight. An hour with weight 0, or with no entry, is a quiet hour: a message accepted then is held until the next hour that has a weight. Messages held by a 24-hour sending limit are placed in the hours in proportion to their weights. It needs at least one entry, no hour twice, and a total weight above 0 (`422 invalid_activity_curve` otherwise). A curve the same as `default_activity_curve` (returned by `GET /v1/lines/{id}/config`) removes the override instead of setting one. Two curves are the same when every hour from 0 to 23 has the same weight in both, an hour with no entry counting as 0: the order of the entries does not matter, and a curve that lists only its weighted hours is the same as the 24-hour curve with 0 everywhere else. */
|
|
@@ -9700,6 +10129,8 @@ export interface components {
|
|
|
9700
10129
|
/** @description Estimated time of the hand-over of the line: the time the build starts plus 72 hours. Set once, when the build starts, and never revised. `null` while the pre-order is `draft` or `awaiting_payment`, and on a pre-order canceled before its build started. */
|
|
9701
10130
|
estimated_fulfillment: string | null;
|
|
9702
10131
|
device_status?: components["schemas"]["DeviceFulfillmentStatus"];
|
|
10132
|
+
/** @description The four build steps of the pre-order, always in the order `number_secured`, `phone_prepared`, `account_prepared`, `connected`, each with the time it was completed or `null` until it is done. Present on every pre-order response. A `draft`, an `awaiting_payment` and a `cancelled` pre-order show four steps with `completed_at: null`. */
|
|
10133
|
+
progress?: components["schemas"]["PreOrderProgressStep"][];
|
|
9703
10134
|
/** @description Timestamp of creation, ISO 8601 in UTC. */
|
|
9704
10135
|
created_at: string;
|
|
9705
10136
|
/** @description Timestamp of the last change of the pre-order, ISO 8601 in UTC. */
|
|
@@ -9724,6 +10155,16 @@ export interface components {
|
|
|
9724
10155
|
* @enum {string|null}
|
|
9725
10156
|
*/
|
|
9726
10157
|
DeviceFulfillmentStatus: "awaiting_hardware" | "received" | "setup_in_progress" | "ready" | "deployed" | null;
|
|
10158
|
+
/** @description One build step of a pre-order and the time it was completed. */
|
|
10159
|
+
PreOrderProgressStep: {
|
|
10160
|
+
/**
|
|
10161
|
+
* @description The step: `number_secured` (the number of the line is secured), `phone_prepared` (the phone of the line is prepared), `account_prepared` (the accounts the line needs are prepared) or `connected` (the line is connected and handed over).
|
|
10162
|
+
* @enum {string}
|
|
10163
|
+
*/
|
|
10164
|
+
step: "number_secured" | "phone_prepared" | "account_prepared" | "connected";
|
|
10165
|
+
/** @description When the step was completed, ISO 8601 in UTC. `null` until the step is done. */
|
|
10166
|
+
completed_at: string | null;
|
|
10167
|
+
};
|
|
9727
10168
|
PreOrderList: {
|
|
9728
10169
|
/**
|
|
9729
10170
|
* @description Always `true` on a success response.
|
|
@@ -10160,6 +10601,8 @@ export interface components {
|
|
|
10160
10601
|
schedule_reason: string | null;
|
|
10161
10602
|
/** @description `true` when the message is in the reply lane: it answers a contact who wrote to the line in the last 24 hours, within the limits of the reply lane. Such a message is not held by the hourly limit, by the three 24-hour limits or by quiet hours. Set when the message is accepted. A held message enters the reply lane when its contact writes to the line while it waits, whatever held it, oldest first and within the same limits: the value then changes from `false` to `true`, once and never back, and the message is released without waiting for its `scheduled_for`, still after the earlier messages to the same recipient and within the per-minute limit and the spacing of the line. */
|
|
10162
10603
|
reply_lane: boolean;
|
|
10604
|
+
/** @description `true` when the message was sent with `priority: true`, the priority reserve of the line is on (`daily_priority_limit` above 0) and the reply lane does not carry the message. Such a message is not held by the hourly limit while the reserve has room, and a held one leaves before the messages that are not priority. `false` otherwise, on an inbound message and on a message typed on the device of the line. Set when the message is accepted. A held message that enters the reply lane while it waits changes from `true` to `false`, once and never back. */
|
|
10605
|
+
priority: boolean;
|
|
10163
10606
|
/** @description `true` when the message was sent with `ignore_quiet_hours: true` on a line that is not a shared line: quiet hours do not hold it. `false` otherwise, on a shared line, on an inbound message and on a message typed on the device of the line. Set when the message is accepted and never changed after that. */
|
|
10164
10607
|
ignore_quiet_hours: boolean;
|
|
10165
10608
|
/** @description `true` when the message was sent with `cancel_on_reply: true`: iSnap cancels it if its recipient writes to the line before the message is with the line's device. `false` otherwise, on an inbound message and on a message typed on the device of the line. Set when the message is accepted and never changed after that. */
|
|
@@ -10215,7 +10658,7 @@ export interface components {
|
|
|
10215
10658
|
read_at: string | null;
|
|
10216
10659
|
/** @description When the message became `failed`. `null` otherwise. When the device of an iMessage line reports a failure after `sent`, `failed_at` holds the time of the send, not the time of the failure. */
|
|
10217
10660
|
failed_at: string | null;
|
|
10218
|
-
/** @description `null` unless the message is `failed`. When iSnap failed the message itself: `carrier_unavailable` (the message waited 48 hours without reaching a device), `no_terminal_ack` (the line's device took the message and never reported an outcome)
|
|
10661
|
+
/** @description `null` unless the message is `failed`. When iSnap failed the message itself: `carrier_unavailable` (the message waited 48 hours without reaching a device), `no_terminal_ack` (the line's device took the message and never reported an outcome), `carrier_terminated` (the line was terminated while the message was waiting) or `line_offline_stale` (the line stopped reporting and the message waited too long to be sent). `null` when the line's device reported the failure: read `error_message`. */
|
|
10219
10662
|
error_code: string | null;
|
|
10220
10663
|
/** @description `null` unless the message is `failed`. A text that describes the failure. When the line's device reported the failure, it is the text the device gave, or `null` when it gave none. */
|
|
10221
10664
|
error_message: string | null;
|
|
@@ -10395,7 +10838,7 @@ export interface components {
|
|
|
10395
10838
|
* @description An exact event type such as `message.received`, a family wildcard such as `line.*`, or `*` for every event. A wildcard for a family that does not exist is accepted and matches nothing. `webhook.test` is never delivered through an event filter: iSnap sends it only to a suspended webhook subscription, to check whether its URL responds again.
|
|
10396
10839
|
* @enum {string}
|
|
10397
10840
|
*/
|
|
10398
|
-
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" | "line.terminated" | "line.variant_changed" | "line.variant_scheduled" | "line.variant_unscheduled" | "typing_indicator.started" | "typing_indicator.stopped" | "trial.linked" | "trial.dormant" | "trial.reactivated" | "trial.bind_conflict" | "trial.revoked" | "binding.released" | "pre_order.fulfilled" | "pre_order.cancelled" | "macos_session.rented" | "macos_session.released" | "webhook.test" | "*" | "message.*" | "reaction.*" | "line.*" | "typing_indicator.*" | "trial.*" | "binding.*" | "pre_order.*" | "macos_session.*" | "webhook.*";
|
|
10841
|
+
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" | "line.terminated" | "line.variant_changed" | "line.variant_scheduled" | "line.variant_unscheduled" | "line.phone_number_changed" | "typing_indicator.started" | "typing_indicator.stopped" | "trial.linked" | "trial.dormant" | "trial.reactivated" | "trial.bind_conflict" | "trial.revoked" | "binding.released" | "pre_order.fulfilled" | "pre_order.cancelled" | "macos_session.rented" | "macos_session.released" | "webhook.test" | "*" | "message.*" | "reaction.*" | "line.*" | "typing_indicator.*" | "trial.*" | "binding.*" | "pre_order.*" | "macos_session.*" | "webhook.*";
|
|
10399
10842
|
/** @description The webhook subscriptions of the account. */
|
|
10400
10843
|
WebhookList: {
|
|
10401
10844
|
/** @description Every webhook subscription of the account, newest first. */
|
|
@@ -10811,11 +11254,36 @@ export interface components {
|
|
|
10811
11254
|
message_count: number;
|
|
10812
11255
|
/** @description Number of inbound messages received in the chat since it was created. Marking the chat as read does not reset it. */
|
|
10813
11256
|
unread_count: number;
|
|
11257
|
+
health: components["schemas"]["ChatHealth"];
|
|
10814
11258
|
/** @description When iSnap created the chat: at the first message in either direction. */
|
|
10815
11259
|
created_at: string;
|
|
10816
11260
|
/** @description When the chat last changed. */
|
|
10817
11261
|
updated_at: string;
|
|
10818
11262
|
};
|
|
11263
|
+
/** @description The health of the chat. `null` on a group (`is_group` is `true`) and on a chat of a trial line. */
|
|
11264
|
+
ChatHealth: {
|
|
11265
|
+
/**
|
|
11266
|
+
* @description `opted_out` when the contact sent a stop keyword, whatever the streak. Otherwise `critical` from 4 consecutive messages you sent with no reply, `at_risk` from 2, and `healthy` below that.
|
|
11267
|
+
* @enum {string}
|
|
11268
|
+
*/
|
|
11269
|
+
status: "healthy" | "at_risk" | "critical" | "opted_out";
|
|
11270
|
+
/**
|
|
11271
|
+
* @description `opt_out_keyword` on `opted_out`, `no_reply_streak` on `at_risk` and `critical`, `null` on `healthy`.
|
|
11272
|
+
* @enum {string|null}
|
|
11273
|
+
*/
|
|
11274
|
+
reason: "opt_out_keyword" | "no_reply_streak" | null;
|
|
11275
|
+
/**
|
|
11276
|
+
* @description The version of the rule that produced the status. Always `chat-health/1`.
|
|
11277
|
+
* @enum {string}
|
|
11278
|
+
*/
|
|
11279
|
+
rule: "chat-health/1";
|
|
11280
|
+
/** @description Number of consecutive messages sent in the chat since the last message received from the contact. 0 when the contact wrote last. */
|
|
11281
|
+
unanswered_outbound: number;
|
|
11282
|
+
/** @description Time of the last message received from the contact, as an ISO 8601 timestamp. `null` when none was recorded. */
|
|
11283
|
+
last_inbound_at: string | null;
|
|
11284
|
+
/** @description Time of the last message sent to the contact, as an ISO 8601 timestamp. `null` when none was recorded. */
|
|
11285
|
+
last_outbound_at: string | null;
|
|
11286
|
+
} | null;
|
|
10819
11287
|
ChatEnvelope: {
|
|
10820
11288
|
/**
|
|
10821
11289
|
* @description Always `true` on a success response.
|
|
@@ -11311,6 +11779,127 @@ export interface components {
|
|
|
11311
11779
|
*/
|
|
11312
11780
|
available: boolean;
|
|
11313
11781
|
};
|
|
11782
|
+
FleetHealthEnvelope: {
|
|
11783
|
+
/**
|
|
11784
|
+
* @description Always `true` on a success response.
|
|
11785
|
+
* @enum {boolean}
|
|
11786
|
+
*/
|
|
11787
|
+
success: true;
|
|
11788
|
+
data: components["schemas"]["FleetHealthReport"];
|
|
11789
|
+
/** @description Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap. */
|
|
11790
|
+
trace_id: string;
|
|
11791
|
+
/** @description Id of the request that produced this response: `req_` followed by 25 letters or digits. */
|
|
11792
|
+
request_id: string;
|
|
11793
|
+
};
|
|
11794
|
+
/** @description The two-way rate of the iSnap fleet on one UTC day, as figures with no line, number or customer in them. */
|
|
11795
|
+
FleetHealthReport: {
|
|
11796
|
+
/**
|
|
11797
|
+
* @description The definition this report follows.
|
|
11798
|
+
* @example two-way-rate/1
|
|
11799
|
+
* @enum {string}
|
|
11800
|
+
*/
|
|
11801
|
+
standard: "two-way-rate/1";
|
|
11802
|
+
/**
|
|
11803
|
+
* @description The UTC day (`YYYY-MM-DD`) of the report. `null` until the first report is published.
|
|
11804
|
+
* @example 2026-11-12
|
|
11805
|
+
*/
|
|
11806
|
+
as_of: string | null;
|
|
11807
|
+
/**
|
|
11808
|
+
* @description The length of the window the rates cover, in days.
|
|
11809
|
+
* @example 30
|
|
11810
|
+
*/
|
|
11811
|
+
window_days: number;
|
|
11812
|
+
/**
|
|
11813
|
+
* @description The days of the window the figures cover. From 0 to `window_days`.
|
|
11814
|
+
* @example 30
|
|
11815
|
+
*/
|
|
11816
|
+
coverage_days: number;
|
|
11817
|
+
/**
|
|
11818
|
+
* @description The fewest people a line must have contacted in the window to be rated.
|
|
11819
|
+
* @example 20
|
|
11820
|
+
*/
|
|
11821
|
+
min_contacted: number;
|
|
11822
|
+
/**
|
|
11823
|
+
* @description A rated line whose two-way rate is below this value counts as one-way.
|
|
11824
|
+
* @example 0.2
|
|
11825
|
+
*/
|
|
11826
|
+
one_way_below: number;
|
|
11827
|
+
/** @description The rated lines, in no meaningful order. */
|
|
11828
|
+
lines: components["schemas"]["FleetHealthLine"][];
|
|
11829
|
+
/**
|
|
11830
|
+
* @description The lines below `min_contacted`, not listed in `lines`.
|
|
11831
|
+
* @example 12
|
|
11832
|
+
*/
|
|
11833
|
+
unrated: number;
|
|
11834
|
+
/**
|
|
11835
|
+
* @description The lines left out of the fleet figures.
|
|
11836
|
+
* @example 3
|
|
11837
|
+
*/
|
|
11838
|
+
excluded: number;
|
|
11839
|
+
/**
|
|
11840
|
+
* @description The median two-way rate of the day, `null` when there is none.
|
|
11841
|
+
* @example 0.7
|
|
11842
|
+
*/
|
|
11843
|
+
daily_median: number | null;
|
|
11844
|
+
summary: components["schemas"]["FleetHealthSummary"];
|
|
11845
|
+
};
|
|
11846
|
+
/** @description One rated line of the fleet. A row names no line: it carries its kind and its counts only. */
|
|
11847
|
+
FleetHealthLine: {
|
|
11848
|
+
/**
|
|
11849
|
+
* @description The kind of line: `rented`, `byop` or `shared`.
|
|
11850
|
+
* @example rented
|
|
11851
|
+
* @enum {string}
|
|
11852
|
+
*/
|
|
11853
|
+
kind: "rented" | "byop" | "shared";
|
|
11854
|
+
/**
|
|
11855
|
+
* @description The people this line texted first in the window.
|
|
11856
|
+
* @example 42
|
|
11857
|
+
*/
|
|
11858
|
+
contacted: number;
|
|
11859
|
+
/**
|
|
11860
|
+
* @description The people among `contacted` who wrote back. At most `contacted`.
|
|
11861
|
+
* @example 30
|
|
11862
|
+
*/
|
|
11863
|
+
answered: number;
|
|
11864
|
+
/**
|
|
11865
|
+
* @description The messages this line sent in the window.
|
|
11866
|
+
* @example 310
|
|
11867
|
+
*/
|
|
11868
|
+
sent: number;
|
|
11869
|
+
/**
|
|
11870
|
+
* @description The messages this line received in the window.
|
|
11871
|
+
* @example 280
|
|
11872
|
+
*/
|
|
11873
|
+
received: number;
|
|
11874
|
+
};
|
|
11875
|
+
/** @description The figures of the whole rated fleet. */
|
|
11876
|
+
FleetHealthSummary: {
|
|
11877
|
+
/**
|
|
11878
|
+
* @description The number of rated lines: the length of `lines`.
|
|
11879
|
+
* @example 120
|
|
11880
|
+
*/
|
|
11881
|
+
rated: number;
|
|
11882
|
+
/**
|
|
11883
|
+
* @description The median two-way rate of the rated lines, `null` when no line is rated.
|
|
11884
|
+
* @example 0.71
|
|
11885
|
+
*/
|
|
11886
|
+
median: number | null;
|
|
11887
|
+
/**
|
|
11888
|
+
* @description The two-way rate below which the lowest tenth of the rated lines fall, `null` when no line is rated.
|
|
11889
|
+
* @example 0.34
|
|
11890
|
+
*/
|
|
11891
|
+
lowest_tenth: number | null;
|
|
11892
|
+
/**
|
|
11893
|
+
* @description The number of rated lines whose rate is below `one_way_below`.
|
|
11894
|
+
* @example 4
|
|
11895
|
+
*/
|
|
11896
|
+
one_way: number;
|
|
11897
|
+
/**
|
|
11898
|
+
* @description The answers coming back per 100 contacts, `null` when no line is rated.
|
|
11899
|
+
* @example 68.5
|
|
11900
|
+
*/
|
|
11901
|
+
back_per_100: number | null;
|
|
11902
|
+
};
|
|
11314
11903
|
/** @description The text was received by the sandbox number. */
|
|
11315
11904
|
SandboxInboundAccepted: {
|
|
11316
11905
|
/** @description Id of the received text, as the number reported it. */
|