@linqapp/sdk 0.66.3 → 0.68.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/chats/chats.d.mts +6 -4
  10. package/resources/chats/chats.d.mts.map +1 -1
  11. package/resources/chats/chats.d.ts +6 -4
  12. package/resources/chats/chats.d.ts.map +1 -1
  13. package/resources/chats/chats.js.map +1 -1
  14. package/resources/chats/chats.mjs.map +1 -1
  15. package/resources/index.d.mts +1 -1
  16. package/resources/index.d.mts.map +1 -1
  17. package/resources/index.d.ts +1 -1
  18. package/resources/index.d.ts.map +1 -1
  19. package/resources/index.js.map +1 -1
  20. package/resources/index.mjs.map +1 -1
  21. package/resources/messages/messages.d.mts +8 -9
  22. package/resources/messages/messages.d.mts.map +1 -1
  23. package/resources/messages/messages.d.ts +8 -9
  24. package/resources/messages/messages.d.ts.map +1 -1
  25. package/resources/messages/messages.js +5 -4
  26. package/resources/messages/messages.js.map +1 -1
  27. package/resources/messages/messages.mjs +5 -4
  28. package/resources/messages/messages.mjs.map +1 -1
  29. package/resources/webhook-events.d.mts +1 -1
  30. package/resources/webhook-events.d.mts.map +1 -1
  31. package/resources/webhook-events.d.ts +1 -1
  32. package/resources/webhook-events.d.ts.map +1 -1
  33. package/resources/webhook-subscriptions.d.mts +10 -0
  34. package/resources/webhook-subscriptions.d.mts.map +1 -1
  35. package/resources/webhook-subscriptions.d.ts +10 -0
  36. package/resources/webhook-subscriptions.d.ts.map +1 -1
  37. package/resources/webhooks.d.mts +120 -12
  38. package/resources/webhooks.d.mts.map +1 -1
  39. package/resources/webhooks.d.ts +120 -12
  40. package/resources/webhooks.d.ts.map +1 -1
  41. package/src/client.ts +4 -0
  42. package/src/resources/chats/chats.ts +6 -4
  43. package/src/resources/index.ts +2 -0
  44. package/src/resources/messages/messages.ts +8 -9
  45. package/src/resources/webhook-events.ts +2 -0
  46. package/src/resources/webhook-subscriptions.ts +12 -0
  47. package/src/resources/webhooks.ts +248 -0
  48. package/src/version.ts +1 -1
  49. package/version.d.mts +1 -1
  50. package/version.d.ts +1 -1
  51. package/version.js +1 -1
  52. package/version.mjs +1 -1
