@isnap/sdk 2.3.0 → 2.3.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.
Files changed (86) hide show
  1. package/CHANGELOG.md +65 -40
  2. package/README.md +360 -167
  3. package/dist/client.d.ts +35 -49
  4. package/dist/client.d.ts.map +1 -1
  5. package/dist/client.js +44 -58
  6. package/dist/client.js.map +1 -1
  7. package/dist/config.d.ts +6 -6
  8. package/dist/config.js +6 -6
  9. package/dist/generated/openapi.d.ts +403 -14
  10. package/dist/internal/sleep.d.ts +2 -2
  11. package/dist/internal/sleep.js +5 -5
  12. package/dist/internal/sleep.js.map +1 -1
  13. package/dist/resources/apps.d.ts +11 -18
  14. package/dist/resources/apps.d.ts.map +1 -1
  15. package/dist/resources/apps.js +11 -18
  16. package/dist/resources/apps.js.map +1 -1
  17. package/dist/resources/area-codes.d.ts +5 -6
  18. package/dist/resources/area-codes.d.ts.map +1 -1
  19. package/dist/resources/area-codes.js +5 -6
  20. package/dist/resources/area-codes.js.map +1 -1
  21. package/dist/resources/attachments.d.ts +51 -17
  22. package/dist/resources/attachments.d.ts.map +1 -1
  23. package/dist/resources/attachments.js +42 -22
  24. package/dist/resources/attachments.js.map +1 -1
  25. package/dist/resources/byod.d.ts +14 -4
  26. package/dist/resources/byod.d.ts.map +1 -1
  27. package/dist/resources/byod.js +14 -4
  28. package/dist/resources/byod.js.map +1 -1
  29. package/dist/resources/chats.d.ts +30 -22
  30. package/dist/resources/chats.d.ts.map +1 -1
  31. package/dist/resources/chats.js +29 -21
  32. package/dist/resources/chats.js.map +1 -1
  33. package/dist/resources/lines.d.ts +240 -266
  34. package/dist/resources/lines.d.ts.map +1 -1
  35. package/dist/resources/lines.js +240 -266
  36. package/dist/resources/lines.js.map +1 -1
  37. package/dist/resources/lookup.d.ts +10 -13
  38. package/dist/resources/lookup.d.ts.map +1 -1
  39. package/dist/resources/lookup.js +10 -13
  40. package/dist/resources/lookup.js.map +1 -1
  41. package/dist/resources/macos-sessions.d.ts +42 -36
  42. package/dist/resources/macos-sessions.d.ts.map +1 -1
  43. package/dist/resources/macos-sessions.js +24 -22
  44. package/dist/resources/macos-sessions.js.map +1 -1
  45. package/dist/resources/messages.d.ts +35 -25
  46. package/dist/resources/messages.d.ts.map +1 -1
  47. package/dist/resources/messages.js +30 -19
  48. package/dist/resources/messages.js.map +1 -1
  49. package/dist/resources/preorders.d.ts +42 -47
  50. package/dist/resources/preorders.d.ts.map +1 -1
  51. package/dist/resources/preorders.js +42 -47
  52. package/dist/resources/preorders.js.map +1 -1
  53. package/dist/resources/trial.d.ts +30 -21
  54. package/dist/resources/trial.d.ts.map +1 -1
  55. package/dist/resources/trial.js +30 -21
  56. package/dist/resources/trial.js.map +1 -1
  57. package/dist/resources/webhooks.d.ts +39 -22
  58. package/dist/resources/webhooks.d.ts.map +1 -1
  59. package/dist/resources/webhooks.js +39 -22
  60. package/dist/resources/webhooks.js.map +1 -1
  61. package/dist/retry.d.ts +9 -10
  62. package/dist/retry.d.ts.map +1 -1
  63. package/dist/retry.js +11 -12
  64. package/dist/retry.js.map +1 -1
  65. package/dist/types.d.ts +10 -0
  66. package/dist/types.d.ts.map +1 -1
  67. package/dist/version.d.ts +1 -1
  68. package/dist/version.d.ts.map +1 -1
  69. package/dist/version.js +13 -37
  70. package/dist/version.js.map +1 -1
  71. package/dist/webhooks/parse.d.ts +10 -9
  72. package/dist/webhooks/parse.d.ts.map +1 -1
  73. package/dist/webhooks/parse.js +14 -13
  74. package/dist/webhooks/parse.js.map +1 -1
  75. package/dist/webhooks/types.d.ts +74 -110
  76. package/dist/webhooks/types.d.ts.map +1 -1
  77. package/dist/webhooks/types.js.map +1 -1
  78. package/dist/webhooks/verify.d.ts +27 -29
  79. package/dist/webhooks/verify.d.ts.map +1 -1
  80. package/dist/webhooks/verify.js +29 -35
  81. package/dist/webhooks/verify.js.map +1 -1
  82. package/examples/handle-webhook.ts +146 -0
  83. package/examples/paginate-messages.ts +54 -0
  84. package/examples/send-message.ts +37 -0
  85. package/examples/upload-attachment.ts +91 -0
  86. package/package.json +4 -8
