@proveanything/smartlinks 2.1.42 → 2.1.44

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 { AuthLoginResponse, AppleLoginOptions, MicrosoftLoginOptions, RefreshResponse, LogoutResponse, PhoneSendCodeResponse, PhoneVerifyResponse, PasswordResetRequestResponse, VerifyResetTokenResponse, PasswordResetCompleteResponse, EmailVerificationActionResponse, EmailVerifyTokenResponse, AuthKitConfig, AuthKitConfigInput, AuthKitSetIdentityResponse, AuthKitInviteRequest, AuthKitInviteResponse, AuthKitSchema, AuthKitSettingsResponse, AuthKitSetupRequest, AuthKitSetupResponse, AuthKitEmailKind, AuthKitEmailPreview, AuthKitSecretLink, MagicLinkSendResponse, MagicLinkVerifyResponse, UserProfile, UpdateProfileResponse, ProfileUpdateData, SuccessResponse, SendWhatsAppRequest, SendWhatsAppResponse, ExchangeWhatsAppSessionResponse, VerifyWhatsAppResponse, WhatsAppStatusResponse, SendSmsVerifyRequest, SendSmsVerifyResponse, VerifySmsResponse, UpsertContactRequest, UpsertContactResponse, MfaChallengeSendResponse, MfaFinalizeResponse, MfaEnrollSendResponse, MfaTotpEnrollResponse, MfaEnrolledResponse, MfaFactor, MfaFactorsResponse, TrustedDevice } from "../types/authKit.js";
1
+ import type { AuthLoginResponse, AppleLoginOptions, MicrosoftLoginOptions, RefreshResponse, LogoutResponse, PhoneSendCodeResponse, PhoneVerifyResponse, PasswordResetRequestResponse, VerifyResetTokenResponse, PasswordResetCompleteResponse, EmailVerificationActionResponse, EmailVerifyTokenResponse, AuthKitConfig, AuthKitConfigInput, AuthKitSetIdentityResponse, AuthKitInviteRequest, AuthKitInviteResponse, AuthKitSchema, AuthKitSettingsResponse, AuthKitRedirectDomainsResponse, AuthKitSetupRequest, AuthKitSetupResponse, AuthKitEmailKind, AuthKitEmailPreview, AuthKitSecretLink, MagicLinkSendResponse, MagicLinkVerifyResponse, UserProfile, UpdateProfileResponse, ProfileUpdateData, SuccessResponse, SendWhatsAppRequest, SendWhatsAppResponse, ExchangeWhatsAppSessionResponse, VerifyWhatsAppResponse, WhatsAppStatusResponse, SendSmsVerifyRequest, SendSmsVerifyResponse, VerifySmsResponse, UpsertContactRequest, UpsertContactResponse, MfaChallengeSendResponse, MfaFinalizeResponse, MfaEnrollSendResponse, MfaTotpEnrollResponse, MfaEnrolledResponse, MfaFactor, MfaFactorsResponse, TrustedDevice } from "../types/authKit.js";
2
2
  /**
3
3
  * Namespace containing helper functions for the new AuthKit API.
4
4
  * Legacy collection-based authKit helpers retained (marked as *Legacy*).
@@ -333,6 +333,13 @@ export declare namespace authKit {
333
333
  function setup(collectionId: string, body?: AuthKitSetupRequest): Promise<AuthKitSetupResponse>;
334
334
  /** What sign-in does now: the stored config, every default filled in, which secrets are set (masked), and checks. */
335
335
  function settings(collectionId: string, authKitId: string): Promise<AuthKitSettingsResponse>;