@@ -247,10 +247,11 @@ export class Messages extends APIResource {
247
247
  * `sticker` is peeled onto the bubble itself, and can be dragged, resized and
248
248
  * rotated. Both accept an emoji; they do not look alike.
249
249
  *
250
- * **Stickers** are iMessage-only and cannot be removed — iMessage has no unpeel
251
- * operation, so `operation: "remove"` with `type: "sticker"` is rejected.
252
- * Position, size and rotation are optional via `placement`, and can be changed
253
- * afterwards with `PATCH /v3/messages/{messageId}/reactions/{reactionId}`.
250
+ * **Stickers** are iMessage-only and cannot be removed, so `operation: "remove"`
251
+ * with `type: "sticker"` is rejected. Position, size and rotation are optional via
252
+ * `placement`, and can be changed afterwards with
253
+ * `PATCH /v3/messages/{messageId}/reactions/{reactionId}`. An animated image peels
254
+ * as an animated sticker, in whatever shape the file already has.
254
255
  *
255
256
  * @example
256
257
  * ```ts
@@ -945,8 +946,7 @@ export interface MessageAddReactionParams {
945
946
 
946
947
  /**
947
948
  * A single emoji to peel onto the message as a sticker. Only valid when type is
948
- * "sticker", and it is rendered on the device so it matches the glyph a person
949
- * would peel by hand.
949
+ * "sticker".
950
950
  *
951
951
  * Exactly one of `emoji`, `url` or `attachment_id` is required when type is
952
952
  * "sticker".
@@ -974,9 +974,8 @@ export interface MessageAddReactionParams {
974
974
  * Linq attachment URL of the sticker image — the `download_url` returned by
975
975
  * `POST /v3/attachments`. Only valid when type is "sticker".
976
976
  *
977
- * Unlike a media part, this does **not** accept an arbitrary host: reactions have
978
- * no download step, so the image must already be stored. To send a sticker from
979
- * elsewhere, upload it with `POST /v3/attachments` first and pass `attachment_id`.
977
+ * The image must already be stored with us. To send a sticker from elsewhere,
978
+ * upload it with `POST /v3/attachments` first and pass `attachment_id`.
980
979
  *
981
980
  * Exactly one of `emoji`, `url` or `attachment_id` is required when type is
982
981
  * "sticker".
@@ -180,6 +180,8 @@ export type WebhookEventType =
180
180
  | 'chat.typing_indicator.started'
181
181
  | 'chat.typing_indicator.stopped'
182
182
  | 'phone_number.status_updated'
183
+ | 'phone_number.assigned'
184
+ | 'phone_number.released'
183
185
  | 'contact_card.received'
184
186
  | 'call.initiated'
185
187
  | 'call.ringing'
@@ -292,6 +292,12 @@ export interface WebhookSubscription {
292
292
  */
293
293
  updated_at: string;
294
294
 
295
+ /**
296
+ * Environment this subscription belongs to. Null means production. Only events
297
+ * from lines in the same environment are delivered.
298
+ */
299
+ environment_id?: string | null;
300
+
295
301
  /**
296
302
  * Phone numbers this subscription filters for. If null or empty, events from all
297
303
  * phone numbers are delivered.
@@ -340,6 +346,12 @@ export interface WebhookSubscriptionCreateResponse {
340
346
  */
341
347
  updated_at: string;
342
348
 
349
+ /**
350
+ * Environment this subscription belongs to. Null means production. Only events
351
+ * from lines in the same environment are delivered.
352
+ */
353
+ environment_id?: string | null;
354
+
343
355
  /**
344
356
  * Phone numbers this subscription filters for. If null or empty, events from all
345
357
  * phone numbers are delivered.
@@ -3800,6 +3800,8 @@ export interface PhoneNumberStatusUpdatedWebhookEvent {
3800
3800
  | 'chat.typing_indicator.started'
3801
3801
  | 'chat.typing_indicator.stopped'
3802
3802
  | 'phone_number.status_updated'
3803
+ | 'phone_number.assigned'
3804
+ | 'phone_number.released'
3803
3805
  | 'contact_card.received'
3804
3806
  | 'call.initiated'
3805
3807
  | 'call.ringing'
@@ -3873,6 +3875,230 @@ export namespace PhoneNumberStatusUpdatedWebhookEvent {
3873
3875
  }
3874
3876
  }
3875
3877
 
3878
+ /**
3879
+ * Complete webhook payload for phone_number.assigned events
3880
+ */
3881
+ export interface PhoneNumberAssignedWebhookEvent {
3882
+ /**
3883
+ * API version for the webhook payload format
3884
+ */
3885
+ api_version: string;
3886
+
3887
+ /**
3888
+ * When the event was created
3889
+ */
3890
+ created_at: string;
3891
+
3892
+ /**
3893
+ * Payload for phone_number.assigned and phone_number.released webhook events
3894
+ */
3895
+ data: PhoneNumberAssignedWebhookEvent.Data;
3896
+
3897
+ /**
3898
+ * Unique identifier for this event (for deduplication)
3899
+ */
3900
+ event_id: string;
3901
+
3902
+ /**
3903
+ * The type of event
3904
+ */
3905
+ event_type:
3906
+ | 'message.sent'
3907
+ | 'message.received'
3908
+ | 'message.read'
3909
+ | 'message.delivered'
3910
+ | 'message.failed'
3911
+ | 'message.edited'
3912
+ | 'reaction.added'
3913
+ | 'reaction.removed'
3914
+ | 'poll.received'
3915
+ | 'poll.failed'
3916
+ | 'poll.sent'
3917
+ | 'poll.delivered'
3918
+ | 'poll.read'
3919
+ | 'poll.updated'
3920
+ | 'poll.vote.added'
3921
+ | 'poll.vote.removed'
3922
+ | 'poll.reaction.added'
3923
+ | 'participant.added'
3924
+ | 'participant.removed'
3925
+ | 'chat.created'
3926
+ | 'chat.group_name_updated'
3927
+ | 'chat.group_icon_updated'
3928
+ | 'chat.group_name_update_failed'
3929
+ | 'chat.group_icon_update_failed'
3930
+ | 'chat.background_updated'
3931
+ | 'chat.background_update_failed'
3932
+ | 'chat.typing_indicator.started'
3933
+ | 'chat.typing_indicator.stopped'
3934
+ | 'phone_number.status_updated'
3935
+ | 'phone_number.assigned'
3936
+ | 'phone_number.released'
3937
+ | 'contact_card.received'
3938
+ | 'call.initiated'
3939
+ | 'call.ringing'
3940
+ | 'call.answered'
3941
+ | 'call.ended'
3942
+ | 'call.failed'
3943
+ | 'call.declined'
3944
+ | 'call.no_answer'
3945
+ | 'location.sharing.started'
3946
+ | 'location.sharing.stopped'
3947
+ | 'payment.succeeded'
3948
+ | 'payment.canceled'
3949
+ | 'payment.expired'
3950
+ | 'payment.declined'
3951
+ | 'payment.authorized'
3952
+ | 'connection.created'
3953
+ | 'connection.revoked';
3954
+
3955
+ /**
3956
+ * Partner identifier. Present on all webhooks for cross-referencing.
3957
+ */
3958
+ partner_id: string;
3959
+
3960
+ /**
3961
+ * Trace ID for debugging and correlation across systems.
3962
+ */
3963
+ trace_id: string;
3964
+
3965
+ /**
3966
+ * Date-based webhook payload version. Determined by the `?version=` query
3967
+ * parameter in your webhook subscription URL. If no version parameter is
3968
+ * specified, defaults based on subscription creation date.
3969
+ */
3970
+ webhook_version: string;
3971
+ }
3972
+
3973
+ export namespace PhoneNumberAssignedWebhookEvent {
3974
+ /**
3975
+ * Payload for phone_number.assigned and phone_number.released webhook events
3976
+ */
3977
+ export interface Data {
3978
+ /**
3979
+ * When the ownership change occurred
3980
+ */
3981
+ changed_at: string;
3982
+
3983
+ /**
3984
+ * Phone number in E.164 format
3985
+ */
3986
+ phone_number: string;
3987
+ }
3988
+ }
3989
+
3990
+ /**
3991
+ * Complete webhook payload for phone_number.released events
3992
+ */
3993
+ export interface PhoneNumberReleasedWebhookEvent {
3994
+ /**
3995
+ * API version for the webhook payload format
3996
+ */
3997
+ api_version: string;
3998
+
3999
+ /**
4000
+ * When the event was created
4001
+ */
4002
+ created_at: string;
4003
+
4004
+ /**
4005
+ * Payload for phone_number.assigned and phone_number.released webhook events
4006
+ */
4007
+ data: PhoneNumberReleasedWebhookEvent.Data;
4008
+
4009
+ /**
4010
+ * Unique identifier for this event (for deduplication)
4011
+ */
4012
+ event_id: string;
4013
+
4014
+ /**
4015
+ * The type of event
4016
+ */
4017
+ event_type:
4018
+ | 'message.sent'
4019
+ | 'message.received'
4020
+ | 'message.read'
4021
+ | 'message.delivered'
4022
+ | 'message.failed'
4023
+ | 'message.edited'
4024
+ | 'reaction.added'
4025
+ | 'reaction.removed'
4026
+ | 'poll.received'
4027
+ | 'poll.failed'
4028
+ | 'poll.sent'
4029
+ | 'poll.delivered'
4030
+ | 'poll.read'
4031
+ | 'poll.updated'
4032
+ | 'poll.vote.added'
4033
+ | 'poll.vote.removed'
4034
+ | 'poll.reaction.added'
4035
+ | 'participant.added'
4036
+ | 'participant.removed'
4037
+ | 'chat.created'
4038
+ | 'chat.group_name_updated'
4039
+ | 'chat.group_icon_updated'
4040
+ | 'chat.group_name_update_failed'
4041
+ | 'chat.group_icon_update_failed'
4042
+ | 'chat.background_updated'
4043
+ | 'chat.background_update_failed'
4044
+ | 'chat.typing_indicator.started'
4045
+ | 'chat.typing_indicator.stopped'
4046
+ | 'phone_number.status_updated'
4047
+ | 'phone_number.assigned'
4048
+ | 'phone_number.released'
4049
+ | 'contact_card.received'
4050
+ | 'call.initiated'
4051
+ | 'call.ringing'
4052
+ | 'call.answered'
4053
+ | 'call.ended'
4054
+ | 'call.failed'
4055
+ | 'call.declined'
4056
+ | 'call.no_answer'
4057
+ | 'location.sharing.started'
4058
+ | 'location.sharing.stopped'
4059
+ | 'payment.succeeded'
4060
+ | 'payment.canceled'
4061
+ | 'payment.expired'
4062
+ | 'payment.declined'
4063
+ | 'payment.authorized'
4064
+ | 'connection.created'
4065
+ | 'connection.revoked';
4066
+
4067
+ /**
4068
+ * Partner identifier. Present on all webhooks for cross-referencing.
4069
+ */
4070
+ partner_id: string;
4071
+
4072
+ /**
4073
+ * Trace ID for debugging and correlation across systems.
4074
+ */
4075
+ trace_id: string;
4076
+
4077
+ /**
4078
+ * Date-based webhook payload version. Determined by the `?version=` query
4079
+ * parameter in your webhook subscription URL. If no version parameter is
4080
+ * specified, defaults based on subscription creation date.
4081
+ */
4082
+ webhook_version: string;
4083
+ }
4084
+
4085
+ export namespace PhoneNumberReleasedWebhookEvent {
4086
+ /**
4087
+ * Payload for phone_number.assigned and phone_number.released webhook events
4088
+ */
4089
+ export interface Data {
4090
+ /**
4091
+ * When the ownership change occurred
4092
+ */
4093
+ changed_at: string;
4094
+
4095
+ /**
4096
+ * Phone number in E.164 format
4097
+ */
4098
+ phone_number: string;
4099
+ }
4100
+ }
4101
+
3876
4102
  export interface ConnectionCreatedWebhookEvent {
3877
4103
  /**
3878
4104
  * API version for the webhook payload format
@@ -3928,6 +4154,8 @@ export interface ConnectionCreatedWebhookEvent {
3928
4154
  | 'chat.typing_indicator.started'
3929
4155
  | 'chat.typing_indicator.stopped'
3930
4156
  | 'phone_number.status_updated'
4157
+ | 'phone_number.assigned'
4158
+ | 'phone_number.released'
3931
4159
  | 'contact_card.received'
3932
4160
  | 'call.initiated'
3933
4161
  | 'call.ringing'
@@ -4167,6 +4395,8 @@ export interface ConnectionRevokedWebhookEvent {
4167
4395
  | 'chat.typing_indicator.started'
4168
4396
  | 'chat.typing_indicator.stopped'
4169
4397
  | 'phone_number.status_updated'
4398
+ | 'phone_number.assigned'
4399
+ | 'phone_number.released'
4170
4400
  | 'contact_card.received'
4171
4401
  | 'call.initiated'
4172
4402
  | 'call.ringing'
@@ -4400,6 +4630,8 @@ export interface LocationSharingStartedWebhookEvent {
4400
4630
  | 'chat.typing_indicator.started'
4401
4631
  | 'chat.typing_indicator.stopped'
4402
4632
  | 'phone_number.status_updated'
4633
+ | 'phone_number.assigned'
4634
+ | 'phone_number.released'
4403
4635
  | 'contact_card.received'
4404
4636
  | 'call.initiated'
4405
4637
  | 'call.ringing'
@@ -4518,6 +4750,8 @@ export interface LocationSharingStoppedWebhookEvent {
4518
4750
  | 'chat.typing_indicator.started'
4519
4751
  | 'chat.typing_indicator.stopped'
4520
4752
  | 'phone_number.status_updated'
4753
+ | 'phone_number.assigned'
4754
+ | 'phone_number.released'
4521
4755
  | 'contact_card.received'
4522
4756
  | 'call.initiated'
4523
4757
  | 'call.ringing'
@@ -4641,6 +4875,8 @@ export interface PaymentAuthorizedWebhookEvent {
4641
4875
  | 'chat.typing_indicator.started'
4642
4876
  | 'chat.typing_indicator.stopped'
4643
4877
  | 'phone_number.status_updated'
4878
+ | 'phone_number.assigned'
4879
+ | 'phone_number.released'
4644
4880
  | 'contact_card.received'
4645
4881
  | 'call.initiated'
4646
4882
  | 'call.ringing'
@@ -4880,6 +5116,8 @@ export interface PaymentCanceledWebhookEvent {
4880
5116
  | 'chat.typing_indicator.started'
4881
5117
  | 'chat.typing_indicator.stopped'
4882
5118
  | 'phone_number.status_updated'
5119
+ | 'phone_number.assigned'
5120
+ | 'phone_number.released'
4883
5121
  | 'contact_card.received'
4884
5122
  | 'call.initiated'
4885
5123
  | 'call.ringing'
@@ -5119,6 +5357,8 @@ export interface PaymentDeclinedWebhookEvent {
5119
5357
  | 'chat.typing_indicator.started'
5120
5358
  | 'chat.typing_indicator.stopped'
5121
5359
  | 'phone_number.status_updated'
5360
+ | 'phone_number.assigned'
5361
+ | 'phone_number.released'
5122
5362
  | 'contact_card.received'
5123
5363
  | 'call.initiated'
5124
5364
  | 'call.ringing'
@@ -5358,6 +5598,8 @@ export interface PaymentExpiredWebhookEvent {
5358
5598
  | 'chat.typing_indicator.started'
5359
5599
  | 'chat.typing_indicator.stopped'
5360
5600
  | 'phone_number.status_updated'
5601
+ | 'phone_number.assigned'
5602
+ | 'phone_number.released'
5361
5603
  | 'contact_card.received'
5362
5604
  | 'call.initiated'
5363
5605
  | 'call.ringing'
@@ -5597,6 +5839,8 @@ export interface PaymentSucceededWebhookEvent {
5597
5839
  | 'chat.typing_indicator.started'
5598
5840
  | 'chat.typing_indicator.stopped'
5599
5841
  | 'phone_number.status_updated'
5842
+ | 'phone_number.assigned'
5843
+ | 'phone_number.released'
5600
5844
  | 'contact_card.received'
5601
5845
  | 'call.initiated'
5602
5846
  | 'call.ringing'
@@ -5815,6 +6059,8 @@ export type UnwrapWebhookEvent =
5815
6059
  | ChatBackgroundUpdateFailedWebhookEvent
5816
6060
  | ContactCardReceivedWebhookEvent
5817
6061
  | PhoneNumberStatusUpdatedWebhookEvent
6062
+ | PhoneNumberAssignedWebhookEvent
6063
+ | PhoneNumberReleasedWebhookEvent
5818
6064
  | ConnectionCreatedWebhookEvent
5819
6065
  | ConnectionRevokedWebhookEvent
5820
6066
  | LocationSharingStartedWebhookEvent
@@ -5863,6 +6109,8 @@ export declare namespace Webhooks {
5863
6109
  type ChatBackgroundUpdateFailedWebhookEvent as ChatBackgroundUpdateFailedWebhookEvent,
5864
6110
  type ContactCardReceivedWebhookEvent as ContactCardReceivedWebhookEvent,
5865
6111
  type PhoneNumberStatusUpdatedWebhookEvent as PhoneNumberStatusUpdatedWebhookEvent,
6112
+ type PhoneNumberAssignedWebhookEvent as PhoneNumberAssignedWebhookEvent,
6113
+ type PhoneNumberReleasedWebhookEvent as PhoneNumberReleasedWebhookEvent,
5866
6114
  type ConnectionCreatedWebhookEvent as ConnectionCreatedWebhookEvent,
5867
6115
  type ConnectionRevokedWebhookEvent as ConnectionRevokedWebhookEvent,
5868
6116
  type LocationSharingStartedWebhookEvent as LocationSharingStartedWebhookEvent,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.66.3'; // x-release-please-version
1
+ export const VERSION = '0.68.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.66.3";
1
+ export declare const VERSION = "0.68.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.66.3";
1
+ export declare const VERSION = "0.68.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.66.3'; // x-release-please-version
4
+ exports.VERSION = '0.68.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.66.3'; // x-release-please-version
1
+ export const VERSION = '0.68.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map