@linqapp/sdk 0.55.2 → 0.57.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 (71) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +11 -3
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +11 -3
  5. package/client.d.ts.map +1 -1
  6. package/client.js +10 -2
  7. package/client.js.map +1 -1
  8. package/client.mjs +10 -2
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/chats/chats.d.mts +6 -9
  12. package/resources/chats/chats.d.mts.map +1 -1
  13. package/resources/chats/chats.d.ts +6 -9
  14. package/resources/chats/chats.d.ts.map +1 -1
  15. package/resources/chats/chats.js.map +1 -1
  16. package/resources/chats/chats.mjs.map +1 -1
  17. package/resources/chats/messages.d.mts +13 -5
  18. package/resources/chats/messages.d.mts.map +1 -1
  19. package/resources/chats/messages.d.ts +13 -5
  20. package/resources/chats/messages.d.ts.map +1 -1
  21. package/resources/chats/messages.js +8 -0
  22. package/resources/chats/messages.js.map +1 -1
  23. package/resources/chats/messages.mjs +8 -0
  24. package/resources/chats/messages.mjs.map +1 -1
  25. package/resources/chats/polls.d.mts +8 -0
  26. package/resources/chats/polls.d.mts.map +1 -1
  27. package/resources/chats/polls.d.ts +8 -0
  28. package/resources/chats/polls.d.ts.map +1 -1
  29. package/resources/chats/polls.js +8 -0
  30. package/resources/chats/polls.js.map +1 -1
  31. package/resources/chats/polls.mjs +8 -0
  32. package/resources/chats/polls.mjs.map +1 -1
  33. package/resources/index.d.mts +1 -1
  34. package/resources/index.d.mts.map +1 -1
  35. package/resources/index.d.ts +1 -1
  36. package/resources/index.d.ts.map +1 -1
  37. package/resources/index.js.map +1 -1
  38. package/resources/index.mjs.map +1 -1
  39. package/resources/messages/messages.d.mts +13 -5
  40. package/resources/messages/messages.d.mts.map +1 -1
  41. package/resources/messages/messages.d.ts +13 -5
  42. package/resources/messages/messages.d.ts.map +1 -1
  43. package/resources/messages/messages.js +8 -0
  44. package/resources/messages/messages.js.map +1 -1
  45. package/resources/messages/messages.mjs +8 -0
  46. package/resources/messages/messages.mjs.map +1 -1
  47. package/resources/messages/poll.d.mts +8 -0
  48. package/resources/messages/poll.d.mts.map +1 -1
  49. package/resources/messages/poll.d.ts +8 -0
  50. package/resources/messages/poll.d.ts.map +1 -1
  51. package/resources/messages/poll.js +8 -0
  52. package/resources/messages/poll.js.map +1 -1
  53. package/resources/messages/poll.mjs +8 -0
  54. package/resources/messages/poll.mjs.map +1 -1
  55. package/resources/webhooks.d.mts +1232 -2
  56. package/resources/webhooks.d.mts.map +1 -1
  57. package/resources/webhooks.d.ts +1232 -2
  58. package/resources/webhooks.d.ts.map +1 -1
  59. package/src/client.ts +36 -10
  60. package/src/resources/chats/chats.ts +6 -9
  61. package/src/resources/chats/messages.ts +13 -5
  62. package/src/resources/chats/polls.ts +8 -0
  63. package/src/resources/index.ts +9 -0
  64. package/src/resources/messages/messages.ts +13 -5
  65. package/src/resources/messages/poll.ts +8 -0
  66. package/src/resources/webhooks.ts +1927 -1
  67. package/src/version.ts +1 -1
  68. package/version.d.mts +1 -1
  69. package/version.d.ts +1 -1
  70. package/version.js +1 -1
  71. package/version.mjs +1 -1
@@ -3118,11 +3118,1241 @@ export declare namespace PhoneNumberStatusUpdatedWebhookEvent {
3118
3118
  previous_status: 'ACTIVE' | 'FLAGGED';
3119
3119
  }
3120
3120
  }
