@proveanything/smartlinks 2.0.67 → 2.0.68

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/index.d.ts CHANGED
@@ -41,4 +41,4 @@ AdminMobileHostContext, AdminMobileComponentManifest, AdminMobileBundleManifest,
41
41
  MobileAdminBundleManifest, } from './mobile-admin/types.js';
42
42
  export { HostCapabilityUnavailableError, HostPermissionDeniedError, HostTimeoutError, HostCancelledError, } from './mobile-admin/errors.js';
43
43
  export type { NativeCapability, NativeFacade, ShareFacade, ClipboardFacade, HapticImpactStyle, HapticNotificationStyle, HapticsFacade, NetworkStatus, NetworkFacade, DeviceInfo, DeviceFacade, StorageFacade, QrScanOptions, QrFacade, AuthFacade, NfcReadResult, NfcFacade, RfidScanOptions, RfidFacade, EventsFacade, WebSourceMode, WebSourceConfig, WebSourceFacade, } from './native/types.js';
44
- export type { AuthKitUser, UserProfile, ProfileUpdateData, UpdateProfileResponse, SuccessResponse, AuthLoginResponse, AppleLoginOptions, AuthKitErrorCode, RefreshResponse, LogoutResponse, RefreshErrorCode, MagicLinkSendResponse, MagicLinkVerifyResponse, PhoneSendCodeResponse, PhoneVerifyResponse, PasswordResetRequestResponse, VerifyResetTokenResponse, PasswordResetCompleteResponse, EmailVerificationActionResponse, EmailVerifyTokenResponse, VerifyStatus, WhatsAppReplyCta, WhatsAppReplyOptions, WhatsAppContactData, SendWhatsAppRequest, SendWhatsAppResponse, ExchangeWhatsAppSessionResponse, VerifyWhatsAppResponse, WhatsAppStatusResponse, SendSmsVerifyRequest, SendSmsVerifyResponse, VerifySmsResponse, UpsertContactRequest, UpsertContactResponse, AuthKitBrandingConfig, AuthKitConfig, AuthKitConfigInput, AuthKitSecurityConfig, AuthKitPasswordPolicy, AuthKitSessionPolicy, AuthKitLockoutPolicy, PasswordPolicyErrorCode, LoginSecurityErrorCode, } from './types/authKit.js';
44
+ export type { AuthKitUser, UserProfile, ProfileUpdateData, UpdateProfileResponse, SuccessResponse, AuthLoginResponse, AppleLoginOptions, AuthKitErrorCode, RefreshResponse, LogoutResponse, RefreshErrorCode, MagicLinkSendResponse, MagicLinkVerifyResponse, PhoneSendCodeResponse, PhoneVerifyResponse, PasswordResetRequestResponse, VerifyResetTokenResponse, PasswordResetCompleteResponse, EmailVerificationActionResponse, EmailVerifyTokenResponse, VerifyStatus, WhatsAppReplyCta, WhatsAppReplyOptions, WhatsAppContactData, SendWhatsAppRequest, SendWhatsAppResponse, ExchangeWhatsAppSessionResponse, VerifyWhatsAppResponse, WhatsAppStatusResponse, SendSmsVerifyRequest, SendSmsVerifyResponse, VerifySmsResponse, UpsertContactRequest, UpsertContactResponse, AuthKitBrandingConfig, AuthKitConfig, AuthKitConfigInput, AuthKitSecurityConfig, AuthKitIdentity, AuthKitSetIdentityResponse, AuthKitPasswordPolicy, AuthKitSessionPolicy, AuthKitLockoutPolicy, PasswordPolicyErrorCode, LoginSecurityErrorCode, } from './types/authKit.js';
package/dist/openapi.yaml CHANGED
@@ -2077,6 +2077,45 @@ paths:
2077
2077
  description: Unauthorized
2078
2078
  404:
2079
2079
  description: Not found
2080
+ /admin/collection/{collectionId}/authKit/{authKitId}/identity:
2081
+ post:
2082
+ tags:
2083
+ - authKit
2084
+ summary: "Give this AuthKit its **own logins** (admin): its members become accounts of this site only — the same email can be a separate account, with its own password, on another site — rather than SmartLinks accounts shared across sites."
2085
+ operationId: authKit_setIdentity
2086
+ security:
2087
+ - bearerAuth: []
2088
+ parameters:
2089
+ - name: collectionId
2090
+ in: path
2091
+ required: true
2092
+ schema:
2093
+ type: string
2094
+ - name: authKitId
2095
+ in: path
2096
+ required: true
2097
+ schema:
2098
+ type: string
2099
+ responses:
2100
+ 200:
2101
+ description: Success
2102
+ content:
2103
+ application/json:
2104
+ schema:
2105
+ $ref: "#/components/schemas/AuthKitSetIdentityResponse"
2106
+ 400:
2107
+ description: Bad request
2108
+ 401:
2109
+ description: Unauthorized
2110
+ 404:
2111
+ description: Not found
2112
+ requestBody:
2113
+ required: true
2114
+ content:
2115
+ application/json:
2116
+ schema:
2117
+ type: object
2118
+ additionalProperties: true
2080
2119
  /admin/collection/{collectionId}/batch:
