@proveanything/smartlinks 2.0.69 → 2.0.70

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.
@@ -587,7 +587,10 @@ Key records to the returned canonical `id`, and refuse `null` — otherwise anyo
587
587
  empty fields** — it never overwrites a name or field the contact already has, because a visitor's typed
588
588
  details are unverified. It's race-safe: two simultaneous entries with one email end on one contact.
589
589
  Returns `{ contactId, created }`. `forCaller()` is the signed-in caller's own contact (`null` when
590
- anonymous). **Never return contact ids to public callers** — keep them on your records.
590
+ anonymous): `{ contactId, email, phone, firstName, lastName, displayName, tags, customFields }`. Use it
591
+ to check what a member is before returning member-only content — a level the staff set
592
+ (`customFields.level`), a tag. It includes staff-only fields, so return only what the caller may see
593
+ (see members.md). **Never return contact ids to public callers** — keep them on your records.
591
594
 
592
595
  This is not consent. A ticked "keep me updated" box is evidence you can record (below); subscribing
593
596
  someone to marketing is the double opt-in flow (`comms.signup`, see comms.md).
package/openapi.yaml CHANGED
@@ -2116,6 +2116,44 @@ paths:
2116
2116
  schema:
2117
2117
  type: object
2118
2118
  additionalProperties: true
2119
+ /admin/collection/{collectionId}/authKit/{authKitId}/invite:
2120
+ post:
2121
+ tags:
2122
+ - authKit
2123
+ summary: Invite someone to be a member of a site with its own logins (admin).
2124
+ operationId: authKit_invite
2125
+ security:
2126
+ - bearerAuth: []
2127
+ parameters:
2128
+ - name: collectionId
2129
+ in: path
2130
+ required: true
2131
+ schema:
2132
+ type: string
2133
+ - name: authKitId
2134
+ in: path
2135
+ required: true
2136
+ schema:
2137
+ type: string
2138
+ responses:
2139
+ 200:
2140
+ description: Success
2141
+ content:
2142
+ application/json:
2143
+ schema:
2144
+ $ref: "#/components/schemas/AuthKitInviteResponse"
2145
+ 400:
2146
+ description: Bad request
2147
+ 401:
2148
+ description: Unauthorized
2149
+ 404:
2150
+ description: Not found
2151
+ requestBody:
2152
+ required: true
2153
+ content:
2154
+ application/json:
2155
+ schema:
2156
+ $ref: "#/components/schemas/AuthKitInviteRequest"
2119
2157
  /admin/collection/{collectionId}/batch:
2120
2158
  get:
2121
2159
  tags:
@@ -9898,10 +9936,7 @@ paths:
9898
9936
  content:
9899
9937
  application/json:
9900
9938
  schema:
9901
- type: string
9902
- enum:
9903
- - email
9904
- - sms
9939
+ $ref: "#/components/schemas/MfaFactor"
9905
9940
  /authkit/{clientId}/mfa/challenge/verify:
9906
9941
  post:
9907
9942
  tags:
@@ -10058,6 +10093,58 @@ paths:
10058
10093
  description: Unauthorized
10059
10094
  404:
10060
10095
  description: Not found
10096
+ /authkit/{clientId}/mfa/factors/totp/confirm:
10097
+ post:
10098
+ tags:
10099
+ - authKit
10100
+ summary: Confirm authenticator-app enrollment with the 6-digit code the app shows (authenticated).
10101
+ operationId: authKit_confirmTotpMfa
10102
+ security: []
10103
+ parameters:
10104
+ - name: clientId
10105
+ in: path
10106
+ required: true
10107
+ schema:
10108
+ type: string
10109
+ responses:
10110
+ 200:
10111
+ description: Success
10112
+ content:
10113
+ application/json:
10114
+ schema:
10115
+ $ref: "#/components/schemas/MfaEnrolledResponse"
10116
+ 400:
10117
+ description: Bad request
10118
+ 401:
10119
+ description: Unauthorized
10120
+ 404:
10121
+ description: Not found
10122
+ /authkit/{clientId}/mfa/factors/totp/enroll:
10123
+ post:
10124
+ tags:
10125
+ - authKit
10126
+ summary: "Begin authenticator-app enrollment (authenticated): a new secret for Google Authenticator, Microsoft Authenticator, 1Password and the like."
10127
+ operationId: authKit_enrollTotpMfa
10128
+ security: []
10129
+ parameters:
10130
+ - name: clientId
10131
+ in: path
10132
+ required: true
10133
+ schema:
10134
+ type: string
10135
+ responses:
10136
+ 200:
10137
+ description: Success
10138
+ content:
10139
+ application/json:
10140
+ schema:
10141
+ $ref: "#/components/schemas/MfaTotpEnrollResponse"
10142
+ 400:
10143
+ description: Bad request
10144
+ 401:
10145
+ description: Unauthorized
10146
+ 404:
10147
+ description: Not found
10061
10148
  /authkit/{clientId}/mfa/factors/{factor}:
10062
10149
  get:
10063
10150
  tags:
@@ -19790,6 +19877,37 @@ components:
19790
19877
  - userId
19791
19878
  - anonymous
19792
19879
  - via