3121
+ export interface ConnectionCreatedWebhookEvent {
3122
+ /**
3123
+ * API version for the webhook payload format
3124
+ */
3125
+ api_version: string;
3126
+ /**
3127
+ * When the event was created
3128
+ */
3129
+ created_at: string;
3130
+ /**
3131
+ * The payment request, as returned by
3132
+ * `GET /v3/payment_requests/{paymentRequestId}`.
3133
+ */
3134
+ data: ConnectionCreatedWebhookEvent.Data;
3135
+ /**
3136
+ * Unique identifier for this event (for deduplication)
3137
+ */
3138
+ event_id: string;
3139
+ event_type: 'payment.succeeded' | 'payment.canceled' | 'payment.expired' | '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.declined' | 'payment.authorized' | 'connection.created' | 'connection.revoked';
3140
+ /**
3141
+ * Partner identifier. Present on all webhooks for cross-referencing.
3142
+ */
3143
+ partner_id: string;
3144
+ /**
3145
+ * Trace ID for debugging and correlation across systems.
3146
+ */
3147
+ trace_id: string;
3148
+ /**
3149
+ * Date-based webhook payload version. Determined by the `?version=` query
3150
+ * parameter in your webhook subscription URL. If no version parameter is
3151
+ * specified, defaults based on subscription creation date.
3152
+ */
3153
+ webhook_version: string;
3154
+ }
3155
+ export declare namespace ConnectionCreatedWebhookEvent {
3156
+ /**
3157
+ * The payment request, as returned by
3158
+ * `GET /v3/payment_requests/{paymentRequestId}`.
3159
+ */
3160
+ interface Data {
3161
+ /**
3162
+ * The payment request id.
3163
+ */
3164
+ id: string;
3165
+ /**
3166
+ * What was charged at checkout, in the currency's minor units. In `subscription`
3167
+ * mode this is the first invoice's total — all items after any discounts are
3168
+ * applied.
3169
+ */
3170
+ amount: number;
3171
+ /**
3172
+ * URL the recipient opens to pay
3173
+ * (`https://zero.linqapp.com/pay/{slug}?session=...`).
3174
+ */
3175
+ checkout_url: string;
3176
+ created_at: string;
3177
+ currency: string;
3178
+ object: string;
3179
+ status: 'succeeded' | 'failed' | 'canceled' | 'expired';
3180
+ description?: string;
3181
+ /**
3182
+ * Subscription mode — the discount Stripe applied, read back from the coupon.
3183
+ * Absent when none was applied.
3184
+ */
3185
+ discount?: Data.Discount;
3186
+ /**
3187
+ * Subscription mode — how often the subscription renews.
3188
+ */
3189
+ interval?: 'day' | 'week' | 'month' | 'year';
3190
+ /**
3191
+ * Subscription mode — intervals per renewal.
3192
+ */
3193
+ interval_count?: number;
3194
+ metadata?: {
3195
+ [key: string]: string;
3196
+ };
3197
+ /**
3198
+ * Whether the request collected a one-time charge or started a subscription.
3199
+ */
3200
+ mode?: 'payment' | 'subscription';
3201
+ /**
3202
+ * Natural-rail join keys, present when `rail: natural`.
3203
+ */
3204
+ natural?: Data.Natural;
3205
+ /**
3206
+ * Subscription mode — the recurring price subscribed to.
3207
+ */
3208
+ price_id?: string;
3209
+ /**
3210
+ * Subscription mode — units of the price subscribed to.
3211
+ */
3212
+ quantity?: number;
3213
+ /**
3214
+ * The rail this request settled on.
3215
+ */
3216
+ rail?: 'stripe' | 'natural';
3217
+ /**
3218
+ * Ids of the Stripe objects on your connected account — join keys into your own
3219
+ * Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
3220
+ * `subscription_id`.
3221
+ */
3222
+ stripe?: Data.Stripe;
3223
+ /**
3224
+ * Subscription mode — when the free trial ends and the first charge happens. On a
3225
+ * trial request, `payment.succeeded` means the payment method was collected ($0
3226
+ * moved).
3227
+ */
3228
+ trial_end?: string;
3229
+ updated_at?: string;
3230
+ }
3231
+ namespace Data {
3232
+ /**
3233
+ * Subscription mode — the discount Stripe applied, read back from the coupon.
3234
+ * Absent when none was applied.
3235
+ */
3236
+ interface Discount {
3237
+ coupon?: string;
3238
+ /**
3239
+ * Name of the coupon/promo code displayed to customers.
3240
+ */
3241
+ label?: string;
3242
+ promotion_code?: string;
3243
+ }
3244
+ /**
3245
+ * Natural-rail join keys, present when `rail: natural`.
3246
+ */
3247
+ interface Natural {
3248
+ /**
3249
+ * The Natural payment request (`prq_...`).
3250
+ */
3251
+ payment_request_id?: string;
3252
+ /**
3253
+ * The settled transaction (`txn_...`).
3254
+ */
3255
+ transaction_id?: string;
3256
+ }
3257
+ /**
3258
+ * Ids of the Stripe objects on your connected account — join keys into your own
3259
+ * Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
3260
+ * `subscription_id`.
3261
+ */
3262
+ interface Stripe {
3263
+ /**
3264
+ * The Customer the request is attached to (`cus_...`). Always set in subscription
3265
+ * mode; set in payment mode only when the request was created with a
3266
+ * `customer_id`.
3267
+ */
3268
+ customer_id?: string;
3269
+ /**
3270
+ * The PaymentIntent collected at checkout (`pi_...`).
3271
+ */
3272
+ payment_intent_id?: string;
3273
+ /**
3274
+ * Subscription mode — the Subscription (`sub_...`).
3275
+ */
3276
+ subscription_id?: string;
3277
+ }
3278
+ }
3279
+ }
3280
+ export interface ConnectionRevokedWebhookEvent {
3281
+ /**
3282
+ * API version for the webhook payload format
3283
+ */
3284
+ api_version: string;
3285
+ /**
3286
+ * When the event was created
3287
+ */
3288
+ created_at: string;
3289
+ /**
3290
+ * The payment request, as returned by
3291
+ * `GET /v3/payment_requests/{paymentRequestId}`.
3292
+ */
3293
+ data: ConnectionRevokedWebhookEvent.Data;
3294
+ /**
3295
+ * Unique identifier for this event (for deduplication)
3296
+ */
3297
+ event_id: string;
3298
+ event_type: 'payment.succeeded' | 'payment.canceled' | 'payment.expired' | '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.declined' | 'payment.authorized' | 'connection.created' | 'connection.revoked';
3299
+ /**
3300
+ * Partner identifier. Present on all webhooks for cross-referencing.
3301
+ */
3302
+ partner_id: string;
3303
+ /**
3304
+ * Trace ID for debugging and correlation across systems.
3305
+ */
3306
+ trace_id: string;
3307
+ /**
3308
+ * Date-based webhook payload version. Determined by the `?version=` query
3309
+ * parameter in your webhook subscription URL. If no version parameter is
3310
+ * specified, defaults based on subscription creation date.
3311
+ */
3312
+ webhook_version: string;
3313
+ }
3314
+ export declare namespace ConnectionRevokedWebhookEvent {
3315
+ /**
3316
+ * The payment request, as returned by
3317
+ * `GET /v3/payment_requests/{paymentRequestId}`.
3318
+ */
3319
+ interface Data {
3320
+ /**
3321
+ * The payment request id.
3322
+ */
3323
+ id: string;
3324
+ /**
3325
+ * What was charged at checkout, in the currency's minor units. In `subscription`
3326
+ * mode this is the first invoice's total — all items after any discounts are
3327
+ * applied.
3328
+ */
3329
+ amount: number;
3330
+ /**
3331
+ * URL the recipient opens to pay
3332
+ * (`https://zero.linqapp.com/pay/{slug}?session=...`).
3333
+ */
3334
+ checkout_url: string;
3335
+ created_at: string;
3336
+ currency: string;
3337
+ object: string;
3338
+ status: 'succeeded' | 'failed' | 'canceled' | 'expired';
3339
+ description?: string;
3340
+ /**
3341
+ * Subscription mode — the discount Stripe applied, read back from the coupon.
3342
+ * Absent when none was applied.
3343
+ */
3344
+ discount?: Data.Discount;
3345
+ /**
3346
+ * Subscription mode — how often the subscription renews.
3347
+ */
3348
+ interval?: 'day' | 'week' | 'month' | 'year';
3349
+ /**
3350
+ * Subscription mode — intervals per renewal.
3351
+ */
3352
+ interval_count?: number;
3353
+ metadata?: {
3354
+ [key: string]: string;
3355
+ };
3356
+ /**
3357
+ * Whether the request collected a one-time charge or started a subscription.
3358
+ */
3359
+ mode?: 'payment' | 'subscription';
3360
+ /**
3361
+ * Natural-rail join keys, present when `rail: natural`.
3362
+ */
3363
+ natural?: Data.Natural;
3364
+ /**
3365
+ * Subscription mode — the recurring price subscribed to.
3366
+ */
3367
+ price_id?: string;
3368
+ /**
3369
+ * Subscription mode — units of the price subscribed to.
3370
+ */
3371
+ quantity?: number;
3372
+ /**
3373
+ * The rail this request settled on.
3374
+ */
3375
+ rail?: 'stripe' | 'natural';
3376
+ /**
3377
+ * Ids of the Stripe objects on your connected account — join keys into your own
3378
+ * Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
3379
+ * `subscription_id`.
3380
+ */
3381
+ stripe?: Data.Stripe;
3382
+ /**
3383
+ * Subscription mode — when the free trial ends and the first charge happens. On a
3384
+ * trial request, `payment.succeeded` means the payment method was collected ($0
3385
+ * moved).
3386
+ */
3387
+ trial_end?: string;
3388
+ updated_at?: string;
3389
+ }
3390
+ namespace Data {
3391
+ /**
3392
+ * Subscription mode — the discount Stripe applied, read back from the coupon.
3393
+ * Absent when none was applied.
3394
+ */
3395
+ interface Discount {
3396
+ coupon?: string;
3397
+ /**
3398
+ * Name of the coupon/promo code displayed to customers.
3399
+ */
3400
+ label?: string;
3401
+ promotion_code?: string;
3402
+ }
3403
+ /**
3404
+ * Natural-rail join keys, present when `rail: natural`.
3405
+ */
3406
+ interface Natural {
3407
+ /**
3408
+ * The Natural payment request (`prq_...`).
3409
+ */
3410
+ payment_request_id?: string;
3411
+ /**
3412
+ * The settled transaction (`txn_...`).
3413
+ */
3414
+ transaction_id?: string;
3415
+ }
3416
+ /**
3417
+ * Ids of the Stripe objects on your connected account — join keys into your own
3418
+ * Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
3419
+ * `subscription_id`.
3420
+ */
3421
+ interface Stripe {
3422
+ /**
3423
+ * The Customer the request is attached to (`cus_...`). Always set in subscription
3424
+ * mode; set in payment mode only when the request was created with a
3425
+ * `customer_id`.
3426
+ */
3427
+ customer_id?: string;
3428
+ /**
3429
+ * The PaymentIntent collected at checkout (`pi_...`).
3430
+ */
3431
+ payment_intent_id?: string;
3432
+ /**
3433
+ * Subscription mode — the Subscription (`sub_...`).
3434
+ */
3435
+ subscription_id?: string;
3436
+ }
3437
+ }
3438
+ }
3439
+ export interface LocationSharingStartedWebhookEvent {
3440
+ /**
3441
+ * API version for the webhook payload format
3442
+ */
3443
+ api_version: string;
3444
+ /**
3445
+ * When the event was created
3446
+ */
3447
+ created_at: string;
3448
+ data: LocationSharingStartedWebhookEvent.Data;
3449
+ /**
3450
+ * Unique identifier for this event (for deduplication)
3451
+ */
3452
+ event_id: string;
3453
+ event_type: 'location.sharing.started' | '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.stopped' | 'payment.succeeded' | 'payment.canceled' | 'payment.expired' | 'payment.declined' | 'payment.authorized' | 'connection.created' | 'connection.revoked';
3454
+ /**
3455
+ * Partner identifier. Present on all webhooks for cross-referencing.
3456
+ */
3457
+ partner_id: string;
3458
+ /**
3459
+ * Trace ID for debugging and correlation across systems.
3460
+ */
3461
+ trace_id: string;
3462
+ /**
3463
+ * Date-based webhook payload version. Determined by the `?version=` query
3464
+ * parameter in your webhook subscription URL. If no version parameter is
3465
+ * specified, defaults based on subscription creation date.
3466
+ */
3467
+ webhook_version: string;
3468
+ }
3469
+ export declare namespace LocationSharingStartedWebhookEvent {
3470
+ interface Data {
3471
+ /**
3472
+ * When location sharing started. Always present: falls back to when the share was
3473
+ * first observed if the device reported no start time.
3474
+ */
3475
+ began_at: string | null;
3476
+ /**
3477
+ * The chat this share was first sent to. Location sharing is per-contact rather
3478
+ * than per-chat, so the location may also be visible in other chats with the same
3479
+ * handle; this identifies where the share originated and does not change if the
3480
+ * contact later shares into another chat. Null when the originating chat could not
3481
+ * be determined.
3482
+ */
3483
+ chat_id: string | null;
3484
+ /**
3485
+ * When location sharing will expire. Null when sharing indefinitely.
3486
+ */
3487
+ ends_at: string | null;
3488
+ /**
3489
+ * Phone number of the person sharing their location
3490
+ */
3491
+ shared_by: string;
3492
+ /**
3493
+ * Your phone number receiving the location
3494
+ */
3495
+ shared_with: string;
3496
+ }
3497
+ }
3498
+ export interface LocationSharingStoppedWebhookEvent {
3499
+ /**
3500
+ * API version for the webhook payload format
3501
+ */
3502
+ api_version: string;
3503
+ /**
3504
+ * When the event was created
3505
+ */
3506
+ created_at: string;
3507
+ data: LocationSharingStoppedWebhookEvent.Data;
3508
+ /**
3509
+ * Unique identifier for this event (for deduplication)
3510
+ */
3511
+ event_id: string;
3512
+ event_type: 'location.sharing.stopped' | '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' | 'payment.succeeded' | 'payment.canceled' | 'payment.expired' | 'payment.declined' | 'payment.authorized' | 'connection.created' | 'connection.revoked';
3513
+ /**
3514
+ * Partner identifier. Present on all webhooks for cross-referencing.
3515
+ */
3516
+ partner_id: string;
3517
+ /**
3518
+ * Trace ID for debugging and correlation across systems.
3519
+ */
3520
+ trace_id: string;
3521
+ /**
3522
+ * Date-based webhook payload version. Determined by the `?version=` query
3523
+ * parameter in your webhook subscription URL. If no version parameter is
3524
+ * specified, defaults based on subscription creation date.
3525
+ */
3526
+ webhook_version: string;
3527
+ }
3528
+ export declare namespace LocationSharingStoppedWebhookEvent {
3529
+ interface Data {
3530
+ /**
3531
+ * When the sharing session started, matching began_at on its started event. Always
3532
+ * present.
3533
+ */
3534
+ began_at: string | null;
3535
+ /**
3536
+ * The chat the ended share was first sent to, matching the chat_id on its started
3537
+ * event. Sharing always stops for the contact as a whole, never for a single chat,
3538
+ * so this is the session's origin rather than the chat it stopped in. Null when
3539
+ * the originating chat could not be determined.
3540
+ */
3541
+ chat_id: string | null;
3542
+ /**
3543
+ * When the sharing session was observed to stop.
3544
+ */
3545
+ ended_at: string;
3546
+ /**
3547
+ * Phone number of the person who stopped sharing
3548
+ */
3549
+ shared_by: string;
3550
+ /**
3551
+ * Your phone number that was receiving the location
3552
+ */
3553
+ shared_with: string;
3554
+ }
3555
+ }
3556
+ export interface PaymentAuthorizedWebhookEvent {
3557
+ /**
3558
+ * API version for the webhook payload format
3559
+ */
3560
+ api_version: string;
3561
+ /**
3562
+ * When the event was created
3563
+ */
3564
+ created_at: string;
3565
+ /**
3566
+ * The payment request, as returned by
3567
+ * `GET /v3/payment_requests/{paymentRequestId}`.
3568
+ */
3569
+ data: PaymentAuthorizedWebhookEvent.Data;
3570
+ /**
3571
+ * Unique identifier for this event (for deduplication)
3572
+ */
3573
+ event_id: string;
3574
+ event_type: 'payment.succeeded' | 'payment.canceled' | 'payment.expired' | '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.declined' | 'payment.authorized' | 'connection.created' | 'connection.revoked';
3575
+ /**
3576
+ * Partner identifier. Present on all webhooks for cross-referencing.
3577
+ */
3578
+ partner_id: string;
3579
+ /**
3580
+ * Trace ID for debugging and correlation across systems.
3581
+ */
3582
+ trace_id: string;
3583
+ /**
3584
+ * Date-based webhook payload version. Determined by the `?version=` query
3585
+ * parameter in your webhook subscription URL. If no version parameter is
3586
+ * specified, defaults based on subscription creation date.
3587
+ */
3588
+ webhook_version: string;
3589
+ }
3590
+ export declare namespace PaymentAuthorizedWebhookEvent {
3591
+ /**
3592
+ * The payment request, as returned by
3593
+ * `GET /v3/payment_requests/{paymentRequestId}`.
3594
+ */
3595
+ interface Data {
3596
+ /**
3597
+ * The payment request id.
3598
+ */
3599
+ id: string;
3600
+ /**
3601
+ * What was charged at checkout, in the currency's minor units. In `subscription`
3602
+ * mode this is the first invoice's total — all items after any discounts are
3603
+ * applied.
3604
+ */
3605
+ amount: number;
3606
+ /**
3607
+ * URL the recipient opens to pay
3608
+ * (`https://zero.linqapp.com/pay/{slug}?session=...`).
3609
+ */
3610
+ checkout_url: string;
3611
+ created_at: string;
3612
+ currency: string;
3613
+ object: string;
3614
+ status: 'succeeded' | 'failed' | 'canceled' | 'expired';
3615
+ description?: string;
3616
+ /**
3617
+ * Subscription mode — the discount Stripe applied, read back from the coupon.
3618
+ * Absent when none was applied.
3619
+ */
3620
+ discount?: Data.Discount;
3621
+ /**
3622
+ * Subscription mode — how often the subscription renews.
3623
+ */
3624
+ interval?: 'day' | 'week' | 'month' | 'year';
3625
+ /**
3626
+ * Subscription mode — intervals per renewal.
3627
+ */
3628
+ interval_count?: number;
3629
+ metadata?: {
3630
+ [key: string]: string;
3631
+ };
3632
+ /**
3633
+ * Whether the request collected a one-time charge or started a subscription.
3634
+ */
3635
+ mode?: 'payment' | 'subscription';
3636
+ /**
3637
+ * Natural-rail join keys, present when `rail: natural`.
3638
+ */
3639
+ natural?: Data.Natural;
3640
+ /**
3641
+ * Subscription mode — the recurring price subscribed to.
3642
+ */
3643
+ price_id?: string;
3644
+ /**
3645
+ * Subscription mode — units of the price subscribed to.
3646
+ */
3647
+ quantity?: number;
3648
+ /**
3649
+ * The rail this request settled on.
3650
+ */
3651
+ rail?: 'stripe' | 'natural';
3652
+ /**
3653
+ * Ids of the Stripe objects on your connected account — join keys into your own
3654
+ * Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
3655
+ * `subscription_id`.
3656
+ */
3657
+ stripe?: Data.Stripe;
3658
+ /**
3659
+ * Subscription mode — when the free trial ends and the first charge happens. On a
3660
+ * trial request, `payment.succeeded` means the payment method was collected ($0
3661
+ * moved).
3662
+ */
3663
+ trial_end?: string;
3664
+ updated_at?: string;
3665
+ }
3666
+ namespace Data {
3667
+ /**
3668
+ * Subscription mode — the discount Stripe applied, read back from the coupon.
3669
+ * Absent when none was applied.
3670
+ */
3671
+ interface Discount {
3672
+ coupon?: string;
3673
+ /**
3674
+ * Name of the coupon/promo code displayed to customers.
3675
+ */
3676
+ label?: string;
3677
+ promotion_code?: string;
3678
+ }
3679
+ /**
3680
+ * Natural-rail join keys, present when `rail: natural`.
3681
+ */
3682
+ interface Natural {
3683
+ /**
3684
+ * The Natural payment request (`prq_...`).
3685
+ */
3686
+ payment_request_id?: string;
3687
+ /**
3688
+ * The settled transaction (`txn_...`).
3689
+ */
3690
+ transaction_id?: string;
3691
+ }
3692
+ /**
3693
+ * Ids of the Stripe objects on your connected account — join keys into your own
3694
+ * Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
3695
+ * `subscription_id`.
3696
+ */
3697
+ interface Stripe {
3698
+ /**
3699
+ * The Customer the request is attached to (`cus_...`). Always set in subscription
3700
+ * mode; set in payment mode only when the request was created with a
3701
+ * `customer_id`.
3702
+ */
3703
+ customer_id?: string;
3704
+ /**
3705
+ * The PaymentIntent collected at checkout (`pi_...`).
3706
+ */
3707
+ payment_intent_id?: string;
3708
+ /**
3709
+ * Subscription mode — the Subscription (`sub_...`).
3710
+ */
3711
+ subscription_id?: string;
3712
+ }
3713
+ }
3714
+ }
3715
+ export interface PaymentCanceledWebhookEvent {
3716
+ /**
3717
+ * API version for the webhook payload format
3718
+ */
3719
+ api_version: string;
3720
+ /**
3721
+ * When the event was created
3722
+ */
3723
+ created_at: string;
3724
+ /**
3725
+ * The payment request, as returned by
3726
+ * `GET /v3/payment_requests/{paymentRequestId}`.
3727
+ */
3728
+ data: PaymentCanceledWebhookEvent.Data;
3729
+ /**
3730
+ * Unique identifier for this event (for deduplication)
3731
+ */
3732
+ event_id: string;
3733
+ event_type: 'payment.succeeded' | 'payment.canceled' | 'payment.expired' | '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.declined' | 'payment.authorized' | 'connection.created' | 'connection.revoked';
3734
+ /**
3735
+ * Partner identifier. Present on all webhooks for cross-referencing.
3736
+ */
3737
+ partner_id: string;
3738
+ /**
3739
+ * Trace ID for debugging and correlation across systems.
3740
+ */
3741
+ trace_id: string;
3742
+ /**
3743
+ * Date-based webhook payload version. Determined by the `?version=` query
3744
+ * parameter in your webhook subscription URL. If no version parameter is
3745
+ * specified, defaults based on subscription creation date.
3746
+ */
3747
+ webhook_version: string;
3748
+ }
3749
+ export declare namespace PaymentCanceledWebhookEvent {
3750
+ /**
3751
+ * The payment request, as returned by
3752
+ * `GET /v3/payment_requests/{paymentRequestId}`.
3753
+ */
3754
+ interface Data {
3755
+ /**
3756
+ * The payment request id.
3757
+ */
3758
+ id: string;
3759
+ /**
3760
+ * What was charged at checkout, in the currency's minor units. In `subscription`
3761
+ * mode this is the first invoice's total — all items after any discounts are
3762
+ * applied.
3763
+ */
3764
+ amount: number;
3765
+ /**
3766
+ * URL the recipient opens to pay
3767
+ * (`https://zero.linqapp.com/pay/{slug}?session=...`).
3768
+ */
3769
+ checkout_url: string;
3770
+ created_at: string;
3771
+ currency: string;
3772
+ object: string;
3773
+ status: 'succeeded' | 'failed' | 'canceled' | 'expired';
3774
+ description?: string;
3775
+ /**
3776
+ * Subscription mode — the discount Stripe applied, read back from the coupon.
3777
+ * Absent when none was applied.
3778
+ */
3779
+ discount?: Data.Discount;
3780
+ /**
3781
+ * Subscription mode — how often the subscription renews.
3782
+ */
3783
+ interval?: 'day' | 'week' | 'month' | 'year';
3784
+ /**
3785
+ * Subscription mode — intervals per renewal.
3786
+ */
3787
+ interval_count?: number;
3788
+ metadata?: {
3789
+ [key: string]: string;
3790
+ };
3791
+ /**
3792
+ * Whether the request collected a one-time charge or started a subscription.
3793
+ */
3794
+ mode?: 'payment' | 'subscription';
3795
+ /**
3796
+ * Natural-rail join keys, present when `rail: natural`.
3797
+ */
3798
+ natural?: Data.Natural;
3799
+ /**
3800
+ * Subscription mode — the recurring price subscribed to.
3801
+ */
3802
+ price_id?: string;
3803
+ /**
3804
+ * Subscription mode — units of the price subscribed to.
3805
+ */
3806
+ quantity?: number;
3807
+ /**
3808
+ * The rail this request settled on.
3809
+ */
3810
+ rail?: 'stripe' | 'natural';
3811
+ /**
3812
+ * Ids of the Stripe objects on your connected account — join keys into your own
3813
+ * Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
3814
+ * `subscription_id`.
3815
+ */
3816
+ stripe?: Data.Stripe;
3817
+ /**
3818
+ * Subscription mode — when the free trial ends and the first charge happens. On a
3819
+ * trial request, `payment.succeeded` means the payment method was collected ($0
3820
+ * moved).
3821
+ */
3822
+ trial_end?: string;
3823
+ updated_at?: string;
3824
+ }
3825
+ namespace Data {
3826
+ /**
3827
+ * Subscription mode — the discount Stripe applied, read back from the coupon.
3828
+ * Absent when none was applied.
3829
+ */
3830
+ interface Discount {
3831
+ coupon?: string;
3832
+ /**
3833
+ * Name of the coupon/promo code displayed to customers.
3834
+ */
3835
+ label?: string;
3836
+ promotion_code?: string;
3837
+ }
3838
+ /**
3839
+ * Natural-rail join keys, present when `rail: natural`.
3840
+ */
3841
+ interface Natural {
3842
+ /**
3843
+ * The Natural payment request (`prq_...`).
3844
+ */
3845
+ payment_request_id?: string;
3846
+ /**
3847
+ * The settled transaction (`txn_...`).
3848
+ */
3849
+ transaction_id?: string;
3850
+ }
3851
+ /**
3852
+ * Ids of the Stripe objects on your connected account — join keys into your own
3853
+ * Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
3854
+ * `subscription_id`.
3855
+ */
3856
+ interface Stripe {
3857
+ /**
3858
+ * The Customer the request is attached to (`cus_...`). Always set in subscription
3859
+ * mode; set in payment mode only when the request was created with a
3860
+ * `customer_id`.
3861
+ */
3862
+ customer_id?: string;
3863
+ /**
3864
+ * The PaymentIntent collected at checkout (`pi_...`).
3865
+ */
3866
+ payment_intent_id?: string;
3867
+ /**
3868
+ * Subscription mode — the Subscription (`sub_...`).
3869
+ */
3870
+ subscription_id?: string;
3871
+ }
3872
+ }
3873
+ }
3874
+ export interface PaymentDeclinedWebhookEvent {
3875
+ /**
3876
+ * API version for the webhook payload format
3877
+ */
3878
+ api_version: string;
3879
+ /**
3880
+ * When the event was created
3881
+ */
3882
+ created_at: string;
3883
+ /**
3884
+ * The payment request, as returned by
3885
+ * `GET /v3/payment_requests/{paymentRequestId}`.
3886
+ */
3887
+ data: PaymentDeclinedWebhookEvent.Data;
3888
+ /**
3889
+ * Unique identifier for this event (for deduplication)
3890
+ */
3891
+ event_id: string;
3892
+ event_type: 'payment.succeeded' | 'payment.canceled' | 'payment.expired' | '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.declined' | 'payment.authorized' | 'connection.created' | 'connection.revoked';
3893
+ /**
3894
+ * Partner identifier. Present on all webhooks for cross-referencing.
3895
+ */
3896
+ partner_id: string;
3897
+ /**
3898
+ * Trace ID for debugging and correlation across systems.
3899
+ */
3900
+ trace_id: string;
3901
+ /**
3902
+ * Date-based webhook payload version. Determined by the `?version=` query
3903
+ * parameter in your webhook subscription URL. If no version parameter is
3904
+ * specified, defaults based on subscription creation date.
3905
+ */
3906
+ webhook_version: string;
3907
+ }
3908
+ export declare namespace PaymentDeclinedWebhookEvent {
3909
+ /**
3910
+ * The payment request, as returned by
3911
+ * `GET /v3/payment_requests/{paymentRequestId}`.
3912
+ */
3913
+ interface Data {
3914
+ /**
3915
+ * The payment request id.
3916
+ */
3917
+ id: string;
3918
+ /**
3919
+ * What was charged at checkout, in the currency's minor units. In `subscription`
3920
+ * mode this is the first invoice's total — all items after any discounts are
3921
+ * applied.
3922
+ */
3923
+ amount: number;
3924
+ /**
3925
+ * URL the recipient opens to pay
3926
+ * (`https://zero.linqapp.com/pay/{slug}?session=...`).
3927
+ */
3928
+ checkout_url: string;
3929
+ created_at: string;
3930
+ currency: string;
3931
+ object: string;
3932
+ status: 'succeeded' | 'failed' | 'canceled' | 'expired';
3933
+ description?: string;
3934
+ /**
3935
+ * Subscription mode — the discount Stripe applied, read back from the coupon.
3936
+ * Absent when none was applied.
3937
+ */
3938
+ discount?: Data.Discount;
3939
+ /**
3940
+ * Subscription mode — how often the subscription renews.
3941
+ */
3942
+ interval?: 'day' | 'week' | 'month' | 'year';
3943
+ /**
3944
+ * Subscription mode — intervals per renewal.
3945
+ */
3946
+ interval_count?: number;
3947
+ metadata?: {
3948
+ [key: string]: string;
3949
+ };
3950
+ /**
3951
+ * Whether the request collected a one-time charge or started a subscription.
3952
+ */
3953
+ mode?: 'payment' | 'subscription';
3954
+ /**
3955
+ * Natural-rail join keys, present when `rail: natural`.
3956
+ */
3957
+ natural?: Data.Natural;
3958
+ /**
3959
+ * Subscription mode — the recurring price subscribed to.
3960
+ */
3961
+ price_id?: string;
3962
+ /**
3963
+ * Subscription mode — units of the price subscribed to.
3964
+ */
3965
+ quantity?: number;
3966
+ /**
3967
+ * The rail this request settled on.
3968
+ */
3969
+ rail?: 'stripe' | 'natural';
3970
+ /**
3971
+ * Ids of the Stripe objects on your connected account — join keys into your own
3972
+ * Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
3973
+ * `subscription_id`.
3974
+ */
3975
+ stripe?: Data.Stripe;
3976
+ /**
3977
+ * Subscription mode — when the free trial ends and the first charge happens. On a
3978
+ * trial request, `payment.succeeded` means the payment method was collected ($0
3979
+ * moved).
3980
+ */
3981
+ trial_end?: string;
3982
+ updated_at?: string;
3983
+ }
3984
+ namespace Data {
3985
+ /**
3986
+ * Subscription mode — the discount Stripe applied, read back from the coupon.
3987
+ * Absent when none was applied.
3988
+ */
3989
+ interface Discount {
3990
+ coupon?: string;
3991
+ /**
3992
+ * Name of the coupon/promo code displayed to customers.
3993
+ */
3994
+ label?: string;
3995
+ promotion_code?: string;
3996
+ }
3997
+ /**
3998
+ * Natural-rail join keys, present when `rail: natural`.
3999
+ */
4000
+ interface Natural {
4001
+ /**
4002
+ * The Natural payment request (`prq_...`).
4003
+ */
4004
+ payment_request_id?: string;
4005
+ /**
4006
+ * The settled transaction (`txn_...`).
4007
+ */
4008
+ transaction_id?: string;
4009
+ }
4010
+ /**
4011
+ * Ids of the Stripe objects on your connected account — join keys into your own
4012
+ * Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
4013
+ * `subscription_id`.
4014
+ */
4015
+ interface Stripe {
4016
+ /**
4017
+ * The Customer the request is attached to (`cus_...`). Always set in subscription
4018
+ * mode; set in payment mode only when the request was created with a
4019
+ * `customer_id`.
4020
+ */
4021
+ customer_id?: string;
4022
+ /**
4023
+ * The PaymentIntent collected at checkout (`pi_...`).
4024
+ */
4025
+ payment_intent_id?: string;
4026
+ /**
4027
+ * Subscription mode — the Subscription (`sub_...`).
4028
+ */
4029
+ subscription_id?: string;
4030
+ }
4031
+ }
4032
+ }
4033
+ export interface PaymentExpiredWebhookEvent {
4034
+ /**
4035
+ * API version for the webhook payload format
4036
+ */
4037
+ api_version: string;
4038
+ /**
4039
+ * When the event was created
4040
+ */
4041
+ created_at: string;
4042
+ /**
4043
+ * The payment request, as returned by
4044
+ * `GET /v3/payment_requests/{paymentRequestId}`.
4045
+ */
4046
+ data: PaymentExpiredWebhookEvent.Data;
4047
+ /**
4048
+ * Unique identifier for this event (for deduplication)
4049
+ */
4050
+ event_id: string;
4051
+ event_type: 'payment.succeeded' | 'payment.canceled' | 'payment.expired' | '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.declined' | 'payment.authorized' | 'connection.created' | 'connection.revoked';
4052
+ /**
4053
+ * Partner identifier. Present on all webhooks for cross-referencing.
4054
+ */
4055
+ partner_id: string;
4056
+ /**
4057
+ * Trace ID for debugging and correlation across systems.
4058
+ */
4059
+ trace_id: string;
4060
+ /**
4061
+ * Date-based webhook payload version. Determined by the `?version=` query
4062
+ * parameter in your webhook subscription URL. If no version parameter is
4063
+ * specified, defaults based on subscription creation date.
4064
+ */
4065
+ webhook_version: string;
4066
+ }
4067
+ export declare namespace PaymentExpiredWebhookEvent {
4068
+ /**
4069
+ * The payment request, as returned by
4070
+ * `GET /v3/payment_requests/{paymentRequestId}`.
4071
+ */
4072
+ interface Data {
4073
+ /**
4074
+ * The payment request id.
4075
+ */
4076
+ id: string;
4077
+ /**
4078
+ * What was charged at checkout, in the currency's minor units. In `subscription`
4079
+ * mode this is the first invoice's total — all items after any discounts are
4080
+ * applied.
4081
+ */
4082
+ amount: number;
4083
+ /**
4084
+ * URL the recipient opens to pay
4085
+ * (`https://zero.linqapp.com/pay/{slug}?session=...`).
4086
+ */
4087
+ checkout_url: string;
4088
+ created_at: string;
4089
+ currency: string;
4090
+ object: string;
4091
+ status: 'succeeded' | 'failed' | 'canceled' | 'expired';
4092
+ description?: string;
4093
+ /**
4094
+ * Subscription mode — the discount Stripe applied, read back from the coupon.
4095
+ * Absent when none was applied.
4096
+ */
4097
+ discount?: Data.Discount;
4098
+ /**
4099
+ * Subscription mode — how often the subscription renews.
4100
+ */
4101
+ interval?: 'day' | 'week' | 'month' | 'year';
4102
+ /**
4103
+ * Subscription mode — intervals per renewal.
4104
+ */
4105
+ interval_count?: number;
4106
+ metadata?: {
4107
+ [key: string]: string;
4108
+ };
4109
+ /**
4110
+ * Whether the request collected a one-time charge or started a subscription.
4111
+ */
4112
+ mode?: 'payment' | 'subscription';
4113
+ /**
4114
+ * Natural-rail join keys, present when `rail: natural`.
4115
+ */
4116
+ natural?: Data.Natural;
4117
+ /**
4118
+ * Subscription mode — the recurring price subscribed to.
4119
+ */
4120
+ price_id?: string;
4121
+ /**
4122
+ * Subscription mode — units of the price subscribed to.
4123
+ */
4124
+ quantity?: number;
4125
+ /**
4126
+ * The rail this request settled on.
4127
+ */
4128
+ rail?: 'stripe' | 'natural';
4129
+ /**
4130
+ * Ids of the Stripe objects on your connected account — join keys into your own
4131
+ * Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
4132
+ * `subscription_id`.
4133
+ */
4134
+ stripe?: Data.Stripe;
4135
+ /**
4136
+ * Subscription mode — when the free trial ends and the first charge happens. On a
4137
+ * trial request, `payment.succeeded` means the payment method was collected ($0
4138
+ * moved).
4139
+ */
4140
+ trial_end?: string;
4141
+ updated_at?: string;
4142
+ }
4143
+ namespace Data {
4144
+ /**
4145
+ * Subscription mode — the discount Stripe applied, read back from the coupon.
4146
+ * Absent when none was applied.
4147
+ */
4148
+ interface Discount {
4149
+ coupon?: string;
4150
+ /**
4151
+ * Name of the coupon/promo code displayed to customers.
4152
+ */
4153
+ label?: string;
4154
+ promotion_code?: string;
4155
+ }
4156
+ /**
4157
+ * Natural-rail join keys, present when `rail: natural`.
4158
+ */
4159
+ interface Natural {
4160
+ /**
4161
+ * The Natural payment request (`prq_...`).
4162
+ */
4163
+ payment_request_id?: string;
4164
+ /**
4165
+ * The settled transaction (`txn_...`).
4166
+ */
4167
+ transaction_id?: string;
4168
+ }
4169
+ /**
4170
+ * Ids of the Stripe objects on your connected account — join keys into your own
4171
+ * Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
4172
+ * `subscription_id`.
4173
+ */
4174
+ interface Stripe {
4175
+ /**
4176
+ * The Customer the request is attached to (`cus_...`). Always set in subscription
4177
+ * mode; set in payment mode only when the request was created with a
4178
+ * `customer_id`.
4179
+ */
4180
+ customer_id?: string;
4181
+ /**
4182
+ * The PaymentIntent collected at checkout (`pi_...`).
4183
+ */
4184
+ payment_intent_id?: string;
4185
+ /**
4186
+ * Subscription mode — the Subscription (`sub_...`).
4187
+ */
4188
+ subscription_id?: string;
4189
+ }
4190
+ }
4191
+ }
4192
+ export interface PaymentSucceededWebhookEvent {
4193
+ /**
4194
+ * API version for the webhook payload format
4195
+ */
4196
+ api_version: string;
4197
+ /**
4198
+ * When the event was created
4199
+ */
4200
+ created_at: string;
4201
+ /**
4202
+ * The payment request, as returned by
4203
+ * `GET /v3/payment_requests/{paymentRequestId}`.
4204
+ */
4205
+ data: PaymentSucceededWebhookEvent.Data;
4206
+ /**
4207
+ * Unique identifier for this event (for deduplication)
4208
+ */
4209
+ event_id: string;
4210
+ event_type: 'payment.succeeded' | 'payment.canceled' | 'payment.expired' | '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.declined' | 'payment.authorized' | 'connection.created' | 'connection.revoked';
4211
+ /**
4212
+ * Partner identifier. Present on all webhooks for cross-referencing.
4213
+ */
4214
+ partner_id: string;
4215
+ /**
4216
+ * Trace ID for debugging and correlation across systems.
4217
+ */
4218
+ trace_id: string;
4219
+ /**
4220
+ * Date-based webhook payload version. Determined by the `?version=` query
4221
+ * parameter in your webhook subscription URL. If no version parameter is
4222
+ * specified, defaults based on subscription creation date.
4223
+ */
4224
+ webhook_version: string;
4225
+ }
4226
+ export declare namespace PaymentSucceededWebhookEvent {
4227
+ /**
4228
+ * The payment request, as returned by
4229
+ * `GET /v3/payment_requests/{paymentRequestId}`.
4230
+ */
4231
+ interface Data {
4232
+ /**
4233
+ * The payment request id.
4234
+ */
4235
+ id: string;
4236
+ /**
4237
+ * What was charged at checkout, in the currency's minor units. In `subscription`
4238
+ * mode this is the first invoice's total — all items after any discounts are
4239
+ * applied.
4240
+ */
4241
+ amount: number;
4242
+ /**
4243
+ * URL the recipient opens to pay
4244
+ * (`https://zero.linqapp.com/pay/{slug}?session=...`).
4245
+ */
4246
+ checkout_url: string;
4247
+ created_at: string;
4248
+ currency: string;
4249
+ object: string;
4250
+ status: 'succeeded' | 'failed' | 'canceled' | 'expired';
4251
+ description?: string;
4252
+ /**
4253
+ * Subscription mode — the discount Stripe applied, read back from the coupon.
4254
+ * Absent when none was applied.
4255
+ */
4256
+ discount?: Data.Discount;
4257
+ /**
4258
+ * Subscription mode — how often the subscription renews.
4259
+ */
4260
+ interval?: 'day' | 'week' | 'month' | 'year';
4261
+ /**
4262
+ * Subscription mode — intervals per renewal.
4263
+ */
4264
+ interval_count?: number;
4265
+ metadata?: {
4266
+ [key: string]: string;
4267
+ };
4268
+ /**
4269
+ * Whether the request collected a one-time charge or started a subscription.
4270
+ */
4271
+ mode?: 'payment' | 'subscription';
4272
+ /**
4273
+ * Natural-rail join keys, present when `rail: natural`.
4274
+ */
4275
+ natural?: Data.Natural;
4276
+ /**
4277
+ * Subscription mode — the recurring price subscribed to.
4278
+ */
4279
+ price_id?: string;
4280
+ /**
4281
+ * Subscription mode — units of the price subscribed to.
4282
+ */
4283
+ quantity?: number;
4284
+ /**
4285
+ * The rail this request settled on.
4286
+ */
4287
+ rail?: 'stripe' | 'natural';
4288
+ /**
4289
+ * Ids of the Stripe objects on your connected account — join keys into your own
4290
+ * Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
4291
+ * `subscription_id`.
4292
+ */
4293
+ stripe?: Data.Stripe;
4294
+ /**
4295
+ * Subscription mode — when the free trial ends and the first charge happens. On a
4296
+ * trial request, `payment.succeeded` means the payment method was collected ($0
4297
+ * moved).
4298
+ */
4299
+ trial_end?: string;
4300
+ updated_at?: string;
4301
+ }
4302
+ namespace Data {
4303
+ /**
4304
+ * Subscription mode — the discount Stripe applied, read back from the coupon.
4305
+ * Absent when none was applied.
4306
+ */
4307
+ interface Discount {
4308
+ coupon?: string;
4309
+ /**
4310
+ * Name of the coupon/promo code displayed to customers.
4311
+ */
4312
+ label?: string;
4313
+ promotion_code?: string;
4314
+ }
4315
+ /**
4316
+ * Natural-rail join keys, present when `rail: natural`.
4317
+ */
4318
+ interface Natural {
4319
+ /**
4320
+ * The Natural payment request (`prq_...`).
4321
+ */
4322
+ payment_request_id?: string;
4323
+ /**
4324
+ * The settled transaction (`txn_...`).
4325
+ */
4326
+ transaction_id?: string;
4327
+ }
4328
+ /**
4329
+ * Ids of the Stripe objects on your connected account — join keys into your own
4330
+ * Stripe Dashboard/API. Manage a subscription's post-checkout lifecycle with
4331
+ * `subscription_id`.
4332
+ */
4333
+ interface Stripe {
4334
+ /**
4335
+ * The Customer the request is attached to (`cus_...`). Always set in subscription
4336
+ * mode; set in payment mode only when the request was created with a
4337
+ * `customer_id`.
4338
+ */
4339
+ customer_id?: string;
4340
+ /**
4341
+ * The PaymentIntent collected at checkout (`pi_...`).
4342
+ */
4343
+ payment_intent_id?: string;
4344
+ /**
4345
+ * Subscription mode — the Subscription (`sub_...`).
4346
+ */
4347
+ subscription_id?: string;
4348
+ }
4349
+ }
4350
+ }
3121
4351
  /**
3122
4352
  * Complete webhook payload for message.sent events (2026-02-03 format)
3123
4353
  */