2081
2120
  get:
2082
2121
  tags:
@@ -3715,7 +3754,7 @@ paths:
3715
3754
  get:
3716
3755
  tags:
3717
3756
  - collection
3718
- summary: "Get the managed-certificate status for a collection's custom domain (admin only)."
3757
+ summary: "Get the certificate status of the collection's own domain (admin only)."
3719
3758
  operationId: collection_getDomainStatus
3720
3759
  security:
3721
3760
  - bearerAuth: []
@@ -3740,7 +3779,7 @@ paths:
3740
3779
  post:
3741
3780
  tags:
3742
3781
  - collection
3743
- summary: Register a custom domain for a collection and provision its managed certificate (admin only).
3782
+ summary: "Connect one of the collection's own domains and start its certificate (admin only)."
3744
3783
  operationId: collection_registerDomain
3745
3784
  security:
3746
3785
  - bearerAuth: []
@@ -9207,7 +9246,7 @@ paths:
9207
9246
  post:
9208
9247
  tags:
9209
9248
  - authKit
9210
- summary: authKit.linkedInLogin
9249
+ summary: Sign in with LinkedIn (OpenID Connect) via a server-side authorization code (public).
9211
9250
  operationId: authKit_linkedInLogin
9212
9251
  security: []
9213
9252
  parameters:
@@ -23327,8 +23366,38 @@ components:
23327
23366
  type: string
23328
23367
  security:
23329
23368
  $ref: "#/components/schemas/AuthKitSecurityConfig"
23369
+ collectionIds:
23370
+ type: array
23371
+ items:
23372
+ type: string
23373
+ identity:
23374
+ $ref: "#/components/schemas/AuthKitIdentity"
23330
23375
  required:
23331
23376
  - id
23377
+ AuthKitIdentity:
23378
+ type: object
23379
+ properties:
23380
+ mode:
23381
+ type: string
23382
+ enum:
23383
+ - shared
23384
+ - own
23385
+ tenantId:
23386
+ type: string
23387
+ createdAt:
23388
+ type: string
23389
+ required:
23390
+ - mode
23391
+ AuthKitSetIdentityResponse:
23392
+ type: object
23393
+ properties:
23394
+ identity:
23395
+ $ref: "#/components/schemas/AuthKitIdentity"
23396
+ message:
23397
+ type: string
23398
+ required:
23399
+ - identity
23400
+ - message
23332
23401
  AuthKitSecurityConfig:
23333
23402
  type: object
23334
23403
  properties:
@@ -407,6 +407,26 @@ export interface AuthKitConfig {
407
407
  * server-side. See {@link AuthKitSecurityConfig}.
408
408
  */
409
409
  security?: AuthKitSecurityConfig;
410
+ /** The collections this AuthKit serves. */
411
+ collectionIds?: string[];
412
+ /**
413
+ * Which user pool this site's members sign in to. Absent or `shared` = the SmartLinks account (the
414
+ * same account on every site that uses it). `own` = the site's own members (a separate account per
415
+ * site, its own passwords). Switch with {@link authKit.setIdentity}; never via create/update.
416
+ */
417
+ identity?: AuthKitIdentity;
418
+ }
419
+ /** An AuthKit's member pool. */
420
+ export interface AuthKitIdentity {
421
+ mode: 'shared' | 'own';
422
+ /** The site's own pool (set by the platform). */
423
+ tenantId?: string;
424
+ createdAt?: string;
425
+ }
426
+ /** Result of {@link authKit.setIdentity}. */
427
+ export interface AuthKitSetIdentityResponse {
428
+ identity: AuthKitIdentity;
429
+ message: string;
410
430
  }
411
431
  /**
412
432
  * Writable shape for `authKit.create` / `authKit.update` (admin). Known fields are
@@ -424,7 +444,7 @@ export interface AuthKitConfig {
424
444
  * })
425
445
  * ```
426
446
  */
