@linqapp/sdk 0.44.3 → 0.46.0

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.46.0](https://github.com/linq-team/linq-node/compare/v0.45.0...v0.46.0) (2026-08-25)
4
+
5
+
6
+ ### Features
7
+
8
+ * add contact_card.received webhook event ([af5feb2](https://github.com/linq-team/linq-node/commit/af5feb20a698cfec66ba6da64ea08097dfe8abdb))
9
+
10
+ ## [0.45.0](https://github.com/linq-team/linq-node/compare/v0.44.3...v0.45.0) (2026-08-24)
11
+
12
+
13
+ ### Features
14
+
15
+ * add location sharing webhook metadata and request validation ([bcadf8c](https://github.com/linq-team/linq-node/commit/bcadf8cf5297c7489e86ab95a421576842b179c1))
16
+
3
17
  ## [0.44.3](https://github.com/linq-team/linq-node/compare/v0.44.2...v0.44.3) (2026-08-20)
4
18
 
5
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linqapp/sdk",
3
- "version": "0.44.3",
3
+ "version": "0.46.0",
4
4
  "description": "The official TypeScript library for the Linq API V3 API",
5
5
  "author": "Linq API V3 <support@linq.com>",
6
6
  "types": "./index.d.ts",
@@ -6,7 +6,7 @@ import { RequestOptions } from "../../internal/request-options.mjs";
6
6
  * and subscribe to webhooks when someone starts or stops sharing.
7
7
  *
8
8
  * **Coordinates** are returned in [GeoJSON](https://datatracker.ietf.org/doc/html/rfc7946) format:
9
- * `[longitude, latitude]` or `[longitude, latitude, altitude]` if altitude is available.
9
+ * `[longitude, latitude]`.
10
10
  *
11
11
  * ### Reading location is poll-based
12
12
  *
@@ -52,6 +52,9 @@ export declare class Location extends APIResource {
52
52
  * separate feature for each participant who is sharing. Each feature's
53
53
  * `properties.handle` identifies the user.
54
54
  *
55
+ * A participant appears as soon as their first position arrives, typically within
56
+ * a second or two of sharing starting.
57
+ *
55
58
  * Returns an empty `data.features` array if no one is sharing or no location data
56
59
  * is available yet. If sharing started but this stays empty, see the **Location
57
60
  * Sharing** overview.
@@ -78,6 +81,12 @@ export declare class Location extends APIResource {
78
81
  * `{ "success": true, "message": "Location request sent" }` and does not return
79
82
  * coordinates.
80
83
  *
84
+ * Rejected with `409` if the recipient is already sharing — read their location
85
+ * with `GET /v3/chats/{chatId}/location` instead of re-requesting.
86
+ *
87
+ * Rate limited per chat, since each request prompts the recipient's device.
88
+ * Exceeding it returns `429` with a `Retry-After` header.
89
+ *
81
90
  * Location requests only work in **1:1 iMessage chats** (Apple limitation):
82
91
  *
83
92
  * - Group chats (any service) return `409` with code `2016`
@@ -113,7 +122,7 @@ export declare namespace GetChatLocationResponse {
113
122
  namespace Feature {
114
123
  interface Geometry {
115
124
  /**
116
- * [longitude, latitude] or [longitude, latitude, altitude]
125
+ * [longitude, latitude]
117
126
  */
118
127
  coordinates: Array<number>;
119
128
  type: 'Point';
@@ -1 +1 @@
1
- {"version":3,"file":"location.d.mts","sourceRoot":"","sources":["../../src/resources/chats/location.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAOvF;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;CAGvF;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,uBAAuB,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O,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
@@ -6,7 +6,7 @@ import { RequestOptions } from "../../internal/request-options.js";
6
6
  * and subscribe to webhooks when someone starts or stops sharing.
7
7
  *
8
8
  * **Coordinates** are returned in [GeoJSON](https://datatracker.ietf.org/doc/html/rfc7946) format:
9
- * `[longitude, latitude]` or `[longitude, latitude, altitude]` if altitude is available.
9
+ * `[longitude, latitude]`.
10
10
  *
11
11
  * ### Reading location is poll-based
12
12
  *
@@ -52,6 +52,9 @@ export declare class Location extends APIResource {
52
52
  * separate feature for each participant who is sharing. Each feature's
53
53
  * `properties.handle` identifies the user.
54
54
  *
55
+ * A participant appears as soon as their first position arrives, typically within
56
+ * a second or two of sharing starting.
57
+ *
55
58
  * Returns an empty `data.features` array if no one is sharing or no location data
56
59
  * is available yet. If sharing started but this stays empty, see the **Location
57
60
  * Sharing** overview.
@@ -78,6 +81,12 @@ export declare class Location extends APIResource {
78
81
  * `{ "success": true, "message": "Location request sent" }` and does not return
79
82
  * coordinates.
80
83
  *
84
+ * Rejected with `409` if the recipient is already sharing — read their location
85
+ * with `GET /v3/chats/{chatId}/location` instead of re-requesting.
86
+ *
87
+ * Rate limited per chat, since each request prompts the recipient's device.
88
+ * Exceeding it returns `429` with a `Retry-After` header.
89
+ *
81
90
  * Location requests only work in **1:1 iMessage chats** (Apple limitation):
82
91
  *
83
92
  * - Group chats (any service) return `409` with code `2016`
@@ -113,7 +122,7 @@ export declare namespace GetChatLocationResponse {
113
122
  namespace Feature {
114
123
  interface Geometry {
115
124
  /**
116
- * [longitude, latitude] or [longitude, latitude, altitude]
125
+ * [longitude, latitude]
117
126
  */
118
127
  coordinates: Array<number>;
119
128
  type: 'Point';
@@ -1 +1 @@
1
- {"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../src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AE,OAAO,CAAC,QAAQ,CAAC;YAE3B,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC;YAE/B,IAAI,EAAE,SAAS,CAAC;SACjB;QAED,UAAiB,OAAO,CAAC;YACvB,UAAiB,QAAQ;gBACvB;;mBAEG;gBACH,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;gBAE3B,IAAI,EAAE,OAAO,CAAC;aACf;YAED,UAAiB,UAAU;gBACzB;;mBAEG;gBACH,MAAM,EAAE,MAAM,CAAC;gBAEf;;mBAEG;gBACH,OAAO,CAAC,EAAE,MAAM,CAAC;gBAEjB;;mBAEG;gBACH,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAElB;;mBAEG;gBACH,UAAU,CAAC,EAAE,MAAM,CAAC;aACrB;SACF;KACF;CACF;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAEhB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
@@ -10,7 +10,7 @@ const path_1 = require("../../internal/utils/path.js");
10
10
  * and subscribe to webhooks when someone starts or stops sharing.
11
11
  *
12
12
  * **Coordinates** are returned in [GeoJSON](https://datatracker.ietf.org/doc/html/rfc7946) format:
13
- * `[longitude, latitude]` or `[longitude, latitude, altitude]` if altitude is available.
13
+ * `[longitude, latitude]`.
14
14
  *
15
15
  * ### Reading location is poll-based
16
16
  *
@@ -56,6 +56,9 @@ class Location extends resource_1.APIResource {
56
56
  * separate feature for each participant who is sharing. Each feature's
57
57
  * `properties.handle` identifies the user.
58
58
  *
59
+ * A participant appears as soon as their first position arrives, typically within
60
+ * a second or two of sharing starting.
61
+ *
59
62
  * Returns an empty `data.features` array if no one is sharing or no location data
60
63
  * is available yet. If sharing started but this stays empty, see the **Location
61
64
  * Sharing** overview.
@@ -87,6 +90,12 @@ class Location extends resource_1.APIResource {
87
90
  * `{ "success": true, "message": "Location request sent" }` and does not return
88
91
  * coordinates.
89
92
  *
93
+ * Rejected with `409` if the recipient is already sharing — read their location
94
+ * with `GET /v3/chats/{chatId}/location` instead of re-requesting.
95
+ *
96
+ * Rate limited per chat, since each request prompts the recipient's device.
97
+ * Exceeding it returns `429` with a `Retry-After` header.
98
+ *
90
99
  * Location requests only work in **1:1 iMessage chats** (Apple limitation):
91
100
  *
92
101
  * - Group chats (any service) return `409` with code `2016`
@@ -1 +1 @@
1
- {"version":3,"file":"location.js","sourceRoot":"","sources":["../../src/resources/chats/location.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAEtD,uDAAiD;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,QAAQ,CAAC,MAAc,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,WAAW,EAAE;YAC1D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,sBAAsB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC9E,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,OAAO,CAAC,MAAc,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,mBAAmB,EAAE,OAAO,CAAC,CAAC;IAChF,CAAC;CACF;AA/DD,4BA+DC"}
1
+ {"version":3,"file":"location.js","sourceRoot":"","sources":["../../src/resources/chats/location.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAEtD,uDAAiD;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,QAAQ,CAAC,MAAc,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,WAAW,EAAE;YAC1D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,sBAAsB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC9E,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,OAAO,CAAC,MAAc,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,mBAAmB,EAAE,OAAO,CAAC,CAAC;IAChF,CAAC;CACF;AAxED,4BAwEC"}
@@ -7,7 +7,7 @@ import { path } from "../../internal/utils/path.mjs";
7
7
  * and subscribe to webhooks when someone starts or stops sharing.
8
8
  *
9
9
  * **Coordinates** are returned in [GeoJSON](https://datatracker.ietf.org/doc/html/rfc7946) format:
10
- * `[longitude, latitude]` or `[longitude, latitude, altitude]` if altitude is available.
10
+ * `[longitude, latitude]`.
11
11
  *
12
12
  * ### Reading location is poll-based
13
13
  *
@@ -53,6 +53,9 @@ export class Location extends APIResource {
53
53
  * separate feature for each participant who is sharing. Each feature's
54
54
  * `properties.handle` identifies the user.
55
55
  *
56
+ * A participant appears as soon as their first position arrives, typically within
57
+ * a second or two of sharing starting.
58
+ *
56
59
  * Returns an empty `data.features` array if no one is sharing or no location data
57
60
  * is available yet. If sharing started but this stays empty, see the **Location
58
61
  * Sharing** overview.
@@ -84,6 +87,12 @@ export class Location extends APIResource {
84
87
  * `{ "success": true, "message": "Location request sent" }` and does not return
85
88
  * coordinates.
86
89
  *
90
+ * Rejected with `409` if the recipient is already sharing — read their location
91
+ * with `GET /v3/chats/{chatId}/location` instead of re-requesting.
92
+ *
93
+ * Rate limited per chat, since each request prompts the recipient's device.
94
+ * Exceeding it returns `429` with a `Retry-After` header.
95
+ *
87
96
  * Location requests only work in **1:1 iMessage chats** (Apple limitation):
88
97
  *
89
98
  * - Group chats (any service) return `409` with code `2016`
@@ -1 +1 @@
1
- {"version":3,"file":"location.mjs","sourceRoot":"","sources":["../../src/resources/chats/location.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,QAAQ,CAAC,MAAc,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,MAAM,WAAW,EAAE;YAC1D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,sBAAsB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC9E,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,OAAO,CAAC,MAAc,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,MAAM,mBAAmB,EAAE,OAAO,CAAC,CAAC;IAChF,CAAC;CACF"}
1
+ {"version":3,"file":"location.mjs","sourceRoot":"","sources":["../../src/resources/chats/location.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,QAAQ,CAAC,MAAc,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,MAAM,WAAW,EAAE;YAC1D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,sBAAsB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC9E,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,OAAO,CAAC,MAAc,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,MAAM,mBAAmB,EAAE,OAAO,CAAC,CAAC;IAChF,CAAC;CACF"}
@@ -144,7 +144,7 @@ export declare class WebhookEvents extends APIResource {
144
144
  * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
145
145
  * subscription will not produce any deliveries.
146
146
  */
147
- export type WebhookEventType = 'message.sent' | 'message.received' | 'message.read' | 'message.delivered' | 'message.failed' | 'message.edited' | 'reaction.added' | 'reaction.removed' | 'poll.received' | 'poll.failed' | 'poll.sent' | 'poll.delivered' | 'poll.read' | 'poll.updated' | 'poll.vote.added' | 'poll.vote.removed' | 'poll.reaction.added' | 'participant.added' | 'participant.removed' | 'chat.created' | 'chat.group_name_updated' | 'chat.group_icon_updated' | 'chat.group_name_update_failed' | 'chat.group_icon_update_failed' | 'chat.background_updated' | 'chat.background_update_failed' | 'chat.typing_indicator.started' | 'chat.typing_indicator.stopped' | 'phone_number.status_updated' | 'call.initiated' | 'call.ringing' | 'call.answered' | 'call.ended' | 'call.failed' | 'call.declined' | 'call.no_answer' | 'location.sharing.started' | 'location.sharing.stopped' | 'payment.succeeded' | 'payment.canceled' | 'payment.expired' | 'payment.declined' | 'payment.authorized' | 'connection.created' | 'connection.revoked';
147
+ export type WebhookEventType = 'message.sent' | 'message.received' | 'message.read' | 'message.delivered' | 'message.failed' | 'message.edited' | 'reaction.added' | 'reaction.removed' | 'poll.received' | 'poll.failed' | 'poll.sent' | 'poll.delivered' | 'poll.read' | 'poll.updated' | 'poll.vote.added' | 'poll.vote.removed' | 'poll.reaction.added' | 'participant.added' | 'participant.removed' | 'chat.created' | 'chat.group_name_updated' | 'chat.group_icon_updated' | 'chat.group_name_update_failed' | 'chat.group_icon_update_failed' | 'chat.background_updated' | 'chat.background_update_failed' | 'chat.typing_indicator.started' | 'chat.typing_indicator.stopped' | 'phone_number.status_updated' | 'contact_card.received' | 'call.initiated' | 'call.ringing' | 'call.answered' | 'call.ended' | 'call.failed' | 'call.declined' | 'call.no_answer' | 'location.sharing.started' | 'location.sharing.stopped' | 'payment.succeeded' | 'payment.canceled' | 'payment.expired' | 'payment.declined' | 'payment.authorized' | 'connection.created' | 'connection.revoked';
148
148
  export interface WebhookEventListResponse {
149
149
  /**
150
150
  * URL to the webhook events documentation
@@ -1 +1 @@
1
- {"version":3,"file":"webhook-events.d.mts","sourceRoot":"","sources":["../src/resources/webhook-events.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+HG;AACH,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;OAIG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;CAGrE;AAED;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GACxB,cAAc,GACd,kBAAkB,GAClB,cAAc,GACd,mBAAmB,GACnB,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,eAAe,GACf,aAAa,GACb,WAAW,GACX,gBAAgB,GAChB,WAAW,GACX,cAAc,GACd,iBAAiB,GACjB,mBAAmB,GACnB,qBAAqB,GACrB,mBAAmB,GACnB,qBAAqB,GACrB,cAAc,GACd,yBAAyB,GACzB,yBAAyB,GACzB,+BAA+B,GAC/B,+BAA+B,GAC/B,yBAAyB,GACzB,+BAA+B,GAC/B,+BAA+B,GAC/B,+BAA+B,GAC/B,6BAA6B,GAC7B,gBAAgB,GAChB,cAAc,GACd,eAAe,GACf,YAAY,GACZ,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,0BAA0B,GAC1B,0BAA0B,GAC1B,mBAAmB,GACnB,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,GAClB,oBAAoB,GACpB,oBAAoB,GACpB,oBAAoB,CAAC;AAEzB,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,EAAE,iDAAiD,CAAC;IAE3D;;OAEG;IACH,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
1
+ {"version":3,"file":"webhook-events.d.mts","sourceRoot":"","sources":["../src/resources/webhook-events.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D;;;;;;;;;;;;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}
@@ -144,7 +144,7 @@ export declare class WebhookEvents extends APIResource {
144
144
  * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
145
145
  * subscription will not produce any deliveries.
146
146
  */
147
- export type WebhookEventType = 'message.sent' | 'message.received' | 'message.read' | 'message.delivered' | 'message.failed' | 'message.edited' | 'reaction.added' | 'reaction.removed' | 'poll.received' | 'poll.failed' | 'poll.sent' | 'poll.delivered' | 'poll.read' | 'poll.updated' | 'poll.vote.added' | 'poll.vote.removed' | 'poll.reaction.added' | 'participant.added' | 'participant.removed' | 'chat.created' | 'chat.group_name_updated' | 'chat.group_icon_updated' | 'chat.group_name_update_failed' | 'chat.group_icon_update_failed' | 'chat.background_updated' | 'chat.background_update_failed' | 'chat.typing_indicator.started' | 'chat.typing_indicator.stopped' | 'phone_number.status_updated' | 'call.initiated' | 'call.ringing' | 'call.answered' | 'call.ended' | 'call.failed' | 'call.declined' | 'call.no_answer' | 'location.sharing.started' | 'location.sharing.stopped' | 'payment.succeeded' | 'payment.canceled' | 'payment.expired' | 'payment.declined' | 'payment.authorized' | 'connection.created' | 'connection.revoked';
147
+ export type WebhookEventType = 'message.sent' | 'message.received' | 'message.read' | 'message.delivered' | 'message.failed' | 'message.edited' | 'reaction.added' | 'reaction.removed' | 'poll.received' | 'poll.failed' | 'poll.sent' | 'poll.delivered' | 'poll.read' | 'poll.updated' | 'poll.vote.added' | 'poll.vote.removed' | 'poll.reaction.added' | 'participant.added' | 'participant.removed' | 'chat.created' | 'chat.group_name_updated' | 'chat.group_icon_updated' | 'chat.group_name_update_failed' | 'chat.group_icon_update_failed' | 'chat.background_updated' | 'chat.background_update_failed' | 'chat.typing_indicator.started' | 'chat.typing_indicator.stopped' | 'phone_number.status_updated' | 'contact_card.received' | 'call.initiated' | 'call.ringing' | 'call.answered' | 'call.ended' | 'call.failed' | 'call.declined' | 'call.no_answer' | 'location.sharing.started' | 'location.sharing.stopped' | 'payment.succeeded' | 'payment.canceled' | 'payment.expired' | 'payment.declined' | 'payment.authorized' | 'connection.created' | 'connection.revoked';
148
148
  export interface WebhookEventListResponse {
149
149
  /**
150
150
  * URL to the webhook events documentation
@@ -1 +1 @@
1
- {"version":3,"file":"webhook-events.d.ts","sourceRoot":"","sources":["../src/resources/webhook-events.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+HG;AACH,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;OAIG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;CAGrE;AAED;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GACxB,cAAc,GACd,kBAAkB,GAClB,cAAc,GACd,mBAAmB,GACnB,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,eAAe,GACf,aAAa,GACb,WAAW,GACX,gBAAgB,GAChB,WAAW,GACX,cAAc,GACd,iBAAiB,GACjB,mBAAmB,GACnB,qBAAqB,GACrB,mBAAmB,GACnB,qBAAqB,GACrB,cAAc,GACd,yBAAyB,GACzB,yBAAyB,GACzB,+BAA+B,GAC/B,+BAA+B,GAC/B,yBAAyB,GACzB,+BAA+B,GAC/B,+BAA+B,GAC/B,+BAA+B,GAC/B,6BAA6B,GAC7B,gBAAgB,GAChB,cAAc,GACd,eAAe,GACf,YAAY,GACZ,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,0BAA0B,GAC1B,0BAA0B,GAC1B,mBAAmB,GACnB,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,GAClB,oBAAoB,GACpB,oBAAoB,GACpB,oBAAoB,CAAC;AAEzB,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,EAAE,iDAAiD,CAAC;IAE3D;;OAEG;IACH,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
1
+ {"version":3,"file":"webhook-events.d.ts","sourceRoot":"","sources":["../src/resources/webhook-events.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+HG;AACH,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;OAIG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;CAGrE;AAED;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GACxB,cAAc,GACd,kBAAkB,GAClB,cAAc,GACd,mBAAmB,GACnB,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,eAAe,GACf,aAAa,GACb,WAAW,GACX,gBAAgB,GAChB,WAAW,GACX,cAAc,GACd,iBAAiB,GACjB,mBAAmB,GACnB,qBAAqB,GACrB,mBAAmB,GACnB,qBAAqB,GACrB,cAAc,GACd,yBAAyB,GACzB,yBAAyB,GACzB,+BAA+B,GAC/B,+BAA+B,GAC/B,yBAAyB,GACzB,+BAA+B,GAC/B,+BAA+B,GAC/B,+BAA+B,GAC/B,6BAA6B,GAC7B,uBAAuB,GACvB,gBAAgB,GAChB,cAAc,GACd,eAAe,GACf,YAAY,GACZ,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,0BAA0B,GAC1B,0BAA0B,GAC1B,mBAAmB,GACnB,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,GAClB,oBAAoB,GACpB,oBAAoB,GACpB,oBAAoB,CAAC;AAEzB,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,EAAE,iDAAiD,CAAC;IAE3D;;OAEG;IACH,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
@@ -11,7 +11,7 @@ import { path } from '../../internal/utils/path';
11
11
  * and subscribe to webhooks when someone starts or stops sharing.
12
12
  *
13
13
  * **Coordinates** are returned in [GeoJSON](https://datatracker.ietf.org/doc/html/rfc7946) format:
14
- * `[longitude, latitude]` or `[longitude, latitude, altitude]` if altitude is available.
14
+ * `[longitude, latitude]`.
15
15
  *
16
16
  * ### Reading location is poll-based
17
17
  *
@@ -57,6 +57,9 @@ export class Location extends APIResource {
57
57
  * separate feature for each participant who is sharing. Each feature's
58
58
  * `properties.handle` identifies the user.
59
59
  *
60
+ * A participant appears as soon as their first position arrives, typically within
61
+ * a second or two of sharing starting.
62
+ *
60
63
  * Returns an empty `data.features` array if no one is sharing or no location data
61
64
  * is available yet. If sharing started but this stays empty, see the **Location
62
65
  * Sharing** overview.
@@ -89,6 +92,12 @@ export class Location extends APIResource {
89
92
  * `{ "success": true, "message": "Location request sent" }` and does not return
90
93
  * coordinates.
91
94
  *
95
+ * Rejected with `409` if the recipient is already sharing — read their location
96
+ * with `GET /v3/chats/{chatId}/location` instead of re-requesting.
97
+ *
98
+ * Rate limited per chat, since each request prompts the recipient's device.
99
+ * Exceeding it returns `429` with a `Retry-After` header.
100
+ *
92
101
  * Location requests only work in **1:1 iMessage chats** (Apple limitation):
93
102
  *
94
103
  * - Group chats (any service) return `409` with code `2016`
@@ -134,7 +143,7 @@ export namespace GetChatLocationResponse {
134
143
  export namespace Feature {
135
144
  export interface Geometry {
136
145
  /**
137
- * [longitude, latitude] or [longitude, latitude, altitude]
146
+ * [longitude, latitude]
138
147
  */
139
148
  coordinates: Array<number>;
140
149
 
@@ -180,6 +180,7 @@ export type WebhookEventType =
180
180
  | 'chat.typing_indicator.started'
181
181
  | 'chat.typing_indicator.stopped'
182
182
  | 'phone_number.status_updated'
183
+ | 'contact_card.received'
183
184
  | 'call.initiated'
184
185
  | 'call.ringing'
185
186
  | 'call.answered'
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.44.3'; // x-release-please-version
1
+ export const VERSION = '0.46.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.44.3";
1
+ export declare const VERSION = "0.46.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.44.3";
1
+ export declare const VERSION = "0.46.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.44.3'; // x-release-please-version
4
+ exports.VERSION = '0.46.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.44.3'; // x-release-please-version
1
+ export const VERSION = '0.46.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map