3124
- export type UnwrapWebhookEvent = MessageSentWebhookEvent | MessageReceivedWebhookEvent | MessageReadWebhookEvent | MessageDeliveredWebhookEvent | MessageFailedWebhookEvent | MessageEditedWebhookEvent | ReactionAddedWebhookEvent | ReactionRemovedWebhookEvent | PollReceivedWebhookEvent | PollSentWebhookEvent | PollDeliveredWebhookEvent | PollReadWebhookEvent | PollUpdatedWebhookEvent | PollFailedWebhookEvent | PollVoteAddedWebhookEvent | PollVoteRemovedWebhookEvent | PollReactionAddedWebhookEvent | ParticipantAddedWebhookEvent | ParticipantRemovedWebhookEvent | ChatCreatedWebhookEvent | ChatGroupNameUpdatedWebhookEvent | ChatGroupIconUpdatedWebhookEvent | ChatGroupNameUpdateFailedWebhookEvent | ChatGroupIconUpdateFailedWebhookEvent | ChatTypingIndicatorStartedWebhookEvent | ChatTypingIndicatorStoppedWebhookEvent | ChatBackgroundUpdatedWebhookEvent | ChatBackgroundUpdateFailedWebhookEvent | ContactCardReceivedWebhookEvent | PhoneNumberStatusUpdatedWebhookEvent;
4354
+ export type UnwrapWebhookEvent = MessageSentWebhookEvent | MessageReceivedWebhookEvent | MessageReadWebhookEvent | MessageDeliveredWebhookEvent | MessageFailedWebhookEvent | MessageEditedWebhookEvent | ReactionAddedWebhookEvent | ReactionRemovedWebhookEvent | PollReceivedWebhookEvent | PollSentWebhookEvent | PollDeliveredWebhookEvent | PollReadWebhookEvent | PollUpdatedWebhookEvent | PollFailedWebhookEvent | PollVoteAddedWebhookEvent | PollVoteRemovedWebhookEvent | PollReactionAddedWebhookEvent | ParticipantAddedWebhookEvent | ParticipantRemovedWebhookEvent | ChatCreatedWebhookEvent | ChatGroupNameUpdatedWebhookEvent | ChatGroupIconUpdatedWebhookEvent | ChatGroupNameUpdateFailedWebhookEvent | ChatGroupIconUpdateFailedWebhookEvent | ChatTypingIndicatorStartedWebhookEvent | ChatTypingIndicatorStoppedWebhookEvent | ChatBackgroundUpdatedWebhookEvent | ChatBackgroundUpdateFailedWebhookEvent | ContactCardReceivedWebhookEvent | PhoneNumberStatusUpdatedWebhookEvent | ConnectionCreatedWebhookEvent | ConnectionRevokedWebhookEvent | LocationSharingStartedWebhookEvent | LocationSharingStoppedWebhookEvent | PaymentAuthorizedWebhookEvent | PaymentCanceledWebhookEvent | PaymentDeclinedWebhookEvent | PaymentExpiredWebhookEvent | PaymentSucceededWebhookEvent;
3125
4355
  export declare namespace Webhooks {
3126
- export { type MessageEventV2 as MessageEventV2, type MessagePayload as MessagePayload, type ReactionEventBase as ReactionEventBase, type SchemasMediaPartResponse as SchemasMediaPartResponse, type SchemasMessageEffect as SchemasMessageEffect, type SchemasTextPartResponse as SchemasTextPartResponse, type MessageSentWebhookEvent as MessageSentWebhookEvent, type MessageReceivedWebhookEvent as MessageReceivedWebhookEvent, type MessageReadWebhookEvent as MessageReadWebhookEvent, type MessageDeliveredWebhookEvent as MessageDeliveredWebhookEvent, type MessageFailedWebhookEvent as MessageFailedWebhookEvent, type MessageEditedWebhookEvent as MessageEditedWebhookEvent, type ReactionAddedWebhookEvent as ReactionAddedWebhookEvent, type ReactionRemovedWebhookEvent as ReactionRemovedWebhookEvent, type PollReceivedWebhookEvent as PollReceivedWebhookEvent, type PollSentWebhookEvent as PollSentWebhookEvent, type PollDeliveredWebhookEvent as PollDeliveredWebhookEvent, type PollReadWebhookEvent as PollReadWebhookEvent, type PollUpdatedWebhookEvent as PollUpdatedWebhookEvent, type PollFailedWebhookEvent as PollFailedWebhookEvent, type PollVoteAddedWebhookEvent as PollVoteAddedWebhookEvent, type PollVoteRemovedWebhookEvent as PollVoteRemovedWebhookEvent, type PollReactionAddedWebhookEvent as PollReactionAddedWebhookEvent, type ParticipantAddedWebhookEvent as ParticipantAddedWebhookEvent, type ParticipantRemovedWebhookEvent as ParticipantRemovedWebhookEvent, type ChatCreatedWebhookEvent as ChatCreatedWebhookEvent, type ChatGroupNameUpdatedWebhookEvent as ChatGroupNameUpdatedWebhookEvent, type ChatGroupIconUpdatedWebhookEvent as ChatGroupIconUpdatedWebhookEvent, type ChatGroupNameUpdateFailedWebhookEvent as ChatGroupNameUpdateFailedWebhookEvent, type ChatGroupIconUpdateFailedWebhookEvent as ChatGroupIconUpdateFailedWebhookEvent, type ChatTypingIndicatorStartedWebhookEvent as ChatTypingIndicatorStartedWebhookEvent, type ChatTypingIndicatorStoppedWebhookEvent as ChatTypingIndicatorStoppedWebhookEvent, type ChatBackgroundUpdatedWebhookEvent as ChatBackgroundUpdatedWebhookEvent, type ChatBackgroundUpdateFailedWebhookEvent as ChatBackgroundUpdateFailedWebhookEvent, type ContactCardReceivedWebhookEvent as ContactCardReceivedWebhookEvent, type PhoneNumberStatusUpdatedWebhookEvent as PhoneNumberStatusUpdatedWebhookEvent, type UnwrapWebhookEvent as UnwrapWebhookEvent, };
4356
+ export { type MessageEventV2 as MessageEventV2, type MessagePayload as MessagePayload, type ReactionEventBase as ReactionEventBase, type SchemasMediaPartResponse as SchemasMediaPartResponse, type SchemasMessageEffect as SchemasMessageEffect, type SchemasTextPartResponse as SchemasTextPartResponse, type MessageSentWebhookEvent as MessageSentWebhookEvent, type MessageReceivedWebhookEvent as MessageReceivedWebhookEvent, type MessageReadWebhookEvent as MessageReadWebhookEvent, type MessageDeliveredWebhookEvent as MessageDeliveredWebhookEvent, type MessageFailedWebhookEvent as MessageFailedWebhookEvent, type MessageEditedWebhookEvent as MessageEditedWebhookEvent, type ReactionAddedWebhookEvent as ReactionAddedWebhookEvent, type ReactionRemovedWebhookEvent as ReactionRemovedWebhookEvent, type PollReceivedWebhookEvent as PollReceivedWebhookEvent, type PollSentWebhookEvent as PollSentWebhookEvent, type PollDeliveredWebhookEvent as PollDeliveredWebhookEvent, type PollReadWebhookEvent as PollReadWebhookEvent, type PollUpdatedWebhookEvent as PollUpdatedWebhookEvent, type PollFailedWebhookEvent as PollFailedWebhookEvent, type PollVoteAddedWebhookEvent as PollVoteAddedWebhookEvent, type PollVoteRemovedWebhookEvent as PollVoteRemovedWebhookEvent, type PollReactionAddedWebhookEvent as PollReactionAddedWebhookEvent, type ParticipantAddedWebhookEvent as ParticipantAddedWebhookEvent, type ParticipantRemovedWebhookEvent as ParticipantRemovedWebhookEvent, type ChatCreatedWebhookEvent as ChatCreatedWebhookEvent, type ChatGroupNameUpdatedWebhookEvent as ChatGroupNameUpdatedWebhookEvent, type ChatGroupIconUpdatedWebhookEvent as ChatGroupIconUpdatedWebhookEvent, type ChatGroupNameUpdateFailedWebhookEvent as ChatGroupNameUpdateFailedWebhookEvent, type ChatGroupIconUpdateFailedWebhookEvent as ChatGroupIconUpdateFailedWebhookEvent, type ChatTypingIndicatorStartedWebhookEvent as ChatTypingIndicatorStartedWebhookEvent, type ChatTypingIndicatorStoppedWebhookEvent as ChatTypingIndicatorStoppedWebhookEvent, type ChatBackgroundUpdatedWebhookEvent as ChatBackgroundUpdatedWebhookEvent, type ChatBackgroundUpdateFailedWebhookEvent as ChatBackgroundUpdateFailedWebhookEvent, type ContactCardReceivedWebhookEvent as ContactCardReceivedWebhookEvent, type PhoneNumberStatusUpdatedWebhookEvent as PhoneNumberStatusUpdatedWebhookEvent, type ConnectionCreatedWebhookEvent as ConnectionCreatedWebhookEvent, type ConnectionRevokedWebhookEvent as ConnectionRevokedWebhookEvent, type LocationSharingStartedWebhookEvent as LocationSharingStartedWebhookEvent, type LocationSharingStoppedWebhookEvent as LocationSharingStoppedWebhookEvent, type PaymentAuthorizedWebhookEvent as PaymentAuthorizedWebhookEvent, type PaymentCanceledWebhookEvent as PaymentCanceledWebhookEvent, type PaymentDeclinedWebhookEvent as PaymentDeclinedWebhookEvent, type PaymentExpiredWebhookEvent as PaymentExpiredWebhookEvent, type PaymentSucceededWebhookEvent as PaymentSucceededWebhookEvent, type UnwrapWebhookEvent as UnwrapWebhookEvent, };
3127
4357
  }
3128
4358
  //# sourceMappingURL=webhooks.d.mts.map