427
- export type AuthKitConfigInput = Partial<Omit<AuthKitConfig, 'id' | 'updatedAt'>> & Record<string, any>;
447
+ export type AuthKitConfigInput = Partial<Omit<AuthKitConfig, 'id' | 'updatedAt' | 'identity'>> & Record<string, any>;
428
448
  /**
429
449
  * Per-collection account-security policy. The API **enforces** all of this; the
430
450
  * client uses `passwordPolicy` (live checklist) and `session` (idle sign-out) for UX.
@@ -93,11 +93,13 @@ export type CollectionResponse = Collection;
93
93
  export type CollectionCreateRequest = Omit<Collection, 'id' | 'shortId'>;
94
94
  export type CollectionUpdateRequest = Partial<Omit<Collection, 'id' | 'shortId'>>;
95
95
  /**
96
- * Which load balancer / certificate map a custom domain registration targets.
97
- * - `"smartlinks"` (default): the id.smartlinks.app load balancer (legacy behaviour)
98
- * - `"hub"`: the SmartLinks Hub load balancer
96
+ * What a collection's own domain is for:
97
+ * - `"links"` (default): a links domain (e.g. `id.brand.com`) — GS1 Digital Links, short links and QR
98
+ * codes, the portal, and the API and sign-in on the brand's domain. Stored as `redirectUrl`.
99
+ * - `"site"`: a site domain — the collection's Hub (`hubCustomDomain`), or an app website when an
100
+ * `appId` is given. Served through the site runtime (CNAME to `cname.smartlinks.host`).
99
101
  */
100
- export type DomainTarget = "smartlinks" | "hub";
102
+ export type DomainTarget = "links" | "site";
101
103
  /**
102
104
  * Response from checking whether a Hub subdomain name is available.
103
105
  */
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 2.0.67 | Generated: 2026-10-15T17:52:10.614Z
3
+ Version: 2.0.68 | Generated: 2026-10-17T10:04:22.637Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
@@ -4864,6 +4864,25 @@ interface AuthKitConfig {
4864
4864
  redirectUrl?: string
4865
4865
  updatedAt?: string
4866
4866
  security?: AuthKitSecurityConfig
4867
+ collectionIds?: string[]
4868
+ identity?: AuthKitIdentity
4869
+ }
4870
+ ```
4871
+
4872
+ **AuthKitIdentity** (interface)
4873
+ ```typescript
4874
+ interface AuthKitIdentity {
4875
+ mode: 'shared' | 'own'
4876
+ tenantId?: string
4877
+ createdAt?: string
4878
+ }
4879
+ ```
4880
+
4881
+ **AuthKitSetIdentityResponse** (interface)
4882
+ ```typescript
4883
+ interface AuthKitSetIdentityResponse {
4884
+ identity: AuthKitIdentity
4885
+ message: string
4867
4886
  }