336
+ /**
337
+ * Where this sign-in may send emailed links (password reset, magic link, verification): the domains that
338
+ * are automatic (connected to its own collections), the extra ones in its settings, and the connected
339
+ * domains of the caller's other collections it could also allow (offered only to an Owner of both).
340
+ * A page on a domain that isn't allowed still gets its link, via the same page on smartlinks.app.
341
+ */
342
+ function redirectDomains(collectionId: string, authKitId: string): Promise<AuthKitRedirectDomainsResponse>;
336
343
  /**
337
344
  * A one-time SmartLinks page where the PERSON types a secret (e.g. `linkedInClientSecret`) — so it never
338
345
  * passes through a chat or your code. Give them the `url`; it works once, for 30 minutes. Asking again
@@ -607,6 +607,16 @@ export var authKit;
607
607
  return request(`/admin/collection/${encodeURIComponent(collectionId)}/authKit/${encodeURIComponent(authKitId)}/settings`);
608
608
  }
609
609
  authKit.settings = settings;
610
+ /**
611
+ * Where this sign-in may send emailed links (password reset, magic link, verification): the domains that
612
+ * are automatic (connected to its own collections), the extra ones in its settings, and the connected
613
+ * domains of the caller's other collections it could also allow (offered only to an Owner of both).
614
+ * A page on a domain that isn't allowed still gets its link, via the same page on smartlinks.app.
615
+ */
616
+ async function redirectDomains(collectionId, authKitId) {
617
+ return request(`/admin/collection/${encodeURIComponent(collectionId)}/authKit/${encodeURIComponent(authKitId)}/redirect-domains`);
618
+ }
619
+ authKit.redirectDomains = redirectDomains;
610
620
  /**
611
621
  * A one-time SmartLinks page where the PERSON types a secret (e.g. `linkedInClientSecret`) — so it never
612
622
  * passes through a chat or your code. Give them the `url`; it works once, for 30 minutes. Asking again
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 2.1.42 | Generated: 2026-11-22T10:24:05.154Z
3
+ Version: 2.1.44 | Generated: 2026-11-23T13:04:11.379Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
@@ -5349,6 +5349,25 @@ interface AuthKitSettingsResponse {
5349
5349
  }
5350
5350
  ```
5351
5351
 
5352
+ **AuthKitRedirectDomain** (interface)
5353
+ ```typescript
5354
+ interface AuthKitRedirectDomain {
5355
+ domain: string
5356
+ collectionId: string
5357
+ title: string
5358
+ }
5359
+ ```
5360
+
5361
+ **AuthKitRedirectDomainsResponse** (interface)
5362
+ ```typescript
5363
+ interface AuthKitRedirectDomainsResponse {
5364
+ automatic: AuthKitRedirectDomain[]
5365
+ allowed: string[]
5366
+ suggested: AuthKitRedirectDomain[]
5367
+ canSuggest: boolean
5368
+ }
5369
+ ```
5370
+
5352
5371
  **AuthKitSetupRequest** (interface)
5353
5372
  ```typescript
5354
5373
  interface AuthKitSetupRequest {
@@ -14390,6 +14409,9 @@ Set up the collection's sign-in in one call, safe to repeat: finds its sign-in (
14390
14409
  **settings**(collectionId: string, authKitId: string) → `Promise<AuthKitSettingsResponse>`
14391
14410
  What sign-in does now: the stored config, every default filled in, which secrets are set (masked), and checks.
14392
14411
 
14412
+ **redirectDomains**(collectionId: string, authKitId: string) → `Promise<AuthKitRedirectDomainsResponse>`
14413
+ Where this sign-in may send emailed links (password reset, magic link, verification): the domains that are automatic (connected to its own collections), the extra ones in its settings, and the connected domains of the caller's other collections it could also allow (offered only to an Owner of both). A page on a domain that isn't allowed still gets its link, via the same page on smartlinks.app.
14414
+
14393
14415
  **secretEntryLink**(collectionId: string, authKitId: string, name: string, opts: { label?: string } = {}) → `Promise<AuthKitSecretLink>`
14394
14416
  A one-time SmartLinks page where the PERSON types a secret (e.g. `linkedInClientSecret`) — so it never passes through a chat or your code. Give them the `url`; it works once, for 30 minutes. Asking again replaces the link. Check it landed with {@link settings} (`secrets.<name>.set`).
14395
14417
 
@@ -87,8 +87,13 @@ being asked; `always` asks everyone who has one at every sign-in.
87
87
 
88
88
  **Redirects** — `redirectUrl`: the site's sign-in page (where invitations open; the default for
89
89
  emailed links). `afterSignInUrl`: where the site sends people after they sign in (the screens hand the session to the
90
- page's `onAuthSuccess`; the page reads `afterSignInUrl` from `authKit.load()` and goes there). `allowedRedirectDomains`: extra domains emailed links may return to (the collection's own domains
91
- and `*.smartlinks.host` are always allowed).
90
+ page's `onAuthSuccess`; the page reads `afterSignInUrl` from `authKit.load()` and goes there). `allowedRedirectDomains`: extra domains emailed links may return to (smartlinks.app, the connected
91
+ domains of the sign-in's own collections and their site addresses on smartlinks.host are always allowed).
92
+ `authKit.redirectDomains(collectionId, authKitId)` lists the automatic ones, the extra ones, and the
93
+ connected domains of your other collections you could add (offered only to an Owner of both — say a sister
94
+ collection's links domain where this collection's tags open). An emailed link for a page of one of the
95
+ sign-in's own collections (`/p/<collectionId>/…`) on a domain that isn't allowed is not refused: it opens
96
+ the same page on smartlinks.app.
92
97
 
93
98
  **The screens' look** — `branding`: `title`, `subtitle`, `registerTitle`, `registerSubtitle`,
94
99
  `logoUrl` (absent = SmartLinks logo, `''` = none), `primaryColor`, `secondaryColor`,
package/dist/openapi.yaml CHANGED
@@ -2249,6 +2249,38 @@ paths:
2249
2249
  application/json:
2250
2250
  schema:
2251
2251
  $ref: "#/components/schemas/AuthKitInviteRequest"
2252
+ /admin/collection/{collectionId}/authKit/{authKitId}/redirect-domains:
2253
+ get:
2254
+ tags:
2255
+ - authKit
2256
+ summary: "Where this sign-in may send emailed links (password reset, magic link, verification): the domains that are automatic (connected to its own collections), the extra ones in its settings, and the connected domains of the caller's other collections it could also allow (offered only to an Owner of both)."
2257
+ operationId: authKit_redirectDomains
2258
+ security:
2259
+ - bearerAuth: []
2260
+ parameters:
2261
+ - name: collectionId
2262
+ in: path
2263
+ required: true
2264
+ schema:
2265
+ type: string
2266
+ - name: authKitId
2267
+ in: path
2268
+ required: true
2269
+ schema:
2270
+ type: string
2271
+ responses:
2272
+ 200:
2273
+ description: Success
2274
+ content:
2275
+ application/json:
2276
+ schema:
2277
+ $ref: "#/components/schemas/AuthKitRedirectDomainsResponse"
2278
+ 400:
2279
+ description: Bad request
2280
+ 401:
2281
+ description: Unauthorized
2282
+ 404:
2283
+ description: Not found
2252
2284
  /admin/collection/{collectionId}/authKit/{authKitId}/secrets/{name}/link:
2253
2285
  post:
2254
2286
  tags:
@@ -10148,7 +10180,7 @@ paths:
10148
10180
  post:
10149
10181
  tags:
10150
10182
  - authKit
10151
- summary: authKit.linkedInLogin
10183
+ summary: Sign in with LinkedIn (OpenID Connect) via a server-side authorization code (public).
10152
10184
  operationId: authKit_linkedInLogin
10153
10185
  security: []
10154
10186
  parameters:
@@ -26031,6 +26063,41 @@ components:
26031
26063
  - effective
26032
26064
  - secrets
26033
26065
  - checks
26066
+ AuthKitRedirectDomain:
26067
+ type: object
26068
+ properties:
26069
+ domain:
26070
+ type: string
26071
+ collectionId:
26072
+ type: string
26073
+ title:
26074
+ type: string
26075
+ required:
26076
+ - domain
26077
+ - collectionId
26078
+ - title
26079
+ AuthKitRedirectDomainsResponse:
26080
+ type: object
26081
+ properties:
26082
+ automatic:
26083
+ type: array
26084
+ items:
26085
+ $ref: "#/components/schemas/AuthKitRedirectDomain"
26086
+ allowed:
26087
+ type: array
26088
+ items:
26089
+ type: string
26090
+ suggested:
26091
+ type: array
26092
+ items:
26093
+ $ref: "#/components/schemas/AuthKitRedirectDomain"
26094
+ canSuggest:
26095
+ type: boolean
26096
+ required:
26097
+ - automatic
26098
+ - allowed
26099
+ - suggested
26100
+ - canSuggest
26034
26101
  AuthKitSetupRequest:
26035
26102
  type: object
26036
26103
  properties:
@@ -704,6 +704,28 @@ export interface AuthKitSettingsResponse {
704
704
  }>;
705
705
  checks: AuthKitCheck[];
706
706
  }
707
+ /** A domain in {@link authKit.redirectDomains}. */
708
+ export interface AuthKitRedirectDomain {
709
+ domain: string;
710
+ /** The collection the domain is connected to. */
711
+ collectionId: string;
712
+ /** That collection's name. */
713
+ title: string;
714
+ }
715
+ /** {@link authKit.redirectDomains}: where this sign-in may send emailed links (password reset, magic link, verification). */
716
+ export interface AuthKitRedirectDomainsResponse {
717
+ /** Connected domains of the collections this sign-in serves: always allowed. */
718
+ automatic: AuthKitRedirectDomain[];
719
+ /** The extra domains in its settings (`allowedRedirectDomains`). */
720
+ allowed: string[];
721
+ /**
722
+ * Connected domains of the caller's OTHER collections, where the caller is an Owner of both: add one to
723
+ * `allowedRedirectDomains` to trust it. Never added automatically.
724
+ */
725
+ suggested: AuthKitRedirectDomain[];
726
+ /** The caller is an Owner of this collection (only owners are offered other collections' domains). */
727
+ canSuggest: boolean;
728
+ }
707
729
  /** Body of {@link authKit.setup}. */
