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

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
  *
@@ -9087,6 +9087,13 @@ export interface components {
9087
9087
  /** @description The keys of `config` that have an override on this line. */
9088
9088
  overridden_keys: string[];
9089
9089
  knobs: components["schemas"]["LineConfigKnobs"];
9090
+ /** @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. */
9091
+ default_activity_curve: {
9092
+ /** @description Hour of the day, from 0 to 23, in the local time of the recipient. */
9093
+ hour: number;
9094
+ /** @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. */
9095
+ weight: number;
9096
+ }[];
9090
9097
  };
9091
9098
  /** @description The value in force for every key of the configuration: the override of the line where it has one, the default otherwise. */
9092
9099
  EffectiveLineConfig: {
@@ -9121,7 +9128,7 @@ export interface components {
9121
9128
  daily_reply_limit: number;
9122
9129
  /** @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
9130
  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. */
9131
+ /** @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
9132
  activity_curve: {
9126
9133
  /** @description Hour of the day, from 0 to 23, in the local time of the recipient. */
9127
9134
  hour: number;
@@ -9184,7 +9191,7 @@ export interface components {
9184
9191
  daily_reply_limit?: number;
9185
9192
  /** @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
9193
  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). */
9194
+ /** @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
9195
  activity_curve?: {
9189
9196
  /** @description Hour of the day, from 0 to 23, in the local time of the recipient. */
9190
9197
  hour: number;
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.230",
4
4
  "description": "Official TypeScript SDK for the iSnap P2P telephony API",
5
5
  "license": "MIT",
6
6
  "type": "module",