@peable.to/shared-types 0.6.0 → 0.8.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.
@@ -1,17 +1,2 @@
1
1
  "use strict";
2
- /**
3
- * A dispute — the card network holding a settled payment's money while a
4
- * cardholder contests it.
5
- *
6
- * Published because `payment_intent.disputed` and `payment_intent.dispute_closed`
7
- * carry it as their `data.object`. It was route-local at first, with the webhook
8
- * carrying the PaymentIntent and the detail reachable only through
9
- * `GET /v1/payment_intents/:id/disputes`. That was inconsistent with the reason
10
- * those two events exist: `disputed` is a DEADLINE, and a merchant who has to
11
- * make a second call to learn when evidence is due is a merchant who can miss it
12
- * while their integration is working exactly as documented.
13
- *
14
- * It is also what the provider does. Stripe's `charge.dispute.created` carries
15
- * the dispute, not the charge — the parity was half-applied.
16
- */
17
2
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // The one list contract (ADR 0014 D1), for every list endpoint.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/cjs/tax.js CHANGED
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TAX_LOCATION_EVIDENCE_TYPES = exports.TAX_REGISTRATION_SCHEMES = void 0;
2
4
  /**
3
5
  * Peable Tax — the wire contract.
4
6
  *
@@ -11,8 +13,6 @@
11
13
  *
12
14
  * Amounts are integers in the currency's minor unit, like the billing quote.
13
15
  */
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.TAX_LOCATION_EVIDENCE_TYPES = exports.TAX_REGISTRATION_SCHEMES = void 0;
16
16
  /** How a registration lets the seller collect. `standard`/`simplified` cover
17
17
  * one country; the EU One-Stop-Shop schemes cover every EU member state from
18
18
  * one identification state; the US is per state; Canadian PST/QST is per
@@ -1,16 +1 @@
1
- /**
2
- * A dispute — the card network holding a settled payment's money while a
3
- * cardholder contests it.
4
- *
5
- * Published because `payment_intent.disputed` and `payment_intent.dispute_closed`
6
- * carry it as their `data.object`. It was route-local at first, with the webhook
7
- * carrying the PaymentIntent and the detail reachable only through
8
- * `GET /v1/payment_intents/:id/disputes`. That was inconsistent with the reason
9
- * those two events exist: `disputed` is a DEADLINE, and a merchant who has to
10
- * make a second call to learn when evidence is due is a merchant who can miss it
11
- * while their integration is working exactly as documented.
12
- *
13
- * It is also what the provider does. Stripe's `charge.dispute.created` carries
14
- * the dispute, not the charge — the parity was half-applied.
15
- */
16
1
  export {};
@@ -0,0 +1,2 @@
1
+ // The one list contract (ADR 0014 D1), for every list endpoint.
2
+ export {};
@@ -3,11 +3,18 @@ import type { CurrencyCode } from './money';
3
3
  import type { NetworkType } from './network';
4
4
  import type { MerchantDisplay } from './merchantDisplay';
5
5
  import type { PaymentIntent, PaymentIntentRail } from './paymentIntent';
6
+ import type { ConnectedAccount } from './settlement';
6
7
  /** The merchant/SDK-facing DTO — returned on create and by merchant retrieve. */
