@linqapp/sdk 0.50.0 → 0.51.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 +14 -0
- package/client.d.mts +39 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +39 -0
- package/client.d.ts.map +1 -1
- package/client.js +39 -0
- package/client.js.map +1 -1
- package/client.mjs +39 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/chats/chats.d.mts +1 -1
- package/resources/chats/chats.d.ts +1 -1
- package/resources/payment-requests.d.mts +89 -3
- package/resources/payment-requests.d.mts.map +1 -1
- package/resources/payment-requests.d.ts +89 -3
- package/resources/payment-requests.d.ts.map +1 -1
- package/resources/payment-requests.js +39 -0
- package/resources/payment-requests.js.map +1 -1
- package/resources/payment-requests.mjs +39 -0
- package/resources/payment-requests.mjs.map +1 -1
- package/resources/shared.d.mts +6 -45
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +6 -45
- package/resources/shared.d.ts.map +1 -1
- package/resources/webhooks.d.mts +6 -45
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +6 -45
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +39 -0
- package/src/resources/chats/chats.ts +1 -1
- package/src/resources/payment-requests.ts +97 -3
- package/src/resources/shared.ts +6 -49
- package/src/resources/webhooks.ts +6 -49
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -63,6 +63,45 @@ import { RequestOptions } from "../internal/request-options.mjs";
|
|
|
63
63
|
* the Customer and Subscription, so correlating in either direction is
|
|
64
64
|
* trivial. There are no renewal webhooks from Linq by design.
|
|
65
65
|
*
|
|
66
|
+
* ### Discounts
|
|
67
|
+
*
|
|
68
|
+
* Pass a `discount` with a **coupon** or **promotion code** from your
|
|
69
|
+
* connected Stripe account to apply it to the subscription. Create either in
|
|
70
|
+
* your Stripe Dashboard under Product catalog → Coupons; Linq only forwards
|
|
71
|
+
* the id.
|
|
72
|
+
*
|
|
73
|
+
* ```json
|
|
74
|
+
* {
|
|
75
|
+
* "mode": "subscription",
|
|
76
|
+
* "price_id": "price_1QAbCdEfGhIjKlMn",
|
|
77
|
+
* "discount": {
|
|
78
|
+
* "coupon": "7fKCMvBh",
|
|
79
|
+
* "label": "50% OFF FIRST MONTH"
|
|
80
|
+
* }
|
|
81
|
+
* }
|
|
82
|
+
* ```
|
|
83
|
+
*
|
|
84
|
+
* Stripe applies the coupon and prices the first invoice; the `amount` we
|
|
85
|
+
* return is that invoice's amount due, so a `$50.00/month` price with a
|
|
86
|
+
* 50%-off-first-month coupon comes back as `2500` and the recipient is
|
|
87
|
+
* charged **$25.00** at checkout. A coupon that covers the whole first
|
|
88
|
+
* invoice returns `amount: 0`; checkout shows $0.00 and collects the card for
|
|
89
|
+
* the renewal rather than charging now. Renewals bill at the full price
|
|
90
|
+
* automatically — how long a discount lasts is the coupon's `duration`,
|
|
91
|
+
* enforced by Stripe on your account, and Linq never re-prices anything.
|
|
92
|
+
*
|
|
93
|
+
* Use `promotion_code` instead of `coupon` to apply a promotion code by id
|
|
94
|
+
* (`promo_...`, not the customer-facing code string); pass one or the other,
|
|
95
|
+
* never both.
|
|
96
|
+
*
|
|
97
|
+
* `label` is the customer-facing promotion name displayed at checkout instead
|
|
98
|
+
* of the coupon or promotion code ID. The label is displayed exactly as
|
|
99
|
+
* provided, so include important terms such as "FIRST MONTH" or
|
|
100
|
+
* "FIRST 3 MONTHS" when applicable. These terms are not displayed elsewhere
|
|
101
|
+
* on the checkout screen.
|
|
102
|
+
*
|
|
103
|
+
* If omitted, Stripe uses the coupon's name as the promotion label.
|
|
104
|
+
*
|
|
66
105
|
* ### Free trials
|
|
67
106
|
*
|
|
68
107
|
* Add `trial_period_days` (or a fixed `trial_end` timestamp) to start the
|
|
@@ -220,9 +259,10 @@ export interface PaymentRequest {
|
|
|
220
259
|
*/
|
|
221
260
|
id: string;
|
|
222
261
|
/**
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
262
|
+
* What the recipient is charged at checkout, in the currency's minor units. In
|
|
263
|
+
* `subscription` mode this is the first invoice's amount due — all items after any
|
|
264
|
+
* discounts are applied — so a discount that covers the whole invoice returns `0`
|
|
265
|
+
* and checkout shows $0.00.
|
|
226
266
|
*/
|
|
227
267
|
amount: number;
|
|
228
268
|
/**
|
|
@@ -243,6 +283,10 @@ export interface PaymentRequest {
|
|
|
243
283
|
*/
|
|
244
284
|
status: 'requested' | 'succeeded' | 'canceled' | 'expired';
|
|
245
285
|
description?: string;
|
|
286
|
+
/**
|
|
287
|
+
* Subscription mode — the discount applied, as Stripe applied it.
|
|
288
|
+
*/
|
|
289
|
+
discount?: PaymentRequest.Discount;
|
|
246
290
|
/**
|
|
247
291
|
* When an unpaid request auto-expires.
|
|
248
292
|
*/
|
|
@@ -294,6 +338,23 @@ export interface PaymentRequest {
|
|
|
294
338
|
updated_at?: string;
|
|
295
339
|
}
|
|
296
340
|
export declare namespace PaymentRequest {
|
|
341
|
+
/**
|
|
342
|
+
* Subscription mode — the discount applied, as Stripe applied it.
|
|
343
|
+
*/
|
|
344
|
+
interface Discount {
|
|
345
|
+
/**
|
|
346
|
+
* The ID of the coupon applied.
|
|
347
|
+
*/
|
|
348
|
+
coupon?: string;
|
|
349
|
+
/**
|
|
350
|
+
* The customer-facing discount description shown at checkout.
|
|
351
|
+
*/
|
|
352
|
+
label?: string;
|
|
353
|
+
/**
|
|
354
|
+
* The ID of the promotion code applied, if you passed one.
|
|
355
|
+
*/
|
|
356
|
+
promotion_code?: string;
|
|
357
|
+
}
|
|
297
358
|
/**
|
|
298
359
|
* Natural-rail join keys, present when `rail: natural`.
|
|
299
360
|
*/
|
|
@@ -363,6 +424,11 @@ export interface PaymentRequestCreateParams {
|
|
|
363
424
|
* Body param: Optional description shown to the recipient at checkout.
|
|
364
425
|
*/
|
|
365
426
|
description?: string;
|
|
427
|
+
/**
|
|
428
|
+
* Body param: Subscription mode only. The coupon or promotion code to apply to
|
|
429
|
+
* this subscription payment. Currently, only accept one coupon or one promo code.
|
|
430
|
+
*/
|
|
431
|
+
discount?: PaymentRequestCreateParams.Discount;
|
|
366
432
|
/**
|
|
367
433
|
* Body param: Required for `rail: natural`. The line the request is sent from, in
|
|
368
434
|
* E.164 format. Must be a phone number your organization owns.
|
|
@@ -428,6 +494,26 @@ export interface PaymentRequestCreateParams {
|
|
|
428
494
|
*/
|
|
429
495
|
'Idempotency-Key'?: string;
|
|
430
496
|
}
|
|
497
|
+
export declare namespace PaymentRequestCreateParams {
|
|
498
|
+
/**
|
|
499
|
+
* Subscription mode only. The coupon or promotion code to apply to this
|
|
500
|
+
* subscription payment. Currently, only accept one coupon or one promo code.
|
|
501
|
+
*/
|
|
502
|
+
interface Discount {
|
|
503
|
+
/**
|
|
504
|
+
* The ID of the coupon to apply to this subscription.
|
|
505
|
+
*/
|
|
506
|
+
coupon?: string;
|
|
507
|
+
/**
|
|
508
|
+
* Name of the coupon/promo code displayed to customers.
|
|
509
|
+
*/
|
|
510
|
+
label?: string;
|
|
511
|
+
/**
|
|
512
|
+
* The ID of a promotion code to apply to this subscription.
|
|
513
|
+
*/
|
|
514
|
+
promotion_code?: string;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
431
517
|
export interface PaymentRequestListParams {
|
|
432
518
|
/**
|
|
433
519
|
* Max results to return (default 20, max 100).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-requests.d.mts","sourceRoot":"","sources":["../src/resources/payment-requests.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D
|
|
1
|
+
{"version":3,"file":"payment-requests.d.mts","sourceRoot":"","sources":["../src/resources/payment-requests.ts"],"names":[],"mappings":"A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C;CAC5B;AAED,yBAAiB,0BAA0B,CAAC;IAC1C;;;OAGG;IACH,UAAiB,QAAQ;QACvB;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB;CACF;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,GAAG,YAAY,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;CACzF;AAED,MAAM,CAAC,OAAO,WAAW,eAAe,CAAC;IACvC,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -63,6 +63,45 @@ import { RequestOptions } from "../internal/request-options.js";
|
|
|
63
63
|
* the Customer and Subscription, so correlating in either direction is
|
|
64
64
|
* trivial. There are no renewal webhooks from Linq by design.
|
|
65
65
|
*
|
|
66
|
+
* ### Discounts
|
|
67
|
+
*
|
|
68
|
+
* Pass a `discount` with a **coupon** or **promotion code** from your
|
|
69
|
+
* connected Stripe account to apply it to the subscription. Create either in
|
|
70
|
+
* your Stripe Dashboard under Product catalog → Coupons; Linq only forwards
|
|
71
|
+
* the id.
|
|
72
|
+
*
|
|
73
|
+
* ```json
|
|
74
|
+
* {
|
|
75
|
+
* "mode": "subscription",
|
|
76
|
+
* "price_id": "price_1QAbCdEfGhIjKlMn",
|
|
77
|
+
* "discount": {
|
|
78
|
+
* "coupon": "7fKCMvBh",
|
|
79
|
+
* "label": "50% OFF FIRST MONTH"
|
|
80
|
+
* }
|
|
81
|
+
* }
|
|
82
|
+
* ```
|
|
83
|
+
*
|
|
84
|
+
* Stripe applies the coupon and prices the first invoice; the `amount` we
|
|
85
|
+
* return is that invoice's amount due, so a `$50.00/month` price with a
|
|
86
|
+
* 50%-off-first-month coupon comes back as `2500` and the recipient is
|
|
87
|
+
* charged **$25.00** at checkout. A coupon that covers the whole first
|
|
88
|
+
* invoice returns `amount: 0`; checkout shows $0.00 and collects the card for
|
|
89
|
+
* the renewal rather than charging now. Renewals bill at the full price
|
|
90
|
+
* automatically — how long a discount lasts is the coupon's `duration`,
|
|
91
|
+
* enforced by Stripe on your account, and Linq never re-prices anything.
|
|
92
|
+
*
|
|
93
|
+
* Use `promotion_code` instead of `coupon` to apply a promotion code by id
|
|
94
|
+
* (`promo_...`, not the customer-facing code string); pass one or the other,
|
|
95
|
+
* never both.
|
|
96
|
+
*
|
|
97
|
+
* `label` is the customer-facing promotion name displayed at checkout instead
|
|
98
|
+
* of the coupon or promotion code ID. The label is displayed exactly as
|
|
99
|
+
* provided, so include important terms such as "FIRST MONTH" or
|
|
100
|
+
* "FIRST 3 MONTHS" when applicable. These terms are not displayed elsewhere
|
|
101
|
+
* on the checkout screen.
|
|
102
|
+
*
|
|
103
|
+
* If omitted, Stripe uses the coupon's name as the promotion label.
|
|
104
|
+
*
|
|
66
105
|
* ### Free trials
|
|
67
106
|
*
|
|
68
107
|
* Add `trial_period_days` (or a fixed `trial_end` timestamp) to start the
|
|
@@ -220,9 +259,10 @@ export interface PaymentRequest {
|
|
|
220
259
|
*/
|
|
221
260
|
id: string;
|
|
222
261
|
/**
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
262
|
+
* What the recipient is charged at checkout, in the currency's minor units. In
|
|
263
|
+
* `subscription` mode this is the first invoice's amount due — all items after any
|
|
264
|
+
* discounts are applied — so a discount that covers the whole invoice returns `0`
|
|
265
|
+
* and checkout shows $0.00.
|
|
226
266
|
*/
|
|
227
267
|
amount: number;
|
|
228
268
|
/**
|
|
@@ -243,6 +283,10 @@ export interface PaymentRequest {
|
|
|
243
283
|
*/
|
|
244
284
|
status: 'requested' | 'succeeded' | 'canceled' | 'expired';
|
|
245
285
|
description?: string;
|
|
286
|
+
/**
|
|
287
|
+
* Subscription mode — the discount applied, as Stripe applied it.
|
|
288
|
+
*/
|
|
289
|
+
discount?: PaymentRequest.Discount;
|
|
246
290
|
/**
|
|
247
291
|
* When an unpaid request auto-expires.
|
|
248
292
|
*/
|
|
@@ -294,6 +338,23 @@ export interface PaymentRequest {
|
|
|
294
338
|
updated_at?: string;
|
|
295
339
|
}
|
|
296
340
|
export declare namespace PaymentRequest {
|
|
341
|
+
/**
|
|
342
|
+
* Subscription mode — the discount applied, as Stripe applied it.
|
|
343
|
+
*/
|
|
344
|
+
interface Discount {
|
|
345
|
+
/**
|
|
346
|
+
* The ID of the coupon applied.
|
|
347
|
+
*/
|
|
348
|
+
coupon?: string;
|
|
349
|
+
/**
|
|
350
|
+
* The customer-facing discount description shown at checkout.
|
|
351
|
+
*/
|
|
352
|
+
label?: string;
|
|
353
|
+
/**
|
|
354
|
+
* The ID of the promotion code applied, if you passed one.
|
|
355
|
+
*/
|
|
356
|
+
promotion_code?: string;
|
|
357
|
+
}
|
|
297
358
|
/**
|
|
298
359
|
* Natural-rail join keys, present when `rail: natural`.
|
|
299
360
|
*/
|
|
@@ -363,6 +424,11 @@ export interface PaymentRequestCreateParams {
|
|
|
363
424
|
* Body param: Optional description shown to the recipient at checkout.
|
|
364
425
|
*/
|
|
365
426
|
description?: string;
|
|
427
|
+
/**
|
|
428
|
+
* Body param: Subscription mode only. The coupon or promotion code to apply to
|
|
429
|
+
* this subscription payment. Currently, only accept one coupon or one promo code.
|
|
430
|
+
*/
|
|
431
|
+
discount?: PaymentRequestCreateParams.Discount;
|
|
366
432
|
/**
|
|
367
433
|
* Body param: Required for `rail: natural`. The line the request is sent from, in
|
|
368
434
|
* E.164 format. Must be a phone number your organization owns.
|
|
@@ -428,6 +494,26 @@ export interface PaymentRequestCreateParams {
|
|
|
428
494
|
*/
|
|
429
495
|
'Idempotency-Key'?: string;
|
|
430
496
|
}
|
|
497
|
+
export declare namespace PaymentRequestCreateParams {
|
|
498
|
+
/**
|
|
499
|
+
* Subscription mode only. The coupon or promotion code to apply to this
|
|
500
|
+
* subscription payment. Currently, only accept one coupon or one promo code.
|
|
501
|
+
*/
|
|
502
|
+
interface Discount {
|
|
503
|
+
/**
|
|
504
|
+
* The ID of the coupon to apply to this subscription.
|
|
505
|
+
*/
|
|
506
|
+
coupon?: string;
|
|
507
|
+
/**
|
|
508
|
+
* Name of the coupon/promo code displayed to customers.
|
|
509
|
+
*/
|
|
510
|
+
label?: string;
|
|
511
|
+
/**
|
|
512
|
+
* The ID of a promotion code to apply to this subscription.
|
|
513
|
+
*/
|
|
514
|
+
promotion_code?: string;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
431
517
|
export interface PaymentRequestListParams {
|
|
432
518
|
/**
|
|
433
519
|
* Max results to return (default 20, max 100).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-requests.d.ts","sourceRoot":"","sources":["../src/resources/payment-requests.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D
|
|
1
|
+
{"version":3,"file":"payment-requests.d.ts","sourceRoot":"","sources":["../src/resources/payment-requests.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,GAAG,YAAY,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;CACzF;AAED,MAAM,CAAC,OAAO,WAAW,eAAe,CAAC;IACvC,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -67,6 +67,45 @@ const path_1 = require("../internal/utils/path.js");
|
|
|
67
67
|
* the Customer and Subscription, so correlating in either direction is
|
|
68
68
|
* trivial. There are no renewal webhooks from Linq by design.
|
|
69
69
|
*
|
|
70
|
+
* ### Discounts
|
|
71
|
+
*
|
|
72
|
+
* Pass a `discount` with a **coupon** or **promotion code** from your
|
|
73
|
+
* connected Stripe account to apply it to the subscription. Create either in
|
|
74
|
+
* your Stripe Dashboard under Product catalog → Coupons; Linq only forwards
|
|
75
|
+
* the id.
|
|
76
|
+
*
|
|
77
|
+
* ```json
|
|
78
|
+
* {
|
|
79
|
+
* "mode": "subscription",
|
|
80
|
+
* "price_id": "price_1QAbCdEfGhIjKlMn",
|
|
81
|
+
* "discount": {
|
|
82
|
+
* "coupon": "7fKCMvBh",
|
|
83
|
+
* "label": "50% OFF FIRST MONTH"
|
|
84
|
+
* }
|
|
85
|
+
* }
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
88
|
+
* Stripe applies the coupon and prices the first invoice; the `amount` we
|
|
89
|
+
* return is that invoice's amount due, so a `$50.00/month` price with a
|
|
90
|
+
* 50%-off-first-month coupon comes back as `2500` and the recipient is
|
|
91
|
+
* charged **$25.00** at checkout. A coupon that covers the whole first
|
|
92
|
+
* invoice returns `amount: 0`; checkout shows $0.00 and collects the card for
|
|
93
|
+
* the renewal rather than charging now. Renewals bill at the full price
|
|
94
|
+
* automatically — how long a discount lasts is the coupon's `duration`,
|
|
95
|
+
* enforced by Stripe on your account, and Linq never re-prices anything.
|
|
96
|
+
*
|
|
97
|
+
* Use `promotion_code` instead of `coupon` to apply a promotion code by id
|
|
98
|
+
* (`promo_...`, not the customer-facing code string); pass one or the other,
|
|
99
|
+
* never both.
|
|
100
|
+
*
|
|
101
|
+
* `label` is the customer-facing promotion name displayed at checkout instead
|
|
102
|
+
* of the coupon or promotion code ID. The label is displayed exactly as
|
|
103
|
+
* provided, so include important terms such as "FIRST MONTH" or
|
|
104
|
+
* "FIRST 3 MONTHS" when applicable. These terms are not displayed elsewhere
|
|
105
|
+
* on the checkout screen.
|
|
106
|
+
*
|
|
107
|
+
* If omitted, Stripe uses the coupon's name as the promotion label.
|
|
108
|
+
*
|
|
70
109
|
* ### Free trials
|
|
71
110
|
*
|
|
72
111
|
* Add `trial_period_days` (or a fixed `trial_end` timestamp) to start the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-requests.js","sourceRoot":"","sources":["../src/resources/payment-requests.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAEnD,oDAA8C;AAE9C
|
|
1
|
+
{"version":3,"file":"payment-requests.js","sourceRoot":"","sources":["../src/resources/payment-requests.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAEnD,oDAA8C;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0LG;AACH,MAAa,eAAgB,SAAQ,sBAAW;IAC9C;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,CAAC,MAAkC,EAAE,OAAwB;QACjE,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE;YAC/C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACnF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,gBAAwB,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,wBAAwB,gBAAgB,EAAE,EAAE,OAAO,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CACF,QAAqD,EAAE,EACvD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,gBAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,wBAAwB,gBAAgB,SAAS,EAAE,OAAO,CAAC,CAAC;IAC3F,CAAC;CACF;AAtFD,0CAsFC"}
|
|
@@ -64,6 +64,45 @@ import { path } from "../internal/utils/path.mjs";
|
|
|
64
64
|
* the Customer and Subscription, so correlating in either direction is
|
|
65
65
|
* trivial. There are no renewal webhooks from Linq by design.
|
|
66
66
|
*
|
|
67
|
+
* ### Discounts
|
|
68
|
+
*
|
|
69
|
+
* Pass a `discount` with a **coupon** or **promotion code** from your
|
|
70
|
+
* connected Stripe account to apply it to the subscription. Create either in
|
|
71
|
+
* your Stripe Dashboard under Product catalog → Coupons; Linq only forwards
|
|
72
|
+
* the id.
|
|
73
|
+
*
|
|
74
|
+
* ```json
|
|
75
|
+
* {
|
|
76
|
+
* "mode": "subscription",
|
|
77
|
+
* "price_id": "price_1QAbCdEfGhIjKlMn",
|
|
78
|
+
* "discount": {
|
|
79
|
+
* "coupon": "7fKCMvBh",
|
|
80
|
+
* "label": "50% OFF FIRST MONTH"
|
|
81
|
+
* }
|
|
82
|
+
* }
|
|
83
|
+
* ```
|
|
84
|
+
*
|
|
85
|
+
* Stripe applies the coupon and prices the first invoice; the `amount` we
|
|
86
|
+
* return is that invoice's amount due, so a `$50.00/month` price with a
|
|
87
|
+
* 50%-off-first-month coupon comes back as `2500` and the recipient is
|
|
88
|
+
* charged **$25.00** at checkout. A coupon that covers the whole first
|
|
89
|
+
* invoice returns `amount: 0`; checkout shows $0.00 and collects the card for
|
|
90
|
+
* the renewal rather than charging now. Renewals bill at the full price
|
|
91
|
+
* automatically — how long a discount lasts is the coupon's `duration`,
|
|
92
|
+
* enforced by Stripe on your account, and Linq never re-prices anything.
|
|
93
|
+
*
|
|
94
|
+
* Use `promotion_code` instead of `coupon` to apply a promotion code by id
|
|
95
|
+
* (`promo_...`, not the customer-facing code string); pass one or the other,
|
|
96
|
+
* never both.
|
|
97
|
+
*
|
|
98
|
+
* `label` is the customer-facing promotion name displayed at checkout instead
|
|
99
|
+
* of the coupon or promotion code ID. The label is displayed exactly as
|
|
100
|
+
* provided, so include important terms such as "FIRST MONTH" or
|
|
101
|
+
* "FIRST 3 MONTHS" when applicable. These terms are not displayed elsewhere
|
|
102
|
+
* on the checkout screen.
|
|
103
|
+
*
|
|
104
|
+
* If omitted, Stripe uses the coupon's name as the promotion label.
|
|
105
|
+
*
|
|
67
106
|
* ### Free trials
|
|
68
107
|
*
|
|
69
108
|
* Add `trial_period_days` (or a fixed `trial_end` timestamp) to start the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-requests.mjs","sourceRoot":"","sources":["../src/resources/payment-requests.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C
|
|
1
|
+
{"version":3,"file":"payment-requests.mjs","sourceRoot":"","sources":["../src/resources/payment-requests.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0LG;AACH,MAAM,OAAO,eAAgB,SAAQ,WAAW;IAC9C;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,CAAC,MAAkC,EAAE,OAAwB;QACjE,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE;YAC/C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACnF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,gBAAwB,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,wBAAwB,gBAAgB,EAAE,EAAE,OAAO,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CACF,QAAqD,EAAE,EACvD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,gBAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,wBAAwB,gBAAgB,SAAS,EAAE,OAAO,CAAC,CAAC;IAC3F,CAAC;CACF"}
|
package/resources/shared.d.mts
CHANGED
|
@@ -173,59 +173,20 @@ export interface TextPartResponse {
|
|
|
173
173
|
*/
|
|
174
174
|
value: string;
|
|
175
175
|
/**
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
* mentions; this field shows only the first in `value` order, so it cannot be used
|
|
179
|
-
* to determine whether a given participant was mentioned. `null` when the part
|
|
180
|
-
* carries no mention.
|
|
176
|
+
* Handle (E.164 phone number or Apple ID email) of the @mentioned chat
|
|
177
|
+
* participant, as sent. `null` when the part carries no mention.
|
|
181
178
|
*/
|
|
182
179
|
mention?: string | null;
|
|
183
180
|
/**
|
|
184
|
-
*
|
|
185
|
-
* `
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
* 1; some emoji count as 2._
|
|
181
|
+
* Character range `[start, end)` in `value` highlighted as the mention, as sent.
|
|
182
|
+
* `null` when the send omitted it (the whole `value` is highlighted) or the part
|
|
183
|
+
* carries no mention. _Characters are measured as UTF-16 code units. Most
|
|
184
|
+
* characters count as 1; some emoji count as 2._
|
|
189
185
|
*/
|
|
190
186
|
mention_range?: Array<number> | null;
|
|
191
|
-
/**
|
|
192
|
-
* Every mention on this part, in the order they appear in `value`. `null` when the
|
|
193
|
-
* part carries no mention. A part can carry several mentions of different people —
|
|
194
|
-
* check `is_me` to tell whether this line was one of them.
|
|
195
|
-
*
|
|
196
|
-
* Only iMessage carries mentions. On a received message this is populated when the
|
|
197
|
-
* sender was on iMessage; SMS and RCS have no way to mark a mention, so a message
|
|
198
|
-
* from an SMS or RCS participant arrives as plain text with `mentions` null, even
|
|
199
|
-
* in a group where other participants are on iMessage.
|
|
200
|
-
*/
|
|
201
|
-
mentions?: Array<TextPartResponse.Mention> | null;
|
|
202
187
|
/**
|
|
203
188
|
* Text decorations applied to character ranges in the value
|
|
204
189
|
*/
|
|
205
190
|
text_decorations?: Array<TextDecoration> | null;
|
|
206
191
|
}
|
|
207
|
-
export declare namespace TextPartResponse {
|
|
208
|
-
/**
|
|
209
|
-
* One mention on a text part — who was mentioned, and which characters of `value`
|
|
210
|
-
* are the mention. A part carries one of these per mention, in the order they
|
|
211
|
-
* appear in the text, so a message naming two people has two entries.
|
|
212
|
-
*/
|
|
213
|
-
interface Mention {
|
|
214
|
-
/**
|
|
215
|
-
* Address of the mentioned participant, exactly as the device recorded it — an
|
|
216
|
-
* E.164 phone number or an email address.
|
|
217
|
-
*/
|
|
218
|
-
handle: string;
|
|
219
|
-
/**
|
|
220
|
-
* Whether the mentioned participant is this line.
|
|
221
|
-
*/
|
|
222
|
-
is_me: boolean;
|
|
223
|
-
/**
|
|
224
|
-
* Character range `[start, end)` in `value` highlighted as this mention.
|
|
225
|
-
* _Characters are measured as UTF-16 code units. Most characters count as 1; some
|
|
226
|
-
* emoji count as 2._
|
|
227
|
-
*/
|
|
228
|
-
range: Array<number>;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
192
|
//# sourceMappingURL=shared.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.mts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],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"}
|
package/resources/shared.d.ts
CHANGED
|
@@ -173,59 +173,20 @@ export interface TextPartResponse {
|
|
|
173
173
|
*/
|
|
174
174
|
value: string;
|
|
175
175
|
/**
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
* mentions; this field shows only the first in `value` order, so it cannot be used
|
|
179
|
-
* to determine whether a given participant was mentioned. `null` when the part
|
|
180
|
-
* carries no mention.
|
|
176
|
+
* Handle (E.164 phone number or Apple ID email) of the @mentioned chat
|
|
177
|
+
* participant, as sent. `null` when the part carries no mention.
|
|
181
178
|
*/
|
|
182
179
|
mention?: string | null;
|
|
183
180
|
/**
|
|
184
|
-
*
|
|
185
|
-
* `
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
* 1; some emoji count as 2._
|
|
181
|
+
* Character range `[start, end)` in `value` highlighted as the mention, as sent.
|
|
182
|
+
* `null` when the send omitted it (the whole `value` is highlighted) or the part
|
|
183
|
+
* carries no mention. _Characters are measured as UTF-16 code units. Most
|
|
184
|
+
* characters count as 1; some emoji count as 2._
|
|
189
185
|
*/
|
|
190
186
|
mention_range?: Array<number> | null;
|
|
191
|
-
/**
|
|
192
|
-
* Every mention on this part, in the order they appear in `value`. `null` when the
|
|
193
|
-
* part carries no mention. A part can carry several mentions of different people —
|
|
194
|
-
* check `is_me` to tell whether this line was one of them.
|
|
195
|
-
*
|
|
196
|
-
* Only iMessage carries mentions. On a received message this is populated when the
|
|
197
|
-
* sender was on iMessage; SMS and RCS have no way to mark a mention, so a message
|
|
198
|
-
* from an SMS or RCS participant arrives as plain text with `mentions` null, even
|
|
199
|
-
* in a group where other participants are on iMessage.
|
|
200
|
-
*/
|
|
201
|
-
mentions?: Array<TextPartResponse.Mention> | null;
|
|
202
187
|
/**
|
|
203
188
|
* Text decorations applied to character ranges in the value
|
|
204
189
|
*/
|
|
205
190
|
text_decorations?: Array<TextDecoration> | null;
|
|
206
191
|
}
|
|
207
|
-
export declare namespace TextPartResponse {
|
|
208
|
-
/**
|
|
209
|
-
* One mention on a text part — who was mentioned, and which characters of `value`
|
|
210
|
-
* are the mention. A part carries one of these per mention, in the order they
|
|
211
|
-
* appear in the text, so a message naming two people has two entries.
|
|
212
|
-
*/
|
|
213
|
-
interface Mention {
|
|
214
|
-
/**
|
|
215
|
-
* Address of the mentioned participant, exactly as the device recorded it — an
|
|
216
|
-
* E.164 phone number or an email address.
|
|
217
|
-
*/
|
|
218
|
-
handle: string;
|
|
219
|
-
/**
|
|
220
|
-
* Whether the mentioned participant is this line.
|
|
221
|
-
*/
|
|
222
|
-
is_me: boolean;
|
|
223
|
-
/**
|
|
224
|
-
* Character range `[start, end)` in `value` highlighted as this mention.
|
|
225
|
-
* _Characters are measured as UTF-16 code units. Most characters count as 1; some
|
|
226
|
-
* emoji count as 2._
|
|
227
|
-
*/
|
|
228
|
-
range: Array<number>;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
192
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,EAAE,WAAW,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;IAElC;;OAEG;IACH,IAAI,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AAK,CAAC,MAAM,CAAC,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IAE1F;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,eAAe,GAAG,WAAW,CAAC;CAC3D;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;IAElC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAErC;;OAEG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;CACjD"}
|
package/resources/webhooks.d.mts
CHANGED
|
@@ -614,61 +614,22 @@ export interface SchemasTextPartResponse {
|
|
|
614
614
|
*/
|
|
615
615
|
value: string;
|
|
616
616
|
/**
|
|
617
|
-
*
|
|
618
|
-
*
|
|
619
|
-
* mentions; this field shows only the first in `value` order, so it cannot be used
|
|
620
|
-
* to determine whether a given participant was mentioned. `null` when the part
|
|
621
|
-
* carries no mention.
|
|
617
|
+
* Handle (E.164 phone number or Apple ID email) of the @mentioned chat
|
|
618
|
+
* participant, as sent. `null` when the part carries no mention.
|
|
622
619
|
*/
|
|
623
620
|
mention?: string | null;
|
|
624
621
|
/**
|
|
625
|
-
*
|
|
626
|
-
* `
|
|
627
|
-
*
|
|
628
|
-
*
|
|
629
|
-
* 1; some emoji count as 2._
|
|
622
|
+
* Character range `[start, end)` in `value` highlighted as the mention, as sent.
|
|
623
|
+
* `null` when the send omitted it (the whole `value` is highlighted) or the part
|
|
624
|
+
* carries no mention. _Characters are measured as UTF-16 code units. Most
|
|
625
|
+
* characters count as 1; some emoji count as 2._
|
|
630
626
|
*/
|
|
631
627
|
mention_range?: Array<number> | null;
|
|
632
|
-
/**
|
|
633
|
-
* Every mention on this part, in the order they appear in `value`. `null` when the
|
|
634
|
-
* part carries no mention. A part can carry several mentions of different people —
|
|
635
|
-
* check `is_me` to tell whether this line was one of them.
|
|
636
|
-
*
|
|
637
|
-
* Only iMessage carries mentions. On a received message this is populated when the
|
|
638
|
-
* sender was on iMessage; SMS and RCS have no way to mark a mention, so a message
|
|
639
|
-
* from an SMS or RCS participant arrives as plain text with `mentions` null, even
|
|
640
|
-
* in a group where other participants are on iMessage.
|
|
641
|
-
*/
|
|
642
|
-
mentions?: Array<SchemasTextPartResponse.Mention> | null;
|
|
643
628
|
/**
|
|
644
629
|
* Text decorations applied to character ranges in the value
|
|
645
630
|
*/
|
|
646
631
|
text_decorations?: Array<Shared.TextDecoration> | null;
|
|
647
632
|
}
|
|
648
|
-
export declare namespace SchemasTextPartResponse {
|
|
649
|
-
/**
|
|
650
|
-
* One mention on a text part — who was mentioned, and which characters of `value`
|
|
651
|
-
* are the mention. A part carries one of these per mention, in the order they
|
|
652
|
-
* appear in the text, so a message naming two people has two entries.
|
|
653
|
-
*/
|
|
654
|
-
interface Mention {
|
|
655
|
-
/**
|
|
656
|
-
* Address of the mentioned participant, exactly as the device recorded it — an
|
|
657
|
-
* E.164 phone number or an email address.
|
|
658
|
-
*/
|
|
659
|
-
handle: string;
|
|
660
|
-
/**
|
|
661
|
-
* Whether the mentioned participant is this line.
|
|
662
|
-
*/
|
|
663
|
-
is_me: boolean;
|
|
664
|
-
/**
|
|
665
|
-
* Character range `[start, end)` in `value` highlighted as this mention.
|
|
666
|
-
* _Characters are measured as UTF-16 code units. Most characters count as 1; some
|
|
667
|
-
* emoji count as 2._
|
|
668
|
-
*/
|
|
669
|
-
range: Array<number>;
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
633
|
/**
|
|
673
634
|
* Complete webhook payload for message.sent events (2026-02-03 format)
|
|
674
635
|
*/
|