@proveanything/smartlinks 2.2.8 → 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.
- package/dist/api/payments.d.ts +9 -0
- package/dist/api/payments.js +9 -0
- package/dist/docs/API_SUMMARY.md +4 -1
- package/dist/docs/payments.md +7 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/API_SUMMARY.md +4 -1
- package/docs/payments.md +7 -0
- package/package.json +87 -87
package/dist/api/payments.d.ts
CHANGED
|
@@ -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). */
|
package/dist/api/payments.js
CHANGED
|
@@ -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();
|
package/dist/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 2.2.
|
|
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/payments.md
CHANGED
|
@@ -75,6 +75,13 @@ location.href = url
|
|
|
75
75
|
|
|
76
76
|
`shop.admin.connect` does the same thing: there is one account per business, whichever app connects it.
|
|
77
77
|
|
|
78
|
+
```typescript
|
|
79
|
+
await payments.admin.disconnect(collectionId) // → { connected: false, disconnectedAccountId }
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Disconnecting stops every app taking payments until an account is connected again. SmartLinks forgets the
|
|
83
|
+
account; the Stripe account stays the business's own, with its payments. Connecting again makes a new one.
|
|
84
|
+
|
|
78
85
|
### Reconciling an app's payments
|
|
79
86
|
|
|
80
87
|
```typescript
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.2.
|
|
1
|
+
export declare const SDK_VERSION = "2.2.9";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by scripts/write-version.mjs from package.json. Do not edit.
|
|
2
|
-
export const SDK_VERSION = "2.2.
|
|
2
|
+
export const SDK_VERSION = "2.2.9";
|
package/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 2.2.
|
|
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/docs/payments.md
CHANGED
|
@@ -75,6 +75,13 @@ location.href = url
|
|
|
75
75
|
|
|
76
76
|
`shop.admin.connect` does the same thing: there is one account per business, whichever app connects it.
|
|
77
77
|
|
|
78
|
+
```typescript
|
|
79
|
+
await payments.admin.disconnect(collectionId) // → { connected: false, disconnectedAccountId }
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Disconnecting stops every app taking payments until an account is connected again. SmartLinks forgets the
|
|
83
|
+
account; the Stripe account stays the business's own, with its payments. Connecting again makes a new one.
|
|
84
|
+
|
|
78
85
|
### Reconciling an app's payments
|
|
79
86
|
|
|
80
87
|
```typescript
|
package/package.json
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@proveanything/smartlinks",
|
|
3
|
-
"version": "2.2.
|
|
4
|
-
"description": "Official JavaScript/TypeScript SDK for the Smartlinks API",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"import": "./dist/index.js",
|
|
12
|
-
"default": "./dist/index.js"
|
|
13
|
-
},
|
|
14
|
-
"./testing": {
|
|
15
|
-
"types": "./dist/testing/index.d.ts",
|
|
16
|
-
"import": "./dist/testing/index.js",
|
|
17
|
-
"default": "./dist/testing/index.js"
|
|
18
|
-
},
|
|
19
|
-
"./*": {
|
|
20
|
-
"types": "./dist/*.d.ts",
|
|
21
|
-
"import": "./dist/*.js",
|
|
22
|
-
"default": "./dist/*.js"
|
|
23
|
-
},
|
|
24
|
-
"./baseline.css": "./dist/baseline.css",
|
|
25
|
-
"./baseline.classes.json": "./dist/baseline.classes.json",
|
|
26
|
-
"./theme.css": "./dist/theme.css",
|
|
27
|
-
"./theme-boot.js": "./dist/theme-boot.js",
|
|
28
|
-
"./package.json": "./package.json"
|
|
29
|
-
},
|
|
30
|
-
"bin": {
|
|
31
|
-
"smartlinks-register-release": "scripts/register-release.mjs",
|
|
32
|
-
"smartlinks-publish": "scripts/publish.mjs",
|
|
33
|
-
"smartlinks-doctor": "scripts/doctor.mjs",
|
|
34
|
-
"smartlinks-headless": "scripts/headless-check.mjs"
|
|
35
|
-
},
|
|
36
|
-
"files": [
|
|
37
|
-
"dist/",
|
|
38
|
-
"docs/",
|
|
39
|
-
"scripts/register-release.mjs",
|
|
40
|
-
"scripts/publish.mjs",
|
|
41
|
-
"scripts/doctor.mjs",
|
|
42
|
-
"scripts/headless-check.mjs",
|
|
43
|
-
"scripts/lib/",
|
|
44
|
-
"openapi.yaml",
|
|
45
|
-
"README.md"
|
|
46
|
-
],
|
|
47
|
-
"scripts": {
|
|
48
|
-
"test": "node test/run.cjs",
|
|
49
|
-
"build": "node scripts/write-version.mjs && tsc && node scripts/fix-esm-extensions.mjs && node generate-api-summary.cjs && node generate-openapi.cjs && node scripts/copy-docs-to-dist.cjs && node scripts/build-baseline.mjs",
|
|
50
|
-
"docs": "typedoc",
|
|
51
|
-
"docs:summary": "node generate-api-summary.cjs",
|
|
52
|
-
"docs:openapi": "node generate-openapi.cjs",
|
|
53
|
-
"docs:openapi:lint": "npx --yes @redocly/cli@latest lint openapi.yaml",
|
|
54
|
-
"docs:openapi:check": "node generate-openapi.cjs && npx --yes @redocly/cli@latest lint openapi.yaml",
|
|
55
|
-
"build:docs": "tsc build-docs.ts --outDir dist && node dist/build-docs.js",
|
|
56
|
-
"prepublishOnly": "npm run build"
|
|
57
|
-
},
|
|
58
|
-
"keywords": [
|
|
59
|
-
"smartlinks",
|
|
60
|
-
"api",
|
|
61
|
-
"authentication",
|
|
62
|
-
"traceability",
|
|
63
|
-
"blockchain",
|
|
64
|
-
"typescript",
|
|
65
|
-
"sdk"
|
|
66
|
-
],
|
|
67
|
-
"author": "Glenn Shoosmith",
|
|
68
|
-
"license": "MIT",
|
|
69
|
-
"publishConfig": {
|
|
70
|
-
"access": "public"
|
|
71
|
-
},
|
|
72
|
-
"dependencies": {
|
|
73
|
-
"cross-fetch": "^3.1.5",
|
|
74
|
-
"es-module-lexer": "^1.7.0"
|
|
75
|
-
},
|
|
76
|
-
"devDependencies": {
|
|
77
|
-
"ts-node": "^10.9.1",
|
|
78
|
-
"typedoc": "^0.25.13",
|
|
79
|
-
"typedoc-plugin-markdown": "^3.17.1",
|
|
80
|
-
"typescript": "^4.9.0"
|
|
81
|
-
},
|
|
82
|
-
"repository": {
|
|
83
|
-
"type": "git",
|
|
84
|
-
"url": "https://github.com/Prove-Anything/smartlinks.git"
|
|
85
|
-
},
|
|
86
|
-
"homepage": "https://smartlinks.app"
|
|
87
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@proveanything/smartlinks",
|
|
3
|
+
"version": "2.2.9",
|
|
4
|
+
"description": "Official JavaScript/TypeScript SDK for the Smartlinks API",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./testing": {
|
|
15
|
+
"types": "./dist/testing/index.d.ts",
|
|
16
|
+
"import": "./dist/testing/index.js",
|
|
17
|
+
"default": "./dist/testing/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./*": {
|
|
20
|
+
"types": "./dist/*.d.ts",
|
|
21
|
+
"import": "./dist/*.js",
|
|
22
|
+
"default": "./dist/*.js"
|
|
23
|
+
},
|
|
24
|
+
"./baseline.css": "./dist/baseline.css",
|
|
25
|
+
"./baseline.classes.json": "./dist/baseline.classes.json",
|
|
26
|
+
"./theme.css": "./dist/theme.css",
|
|
27
|
+
"./theme-boot.js": "./dist/theme-boot.js",
|
|
28
|
+
"./package.json": "./package.json"
|
|
29
|
+
},
|
|
30
|
+
"bin": {
|
|
31
|
+
"smartlinks-register-release": "scripts/register-release.mjs",
|
|
32
|
+
"smartlinks-publish": "scripts/publish.mjs",
|
|
33
|
+
"smartlinks-doctor": "scripts/doctor.mjs",
|
|
34
|
+
"smartlinks-headless": "scripts/headless-check.mjs"
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"dist/",
|
|
38
|
+
"docs/",
|
|
39
|
+
"scripts/register-release.mjs",
|
|
40
|
+
"scripts/publish.mjs",
|
|
41
|
+
"scripts/doctor.mjs",
|
|
42
|
+
"scripts/headless-check.mjs",
|
|
43
|
+
"scripts/lib/",
|
|
44
|
+
"openapi.yaml",
|
|
45
|
+
"README.md"
|
|
46
|
+
],
|
|
47
|
+
"scripts": {
|
|
48
|
+
"test": "node test/run.cjs",
|
|
49
|
+
"build": "node scripts/write-version.mjs && tsc && node scripts/fix-esm-extensions.mjs && node generate-api-summary.cjs && node generate-openapi.cjs && node scripts/copy-docs-to-dist.cjs && node scripts/build-baseline.mjs",
|
|
50
|
+
"docs": "typedoc",
|
|
51
|
+
"docs:summary": "node generate-api-summary.cjs",
|
|
52
|
+
"docs:openapi": "node generate-openapi.cjs",
|
|
53
|
+
"docs:openapi:lint": "npx --yes @redocly/cli@latest lint openapi.yaml",
|
|
54
|
+
"docs:openapi:check": "node generate-openapi.cjs && npx --yes @redocly/cli@latest lint openapi.yaml",
|
|
55
|
+
"build:docs": "tsc build-docs.ts --outDir dist && node dist/build-docs.js",
|
|
56
|
+
"prepublishOnly": "npm run build"
|
|
57
|
+
},
|
|
58
|
+
"keywords": [
|
|
59
|
+
"smartlinks",
|
|
60
|
+
"api",
|
|
61
|
+
"authentication",
|
|
62
|
+
"traceability",
|
|
63
|
+
"blockchain",
|
|
64
|
+
"typescript",
|
|
65
|
+
"sdk"
|
|
66
|
+
],
|
|
67
|
+
"author": "Glenn Shoosmith",
|
|
68
|
+
"license": "MIT",
|
|
69
|
+
"publishConfig": {
|
|
70
|
+
"access": "public"
|
|
71
|
+
},
|
|
72
|
+
"dependencies": {
|
|
73
|
+
"cross-fetch": "^3.1.5",
|
|
74
|
+
"es-module-lexer": "^1.7.0"
|
|
75
|
+
},
|
|
76
|
+
"devDependencies": {
|
|
77
|
+
"ts-node": "^10.9.1",
|
|
78
|
+
"typedoc": "^0.25.13",
|
|
79
|
+
"typedoc-plugin-markdown": "^3.17.1",
|
|
80
|
+
"typescript": "^4.9.0"
|
|
81
|
+
},
|
|
82
|
+
"repository": {
|
|
83
|
+
"type": "git",
|
|
84
|
+
"url": "https://github.com/Prove-Anything/smartlinks.git"
|
|
85
|
+
},
|
|
86
|
+
"homepage": "https://smartlinks.app"
|
|
87
|
+
}
|