4868
4887
  ```
4869
4888
 
@@ -5362,7 +5381,7 @@ interface InviteUserInput {
5362
5381
 
5363
5382
  **CollectionUpdateRequest** = `Partial<Omit<Collection, 'id' | 'shortId'>>`
5364
5383
 
5365
- **DomainTarget** = `"smartlinks" | "hub"`
5384
+ **DomainTarget** = `"links" | "site"`
5366
5385
 
5367
5386
  **CollectionAccessLevel** = `'Owner' | 'Admin' | 'Assigner' | 'Reporter' | 'User' | 'None'`
5368
5387
 
@@ -11323,8 +11342,11 @@ Create an AuthKit client config (admin). Accepts the account `security` policy
11323
11342
  **update**(collectionId: string, authKitId: string, data: AuthKitConfigInput) → `Promise<AuthKitConfig>`
11324
11343
  Update an AuthKit client config (admin). This is how the account **security policy** is written — pass a `security` block ({@link AuthKitSecurityConfig}). The server validates it and enforces it; the login UI reads the public subset back via {@link load}.
11325
11344
 
11345
+ **setIdentity**(collectionId: string, authKitId: string, body: { mode: 'own' }) → `Promise<AuthKitSetIdentityResponse>`
11346
+ Give this AuthKit its **own logins** (admin): its members become accounts of this site only — the same email can be a separate account, with its own password, on another site — rather than SmartLinks accounts shared across sites. One way: a site with its own members can't go back to the shared pool. Members who signed up before keep their SmartLinks account until moved across. Errors: `MEMBER_POOL_CONFLICT` (409) when another AuthKit already gives one of its collections its own logins (one per collection); `PERMISSION_DENIED` (403) unless you administer every collection it serves.
11347
+
11326
11348
  **remove**(collectionId: string, authKitId: string) → `Promise<void>`
11327
- Update an AuthKit client config (admin). This is how the account **security policy** is written — pass a `security` block ({@link AuthKitSecurityConfig}). The server validates it and enforces it; the login UI reads the public subset back via {@link load}.
11349
+ Give this AuthKit its **own logins** (admin): its members become accounts of this site only — the same email can be a separate account, with its own password, on another site — rather than SmartLinks accounts shared across sites. One way: a site with its own members can't go back to the shared pool. Members who signed up before keep their SmartLinks account until moved across. Errors: `MEMBER_POOL_CONFLICT` (409) when another AuthKit already gives one of its collections its own logins (one per collection); `PERMISSION_DENIED` (403) unless you administer every collection it serves.
11328
11350
 
11329
11351
  ### batch
11330
11352
 
@@ -11514,11 +11536,14 @@ Check whether a Hub subdomain name is available to claim (admin only).
11514
11536
  **claimHub**(collectionId: string, hubName: string) → `Promise<CollectionResponse>`
11515
11537
  Claim or rename the Hub subdomain for a collection (admin only). Maps `{hubName}.smartlinks.host` to the collection. If the collection already had a different hub name, the previous subdomain is released automatically.
11516
11538
 
11517
- **registerDomain**(collectionId: string, domain: string, target: DomainTarget = "smartlinks") → `Promise<any>`
11518
- Register a custom domain for a collection and provision its managed certificate (admin only). `"smartlinks"` (the id.smartlinks.app load balancer). Pass `"hub"` to register a bring-your-own Hub domain.
11539
+ **registerDomain**(collectionId: string, domain: string, target: DomainTarget = "links") → `Promise<any>`
11540
+ Connect one of the collection's own domains and start its certificate (admin only). or `"site"` for the collection's Hub domain.
11541
+
11542
+ **getDomainStatus**(collectionId: string, target: DomainTarget = "links") → `Promise<any>`
11543
+ Get the certificate status of the collection's own domain (admin only). or `"site"` (its Hub domain, `hubCustomDomain`)
11519
11544
 
11520
- **getDomainStatus**(collectionId: string, target: DomainTarget = "smartlinks") → `Promise<any>`
11521
- Get the managed-certificate status for a collection's custom domain (admin only). or `"hub"` (uses `hubCustomDomain`)
11545
+ **releaseDomain**(collectionId: string, domain: string) → `Promise<`
11546
+ Remove the collection's links domain (admin only). It stops working straight away: QR codes, GS1 Digital Links and short links printed with it no longer open. Its certificate goes and `redirectUrl` is cleared. (Site domains are removed from the site's settings.)
11522
11547
 
11523
11548
  **getSettings**(collectionId: string, settingGroup: string, admin?: boolean) → `Promise<any>`
11524
11549
  Retrieve a specific settings group for a collection. Public reads return the public view of the settings group. If the stored payload contains a top-level `admin` object, that block is omitted from public responses and included when `admin === true`.
@@ -11538,29 +11563,29 @@ Update a collection (admin only).
11538
11563
  **remove**(collectionId: string) → `Promise<void>`
11539
11564
  Delete a collection (admin only).
11540
11565
 
11541
- **getSN**(collectionId: string,
11542
- startIndex: number = 0,
11566
+ **getSN**(collectionId: string,
11567
+ startIndex: number = 0,
11543
11568
  count: number = 10) → `Promise<any>`
11544
11569
  Get serial numbers for a collection (admin only).
11545
11570
 
11546
- **lookupSN**(collectionId: string,
11571
+ **lookupSN**(collectionId: string,
11547
11572
  codeId: string) → `Promise<any>`
11548
11573
  Look up a serial number by code for a collection (admin only).
11549
11574
 
11550
- **assignSN**(collectionId: string,
11551
- codeId: string,
11575
+ **assignSN**(collectionId: string,
11576
+ codeId: string,
11552
11577
  value: any) → `Promise<any>`
11553
11578
  Assign a value to a serial number for a collection (admin only).
11554
11579
 
11555
11580
  **getUsers**(collectionId: string) → `Promise<CollectionUser[]>`
11556
11581
  List the users with access to a collection, each with their access level (admin only). Access is stored in the collection's `roles` map (userId → level); this resolves each to name/email. GET /admin/collection/:collectionId/getUsers
11557
11582
 
11558
- **setUserAccess**(collectionId: string,
11559
- userId: string,
11583
+ **setUserAccess**(collectionId: string,
11584
+ userId: string,
11560
11585
  access: CollectionAccessLevel | null) → `Promise<void>`
11561
11586
  Grant, change, or remove a user's access level on a collection (admin only). Pass `null` or `'None'` to remove access. The server enforces privilege-escalation rules — you cannot grant an access level above your own, nor change a user whose level is above yours. POST /admin/collection/:collectionId/updateUserAccess
11562
11587
 
11563
- **inviteUser**(collectionId: string,
11588
+ **inviteUser**(collectionId: string,
11564
11589
  input: InviteUserInput) → `Promise<`
11565
11590
  Invite a user to a collection by email (admin only). Creates or links their account in the login / auth-kit collection (`loginCollectionId`, default `'global'`) and emails them an invite (new account) or an added-to-collection notice (existing account); returns their `uid`. This does NOT grant access on its own — follow with {@link setUserAccess} to set their level (this mirrors the console flow). POST /user/inviteUser
11566
11591