@@ -927,7 +927,7 @@ export interface paths {
927
927
  *
928
928
  * Without `inbound_first`, the line is a billed line, for wholesale partners only: any other account gets `402 payment_required`. It has no per-line subscription and is billed on the monthly wholesale invoice. Every call creates one more billable line, and the API sets no limit on their number.
929
929
  *
930
- * With `inbound_first: true` the line is an inbound-first line. It answers only contacts who wrote to it first, each from the number that contact wrote to, and never writes first: a send to any other contact gets `403 outbound_first_forbidden`. The right to create one comes from an inbound pool on your account, whether or not you are a wholesale partner: without one the call gets `403 inbound_pool_required`. The line carries `inbound_only: true`. It has no anniversary, so it cannot be canceled at one: end it with `POST /v1/lines/{id}/terminate`.
930
+ * With `inbound_first: true` the line is an inbound-first line. It answers only contacts who wrote to it first, each from the number that contact wrote to, and never writes first: a send to any other contact gets `403 outbound_first_forbidden`. Inbound-first lines are a private alpha, enabled per account on request: an account they are not enabled on gets `403 inbound_pool_not_enabled`, and an account they are enabled on creates one whether or not it is a wholesale partner. The numbers its contacts write to come from the iSnap pool, one per invite (`POST /v1/lines/{line_id}/invites`). The line carries `inbound_only: true`. It has no anniversary, so it cannot be canceled at one: end it with `POST /v1/lines/{id}/terminate`.
931
931
  */
932
932
  post: {
933
933
  parameters: {
@@ -992,7 +992,7 @@ export interface paths {
992
992
  "application/json": components["schemas"]["ErrorEnvelope"];
993
993
  };
994
994
  };
995
- /** @description Refused. `forbidden`: the request carries neither an API key in its `Authorization` header nor the header `X-Requested-With: XMLHttpRequest`, or the key is line-scoped. A line-scoped key cannot acquire a line. `inbound_pool_required`: `inbound_first` is `true` and the account has no inbound pool. No line is created. */
995
+ /** @description Refused. `forbidden`: the request carries neither an API key in its `Authorization` header nor the header `X-Requested-With: XMLHttpRequest`, or the key is line-scoped. A line-scoped key cannot acquire a line. `inbound_pool_not_enabled`: `inbound_first` is `true` and inbound-first lines are not enabled on the account, a private alpha enabled per account on request. No line is created. */
996
996
  403: {
997
997
  headers: {
998
998
  [name: string]: unknown;
@@ -2979,9 +2979,9 @@ export interface paths {
2979
2979
  put?: never;
2980
2980
  /**
2981
2981
  * Create an invite
2982
- * @description Picks a phone number for one of your inbound-first lines and issues a code for it. Accepts an API key. Put the number and the code in the text you ask a visitor to send, for example in an `sms:` link: the text the visitor sends to that number with the code in it links the visitor to the line, and the line can then answer the visitor from that number. Never show the number without its code.
2982
+ * @description Picks a phone number from the iSnap pool for one of your inbound-first lines and issues a code for it. Accepts an API key. Put the number and the code in the text you ask a visitor to send, for example in an `sms:` link: the text the visitor sends to that number with the code in it links the visitor to the line, and the line can then answer the visitor from that number. Never show the number without its code.
2983
2983
  *
2984
- * Every call issues a new invite with a new code, even for the same visitor: `Idempotency-Key` is ignored, and a repeated call issues another invite. iSnap spreads the invites over the numbers that can take them; pass in `exclude` the numbers you do not want for this visitor. The body is optional; when you send one, send it as `application/json`: a body of any other type is refused with `400 validation_failed`. This operation sends no event.
2984
+ * Every call issues a new invite with a new code, even for the same visitor: `Idempotency-Key` is ignored, and a repeated call issues another invite. iSnap spreads the invites over the numbers that can take them; pass in `exclude` the numbers you do not want for this visitor. Inbound-first lines are a private alpha, enabled per account on request: an account they are not enabled on gets `403 inbound_pool_not_enabled`, whatever line it names. The body is optional; when you send one, send it as `application/json`: a body of any other type is refused with `400 validation_failed`. This operation sends no event.
2985
2985
  */
2986
2986
  post: {
2987
2987
  parameters: {
@@ -3037,7 +3037,7 @@ export interface paths {
3037
3037
  "application/json": components["schemas"]["ErrorEnvelope"];
3038
3038
  };
3039
3039
  };
3040
- /** @description Refused. `forbidden`: the request carries neither an API key in its `Authorization` header nor the header `X-Requested-With: XMLHttpRequest`, or the key is line-scoped and this line is outside its list. */
3040
+ /** @description Refused. `forbidden`: the request carries neither an API key in its `Authorization` header nor the header `X-Requested-With: XMLHttpRequest`, or the key is line-scoped and this line is outside its list. `inbound_pool_not_enabled`: inbound-first lines are not enabled on the account, a private alpha enabled per account on request. No invite is issued. */
3041
3041
  403: {
3042
3042
  headers: {
3043
3043
  [name: string]: unknown;
@@ -5009,11 +5009,11 @@ export interface paths {
5009
5009
  };
5010
5010
  /**
5011
5011
  * List messages
5012
- * @description Lists the messages your account sent and received that iSnap still keeps: it deletes a message at least 72 hours after it recorded it. Newest first by default. Filter with `line_id`, `status`, `direction`, `kind`, `since` and `until`. No filter selects one contact or one chat: filter with `line_id`, `direction`, `kind` and `since`, then keep the items whose `from` (inbound) or `to` (outbound) is the handle of the contact, both brought to E.164. A `line_id` that does not exist, or that is not a line of your account, returns an empty page and not `404`. Each item is the same message object as `GET /v1/messages/{id}` returns, with `queue_info` set to `null`. An item whose `kind` is `reaction` does not say which message it reacts to: filter with `kind=message` and read the `reactions` of each message.
5012
+ * @description Lists the messages your account sent and received that iSnap still keeps: it deletes a message at least 72 hours after it recorded it. Newest first by default. Filter with `line_id`, `contact`, `status`, `direction`, `kind`, `since` and `until`. `contact` selects one conversation of a line: with `line_id`, `contact` and `since`, the page holds only the messages exchanged with that handle from `since`, in both directions. A phone number is brought to E.164 and an email handle is compared without regard to case. `limit` counts the messages that match every filter. No filter selects one chat. A `line_id` that does not exist, or that is not a line of your account, returns an empty page and not `404`. Each item is the same message object as `GET /v1/messages/{id}` returns, with `queue_info` set to `null`. An item whose `kind` is `reaction` does not say which message it reacts to: filter with `kind=message` and read the `reactions` of each message.
5013
5013
  *
5014
- * The response carries `items`, `has_more` and `next_cursor`. Pass `next_cursor` as `cursor` to get the next page, and stop when `has_more` is `false`: `next_cursor` is then `null`. A cursor is valid only with the `sort`, `order` and filters of the request that returned it: write `since` and `until` the same way on every page. A malformed cursor, or one sent with another sort, order or filter, is not an error: the list restarts from the first page, and nothing in the response says so. With `sort=created_at`, a page that holds an id you already have means that the list restarted. Cursors do not expire.
5014
+ * The response carries `items`, `has_more` and `next_cursor`. Pass `next_cursor` as `cursor` to get the next page, and stop when `has_more` is `false`: `next_cursor` is then `null`. A cursor is valid only with the `sort`, `order` and filters of the request that returned it, `contact` included: write `since` and `until` the same way on every page. A malformed cursor, or one sent with another sort, order or filter, is not an error: the list restarts from the first page, and nothing in the response says so. With `sort=created_at`, a page that holds an id you already have means that the list restarted. Cursors do not expire.
5015
5015
  *
5016
- * Accepts an API key or a trial key. A line-scoped key lists only the messages of the lines in its `line_ids`. A trial key lists only the messages of its trial. `GET /v1/messages` and `POST /v1/messages` share one budget of 60 requests in 60 seconds, per account with an API key and per network address with a trial key: above it the API returns `429 rate_limit_exceeded` with `Retry-After: 60`. Each item carries personal data: handles, message text, file names and `metadata`.
5016
+ * Accepts an API key or a trial key. A line-scoped key lists only the messages of the lines in its `line_ids`. A trial key lists only the messages of its trial, and the notices iSnap sent to its paired handle since the trial started: those carry `system: true`. `GET /v1/messages` and `POST /v1/messages` share one budget of 60 requests in 60 seconds, per account with an API key and per network address with a trial key: above it the API returns `429 rate_limit_exceeded` with `Retry-After: 60`. Each item carries personal data: handles, message text, file names and `metadata`.
5017
5017
  */
5018
5018
  get: {
5019
5019
  parameters: {
@@ -5030,6 +5030,8 @@ export interface paths {
5030
5030
  until?: string;
5031
5031
  /** @description `message` leaves out voice notes and reaction entries. `voice` and `reaction` return only those. Omit it for all kinds. */
5032
5032
  kind?: "message" | "voice" | "reaction";
5033
+ /** @description Only the messages exchanged with this contact: the inbound messages whose `from` is the handle and the outbound messages whose `to` is the handle. A phone number in any form that parses as a valid number (a number without a country code is read as a US number) is brought to E.164. An email handle is compared without regard to case. An invalid handle gives `400 validation_failed`. */
5034
+ contact?: string;
5033
5035
  /** @description `created_at`, the default, orders by the time iSnap recorded each message. `scheduled_for` orders by planned departure, the value of the `scheduled_for` field: messages that have none, which are the inbound messages and the messages typed on the device of a line, come last in both directions. */
5034
5036
  sort?: "created_at" | "scheduled_for";
5035
5037
  /** @description `desc` or `asc`. When omitted: `desc` for `sort=created_at` (newest first) and `asc` for `sort=scheduled_for` (soonest first). */
@@ -5164,6 +5166,8 @@ export interface paths {
5164
5166
  use_typing_indicator?: boolean;
5165
5167
  /** @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. */
5166
5168
  ignore_quiet_hours?: boolean;
5169
+ /** @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
+ cancel_on_reply?: boolean;
5167
5171
  /**
5168
5172
  * @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.
5169
5173
  * @example {
@@ -6556,7 +6560,7 @@ export interface paths {
6556
6560
  };
6557
6561
  /**
6558
6562
  * Get an attachment
6559
- * @description Returns one attachment and, when its `status` is `ready`, a signed `download_url` valid for 15 minutes: until `download_expires_at`. Call again for a new URL. For any other `status`, `download_url` and `download_expires_at` are `null`. An account can read the attachments it created and the files received on its inbound messages: any other id returns `404 not_found`. Once `expires_at` has passed, 72 hours after the attachment was created, or after iSnap registered a received file, the API returns `410 attachment_expired` and iSnap deletes the file. No event announces a change of `status`. Accepts an API key. The `line_ids` of a line-scoped key are not checked: the key reads every attachment the account can read. `filename` can carry personal data.
6563
+ * @description Returns one attachment and, when its `status` is `ready`, a signed `download_url` valid for 15 minutes: until `download_expires_at`. Call again for a new URL. For any other `status`, `download_url` and `download_expires_at` are `null`. An account can read the attachments it created and the files received on its inbound messages: any other id returns `404 not_found`. Once `expires_at` has passed, 72 hours after the attachment was created, or after iSnap registered a received file, the API returns `410 attachment_expired` and iSnap deletes the file. No event announces a change of `status`. Accepts an API key or a trial key. The `line_ids` of a line-scoped key are not checked: the key reads every attachment the account can read. A trial key reads only the files received in its own trial thread, that is on messages on the line of the trial, to or from the phone number paired with the trial, and gets `404 not_found` for any other attachment, including those of another trial on the same line or of an earlier trial of the same number. A trial key cannot create attachments: `POST /v1/attachments` refuses it with `401`. `filename` can carry personal data.
6560
6564
  */
6561
6565
  get: {
6562
6566
  parameters: {
@@ -6608,7 +6612,7 @@ export interface paths {
6608
6612
  "application/json": components["schemas"]["ErrorEnvelope"];
6609
6613
  };
6610
6614
  };
6611
- /** @description Not found. `error.code` is `not_found`: the attachment does not exist, or it is neither an attachment your account created nor a file received on one of its inbound messages. */
6615
+ /** @description Not found. `error.code` is `not_found`: the attachment does not exist, or it is neither an attachment your account created nor a file received on one of its inbound messages, or, with a trial key, it is not a file received in the thread of the trial. */
6612
6616
  404: {
6613
6617
  headers: {
6614
6618
  [name: string]: unknown;
@@ -7073,6 +7077,96 @@ export interface paths {
7073
7077
  patch?: never;
7074
7078
  trace?: never;
7075
7079
  };
7080
+ "/v1/chats/{chat_id}/participants": {
7081
+ parameters: {
7082
+ query?: never;
7083
+ header?: never;
7084
+ path?: never;
7085
+ cookie?: never;
7086
+ };
7087
+ /**
7088
+ * List the members of a chat
7089
+ * @description Returns the members of a chat, oldest first, each with its `handle` and `joined_at`. On a group (`is_group` is `true` on the chat), these are the members iSnap has recorded for it: the current ones, or, with `at`, the ones it had at that time. A group whose members iSnap has not recorded yet returns an empty list. A chat that is not a group returns its one contact, whatever `at` is. A malformed `at` returns `400 validation_failed`. Accepts an API key. A chat that does not exist, whose line is not yours, or that is on a line outside a line-scoped key's `line_ids` returns `404 not_found`. `handle` is personal data.
7090
+ */
7091
+ get: {
7092
+ parameters: {
7093
+ query?: {
7094
+ /** @description An ISO 8601 timestamp with a UTC offset, for example `2026-01-15T14:00:00Z`. Returns the members the group had at that time. Omit it for the current members. It has no effect on a chat that is not a group. */
7095
+ at?: string;
7096
+ };
7097
+ header?: never;
7098
+ path: {
7099
+ /** @description Chat id: `chat_` followed by 25 letters or digits. */
7100
+ chat_id: string;
7101
+ };
7102
+ cookie?: never;
7103
+ };
7104
+ requestBody?: never;
7105
+ responses: {
7106
+ /** @description The members of the chat. */
7107
+ 200: {
7108
+ headers: {
7109
+ [name: string]: unknown;
7110
+ };
7111
+ content: {
7112
+ "application/json": components["schemas"]["ChatParticipantListEnvelope"];
7113
+ };
7114
+ };
7115
+ /** @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. */
7116
+ 400: {
7117
+ headers: {
7118
+ [name: string]: unknown;
7119
+ };
7120
+ content: {
7121
+ "application/json": components["schemas"]["ErrorEnvelope"];
7122
+ };
7123
+ };
7124
+ /** @description No valid credential. `error.code` is `unauthorized`. */
7125
+ 401: {
7126
+ headers: {
7127
+ [name: string]: unknown;
7128
+ };
7129
+ content: {
7130
+ "application/json": components["schemas"]["ErrorEnvelope"];
7131
+ };
7132
+ };
7133
+ /** @description Not found. `error.code` is `not_found`: the chat does not exist, its line is not yours, or it is on a line outside the key's `line_ids`. */
7134
+ 404: {
7135
+ headers: {
7136
+ [name: string]: unknown;
7137
+ };
7138
+ content: {
7139
+ "application/json": components["schemas"]["ErrorEnvelope"];
7140
+ };
7141
+ };
7142
+ /** @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. */
7143
+ 429: {
7144
+ headers: {
7145
+ [name: string]: unknown;
7146
+ };
7147
+ content: {
7148
+ "application/json": components["schemas"]["ErrorEnvelope"];
7149
+ };
7150
+ };
7151
+ /** @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. */
7152
+ 500: {
7153
+ headers: {
7154
+ [name: string]: unknown;
7155
+ };
7156
+ content: {
7157
+ "application/json": components["schemas"]["ErrorEnvelope"];
7158
+ };
7159
+ };
7160
+ };
7161
+ };
7162
+ put?: never;
7163
+ post?: never;
7164
+ delete?: never;
7165
+ options?: never;
7166
+ head?: never;
7167
+ patch?: never;
7168
+ trace?: never;
7169
+ };
7076
7170
  "/v1/chats/{chat_id}/share-contact-card": {
7077
7171
  parameters: {
7078
7172
  query?: never;
@@ -8656,6 +8750,235 @@ export interface paths {
8656
8750
  patch?: never;
8657
8751
  trace?: never;
8658
8752
  };
8753
+ "/v1/sandbox/inbound": {
8754
+ parameters: {
8755
+ query?: never;
8756
+ header?: never;
8757
+ path?: never;
8758
+ cookie?: never;
8759
+ };
8760
+ get?: never;
8761
+ put?: never;
8762
+ /**
8763
+ * Send a lead text to a sandbox number (staging only)
8764
+ * @description Staging only: in production this operation does not exist and answers `404 not_found`.
8765
+ *
8766
+ * Simulates a lead who texts a sandbox number of your inbound pool. Accepts an API key that is not line-scoped. On staging, the numbers your invites return (`POST /v1/lines/{line_id}/invites`) are sandbox numbers: fictional US numbers with no phone behind them. The text is received by that number exactly as a text from a real phone would be, so everything that follows is what production does: a text that carries the code of one of your invites for that number links the lead to the invite's inbound-first line, and `message.received` is sent on that line with `invite_id`; a text that cannot be linked is dropped. A reply you send to the lead (`POST /v1/messages`) is marked sent, then delivered a few seconds later, with `message.sent` and `message.delivered`. This operation sends no event itself, and `Idempotency-Key` is ignored: every call is a new text.
8767
+ */
8768
+ post: {
8769
+ parameters: {
8770
+ query?: never;
8771
+ header?: never;
8772
+ path?: never;
8773
+ cookie?: never;
8774
+ };
8775
+ requestBody: {
8776
+ content: {
8777
+ "application/json": components["schemas"]["SandboxInbound"];
8778
+ };
8779
+ };
8780
+ responses: {
8781
+ /** @description The sandbox number received the text. */
8782
+ 202: {
8783
+ headers: {
8784
+ [name: string]: unknown;
8785
+ };
8786
+ content: {
8787
+ "application/json": {
8788
+ /**
8789
+ * @description Always `true` on a success response.
8790
+ * @enum {boolean}
8791
+ */
8792
+ success: true;
8793
+ data: components["schemas"]["SandboxInboundAccepted"];
8794
+ /** @description Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap. */
8795
+ trace_id: string;
8796
+ /** @description Id of the request that produced this response: `req_` followed by 25 letters or digits. */
8797
+ request_id: string;
8798
+ };
8799
+ };
8800
+ };
8801
+ /** @description Invalid request. `validation_failed`: the body does not match its schema, for example a `phone_number` or a `from` that is not in E.164, or an empty `body`. `error.issues` lists each problem. */
8802
+ 400: {
8803
+ headers: {
8804
+ [name: string]: unknown;
8805
+ };
8806
+ content: {
8807
+ "application/json": components["schemas"]["ErrorEnvelope"];
8808
+ };
8809
+ };
8810
+ /** @description No valid credential. `error.code` is `unauthorized`. */
8811
+ 401: {
8812
+ headers: {
8813
+ [name: string]: unknown;
8814
+ };
8815
+ content: {
8816
+ "application/json": components["schemas"]["ErrorEnvelope"];
8817
+ };
8818
+ };
8819
+ /** @description Refused. `forbidden`: the request carries neither an API key in its `Authorization` header nor the header `X-Requested-With: XMLHttpRequest`, or the key is line-scoped. A line-scoped key cannot send a lead text: the code in it can link the lead to any inbound-first line of the account. */
8820
+ 403: {
8821
+ headers: {
8822
+ [name: string]: unknown;
8823
+ };
8824
+ content: {
8825
+ "application/json": components["schemas"]["ErrorEnvelope"];
8826
+ };
8827
+ };
8828
+ /** @description Not found. `sandbox_line_not_found`: `phone_number` is not a sandbox number of your inbound pool. `not_found`: the operation does not exist here (production). */
8829
+ 404: {
8830
+ headers: {
8831
+ [name: string]: unknown;
8832
+ };
8833
+ content: {
8834
+ "application/json": components["schemas"]["ErrorEnvelope"];
8835
+ };
8836
+ };
8837
+ /** @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. */
8838
+ 429: {
8839
+ headers: {
8840
+ [name: string]: unknown;
8841
+ };
8842
+ content: {
8843
+ "application/json": components["schemas"]["ErrorEnvelope"];
8844
+ };
8845
+ };
8846
+ /** @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. */
8847
+ 500: {
8848
+ headers: {
8849
+ [name: string]: unknown;
8850
+ };
8851
+ content: {
8852
+ "application/json": components["schemas"]["ErrorEnvelope"];
8853
+ };
8854
+ };
8855
+ };
8856
+ };
8857
+ delete?: never;
8858
+ options?: never;
8859
+ head?: never;
8860
+ patch?: never;
8861
+ trace?: never;
8862
+ };
8863
+ "/v1/sandbox/lines": {
8864
+ parameters: {
8865
+ query?: never;
8866
+ header?: never;
8867
+ path?: never;
8868
+ cookie?: never;
8869
+ };
8870
+ get?: never;
8871
+ put?: never;
8872
+ /**
8873
+ * Add sandbox numbers to your inbound pool (staging only)
8874
+ * @description Staging only: in production this operation does not exist and answers `404 not_found`.
8875
+ *
8876
+ * Adds `count` sandbox numbers to your inbound pool and turns inbound-first lines on for your account. Accepts an API key that is not line-scoped. A sandbox number is a fictional US number (+1 202 555-0100 to 555-0199) with no phone behind it, which stands in on staging for the numbers of the iSnap pool in production: your invites (`POST /v1/lines/{line_id}/invites`) pick among them, `POST /v1/sandbox/inbound` sends a lead's text to one, and what you send from one is marked sent, then delivered a few seconds later. Your pool holds at most 5 sandbox numbers in all; they stay in it. This operation sends no event, and `Idempotency-Key` is ignored: every call adds numbers.
8877
+ */
8878
+ post: {
8879
+ parameters: {
8880
+ query?: never;
8881
+ header?: never;
8882
+ path?: never;
8883
+ cookie?: never;
8884
+ };
8885
+ requestBody: {
8886
+ content: {
8887
+ "application/json": components["schemas"]["SandboxLinesRequest"];
8888
+ };
8889
+ };
8890
+ responses: {
8891
+ /** @description The sandbox numbers added to your inbound pool. */
8892
+ 201: {
8893
+ headers: {
8894
+ [name: string]: unknown;
8895
+ };
8896
+ content: {
8897
+ "application/json": {
8898
+ /**
8899
+ * @description Always `true` on a success response.
8900
+ * @enum {boolean}
8901
+ */
8902
+ success: true;
8903
+ data: components["schemas"]["SandboxLines"];
8904
+ /** @description Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap. */
8905
+ trace_id: string;
8906
+ /** @description Id of the request that produced this response: `req_` followed by 25 letters or digits. */
8907
+ request_id: string;
8908
+ };
8909
+ };
8910
+ };
8911
+ /** @description Invalid request. `validation_failed`: the body does not match its schema, for example a `count` that is not a whole number from 1 to 5. `error.issues` lists each problem. */
8912
+ 400: {
8913
+ headers: {
8914
+ [name: string]: unknown;
8915
+ };
8916
+ content: {
8917
+ "application/json": components["schemas"]["ErrorEnvelope"];
8918
+ };
8919
+ };
8920
+ /** @description No valid credential. `error.code` is `unauthorized`. */
8921
+ 401: {
8922
+ headers: {
8923
+ [name: string]: unknown;
8924
+ };
8925
+ content: {
8926
+ "application/json": components["schemas"]["ErrorEnvelope"];
8927
+ };
8928
+ };
8929
+ /** @description Refused. `forbidden`: the request carries neither an API key in its `Authorization` header nor the header `X-Requested-With: XMLHttpRequest`, or the key is line-scoped. */
8930
+ 403: {
8931
+ headers: {
8932
+ [name: string]: unknown;
8933
+ };
8934
+ content: {
8935
+ "application/json": components["schemas"]["ErrorEnvelope"];
8936
+ };
8937
+ };
8938
+ /** @description Not found. `not_found`: the operation does not exist here (production). */
8939
+ 404: {
8940
+ headers: {
8941
+ [name: string]: unknown;
8942
+ };
8943
+ content: {
8944
+ "application/json": components["schemas"]["ErrorEnvelope"];
8945
+ };
8946
+ };
8947
+ /** @description Conflict. `sandbox_line_limit_reached`: your pool would hold more than 5 sandbox numbers. `sandbox_numbers_exhausted`: not enough sandbox numbers are free. Nothing is added. */
8948
+ 409: {
8949
+ headers: {
8950
+ [name: string]: unknown;
8951
+ };
8952
+ content: {
8953
+ "application/json": components["schemas"]["ErrorEnvelope"];
8954
+ };
8955
+ };
8956
+ /** @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. */
8957
+ 429: {
8958
+ headers: {
8959
+ [name: string]: unknown;
8960
+ };
8961
+ content: {
8962
+ "application/json": components["schemas"]["ErrorEnvelope"];
8963
+ };
8964
+ };
8965
+ /** @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. */
8966
+ 500: {
8967
+ headers: {
8968
+ [name: string]: unknown;
8969
+ };
8970
+ content: {
8971
+ "application/json": components["schemas"]["ErrorEnvelope"];
8972
+ };
8973
+ };
8974
+ };
8975
+ };
8976
+ delete?: never;
8977
+ options?: never;
8978
+ head?: never;
8979
+ patch?: never;
8980
+ trace?: never;
8981
+ };
8659
8982
  }
8660
8983
  export type webhooks = Record<string, never>;
8661
8984
  export interface components {
@@ -8927,7 +9250,7 @@ export interface components {
8927
9250
  metadata?: {
8928
9251
  [key: string]: unknown;
8929
9252
  };
8930
- /** @description `true` to create an inbound-first line: it can only message a contact who wrote to it first, from the number that contact wrote to, and it never messages a contact first (`403 outbound_first_forbidden`). Requires an inbound pool on your account (`403 inbound_pool_required` otherwise). Defaults to `false`: an ordinary shared line. */
9253
+ /** @description `true` to create an inbound-first line: it can only message a contact who wrote to it first, from the number that contact wrote to, and it never messages a contact first (`403 outbound_first_forbidden`). Inbound-first lines are a private alpha, enabled per account on request (`403 inbound_pool_not_enabled` otherwise). The numbers its contacts write to come from the iSnap pool, one per invite (`POST /v1/lines/{line_id}/invites`). Defaults to `false`: an ordinary shared line. */
8931
9254
  inbound_first?: boolean;
8932
9255
  };
8933
9256
  /** @description Optional settings of the activated line: its variant and its billing anchor. */
@@ -9205,6 +9528,8 @@ export interface components {
9205
9528
  device_state: "online" | "degraded" | "offline" | "initializing" | "blocked" | null;
9206
9529
  /** @description Free storage on the device, in bytes, as last reported. `null` means not reported, not zero. */
9207
9530
  storage_free_bytes: number | null;
9531
+ /** @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
+ warnings: string[] | null;
9208
9533
  };
9209
9534
  LineConfigEnvelope: {
9210
9535
  /**
@@ -9819,10 +10144,12 @@ export interface components {
9819
10144
  reply_to_message_id: string | null;
9820
10145
  /** @description On an outbound message, whether the line's device shows the typing indicator to the recipient before it sends the message. A message sent with an API key on a line that is not an iMessage line always has `false`. It has no meaning on an inbound message. */
9821
10146
  use_typing_indicator: boolean;
9822
- /** @description The `metadata` you sent with the message, unchanged. `null` when you sent none, and on an inbound message. */
10147
+ /** @description The `metadata` you sent with the message, unchanged. `null` when you sent none, on an inbound message and on a message iSnap sent itself (`system: true`). */
9823
10148
  metadata: {
9824
10149
  [key: string]: unknown;
9825
10150
  } | null;
10151
+ /** @description `true` on a message iSnap itself sent to a contact, such as the notices a free line sends to its paired phone. `false` on every message sent or received through your own lines and keys. A message with `system: true` does not count toward the limits of a free line. */
10152
+ system: boolean;
9826
10153
  /** @description The files of the message, in order. Empty when the message has none. Files received with an inbound message are listed here too. */
9827
10154
  attachments: components["schemas"]["MessageAttachmentV1"][];
9828
10155
  /** @description The reactions on the message, at most one per author. Empty when the message has none, and always empty on an entry whose `kind` is `reaction`. The line's own reaction appears as soon as the API accepts it, and disappears as soon as the API accepts its removal, before the line's device confirms either. It stays listed when the device fails to place it. */
@@ -9835,6 +10162,8 @@ export interface components {
9835
10162
  reply_lane: boolean;
9836
10163
  /** @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. */
9837
10164
  ignore_quiet_hours: boolean;
10165
+ /** @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. */
10166
+ cancel_on_reply: boolean;
9838
10167
  /** @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. */
9839
10168
  queue_info: {
9840
10169
  /** @description 0 when the message leaves immediately. Otherwise the rank of the message among the line's held messages, starting at 1. */
@@ -10459,7 +10788,7 @@ export interface components {
10459
10788
  /** @description Pass it as `cursor` to get the next page. `null` on the last page. */
10460
10789
  next_cursor: string | null;
10461
10790
  };
10462
- /** @description The messages between one line and one contact. iSnap creates a chat at the first message in either direction and never deletes it: a chat stays listed after its messages are deleted. It uses the same chat for both directions when the device of the line stores the handle of the contact in the form of the `to` you send to. A chat belongs to its line, not to an account: after a line changes owner, the account that owns the line lists its chats, those of earlier owners included, and their counters include the messages of earlier owners. */
10791
+ /** @description The messages between one line and one contact, or in one group. iSnap creates a chat at the first message in either direction and never deletes it: a chat stays listed after its messages are deleted. It uses the same chat for both directions when the device of the line stores the handle of the contact in the form of the `to` you send to. A chat belongs to its line, not to an account: after a line changes owner, the account that owns the line lists its chats, those of earlier owners included, and their counters include the messages of earlier owners. */
10463
10792
  Chat: {
10464
10793
  /**
10465
10794
  * @description Chat id: `chat_` followed by 25 letters or digits.
@@ -10468,8 +10797,12 @@ export interface components {
10468
10797
  id: string;
10469
10798
  /** @description Id of the line of the chat. */
10470
10799
  line_id: string;
10471
- /** @description The handle that opened the chat: the E.164 form of `to` when a message you sent opened it, or the sender's handle as the line's device stores it, a phone number or an email address, when a received message opened it. The typing and read operations take only a chat whose `contact_handle` is a phone number in E.164. It is personal data. When the line receives messages in a group, they are recorded in one chat that shows one handle only, the first sender seen: nothing marks that chat as a group. */
10800
+ /** @description On a chat that is not a group, the handle that opened it: the E.164 form of `to` when a message you sent opened it, or the sender's handle as the line's device stores it, a phone number or an email address, when a received message opened it. The typing and read operations take only a chat whose `contact_handle` is a phone number in E.164. It is personal data. On a group (`is_group` is `true`), the identifier of the group, not a person: read its members with `GET /v1/chats/{chat_id}/participants`. A group that iSnap recorded before it told groups apart can still show the handle of one sender. */
10472
10801
  contact_handle: string;
10802
+ /** @description `true` when the chat is a group conversation, `false` when it is between the line and one contact. */
10803
+ is_group: boolean;
10804
+ /** @description On a group, the number of members iSnap has recorded for it now: 0 while none is recorded yet. `null` on a chat that is not a group. */
10805
+ member_count: number | null;
10473
10806
  /** @description On a shared line, the phone number that serves this contact, or `null` when none is assigned: the next message to the contact is then given a number. Always `null` on a line that is not a shared line. */
10474
10807
  outbound_number: string | null;
10475
10808
  /** @description Time of the last message of the chat, sent or received. Equals `created_at` while the chat has no message. */
@@ -10495,6 +10828,30 @@ export interface components {
10495
10828
  /** @description Id of the request that produced this response: `req_` followed by 25 letters or digits. */
10496
10829
  request_id: string;
10497
10830
  };
10831
+ ChatParticipantListEnvelope: {
10832
+ /**
10833
+ * @description Always `true` on a success response.
10834
+ * @enum {boolean}
10835
+ */
10836
+ success: true;
10837
+ data: components["schemas"]["ChatParticipantList"];
10838
+ /** @description Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap. */
10839
+ trace_id: string;
10840
+ /** @description Id of the request that produced this response: `req_` followed by 25 letters or digits. */
10841
+ request_id: string;
10842
+ };
10843
+ /** @description The members of a chat. */
10844
+ ChatParticipantList: {
10845
+ /** @description The members, oldest first. On a chat that is not a group, its one contact. Empty on a group whose members iSnap has not recorded yet. */
10846
+ items: components["schemas"]["ChatParticipant"][];
10847
+ };
10848
+ /** @description One member of a chat. */
10849
+ ChatParticipant: {
10850
+ /** @description The handle of the member, a phone number or an email address. It is personal data. */
10851
+ handle: string;
10852
+ /** @description When iSnap first saw the member in the group, as an ISO 8601 timestamp. On a chat that is not a group, when iSnap created the chat. */
10853
+ joined_at: string;
10854
+ };
10498
10855
  ShareContactCardEnvelope: {
10499
10856
  /**
10500
10857
  * @description Always `true` on a success response.
@@ -10954,6 +11311,38 @@ export interface components {
10954
11311
  */
10955
11312
  available: boolean;
10956
11313
  };
11314
+ /** @description The text was received by the sandbox number. */
11315
+ SandboxInboundAccepted: {
11316
+ /** @description Id of the received text, as the number reported it. */
11317
+ event_id: string;
11318
+ /** @description When the text was received (ISO 8601, UTC). */
11319
+ accepted_at: string;
11320
+ };
11321
+ /** @description A text a lead sends to a sandbox number. */
11322
+ SandboxInbound: {
11323
+ /** @description The sandbox number the lead texts, in E.164: a number an invite of yours returned on staging. */
11324
+ phone_number: string;
11325
+ /** @description The phone number of the lead who sends the text, in E.164. */
11326
+ from: string;
11327
+ /** @description The text the lead sends, with the code in it to link the lead. */
11328
+ body: string;
11329
+ };
11330
+ /** @description The sandbox numbers added to your inbound pool. */
11331
+ SandboxLines: {
11332
+ lines: components["schemas"]["SandboxLine"][];
11333
+ };
11334
+ /** @description A sandbox number of your inbound pool. */
11335
+ SandboxLine: {
11336
+ /** @description Id of the sandbox line: `line_` followed by 25 letters or digits. */
11337
+ line_id: string;
11338
+ /** @description Its fictional number, in E.164 (+1 202 555-0100 to 555-0199). */
11339
+ phone_number: string;
11340
+ };
11341
+ /** @description How many sandbox numbers to add. */
11342
+ SandboxLinesRequest: {
11343
+ /** @description How many sandbox numbers to add to your inbound pool: 1 to 5. Your pool holds at most 5 in all. */
11344
+ count: number;
11345
+ };
10957
11346
  };
10958
11347
  responses: never;
10959
11348
  parameters: never;
@@ -3,8 +3,8 @@
3
3
  * AbortSignal. If the signal aborts first, the promise rejects with
4
4
  * `APIConnectionError` carrying the signal's `.reason` as the cause.
5
5
  *
6
- * Used by the retry loop's exponential-backoff sleep AND the attachments
7
- * resource's polling loop — same semantics in both places.
6
+ * Used by the wait before a retry and by the polling loop of
7
+ * `attachments.upload`, with the same behavior in both places.
8
8
  */
9
9
  export declare function sleep(ms: number, signal?: AbortSignal, abortMessage?: string): Promise<void>;
10
10
  //# sourceMappingURL=sleep.d.ts.map
@@ -4,8 +4,8 @@ import { APIConnectionError } from '../errors.js';
4
4
  * AbortSignal. If the signal aborts first, the promise rejects with
5
5
  * `APIConnectionError` carrying the signal's `.reason` as the cause.
6
6
  *
7
- * Used by the retry loop's exponential-backoff sleep AND the attachments
8
- * resource's polling loop — same semantics in both places.
7
+ * Used by the wait before a retry and by the polling loop of
8
+ * `attachments.upload`, with the same behavior in both places.
9
9
  */
10
10
  export function sleep(ms, signal, abortMessage = 'Aborted during sleep') {
11
11
  return new Promise((resolve, reject) => {
@@ -15,9 +15,9 @@ export function sleep(ms, signal, abortMessage = 'Aborted during sleep') {
15
15
  }
16
16
  // Track the abort listener so the timer's resolve path can detach it.
17
17
  // Without detachment, sleeps that complete normally still hold a
18
- // closure on the caller's signal — accumulating one leak per call
19
- // across the lifetime of a long-lived signal (e.g. a process-wide
20
- // shutdown signal). Both resolve and reject paths detach.
18
+ // closure on the caller's signal: one leak per call, for the lifetime
19
+ // of a long-lived signal such as a process-wide shutdown signal. Both
20
+ // the resolve path and the reject path detach.
21
21
  let abortListener;
22
22
  const timer = setTimeout(() => {
23
23
  if (abortListener)
@@ -1 +1 @@
1
- {"version":3,"file":"sleep.js","sourceRoot":"","sources":["../../src/internal/sleep.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAEjD;;;;;;;GAOG;AACH,MAAM,UAAU,KAAK,CACnB,EAAU,EACV,MAAoB,EACpB,YAAY,GAAG,sBAAsB;IAErC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAI,MAAM,EAAE,OAAO,EAAE,CAAC;YACpB,MAAM,CAAC,IAAI,kBAAkB,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;YACtE,OAAM;QACR,CAAC;QACD,sEAAsE;QACtE,iEAAiE;QACjE,kEAAkE;QAClE,kEAAkE;QAClE,0DAA0D;QAC1D,IAAI,aAAuC,CAAA;QAC3C,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;YAC5B,IAAI,aAAa;gBAAE,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAA;YACtE,OAAO,EAAE,CAAA;QACX,CAAC,EAAE,EAAE,CAAC,CAAA;QACN,IAAI,MAAM,EAAE,CAAC;YACX,aAAa,GAAG,GAAG,EAAE;gBACnB,YAAY,CAAC,KAAK,CAAC,CAAA;gBACnB,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,aAA2B,CAAC,CAAA;gBAChE,MAAM,CAAC,IAAI,kBAAkB,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;YACxE,CAAC,CAAA;YACD,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;QACjE,CAAC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC"}
1
+ {"version":3,"file":"sleep.js","sourceRoot":"","sources":["../../src/internal/sleep.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAEjD;;;;;;;GAOG;AACH,MAAM,UAAU,KAAK,CACnB,EAAU,EACV,MAAoB,EACpB,YAAY,GAAG,sBAAsB;IAErC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAI,MAAM,EAAE,OAAO,EAAE,CAAC;YACpB,MAAM,CAAC,IAAI,kBAAkB,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;YACtE,OAAM;QACR,CAAC;QACD,sEAAsE;QACtE,iEAAiE;QACjE,sEAAsE;QACtE,sEAAsE;QACtE,+CAA+C;QAC/C,IAAI,aAAuC,CAAA;QAC3C,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;YAC5B,IAAI,aAAa;gBAAE,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAA;YACtE,OAAO,EAAE,CAAA;QACX,CAAC,EAAE,EAAE,CAAC,CAAA;QACN,IAAI,MAAM,EAAE,CAAC;YACX,aAAa,GAAG,GAAG,EAAE;gBACnB,YAAY,CAAC,KAAK,CAAC,CAAA;gBACnB,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,aAA2B,CAAC,CAAA;gBAChE,MAAM,CAAC,IAAI,kBAAkB,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;YACxE,CAAC,CAAA;YACD,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;QACjE,CAAC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC"}