708
730
  export interface AuthKitSetupRequest {
709
731
  /** For a new sign-in. */
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 2.1.42 | Generated: 2026-11-22T10:24:05.154Z
3
+ Version: 2.1.44 | Generated: 2026-11-23T13:04:11.379Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
@@ -5349,6 +5349,25 @@ interface AuthKitSettingsResponse {
5349
5349
  }
5350
5350
  ```
5351
5351
 
5352
+ **AuthKitRedirectDomain** (interface)
5353
+ ```typescript
5354
+ interface AuthKitRedirectDomain {
5355
+ domain: string
5356
+ collectionId: string
5357
+ title: string
5358
+ }
5359
+ ```
5360
+
5361
+ **AuthKitRedirectDomainsResponse** (interface)
5362
+ ```typescript
5363
+ interface AuthKitRedirectDomainsResponse {
5364
+ automatic: AuthKitRedirectDomain[]
5365
+ allowed: string[]
5366
+ suggested: AuthKitRedirectDomain[]
5367
+ canSuggest: boolean
5368
+ }
5369
+ ```
5370
+
5352
5371
  **AuthKitSetupRequest** (interface)
5353
5372
  ```typescript
5354
5373
  interface AuthKitSetupRequest {
@@ -14390,6 +14409,9 @@ Set up the collection's sign-in in one call, safe to repeat: finds its sign-in (
14390
14409
  **settings**(collectionId: string, authKitId: string) → `Promise<AuthKitSettingsResponse>`
14391
14410
  What sign-in does now: the stored config, every default filled in, which secrets are set (masked), and checks.
14392
14411
 
14412
+ **redirectDomains**(collectionId: string, authKitId: string) → `Promise<AuthKitRedirectDomainsResponse>`
14413
+ Where this sign-in may send emailed links (password reset, magic link, verification): the domains that are automatic (connected to its own collections), the extra ones in its settings, and the connected domains of the caller's other collections it could also allow (offered only to an Owner of both). A page on a domain that isn't allowed still gets its link, via the same page on smartlinks.app.
14414
+
14393
14415
  **secretEntryLink**(collectionId: string, authKitId: string, name: string, opts: { label?: string } = {}) → `Promise<AuthKitSecretLink>`
14394
14416
  A one-time SmartLinks page where the PERSON types a secret (e.g. `linkedInClientSecret`) — so it never passes through a chat or your code. Give them the `url`; it works once, for 30 minutes. Asking again replaces the link. Check it landed with {@link settings} (`secrets.<name>.set`).
14395
14417
 
package/docs/auth-kit.md CHANGED
@@ -87,8 +87,13 @@ being asked; `always` asks everyone who has one at every sign-in.
87
87
 
88
88
  **Redirects** — `redirectUrl`: the site's sign-in page (where invitations open; the default for
89
89
  emailed links). `afterSignInUrl`: where the site sends people after they sign in (the screens hand the session to the
90
- page's `onAuthSuccess`; the page reads `afterSignInUrl` from `authKit.load()` and goes there). `allowedRedirectDomains`: extra domains emailed links may return to (the collection's own domains
91
- and `*.smartlinks.host` are always allowed).
90
+ page's `onAuthSuccess`; the page reads `afterSignInUrl` from `authKit.load()` and goes there). `allowedRedirectDomains`: extra domains emailed links may return to (smartlinks.app, the connected
91
+ domains of the sign-in's own collections and their site addresses on smartlinks.host are always allowed).
92
+ `authKit.redirectDomains(collectionId, authKitId)` lists the automatic ones, the extra ones, and the
93
+ connected domains of your other collections you could add (offered only to an Owner of both — say a sister
94
+ collection's links domain where this collection's tags open). An emailed link for a page of one of the
95
+ sign-in's own collections (`/p/<collectionId>/…`) on a domain that isn't allowed is not refused: it opens
96
+ the same page on smartlinks.app.
92
97
 
93
98
  **The screens' look** — `branding`: `title`, `subtitle`, `registerTitle`, `registerSubtitle`,
94
99
  `logoUrl` (absent = SmartLinks logo, `''` = none), `primaryColor`, `secondaryColor`,
package/openapi.yaml CHANGED
@@ -2249,6 +2249,38 @@ paths:
2249
2249
  application/json:
2250
2250
  schema:
2251
2251
  $ref: "#/components/schemas/AuthKitInviteRequest"
2252
+ /admin/collection/{collectionId}/authKit/{authKitId}/redirect-domains:
2253
+ get:
2254
+ tags:
2255
+ - authKit
2256
+ summary: "Where this sign-in may send emailed links (password reset, magic link, verification): the domains that are automatic (connected to its own collections), the extra ones in its settings, and the connected domains of the caller's other collections it could also allow (offered only to an Owner of both)."
2257
+ operationId: authKit_redirectDomains
2258
+ security:
2259
+ - bearerAuth: []
2260
+ parameters:
2261
+ - name: collectionId
2262
+ in: path
2263
+ required: true
2264
+ schema:
2265
+ type: string
2266
+ - name: authKitId
2267
+ in: path
2268
+ required: true
2269
+ schema:
2270
+ type: string
2271
+ responses:
2272
+ 200:
2273
+ description: Success
2274
+ content:
2275
+ application/json:
2276
+ schema:
2277
+ $ref: "#/components/schemas/AuthKitRedirectDomainsResponse"
2278
+ 400:
2279
+ description: Bad request
2280
+ 401:
2281
+ description: Unauthorized
2282
+ 404:
2283
+ description: Not found
2252
2284
  /admin/collection/{collectionId}/authKit/{authKitId}/secrets/{name}/link:
2253
2285
  post:
2254
2286
  tags:
@@ -10148,7 +10180,7 @@ paths:
10148
10180
  post:
10149
10181
  tags:
10150
10182
  - authKit
10151
- summary: authKit.linkedInLogin
10183
+ summary: Sign in with LinkedIn (OpenID Connect) via a server-side authorization code (public).
10152
10184
  operationId: authKit_linkedInLogin
10153
10185
  security: []
10154
10186
  parameters:
@@ -26031,6 +26063,41 @@ components:
26031
26063
  - effective
26032
26064
  - secrets
26033
26065
  - checks
26066
+ AuthKitRedirectDomain:
26067
+ type: object
26068
+ properties:
26069
+ domain:
26070
+ type: string
26071
+ collectionId:
26072
+ type: string
26073
+ title:
26074
+ type: string
26075
+ required:
26076
+ - domain
26077
+ - collectionId
26078
+ - title
26079
+ AuthKitRedirectDomainsResponse:
26080
+ type: object
26081
+ properties:
26082
+ automatic:
26083
+ type: array
26084
+ items:
26085
+ $ref: "#/components/schemas/AuthKitRedirectDomain"
26086
+ allowed:
26087
+ type: array
26088
+ items:
26089
+ type: string
26090
+ suggested:
26091
+ type: array
26092
+ items:
26093
+ $ref: "#/components/schemas/AuthKitRedirectDomain"
26094
+ canSuggest:
26095
+ type: boolean
26096
+ required:
26097
+ - automatic
26098
+ - allowed
26099
+ - suggested
26100
+ - canSuggest
26034
26101
  AuthKitSetupRequest:
26035
26102
  type: object
26036
26103
  properties:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proveanything/smartlinks",
3
- "version": "2.1.42",
3
+ "version": "2.1.44",
4
4
  "description": "Official JavaScript/TypeScript SDK for the Smartlinks API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",