@proveanything/smartlinks 2.2.7 → 2.2.9

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.
@@ -43,6 +43,15 @@ export declare namespace payments {
43
43
  url: string;
44
44
  expiresAt: string;
45
45
  }>;
46
+ /**
47
+ * Stop using the business's Stripe account. SmartLinks forgets it (apps can no longer take payments
48
+ * until one is connected again); the Stripe account itself stays the business's own, with the
49
+ * payments already in it. Connecting again makes a new account.
50
+ */
51
+ function disconnect(collectionId: string): Promise<{
52
+ connected: false;
53
+ disconnectedAccountId: string | null;
54
+ }>;
46
55
  /** An app's in-page payments on the business's account, newest first (for reconciling). */
47
56
  function intents(collectionId: string, params?: PaymentListParams): Promise<PaymentList>;
48
57
  /** Let Apple Pay and Google Pay run on a site's own domain (smartlinks.app needs nothing). */
@@ -61,6 +61,15 @@ export var payments;
61
61
  return post(`${adm(collectionId)}/connect`, input);
62
62
  }
63
63
  admin.connect = connect;
64
+ /**
65
+ * Stop using the business's Stripe account. SmartLinks forgets it (apps can no longer take payments
66
+ * until one is connected again); the Stripe account itself stays the business's own, with the
67
+ * payments already in it. Connecting again makes a new account.
68
+ */
69
+ async function disconnect(collectionId) {
70
+ return post(`${adm(collectionId)}/disconnect`, {});
71
+ }
72
+ admin.disconnect = disconnect;
64
73
  /** An app's in-page payments on the business's account, newest first (for reconciling). */
65
74
  async function intents(collectionId, params) {
66
75
  const q = new URLSearchParams();
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 2.2.7 | Generated: 2026-12-04T13:31:00.283Z
3
+ Version: 2.2.9 | Generated: 2026-12-04T20:26:14.685Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
@@ -16330,6 +16330,9 @@ The business's payments account: connected, can take payments, can pay out. Pass
16330
16330
  **connect**(collectionId: string, input: PaymentsConnectInput) → `Promise<`
16331
16331
  Stripe's page to connect (or finish connecting) the business's Stripe account. Send the person to `url`. The account is made the first time; every app shares it.
16332
16332
 
16333
+ **disconnect**(collectionId: string) → `Promise<`
16334
+ Stop using the business's Stripe account. SmartLinks forgets it (apps can no longer take payments until one is connected again); the Stripe account itself stays the business's own, with the payments already in it. Connecting again makes a new account.
16335
+
16333
16336
  **intents**(collectionId: string, params?: PaymentListParams) → `Promise<PaymentList>`
16334
16337
  An app's in-page payments on the business's account, newest first (for reconciling).
16335
16338
 
package/dist/docs/i18n.md CHANGED
@@ -16,13 +16,17 @@ Forge's step 21 moves an app off it.
16
16
  3. **The host says which language.** Studio passes the person's own Studio language as `?lang=`, and later
17
17
  changes arrive live (`smartlinks:root-state` with `lang`). A key with no translation shows its English.
18
18
 
19
- **Where the other languages come from at run time.** Only `en.json` is in your source. The other
20
- languages are files the platform adds to the published bundle, and the SDK **downloads** the one in use
21
- (`GET <folder>/i18n/fr.json`) when the app starts or the language changes. It is a static file fetch, not
22
- an API call. `<folder>` is beside the page by default, or what you gave as `baseUrl` / `moduleUrl`. So when
23
- a key that has a translation still shows English, ask: **which `fr.json` was fetched, from where, and was it
24
- yours?** (In the browser's network list, filter on `i18n/`.) A local dev server or stand-in usually can't
25
- show this fault: there the page and the bundle are the same folder.
19
+ **Where the other languages come from at run time.** Once your app is translated, the other languages
20
+ are files beside `en.json` (`public/i18n/fr.json`, `de.json`…), in your source and in the published bundle.
21
+ They are not compiled into your code: the SDK **downloads** the one in use (`GET <folder>/i18n/fr.json`) when
22
+ the app starts or the language changes. It is a static file fetch, not an API call. `<folder>` is beside the
23
+ page by default, or what you gave as `baseUrl` / `moduleUrl`. So when a key still shows English:
24
+
25
+ 1. Look the key up in `public/i18n/<lang>.json`. Missing there: it isn't translated yet.
26
+ 2. There, but still English: the file isn't being read. Ask **which `fr.json` was fetched, from where, and
27
+ was it yours?** (In the browser's network list, filter on `i18n/`.) A local dev server or stand-in
28
+ usually can't show this fault: there the page and the bundle are the same folder. Inside Portal or Hub,
29
+ see the next section.
26
30
 
27
31
  ## Mounted inside another app's page: use `i18n.forApp`
28
32
 
@@ -54,8 +58,10 @@ export function useT() {
54
58
  instead when you know the folder exactly.
55
59
  - Don't call `i18n.init` from a container or widget: it changes the host's settings.
56
60
  - A container or widget runs on the **host's** SDK, not the one in your `package.json`. A host older than
57
- 2.2.5 has no `forApp`, and calling it there stops your whole panel. Check first and fall back to your
58
- bundled English: `typeof i18n.forApp === 'function' ? i18n.forApp(...) : <your English only>`.
61
+ 2.2.5 has no `forApp`, and one older than 2.2.1 has no `i18n` at all; calling either there stops your
62
+ whole panel. Check first and fall back to your bundled English:
63
+ `typeof i18n?.forApp === 'function' ? i18n.forApp(...) : <your English only>`, and use `i18n?.` for
64
+ anything else you read from the host's `i18n`.
59
65
  - `forApp` works for a standalone page too, so one `src/i18n.ts` can serve every way the app is shown.
60
66
 
61
67
  In an admin app, `lang` is the person's **Studio language** (buttons and labels). The site's content