7
8
  export interface CheckoutSession {
8
9
  id: string;
9
10
  object: 'checkout_session';
10
- payment_intent_id: string;
11
+ /**
12
+ * Which of the provider's two worlds this object belongs to (ADR 0017):
13
+ * `true` for a `production` merchant, `false` for every other environment.
14
+ */
15
+ livemode: boolean;
16
+ /** The wrapped payment's `pi_…`, or the {@link PaymentIntent} with `expand[]=payment_intent`. */
17
+ payment_intent: string | PaymentIntent;
11
18
  /** The wrapped intent's `client_secret`, returned to the merchant on create. */
12
19
  client_secret: string;
13
20
  amount: string;
@@ -16,10 +23,10 @@ export interface CheckoutSession {
16
23
  /** FairCoin rail only; `null` on a card session. */
17
24
  network: NetworkType | null;
18
25
  /**
19
- * The seller the wrapped payment is made on behalf of (`ca_…`), or `null`
20
- * (ADR 0012 D5). Optional in the type for older fixtures; always sent.
26
+ * The seller the wrapped payment is made on behalf of (`ca_…`, or the
27
+ * object with `expand[]=connected_account`), or `null` (ADR 0012 D5).
21
28
  */
22
- connected_account_id?: string | null;
29
+ connected_account: string | ConnectedAccount | null;
23
30
  metadata: Record<string, string>;
24
31
  success_url?: string;
25
32
  cancel_url?: string;
@@ -39,6 +46,11 @@ export interface CheckoutSessionPublic {
39
46
  billing_quote?: BillingFaircoinFxQuote;
40
47
  id: string;
41
48
  object: 'checkout_session';
49
+ /**
50
+ * Which of the provider's two worlds this object belongs to (ADR 0017):
51
+ * `true` for a `production` merchant, `false` for every other environment.
52
+ */
53
+ livemode: boolean;
42
54
  success_url?: string;
43
55
  cancel_url?: string;
44
56
  merchant: MerchantDisplay;
@@ -58,3 +70,7 @@ export interface CreateCheckoutSessionParams {
58
70
  /** Pay this seller (`ca_…`) rather than the merchant — see `CreatePaymentIntentParams.connectedAccount`. */
59
71
  connected_account?: string;
60
72
  }
73
+ /** `POST /v1/checkout_sessions/:id` — the merchant's `metadata`, as a patch. */
74
+ export interface UpdateCheckoutSessionParams {
75
+ metadata?: Record<string, string>;
76
+ }
@@ -34,6 +34,11 @@ export interface ConnectOnboardingComplete {
34
34
  */
35
35
  export interface AccountLink {
36
36
  object: 'account_link';
37
+ /**
38
+ * Which of the provider's two worlds this object belongs to (ADR 0017):
39
+ * `true` for a `production` merchant, `false` for every other environment.
40
+ */
41
+ livemode: boolean;
37
42
  url: string;
38
43
  expires_at: number;
39
44
  }
@@ -1,3 +1,4 @@
1
+ import type { PaymentIntent } from './paymentIntent';
1
2
  /**
2
3
  * A dispute — the card network holding a settled payment's money while a
3
4
  * cardholder contests it.
@@ -25,8 +26,13 @@ export type DisputeStatus = 'needs_response' | 'under_review' | 'won' | 'lost';
25
26
  export interface Dispute {
26
27
  id: string;
27
28
  object: 'dispute';
28
- /** The PUBLIC `pi_…` id, which is what every other contract here calls `id`. */
29
- payment_intent_id: string;
29
+ /**
30
+ * Which of the provider's two worlds this object belongs to (ADR 0017):
31
+ * `true` for a `production` merchant, `false` for every other environment.
32
+ */
33
+ livemode: boolean;
34
+ /** The disputed payment's `pi_…`, or the {@link PaymentIntent} with `expand[]=payment_intent`. */
35
+ payment_intent: string | PaymentIntent;
30
36
  /**
31
37
  * Amount in the currency's smallest unit as a canonical integer string —
32
38
  * the same encoding every other money field on these contracts uses.
@@ -71,6 +71,8 @@ export type WebhookEventType = 'payment_intent.confirming' | 'payment_intent.set
71
71
  /** Wake-up only. Re-read the owner-bound SDK resource; this is never paid or grant authority. */
72
72
  export interface BillingObservation {
73
73
  object: 'billing_observation';
74
+ /** The mode of the billing cohort observed (ADR 0017). */
75
+ livemode: boolean;
74
76
  resource_kind: 'subscription' | 'invoice';
75
77
  resource_id: string;
76
78
  revision: number;
@@ -115,6 +117,8 @@ export type WebhookEvent<K extends WebhookEventType = WebhookEventType> = {
115
117
  [T in K]: {
116
118
  id: string;
117
119
  object: 'event';
120
+ /** The mode of the merchant it was sent to, and of the object it carries (ADR 0017). */
121
+ livemode: boolean;
118
122
  type: T;
119
123
  created: number;
120
124
  /**
@@ -1,6 +1,7 @@
1
1
  export { UNITS_PER_COIN, isBaseUnitString, type CurrencyCode, CURRENCY_CODES, CURRENCY_DECIMALS, decimalsFor, isCurrencyCode, } from './money';
2
2
  export type { NetworkType } from './network';
3
- export { type PaymentIntentStatus, type PaymentIntentRail, type PaymentIntent, type CreatePaymentIntentParams, isValidStatusTransition, canStillBePaid, reachesSettlementFromPayer, POST_SETTLEMENT_STATUSES, PAYMENT_INTENT_STATUSES, PAYMENT_INTENT_RAILS, CHAIN_ONLY_STATUSES, CARD_ONLY_STATUSES, EXPIRABLE_STATUSES, canExpire, } from './paymentIntent';
3
+ export type { ExpandParams, List, ListParams, RangeQuery } from './list';
4
+ export { type PaymentIntentStatus, type PaymentIntentRail, type PaymentIntent, type CreatePaymentIntentParams, type UpdatePaymentIntentParams, isValidStatusTransition, canStillBePaid, reachesSettlementFromPayer, POST_SETTLEMENT_STATUSES, PAYMENT_INTENT_STATUSES, PAYMENT_INTENT_RAILS, CHAIN_ONLY_STATUSES, CARD_ONLY_STATUSES, EXPIRABLE_STATUSES, canExpire, } from './paymentIntent';
4
5
  export type { WebhookEventType, WebhookEvent, WebhookEventPayload, BillingObservation, } from './event';
5
6
  export type { Dispute, DisputeEvidence, DisputeStatus } from './dispute';
6
7
  export type { CapabilityStatus, ConnectedAccount, ConnectedAccountFaircoin, ConnectedAccountFaircoinStatus, ConnectedAccountRail, Refund, RefundOrigin, RefundStatus, Settlement, Transfer, TransferReversal, TransferReversalStatus, TransferStatus, TransferWithReversal, } from './settlement';
@@ -9,8 +10,8 @@ export { signWebhook, verifyWebhook } from './webhookSigner';
9
10
  export { type MerchantEnvironment, type Merchant, MERCHANT_ENVIRONMENTS, } from './merchant';
10
11
  export type { MerchantDisplay } from './merchantDisplay';
11
12
  export type { AccountLink, ConnectOnboarding, ConnectOnboardingComplete, RegisterFaircoinKeyParams, } from './connect';
12
- export type { PaymentLink, PublicPaymentLink, CreatePaymentLinkParams, } from './paymentLink';
13
- export type { CheckoutSession, CheckoutSessionPublic, CreateCheckoutSessionParams, } from './checkoutSession';
13
+ export type { PaymentLink, PublicPaymentLink, CreatePaymentLinkParams, UpdatePaymentLinkParams, } from './paymentLink';
14
+ export type { CheckoutSession, CheckoutSessionPublic, CreateCheckoutSessionParams, UpdateCheckoutSessionParams, } from './checkoutSession';
14
15
  export { SOCIAL_SOURCE_APP_MAX_LENGTH, SOCIAL_SOURCE_REF_MAX_LENGTH, type SocialPaymentSource, type SocialNextAddressRequest, type SocialNextAddressResponse, type SocialReceiveCursorResponse, type SocialPaymentDirection, type SocialPayment, type SocialPaymentsResponse, type EnrichmentKind, type EnrichmentResult, type EnrichRequest, type EnrichResponse, } from './social';
15
16
  export { BILLING_SUBSCRIPTION_STATUSES, type BillingSubscriptionStatus, type CreateBillingTaxQuoteParams, type BillingTaxQuote, type BillingInvoiceAuthoritySource, type BillingFinalInvoice, type BillingFinalInvoiceAuthority, type BillingFaircoinRenewalChoice, type BillingFaircoinRenewalConsent, type BillingFaircoinRenewalRevocation, type BillingCheckoutSession, type BillingCheckoutObservation, type RetrieveBillingCheckoutOperationParams, type BillingCheckoutOperationSource, type BillingCheckoutOperationRecovery, type BillingPaidInvoice, type BillingInvoiceState, type BillingCustomer, type BillingRail, type BillingRailSettlement, type BillingRailOffer, type BillingRailOption, type BillingRailList, type EnsureBillingCustomerParams, type CreateBillingCheckoutParams, type CreateBillingPortalParams, type BillingHostedSession, type BillingSubscription, } from './billing';
16
17
  export { canonicalBillingAuthority, canonicalBillingTaxQuote, PEABLE_BILLING_AUTHORITY_KEYS, } from './billing-authority';
@@ -0,0 +1,52 @@
1
+ /**
2
+ * One page of a list, newest first.
3
+ *
4
+ * `url` is the path that was listed (`/v1/payment_intents`,
5
+ * `/v1/payment_intents/pi_…/refunds`), so a page carries enough to fetch the
6
+ * next one without the caller remembering where it came from.
7
+ */
8
+ export interface List<T> {
9
+ object: 'list';
10
+ data: T[];
11
+ /** Whether another page exists in the direction this one was read. */
12
+ has_more: boolean;
13
+ url: string;
14
+ }
15
+ /**
16
+ * A range over an integer Unix-seconds field, Stripe's `created[gt]=…` form.
17
+ * Each bound is optional; together they are a conjunction.
18
+ */
19
+ export interface RangeQuery {
20
+ gt?: number;
21
+ gte?: number;
22
+ lt?: number;
23
+ lte?: number;
24
+ }
25
+ /** The parameters every list accepts. A route adds its own filters beside them. */
26
+ export interface ListParams {
27
+ /** 1–100. Default 10. */
28
+ limit?: number;
29
+ /**
30
+ * The id of the LAST object of the previous page: the next page is the
31
+ * objects older than it. Mutually exclusive with `ending_before`.
32
+ */
33
+ starting_after?: string;
34
+ /**
35
+ * The id of the FIRST object of the current page: the page returned is the
36
+ * objects newer than it, still newest first, with `has_more` saying whether
37
+ * there are newer ones still.
38
+ */
39
+ ending_before?: string;
40
+ /** Exactly this second (`number`), or a range. Unix seconds. */
41
+ created?: number | RangeQuery;
42
+ /**
43
+ * Expand references into objects, `data.`-prefixed on a list
44
+ * (`['data.payment_intent']`). At most four levels deep.
45
+ */
46
+ expand?: string[];
47
+ }
48
+ /** The parameter a single read or write accepts to expand its answer. */
49
+ export interface ExpandParams {
50
+ /** Dot paths, at most four levels deep (`['payment_intent.connected_account']`). */
51
+ expand?: string[];
52
+ }
@@ -4,6 +4,11 @@ export type MerchantEnvironment = (typeof MERCHANT_ENVIRONMENTS)[number];
4
4
  export interface Merchant {
5
5
  id: string;
6
6
  object: 'merchant';
7
+ /**
8
+ * Which of the provider's two worlds this object belongs to (ADR 0017):
9
+ * `true` for a `production` merchant, `false` for every other environment.
10
+ */
11
+ livemode: boolean;
7
12
  oxy_app_id: string;
8
13
  environment: MerchantEnvironment;
9
14
  /**
@@ -1,3 +1,4 @@
1
+ import type { ConnectedAccount } from './settlement';
1
2
  import type { CurrencyCode } from './money';
2
3
  import type { NetworkType } from './network';
3
4
  /**
@@ -72,6 +73,11 @@ export declare function canExpire(status: PaymentIntentStatus): boolean;
72
73
  export interface PaymentIntent {
73
74
  id: string;
74
75
  object: 'payment_intent';
76
+ /**
77
+ * Which of the provider's two worlds this object belongs to (ADR 0017):
78
+ * `true` for a `production` merchant, `false` for every other environment.
79
+ */
80
+ livemode: boolean;
75
81
  status: PaymentIntentStatus;
76
82
  /** Which rail moves this payment. Decides which fields below are populated. */
77
83
  rail: PaymentIntentRail;
@@ -95,10 +101,10 @@ export interface PaymentIntent {
95
101
  * payment to the merchant itself (ADR 0012 D5). On-behalf payments are
96
102
  * FairCoin only, and `address` derives from that seller's own key.
97
103
  *
98
- * Optional in the type only so fixtures written against earlier versions
99
- * still compile; a gateway at this version always sends it.
104
+ * The seller's `ca_…`, or the {@link ConnectedAccount} itself when the
105
+ * request asked for `expand[]=connected_account`.
100
106
  */
101
- connected_account_id?: string | null;
107
+ connected_account: string | ConnectedAccount | null;
102
108
  txid: string | null;
103
109
  /** On-chain confirmations. Structurally `0` for the whole life of a card payment. */
104
110
  confirmations: number;
@@ -144,3 +150,14 @@ export interface CreatePaymentIntentParams {
144
150
  */
145
151
  connected_account?: string;
146
152
  }
153
+ /**
154
+ * `POST /v1/payment_intents/:id`. Only the merchant's own `metadata` is
155
+ * mutable on an intent: everything else is either the payment itself or the
156
+ * state machine's, which moves only through its own operations.
157
+ *
158
+ * `metadata` is a PATCH: named keys are set, a key sent as `""` is removed,
159
+ * keys not named are kept.
160
+ */
161
+ export interface UpdatePaymentIntentParams {
162
+ metadata?: Record<string, string>;
163
+ }
@@ -7,6 +7,11 @@ import type { PaymentIntentRail } from './paymentIntent';
7
7
  export interface PaymentLink {
8
8
  id: string;
9
9
  object: 'payment_link';
10
+ /**
11
+ * Which of the provider's two worlds this object belongs to (ADR 0017):
12
+ * `true` for a `production` merchant, `false` for every other environment.
13
+ */
14
+ livemode: boolean;
10
15
  contribution?: ContributionDetails;
11
16
  /**
12
17
  * Amount in the currency's smallest unit, as a canonical integer string.
@@ -30,6 +35,11 @@ export interface PaymentLink {
30
35
  export interface PublicPaymentLink {
31
36
  id: string;
32
37
  object: 'payment_link';
38
+ /**
39
+ * Which of the provider's two worlds this object belongs to (ADR 0017):
40
+ * `true` for a `production` merchant, `false` for every other environment.
41
+ */
42
+ livemode: boolean;
33
43
  contribution?: ContributionDetails;
34
44
  amount: string;
35
45
  currency: CurrencyCode;
@@ -49,3 +59,14 @@ export interface CreatePaymentLinkParams {
49
59
  metadata?: Record<string, string>;
50
60
  success_url?: string;
51
61
  }
62
+ /**
63
+ * `POST /v1/payment_links/:id`. `amount`/`network` are deliberately absent — a
64
+ * link's price is immutable once shared.
65
+ */
66
+ export interface UpdatePaymentLinkParams {
67
+ active?: boolean;
68
+ /** A patch: named keys are set, `""` removes a key, others are kept. */
69
+ metadata?: Record<string, string>;
70
+ /** `null` removes it. */
71
+ success_url?: string | null;
72
+ }
@@ -1,5 +1,6 @@
1
1
  import type { CurrencyCode } from './money';
2
2
  import type { NetworkType } from './network';
3
+ import type { PaymentIntent } from './paymentIntent';
3
4
  /** How a provider reports one capability on a seller's account. */
4
5
  export type CapabilityStatus = 'active' | 'pending' | 'inactive';
5
6
  /** Where one settlement stands. */
@@ -42,6 +43,11 @@ export interface ConnectedAccountFaircoin {
42
43
  export interface ConnectedAccount {
43
44
  id: string;
44
45
  object: 'connected_account';
46
+ /**
47
+ * Which of the provider's two worlds this object belongs to (ADR 0017):
48
+ * `true` for a `production` merchant, `false` for every other environment.
49
+ */
50
+ livemode: boolean;
45
51
  /** The merchant's OWN id for this seller — how they address it. */
46
52
  external_ref: string;
47
53
  /** Which halves this account has. Never empty. */
@@ -96,12 +102,17 @@ export interface ConnectedAccount {
96
102
  export interface Transfer {
97
103
  id: string;
98
104
  object: 'transfer';
105
+ /**
106
+ * Which of the provider's two worlds this object belongs to (ADR 0017):
107
+ * `true` for a `production` merchant, `false` for every other environment.
108
+ */
109
+ livemode: boolean;
99
110
  /** The merchant's OWN id for what this settles. Their idempotency. */
100
111
  external_ref: string;
101
- /** The `ca_…` of the seller — never their account id at the provider. */
102
- connected_account_id: string;
103
- /** The `pi_…` this settlement was funded by — never an internal primary key. */
104
- payment_intent_id: string;
112
+ /** The seller's `ca_…` — never their account id at the provider — or the object, expanded. */
113
+ connected_account: string | ConnectedAccount;
114
+ /** The `pi_…` this settlement was funded by, or the {@link PaymentIntent}, expanded. */
115
+ payment_intent: string | PaymentIntent;
105
116
  amount: string;
106
117
  currency: string;
107
118
  /**
@@ -127,6 +138,11 @@ export interface Transfer {
127
138
  export interface TransferReversal {
128
139
  id: string;
129
140
  object: 'transfer_reversal';
141
+ /**
142
+ * Which of the provider's two worlds this object belongs to (ADR 0017):
143
+ * `true` for a `production` merchant, `false` for every other environment.
144
+ */
145
+ livemode: boolean;
130
146
  /** The merchant's own id for this reversal — their `Idempotency-Key`. */
131
147
  external_ref: string;
132
148
  amount: string;
@@ -163,8 +179,13 @@ export interface TransferWithReversal extends Transfer {
163
179
  */
164
180
  export interface Settlement {
165
181
  object: 'settlement';
166
- /** The `pi_…` this describes. */
167
- payment_intent_id: string;
182
+ /**
183
+ * Which of the provider's two worlds this object belongs to (ADR 0017):
184
+ * `true` for a `production` merchant, `false` for every other environment.
185
+ */
186
+ livemode: boolean;
187
+ /** The `pi_…` this describes, or the {@link PaymentIntent} with `expand[]=payment_intent`. */
188
+ payment_intent: string | PaymentIntent;
168
189
  /**
169
190
  * - `available` — settled; these figures are final.
170
191
  * - `pending` — a settlement record exists and is not final yet.
@@ -195,10 +216,16 @@ export type RefundOrigin = 'merchant' | 'provider';
195
216
  export interface Refund {
196
217
  id: string;
197
218
  object: 'refund';
219
+ /**
220
+ * Which of the provider's two worlds this object belongs to (ADR 0017):
221
+ * `true` for a `production` merchant, `false` for every other environment.
222
+ */
223
+ livemode: boolean;
198
224
  /** `null` on an IMPORTED refund; see {@link RefundOrigin}. */
199
225
  external_ref: string | null;
200
226
  origin: RefundOrigin;
201
- payment_intent_id: string;
227
+ /** The refunded payment's `pi_…`, or the {@link PaymentIntent} with `expand[]=payment_intent`. */
228
+ payment_intent: string | PaymentIntent;
202
229
  amount: string;
203
230
  currency: CurrencyCode | string;
204
231
  status: RefundStatus;
@@ -1,3 +1,4 @@
1
+ import type { List, ListParams } from './list';
1
2
  /**
2
3
  * Peable Tax — the wire contract.
3
4
  *
@@ -239,19 +240,13 @@ export interface CreateTaxReversalParams {
239
240
  * that is not yet reversed. */
240
241
  amount?: number;
241
242
  }
242
- export interface TaxTransactionList {
243
- object: 'list';
244
- data: TaxTransaction[];
245
- has_more: boolean;
246
- }
247
- export interface ListTaxTransactionsParams {
248
- /** Inclusive, Unix seconds. */
249
- from: number;
250
- /** Exclusive, Unix seconds. */
251
- to: number;
252
- limit?: number;
253
- starting_after?: string;
254
- }
243
+ export type TaxTransactionList = List<TaxTransaction>;
244
+ /**
245
+ * `GET /v1/tax/transactions`. `created` filters on `committed_at` — the tax
246
+ * date a filing period is judged by — and the list is newest first, like every
247
+ * other list.
248
+ */
249
+ export type ListTaxTransactionsParams = Omit<ListParams, 'expand'>;
255
250
  /** One filing line: totals per jurisdiction, registration, tax type and rate. */
256
251
  export interface TaxReportRow {
257
252
  country: string;
@@ -22,6 +22,11 @@ export type WebhookDeliveryStatus = 'pending' | 'delivered' | 'failed' | 'dead';
22
22
  export interface WebhookDelivery {
23
23
  id: string;
24
24
  object: 'webhook_delivery';
25
+ /**
26
+ * Which of the provider's two worlds this object belongs to (ADR 0017):
27
+ * `true` for a `production` merchant, `false` for every other environment.
28
+ */
29
+ livemode: boolean;
25
30
  merchant_id: string;
26
31
  /**
27
32
  * The `pi_…` this delivery is about — `null` when the event is not about a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peable.to/shared-types",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "Shared TypeScript types for the Peable Gateway — the wire contract shared by the backend, SDK, and frontend.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -74,6 +74,6 @@
74
74
  "@types/bun": "latest"
75
75
  },
76
76
  "dependencies": {
77
- "@peable.to/contracts": "0.3.0"
77
+ "@peable.to/contracts": "0.4.0"
78
78
  }
79
79
  }