@proveanything/smartlinks 1.13.11 → 1.13.12
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/docs/API_SUMMARY.md +21 -1
- package/dist/docs/auth-kit.md +30 -1
- package/dist/openapi.yaml +27 -0
- package/dist/types/authKit.d.ts +15 -0
- package/docs/API_SUMMARY.md +21 -1
- package/docs/auth-kit.md +30 -1
- package/openapi.yaml +27 -0
- package/package.json +1 -1
package/dist/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.13.
|
|
3
|
+
Version: 1.13.12 | Generated: 2026-05-14T16:00:33.063Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -3024,11 +3024,31 @@ interface EmailVerifyTokenResponse {
|
|
|
3024
3024
|
}
|
|
3025
3025
|
```
|
|
3026
3026
|
|
|
3027
|
+
**WhatsAppReplyCta** (interface)
|
|
3028
|
+
```typescript
|
|
3029
|
+
interface WhatsAppReplyCta {
|
|
3030
|
+
body: string
|
|
3031
|
+
buttonLabel: string
|
|
3032
|
+
buttonUrl: string
|
|
3033
|
+
}
|
|
3034
|
+
```
|
|
3035
|
+
|
|
3036
|
+
**WhatsAppReplyOptions** (interface)
|
|
3037
|
+
```typescript
|
|
3038
|
+
interface WhatsAppReplyOptions {
|
|
3039
|
+
contentSid?: string
|
|
3040
|
+
contentVariables?: Record<string, unknown>
|
|
3041
|
+
cta?: WhatsAppReplyCta
|
|
3042
|
+
text?: string
|
|
3043
|
+
}
|
|
3044
|
+
```
|
|
3045
|
+
|
|
3027
3046
|
**SendWhatsAppRequest** (interface)
|
|
3028
3047
|
```typescript
|
|
3029
3048
|
interface SendWhatsAppRequest {
|
|
3030
3049
|
phoneNumber?: string
|
|
3031
3050
|
redirectUrl?: string
|
|
3051
|
+
reply?: WhatsAppReplyOptions
|
|
3032
3052
|
}
|
|
3033
3053
|
```
|
|
3034
3054
|
|
package/dist/docs/auth-kit.md
CHANGED
|
@@ -88,9 +88,17 @@ import { authKit } from '@proveanything/smartlinks';
|
|
|
88
88
|
// 1) Send WhatsApp verification deep link
|
|
89
89
|
const wa = await authKit.sendWhatsApp(clientId);
|
|
90
90
|
|
|
91
|
-
// Optional: pass redirect context
|
|
91
|
+
// Optional: pass redirect context and/or a post-verification reply
|
|
92
92
|
// const wa = await authKit.sendWhatsApp(clientId, {
|
|
93
93
|
// redirectUrl: 'https://app.example.com/checkout/continue',
|
|
94
|
+
// reply: {
|
|
95
|
+
// cta: {
|
|
96
|
+
// body: "You're verified and ready to bid.",
|
|
97
|
+
// buttonLabel: 'Back to Auction',
|
|
98
|
+
// buttonUrl: '{{returnUrl}}',
|
|
99
|
+
// },
|
|
100
|
+
// text: "You're verified. Return to the app to continue.",
|
|
101
|
+
// },
|
|
94
102
|
// });
|
|
95
103
|
|
|
96
104
|
// wa.waLink can be opened directly by the app/browser
|
|
@@ -135,6 +143,27 @@ Verification status values returned by `authKit.getWhatsAppStatus` are:
|
|
|
135
143
|
- `expired`
|
|
136
144
|
- `unknown`
|
|
137
145
|
|
|
146
|
+
#### Post-verification reply
|
|
147
|
+
|
|
148
|
+
Pass a `reply` object in `sendWhatsApp` to send a message back to the user after they confirm `CONFIRM <token>`. Reply resolution order:
|
|
149
|
+
|
|
150
|
+
1. `reply.contentSid` — explicit Twilio Content SID
|
|
151
|
+
2. `reply.cta` — CTA shorthand using the shared generic Twilio Content template SID (`TWILIO_WHATSAPP_GENERIC_CTA_SID`)
|
|
152
|
+
3. `reply.text` — plain-text fallback
|
|
153
|
+
4. Per-client default (`authKit/{clientId}.whatsapp` config)
|
|
154
|
+
5. Built-in default text
|
|
155
|
+
|
|
156
|
+
The following template placeholders are available in `reply.text`, `reply.cta` fields, and `reply.contentVariables` values:
|
|
157
|
+
|
|
158
|
+
| Placeholder | Description |
|
|
159
|
+
|---|---|
|
|
160
|
+
| `{{returnUrl}}` | The resolved redirect URL |
|
|
161
|
+
| `{{phoneNumber}}` | The verified phone number |
|
|
162
|
+
| `{{clientId}}` | The Auth Kit client ID |
|
|
163
|
+
| `{{token}}` | The verification token |
|
|
164
|
+
|
|
165
|
+
> **Note:** `redirectUrl` is optional. WhatsApp tokens are short hex strings (16 chars) for better UX.
|
|
166
|
+
|
|
138
167
|
### Google OAuth
|
|
139
168
|
|
|
140
169
|
```ts
|
package/dist/openapi.yaml
CHANGED
|
@@ -17864,6 +17864,31 @@ components:
|
|
|
17864
17864
|
required:
|
|
17865
17865
|
- success
|
|
17866
17866
|
- message
|
|
17867
|
+
WhatsAppReplyCta:
|
|
17868
|
+
type: object
|
|
17869
|
+
properties:
|
|
17870
|
+
body:
|
|
17871
|
+
type: string
|
|
17872
|
+
buttonLabel:
|
|
17873
|
+
type: string
|
|
17874
|
+
buttonUrl:
|
|
17875
|
+
type: string
|
|
17876
|
+
required:
|
|
17877
|
+
- body
|
|
17878
|
+
- buttonLabel
|
|
17879
|
+
- buttonUrl
|
|
17880
|
+
WhatsAppReplyOptions:
|
|
17881
|
+
type: object
|
|
17882
|
+
properties:
|
|
17883
|
+
contentSid:
|
|
17884
|
+
type: string
|
|
17885
|
+
contentVariables:
|
|
17886
|
+
type: object
|
|
17887
|
+
additionalProperties: true
|
|
17888
|
+
cta:
|
|
17889
|
+
$ref: "#/components/schemas/WhatsAppReplyCta"
|
|
17890
|
+
text:
|
|
17891
|
+
type: string
|
|
17867
17892
|
SendWhatsAppRequest:
|
|
17868
17893
|
type: object
|
|
17869
17894
|
properties:
|
|
@@ -17871,6 +17896,8 @@ components:
|
|
|
17871
17896
|
type: string
|
|
17872
17897
|
redirectUrl:
|
|
17873
17898
|
type: string
|
|
17899
|
+
reply:
|
|
17900
|
+
$ref: "#/components/schemas/WhatsAppReplyOptions"
|
|
17874
17901
|
SendWhatsAppResponse:
|
|
17875
17902
|
type: object
|
|
17876
17903
|
properties:
|
package/dist/types/authKit.d.ts
CHANGED
|
@@ -76,9 +76,24 @@ export interface EmailVerifyTokenResponse {
|
|
|
76
76
|
emailVerificationMode?: 'immediate' | 'verify-auto-login' | 'verify-manual-login';
|
|
77
77
|
}
|
|
78
78
|
export type VerifyStatus = 'pending' | 'verified' | 'failed' | 'expired' | 'unknown';
|
|
79
|
+
export interface WhatsAppReplyCta {
|
|
80
|
+
body: string;
|
|
81
|
+
buttonLabel: string;
|
|
82
|
+
buttonUrl: string;
|
|
83
|
+
}
|
|
84
|
+
export interface WhatsAppReplyOptions {
|
|
85
|
+
/** Option A: explicit Twilio Content SID */
|
|
86
|
+
contentSid?: string;
|
|
87
|
+
contentVariables?: Record<string, unknown>;
|
|
88
|
+
/** Option B: CTA shorthand (uses shared generic CTA content SID) */
|
|
89
|
+
cta?: WhatsAppReplyCta;
|
|
90
|
+
/** Option C: plain-text fallback */
|
|
91
|
+
text?: string;
|
|
92
|
+
}
|
|
79
93
|
export interface SendWhatsAppRequest {
|
|
80
94
|
phoneNumber?: string;
|
|
81
95
|
redirectUrl?: string;
|
|
96
|
+
reply?: WhatsAppReplyOptions;
|
|
82
97
|
}
|
|
83
98
|
export interface SendWhatsAppResponse {
|
|
84
99
|
waLink: string;
|
package/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.13.
|
|
3
|
+
Version: 1.13.12 | Generated: 2026-05-14T16:00:33.063Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -3024,11 +3024,31 @@ interface EmailVerifyTokenResponse {
|
|
|
3024
3024
|
}
|
|
3025
3025
|
```
|
|
3026
3026
|
|
|
3027
|
+
**WhatsAppReplyCta** (interface)
|
|
3028
|
+
```typescript
|
|
3029
|
+
interface WhatsAppReplyCta {
|
|
3030
|
+
body: string
|
|
3031
|
+
buttonLabel: string
|
|
3032
|
+
buttonUrl: string
|
|
3033
|
+
}
|
|
3034
|
+
```
|
|
3035
|
+
|
|
3036
|
+
**WhatsAppReplyOptions** (interface)
|
|
3037
|
+
```typescript
|
|
3038
|
+
interface WhatsAppReplyOptions {
|
|
3039
|
+
contentSid?: string
|
|
3040
|
+
contentVariables?: Record<string, unknown>
|
|
3041
|
+
cta?: WhatsAppReplyCta
|
|
3042
|
+
text?: string
|
|
3043
|
+
}
|
|
3044
|
+
```
|
|
3045
|
+
|
|
3027
3046
|
**SendWhatsAppRequest** (interface)
|
|
3028
3047
|
```typescript
|
|
3029
3048
|
interface SendWhatsAppRequest {
|
|
3030
3049
|
phoneNumber?: string
|
|
3031
3050
|
redirectUrl?: string
|
|
3051
|
+
reply?: WhatsAppReplyOptions
|
|
3032
3052
|
}
|
|
3033
3053
|
```
|
|
3034
3054
|
|
package/docs/auth-kit.md
CHANGED
|
@@ -88,9 +88,17 @@ import { authKit } from '@proveanything/smartlinks';
|
|
|
88
88
|
// 1) Send WhatsApp verification deep link
|
|
89
89
|
const wa = await authKit.sendWhatsApp(clientId);
|
|
90
90
|
|
|
91
|
-
// Optional: pass redirect context
|
|
91
|
+
// Optional: pass redirect context and/or a post-verification reply
|
|
92
92
|
// const wa = await authKit.sendWhatsApp(clientId, {
|
|
93
93
|
// redirectUrl: 'https://app.example.com/checkout/continue',
|
|
94
|
+
// reply: {
|
|
95
|
+
// cta: {
|
|
96
|
+
// body: "You're verified and ready to bid.",
|
|
97
|
+
// buttonLabel: 'Back to Auction',
|
|
98
|
+
// buttonUrl: '{{returnUrl}}',
|
|
99
|
+
// },
|
|
100
|
+
// text: "You're verified. Return to the app to continue.",
|
|
101
|
+
// },
|
|
94
102
|
// });
|
|
95
103
|
|
|
96
104
|
// wa.waLink can be opened directly by the app/browser
|
|
@@ -135,6 +143,27 @@ Verification status values returned by `authKit.getWhatsAppStatus` are:
|
|
|
135
143
|
- `expired`
|
|
136
144
|
- `unknown`
|
|
137
145
|
|
|
146
|
+
#### Post-verification reply
|
|
147
|
+
|
|
148
|
+
Pass a `reply` object in `sendWhatsApp` to send a message back to the user after they confirm `CONFIRM <token>`. Reply resolution order:
|
|
149
|
+
|
|
150
|
+
1. `reply.contentSid` — explicit Twilio Content SID
|
|
151
|
+
2. `reply.cta` — CTA shorthand using the shared generic Twilio Content template SID (`TWILIO_WHATSAPP_GENERIC_CTA_SID`)
|
|
152
|
+
3. `reply.text` — plain-text fallback
|
|
153
|
+
4. Per-client default (`authKit/{clientId}.whatsapp` config)
|
|
154
|
+
5. Built-in default text
|
|
155
|
+
|
|
156
|
+
The following template placeholders are available in `reply.text`, `reply.cta` fields, and `reply.contentVariables` values:
|
|
157
|
+
|
|
158
|
+
| Placeholder | Description |
|
|
159
|
+
|---|---|
|
|
160
|
+
| `{{returnUrl}}` | The resolved redirect URL |
|
|
161
|
+
| `{{phoneNumber}}` | The verified phone number |
|
|
162
|
+
| `{{clientId}}` | The Auth Kit client ID |
|
|
163
|
+
| `{{token}}` | The verification token |
|
|
164
|
+
|
|
165
|
+
> **Note:** `redirectUrl` is optional. WhatsApp tokens are short hex strings (16 chars) for better UX.
|
|
166
|
+
|
|
138
167
|
### Google OAuth
|
|
139
168
|
|
|
140
169
|
```ts
|
package/openapi.yaml
CHANGED
|
@@ -17864,6 +17864,31 @@ components:
|
|
|
17864
17864
|
required:
|
|
17865
17865
|
- success
|
|
17866
17866
|
- message
|
|
17867
|
+
WhatsAppReplyCta:
|
|
17868
|
+
type: object
|
|
17869
|
+
properties:
|
|
17870
|
+
body:
|
|
17871
|
+
type: string
|
|
17872
|
+
buttonLabel:
|
|
17873
|
+
type: string
|
|
17874
|
+
buttonUrl:
|
|
17875
|
+
type: string
|
|
17876
|
+
required:
|
|
17877
|
+
- body
|
|
17878
|
+
- buttonLabel
|
|
17879
|
+
- buttonUrl
|
|
17880
|
+
WhatsAppReplyOptions:
|
|
17881
|
+
type: object
|
|
17882
|
+
properties:
|
|
17883
|
+
contentSid:
|
|
17884
|
+
type: string
|
|
17885
|
+
contentVariables:
|
|
17886
|
+
type: object
|
|
17887
|
+
additionalProperties: true
|
|
17888
|
+
cta:
|
|
17889
|
+
$ref: "#/components/schemas/WhatsAppReplyCta"
|
|
17890
|
+
text:
|
|
17891
|
+
type: string
|
|
17867
17892
|
SendWhatsAppRequest:
|
|
17868
17893
|
type: object
|
|
17869
17894
|
properties:
|
|
@@ -17871,6 +17896,8 @@ components:
|
|
|
17871
17896
|
type: string
|
|
17872
17897
|
redirectUrl:
|
|
17873
17898
|
type: string
|
|
17899
|
+
reply:
|
|
17900
|
+
$ref: "#/components/schemas/WhatsAppReplyOptions"
|
|
17874
17901
|
SendWhatsAppResponse:
|
|
17875
17902
|
type: object
|
|
17876
17903
|
properties:
|