@proveanything/smartlinks 2.2.10 → 2.2.11

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,4 +1,4 @@
1
- import type { PaymentsPublicConfig, PaymentIntentInput, PaymentIntentResult, PaymentsStatus, PaymentsConnectInput, PaymentListParams, PaymentList, PaymentDomainResult } from '../types/payments.js';
1
+ import type { PaymentsPublicConfig, PaymentIntentInput, PaymentIntentResult, PaymentsStatus, PaymentsConnectInput, PaymentListParams, PaymentList, PaymentSyncInput, PaymentSyncResult, PaymentDomainResult } from '../types/payments.js';
2
2
  export declare namespace payments {
3
3
  /**
4
4
  * Can this business take payments, and what Stripe.js needs. `ready` is false until the business has
@@ -54,6 +54,12 @@ export declare namespace payments {
54
54
  }>;
55
55
  /** An app's in-page payments on the business's account, newest first (for reconciling). */
56
56
  function intents(collectionId: string, params?: PaymentListParams): Promise<PaymentList>;
57
+ /**
58
+ * Bring the app's payment records up to date from Stripe (payments made before payment records
59
+ * existed, or whose events never arrived). One Stripe page per call; call again with `next` while
60
+ * `hasMore`. The records are app records of type `payment`: read them with `app.records.list`.
61
+ */
62
+ function sync(collectionId: string, input?: PaymentSyncInput): Promise<PaymentSyncResult>;
57
63
  /** Let Apple Pay and Google Pay run on a site's own domain (smartlinks.app needs nothing). */
58
64
  function registerDomain(collectionId: string, domain: string): Promise<PaymentDomainResult>;
59
65
  }
@@ -85,6 +85,15 @@ export var payments;
85
85
  return request(`${adm(collectionId)}/intents${s ? `?${s}` : ''}`);
86
86
  }
87
87
  admin.intents = intents;
88
+ /**
89
+ * Bring the app's payment records up to date from Stripe (payments made before payment records
90
+ * existed, or whose events never arrived). One Stripe page per call; call again with `next` while
91
+ * `hasMore`. The records are app records of type `payment`: read them with `app.records.list`.
92
+ */
93
+ async function sync(collectionId, input = {}) {
94
+ return post(`${adm(collectionId)}/sync`, input);
95
+ }
96
+ admin.sync = sync;
88
97
  /** Let Apple Pay and Google Pay run on a site's own domain (smartlinks.app needs nothing). */
89
98
  async function registerDomain(collectionId, domain) {
90
99
  return post(`${adm(collectionId)}/domains`, { domain });
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 2.2.10 | Generated: 2026-12-04T20:36:14.716Z
3
+ Version: 2.2.11 | Generated: 2026-12-05T10:45:08.620Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
@@ -11724,6 +11724,42 @@ interface PaymentList {
11724
11724
  }
11725
11725
  ```
11726
11726
 
11727
+ **PaymentSyncInput** (interface)
11728
+ ```typescript
11729
+ interface PaymentSyncInput {
11730
+ appId?: string
11731
+ since?: string
11732
+ after?: string
11733
+ }
11734
+ ```
11735
+
11736
+ **PaymentSyncResult** (interface)
11737
+ ```typescript
11738
+ interface PaymentSyncResult {
11739
+ checked: number
11740
+ saved: number
11741
+ hasMore: boolean
11742
+ next: string | null
11743
+ }
11744
+ ```
11745
+
11746
+ **AppPaymentRecordData** (interface)
11747
+ ```typescript
11748
+ interface AppPaymentRecordData {
11749
+ paymentIntentId: string
11750
+ amount: number
11751
+ currency: string
11752
+ amountRefunded: number
11753
+ fee: number
11754
+ email: string | null
11755
+ reference: string | null
11756
+ metadata: Record<string, string>
11757
+ paidAt: string
11758
+ refundedAt: string | null
11759
+ dispute?: { status: string; reason: string | null; amount: number | null; at: string }
11760
+ }
11761
+ ```
11762
+
11727
11763
  **PaymentDomainResult** (interface)
11728
11764
  ```typescript
11729
11765
  interface PaymentDomainResult {
@@ -11733,6 +11769,8 @@ interface PaymentDomainResult {
11733
11769
  }
11734
11770
  ```
11735
11771
 
11772
+ **AppPaymentStatus** = `'paid' | 'partially_refunded' | 'refunded' | 'disputed' | 'dispute_lost'`
11773
+
11736
11774
  ### product
11737
11775
 
11738
11776
  **ProductKey** (interface)
@@ -16434,6 +16472,9 @@ Stop using the business's Stripe account. SmartLinks forgets it (apps can no lon
16434
16472
  **intents**(collectionId: string, params?: PaymentListParams) → `Promise<PaymentList>`
16435
16473
  An app's in-page payments on the business's account, newest first (for reconciling).
16436
16474
 
16475
+ **sync**(collectionId: string, input: PaymentSyncInput = {}) → `Promise<PaymentSyncResult>`
16476
+ Bring the app's payment records up to date from Stripe (payments made before payment records existed, or whose events never arrived). One Stripe page per call; call again with `next` while `hasMore`. The records are app records of type `payment`: read them with `app.records.list`.
16477
+
16437
16478
  **registerDomain**(collectionId: string, domain: string) → `Promise<PaymentDomainResult>`
16438
16479
  Let Apple Pay and Google Pay run on a site's own domain (smartlinks.app needs nothing).
16439
16480