@isnap/sdk 2.2.0-next.229 → 2.2.0-next.231

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.
@@ -2791,7 +2791,7 @@ export interface paths {
2791
2791
  };
2792
2792
  /**
2793
2793
  * Get the configuration of a line
2794
- * @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, and `knobs` gives, for eight 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 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.
2794
+ * @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 eight 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 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.
2795
2795
  */
2796
2796
  get: {
2797
2797
  parameters: {
@@ -2877,7 +2877,7 @@ export interface paths {
2877
2877
  head?: never;
2878
2878
  /**
2879
2879
  * Update the configuration of a line
2880
- * @description Sets overrides of the sending configuration on a line you own, and returns the resulting configuration. Accepts an API key. Send only the keys to change. To remove an override, send the key with its default value: `null` is not accepted.
2880
+ * @description Sets overrides of the sending configuration on a line you own, and returns the resulting configuration. Accepts an API key. Send only the keys to change. To remove an override, send the key with its default value: `null` is not accepted. For `activity_curve`, the default value is `default_activity_curve`.
2881
2881
  *
2882
2882
  * A limit can only be lowered below its default, and the two delays, `min_inter_message_seconds` and `min_inter_new_contact_seconds`, can only be raised above theirs. On a BYOD line, the five message limits (`daily_new_contact_limit`, `daily_known_contact_limit`, `daily_total_message_limit`, `hourly_message_limit` and `minute_message_limit`) can also be raised above their default, up to `knobs.<key>.max`.
2883
2883
  *
@@ -5029,6 +5029,8 @@ export interface paths {
5029
5029
  reply_to_message_id?: string;
5030
5030
  /** @description Whether the line's device shows the typing indicator to the recipient before it sends this message. When omitted, the line's `default_use_typing_indicator` applies, which is `true` unless you changed it. Always `false` on a line that is not an iMessage line. The response returns the value in effect. */
5031
5031
  use_typing_indicator?: boolean;
5032
+ /** @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. */
5033
+ ignore_quiet_hours?: boolean;
5032
5034
  /**
5033
5035
  * @description Your own keys and values for this message: at most 20 keys and 8,192 bytes once serialized as JSON, otherwise the API returns `400 validation_failed`. iSnap stores the object as sent and returns it in `metadata` of the message, in every response and in the events of the message.
5034
5036
  * @example {
@@ -6987,6 +6989,8 @@ export interface paths {
6987
6989
  organization?: string;
6988
6990
  /** @description Free text on the card, at most 2,000 characters. */
6989
6991
  note?: string;
6992
+ /** @description `true` to let the message that carries the card leave during the quiet hours of the line, as `ignore_quiet_hours` of `POST /v1/messages`. The default is `false`. No effect on a shared line. */
6993
+ ignore_quiet_hours?: boolean;
6990
6994
  };
6991
6995
  };
6992
6996
  };
@@ -9087,6 +9091,13 @@ export interface components {
9087
9091
  /** @description The keys of `config` that have an override on this line. */
9088
9092
  overridden_keys: string[];
9089
9093
  knobs: components["schemas"]["LineConfigKnobs"];
9094
+ /** @description The sending hours the line has without an `activity_curve` override, as a list of hours with a weight. Never empty. It depends on whether the line is an iMessage line or an Android line, and iSnap can change it: read it here instead of storing it. Send it as `activity_curve` in `PATCH /v1/lines/{id}/config` to remove the override. */
9095
+ default_activity_curve: {
9096
+ /** @description Hour of the day, from 0 to 23, in the local time of the recipient. */
9097
+ hour: number;
9098
+ /** @description Weight of this hour, a non-negative integer. 0 makes it a quiet hour; a larger weight gives the hour a larger share of the held messages. */
9099
+ weight: number;
9100
+ }[];
9090
9101
  };
9091
9102
  /** @description The value in force for every key of the configuration: the override of the line where it has one, the default otherwise. */
9092
9103
  EffectiveLineConfig: {
@@ -9121,7 +9132,7 @@ export interface components {
9121
9132
  daily_reply_limit: number;
9122
9133
  /** @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. */
9123
9134
  timezone: string;
9124
- /** @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. */
9135
+ /** @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. */
9125
9136
  activity_curve: {
9126
9137
  /** @description Hour of the day, from 0 to 23, in the local time of the recipient. */
9127
9138
  hour: number;
@@ -9184,7 +9195,7 @@ export interface components {
9184
9195
  daily_reply_limit?: number;
9185
9196
  /** @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. */
9186
9197
  timezone?: string;
9187
- /** @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). */
9198
+ /** @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. */
9188
9199
  activity_curve?: {
9189
9200
  /** @description Hour of the day, from 0 to 23, in the local time of the recipient. */
9190
9201
  hour: number;
@@ -9667,8 +9678,10 @@ export interface components {
9667
9678
  scheduled_for: string | null;
9668
9679
  /** @description Why iSnap holds the message, while its `status` is `scheduled`. `minute_limit_exceeded`, `hourly_limit_exceeded`, `total_message_quota_exceeded`, `new_contact_quota_exceeded` or `known_contact_quota_exceeded`: a sending limit of the line is reached. `inter_message_delay` or `inter_new_contact_delay`: the spacing between two messages of the line. `quiet_hours`: the message was accepted outside the line's sending hours, counted in the recipient's local time. `carrier_retry`: on a shared line, the number that serves the contact is busy or offline. `pending_retry`: iSnap is retrying the release. A message held behind an earlier message to the same recipient takes the `schedule_reason` of that earlier message while the earlier one is held, and `inter_message_delay` (`carrier_retry` on a shared line) while the earlier one waits for the line's device: `schedule_reason` alone does not tell you that a message waits for an earlier one. `null` on a message that was never held, and `null` again once the message is released. Treat a value you do not know as a hold: more values can be added. */
9669
9680
  schedule_reason: string | null;
9670
- /** @description `true` when the message was accepted 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 and never changed after that. */
9681
+ /** @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. */
9671
9682
  reply_lane: boolean;
9683
+ /** @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. */
9684
+ ignore_quiet_hours: boolean;
9672
9685
  /** @description The state of the line's sending limits when the message was accepted. Filled only in the response of `POST /v1/messages` to a new request: `null` on every read, in the response to a retry with the same `Idempotency-Key`, and in events. */
9673
9686
  queue_info: {
9674
9687
  /** @description 0 when the message leaves immediately. Otherwise the rank of the message among the line's held messages, starting at 1. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isnap/sdk",
3
- "version": "2.2.0-next.229",
3
+ "version": "2.2.0-next.231",
4
4
  "description": "Official TypeScript SDK for the iSnap P2P telephony API",
5
5
  "license": "MIT",
6
6
  "type": "module",