19880
+ CallerContact:
19881
+ type: object
19882
+ properties:
19883
+ contactId:
19884
+ type: string
19885
+ email:
19886
+ type: string
19887
+ phone:
19888
+ type: string
19889
+ firstName:
19890
+ type: string
19891
+ lastName:
19892
+ type: string
19893
+ displayName:
19894
+ type: string
19895
+ tags:
19896
+ type: array
19897
+ items:
19898
+ type: string
19899
+ customFields:
19900
+ type: object
19901
+ additionalProperties: true
19902
+ required:
19903
+ - contactId
19904
+ - email
19905
+ - phone
19906
+ - firstName
19907
+ - lastName
19908
+ - displayName
19909
+ - tags
19910
+ - customFields
19793
19911
  ServerFunctionContext:
19794
19912
  type: object
19795
19913
  properties:
@@ -22894,15 +23012,9 @@ components:
22894
23012
  availableFactors:
22895
23013
  type: array
22896
23014
  items:
22897
- type: string
22898
- enum:
22899
- - email
22900
- - sms
23015
+ $ref: "#/components/schemas/MfaFactor"
22901
23016
  preferredFactor:
22902
- type: string
22903
- enum:
22904
- - email
22905
- - sms
23017
+ $ref: "#/components/schemas/MfaFactor"
22906
23018
  maskedDestinations:
22907
23019
  type: object
22908
23020
  additionalProperties: true
@@ -22918,10 +23030,7 @@ components:
22918
23030
  type: object
22919
23031
  additionalProperties: true
22920
23032
  factor:
22921
- type: string
22922
- enum:
22923
- - email
22924
- - sms
23033
+ $ref: "#/components/schemas/MfaFactor"
22925
23034
  destination:
22926
23035
  type: string
22927
23036
  expiresAt:
@@ -22951,6 +23060,28 @@ components:
22951
23060
  - mfaSessionToken
22952
23061
  - destination
22953
23062
  - expiresAt
23063
+ MfaTotpEnrollResponse:
23064
+ type: object
23065
+ properties:
23066
+ mfaSessionToken:
23067
+ type: string
23068
+ secret:
23069
+ type: string
23070
+ otpauthUri:
23071
+ type: string
23072
+ issuer:
23073
+ type: string
23074
+ account:
23075
+ type: string
23076
+ expiresAt:
23077
+ type: string
23078
+ required:
23079
+ - mfaSessionToken
23080
+ - secret
23081
+ - otpauthUri
23082
+ - issuer
23083
+ - account
23084
+ - expiresAt
22954
23085
  MfaEnrolledResponse:
22955
23086
  type: object
22956
23087
  properties:
@@ -22958,10 +23089,7 @@ components:
22958
23089
  type: object
22959
23090
  additionalProperties: true
22960
23091
  factor:
22961
- type: string
22962
- enum:
22963
- - email
22964
- - sms
23092
+ $ref: "#/components/schemas/MfaFactor"
22965
23093
  required:
22966
23094
  - enrolled
22967
23095
  - factor
@@ -22977,6 +23105,9 @@ components:
22977
23105
  sms:
22978
23106
  type: object
22979
23107
  additionalProperties: true
23108
+ totp:
23109
+ type: object
23110
+ additionalProperties: true
22980
23111
  recoveryCodesRemaining:
22981
23112
  type: number
22982
23113
  mfaEnabledForClient:
@@ -23372,8 +23503,51 @@ components:
23372
23503
  type: string
23373
23504
  identity:
23374
23505
  $ref: "#/components/schemas/AuthKitIdentity"
23506
+ signUp:
23507
+ type: string
23508
+ enum:
23509
+ - open
23510
+ - invite
23375
23511
  required:
23376
23512
  - id
23513
+ AuthKitInviteRequest:
23514
+ type: object
23515
+ properties:
23516
+ email:
23517
+ type: string
23518
+ firstName:
23519
+ type: string
23520
+ lastName:
23521
+ type: string
23522
+ displayName:
23523
+ type: string
23524
+ customFields:
23525
+ type: object
23526
+ additionalProperties: true
23527
+ redirectUrl:
23528
+ type: string
23529
+ required:
23530
+ - email
23531
+ AuthKitInviteResponse:
23532
+ type: object
23533
+ properties:
23534
+ ok:
23535
+ type: object
23536
+ additionalProperties: true
23537
+ userId:
23538
+ type: string
23539
+ contactId:
23540
+ type: string
23541
+ created:
23542
+ type: boolean
23543
+ expiresAt:
23544
+ type: string
23545
+ required:
23546
+ - ok
23547
+ - userId
23548
+ - contactId
23549
+ - created
23550
+ - expiresAt
23377
23551
  AuthKitIdentity:
23378
23552
  type: object
23379
23553
  properties:
@@ -23465,6 +23639,13 @@ components:
23465
23639
  - INVALID_APPLE_TOKEN
23466
23640
  - ACCOUNT_EXISTS_UNVERIFIED
23467
23641
  - APPLE_AUTH_FAILED
23642
+ - SIGN_UP_CLOSED
23643
+ MfaFactor:
23644
+ type: string
23645
+ enum:
23646
+ - email
23647
+ - sms
23648
+ - totp
23468
23649
  MfaErrorCode:
23469
23650
  type: string
23470
23651
  enum:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proveanything/smartlinks",
3
- "version": "2.0.69",
3
+ "version": "2.0.70",
4
4
  "description": "Official JavaScript/TypeScript SDK for the Smartlinks API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",