@reclaimprotocol/client 0.1.43 → 0.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.
- package/lib/result.js +26 -0
- package/lib/routes.gen.d.ts +24 -0
- package/lib/routes.gen.js +7 -1
- package/lib/types/openapi.gen.d.ts +472 -31
- package/lib/types/openapi.gen.js +1 -1
- package/package.json +1 -1
- package/src/result.ts +32 -0
- package/src/routes.gen.ts +7 -1
- package/src/types/openapi.gen.ts +473 -32
package/src/types/openapi.gen.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// AUTO-GENERATED by packages/app/scripts/openapi-typegen.ts
|
|
2
|
-
// from packages/app/openapi.yaml (spec v0.1.0, source sha256:
|
|
2
|
+
// from packages/app/openapi.yaml (spec v0.1.0, source sha256:cbe3daf2a1f3).
|
|
3
3
|
// The hash catches drift the version misses (a spec can change without a
|
|
4
4
|
// version bump) — do not remove it as "redundant" with the version.
|
|
5
5
|
// Run `npm run openapi:gen --workspace=packages/app` to regenerate. Do not edit by hand.
|
|
@@ -747,6 +747,66 @@ export interface paths {
|
|
|
747
747
|
patch?: never;
|
|
748
748
|
trace?: never;
|
|
749
749
|
};
|
|
750
|
+
"/admin/orgs/{orgId}/ai-app-key": {
|
|
751
|
+
parameters: {
|
|
752
|
+
query?: never;
|
|
753
|
+
header?: never;
|
|
754
|
+
path?: never;
|
|
755
|
+
cookie?: never;
|
|
756
|
+
};
|
|
757
|
+
/**
|
|
758
|
+
* Get an org's AI application key (admin-only)
|
|
759
|
+
* @description Admin only. Returns the metadata of the organization's active AI application key. Returns `404` if the organization has no key yet; Builder creates one when the organization starts its first AI session. The response never includes the secret.
|
|
760
|
+
*/
|
|
761
|
+
get: operations["AdminGetOrgAiAppKey"];
|
|
762
|
+
put?: never;
|
|
763
|
+
post?: never;
|
|
764
|
+
delete?: never;
|
|
765
|
+
options?: never;
|
|
766
|
+
head?: never;
|
|
767
|
+
patch?: never;
|
|
768
|
+
trace?: never;
|
|
769
|
+
};
|
|
770
|
+
"/admin/orgs/{orgId}/ai-app-key/rotate": {
|
|
771
|
+
parameters: {
|
|
772
|
+
query?: never;
|
|
773
|
+
header?: never;
|
|
774
|
+
path?: never;
|
|
775
|
+
cookie?: never;
|
|
776
|
+
};
|
|
777
|
+
get?: never;
|
|
778
|
+
put?: never;
|
|
779
|
+
/**
|
|
780
|
+
* Rotate an org's AI application key (admin-only)
|
|
781
|
+
* @description Admin only. Creates and registers a new AI application key and makes it the organization's active key. Builder disables the previous key in Builder only, so sessions that already started keep working until they expire. If the organization has no active key because staff disabled it, this issues a fresh key and so re-enables AI sessions for the organization. Returns `404` only if the organization doesn't exist. Returns the new key's metadata, never its secret.
|
|
782
|
+
*/
|
|
783
|
+
post: operations["AdminRotateOrgAiAppKey"];
|
|
784
|
+
delete?: never;
|
|
785
|
+
options?: never;
|
|
786
|
+
head?: never;
|
|
787
|
+
patch?: never;
|
|
788
|
+
trace?: never;
|
|
789
|
+
};
|
|
790
|
+
"/admin/orgs/{orgId}/ai-app-key/disable": {
|
|
791
|
+
parameters: {
|
|
792
|
+
query?: never;
|
|
793
|
+
header?: never;
|
|
794
|
+
path?: never;
|
|
795
|
+
cookie?: never;
|
|
796
|
+
};
|
|
797
|
+
get?: never;
|
|
798
|
+
put?: never;
|
|
799
|
+
/**
|
|
800
|
+
* Disable an org's AI application key (admin-only)
|
|
801
|
+
* @description Admin only. Disables the organization's active AI application key at the AI SDK backend first, then in Builder. If the AI SDK backend call fails, the response is `503` and the key stays active, so you can retry. The disable persists: the organization's AI sessions fail with `403` until staff rotate the key with `POST /admin/orgs/{orgId}/ai-app-key/rotate`. Returns `404` if the organization has no active key. Returns the disabled key's metadata, never its secret.
|
|
802
|
+
*/
|
|
803
|
+
post: operations["AdminDisableOrgAiAppKey"];
|
|
804
|
+
delete?: never;
|
|
805
|
+
options?: never;
|
|
806
|
+
head?: never;
|
|
807
|
+
patch?: never;
|
|
808
|
+
trace?: never;
|
|
809
|
+
};
|
|
750
810
|
"/admin/orgs/{orgId}/credits": {
|
|
751
811
|
parameters: {
|
|
752
812
|
query?: never;
|
|
@@ -2949,6 +3009,20 @@ export interface paths {
|
|
|
2949
3009
|
* the prompt states, such as the user's name, merged with the `context`
|
|
2950
3010
|
* you send. Your values take precedence.
|
|
2951
3011
|
*
|
|
3012
|
+
* You can also send `dataPoints` (the values to verify, each with a
|
|
3013
|
+
* `name`, a `description`, and an optional `isOptional` flag) and
|
|
3014
|
+
* `loginUrls` (pages where the user signs in). Send a `prompt`, at least
|
|
3015
|
+
* one data point, or both. When you send `loginUrls`, Builder lists them
|
|
3016
|
+
* first as candidates and skips the web search. When you send
|
|
3017
|
+
* `dataPoints`, Builder keeps them and adds only optional ones. Every
|
|
3018
|
+
* required data point must appear in the verified proofs; optional ones
|
|
3019
|
+
* can be absent. Set
|
|
3020
|
+
* `isEmailVerificationAllowed` to `true` to let the user choose
|
|
3021
|
+
* email verification on the share page.
|
|
3022
|
+
*
|
|
3023
|
+
* The first AI session of an organization creates and registers an
|
|
3024
|
+
* application key for the organization. You don't manage this key.
|
|
3025
|
+
*
|
|
2952
3026
|
* On `201`, the session has no providers: the AI agent works out how to
|
|
2953
3027
|
* verify. The organization needs a callback subscription. The session
|
|
2954
3028
|
* uses one verification from the quota pool of the
|
|
@@ -2964,14 +3038,31 @@ export interface paths {
|
|
|
2964
3038
|
* curl -X POST $BASE/verifications/ai-sessions \
|
|
2965
3039
|
* -H "Authorization: Bearer $ORG_TOKEN" \
|
|
2966
3040
|
* -H 'Content-Type: application/json' \
|
|
2967
|
-
* -d '{
|
|
3041
|
+
* -d '{
|
|
3042
|
+
* "prompt": "verify I am a student at Manipal University",
|
|
3043
|
+
* "dataPoints": [
|
|
3044
|
+
* {"name": "fullName", "description": "Name of the student"},
|
|
3045
|
+
* {"name": "studentId", "description": "Student ID", "isOptional": true}
|
|
3046
|
+
* ],
|
|
3047
|
+
* "loginUrls": ["https://learner.manipal.edu/login"],
|
|
3048
|
+
* "isEmailVerificationAllowed": false
|
|
3049
|
+
* }'
|
|
2968
3050
|
*
|
|
2969
3051
|
* Errors:
|
|
2970
3052
|
*
|
|
2971
3053
|
* - `400`: Builder rejects the prompt (for example, it targets an
|
|
2972
|
-
* internal host), `
|
|
2973
|
-
* `
|
|
2974
|
-
*
|
|
3054
|
+
* internal host), the request has no `prompt` and no `dataPoints`,
|
|
3055
|
+
* `dataPoints` has duplicate names or no required item, a login URL
|
|
3056
|
+
* isn't a public `http` or `https` URL, the prompt and data points
|
|
3057
|
+
* together exceed 10,000 characters, `context` contains a reserved key
|
|
3058
|
+
* (`attestationNonce`, `attestationNonceData`, `reclaimSessionId`,
|
|
3059
|
+
* `extractedParameters`, or `builderSessionId`), or
|
|
3060
|
+
* `verificationClientUrl` isn't a registered client.
|
|
3061
|
+
* - `403`: Reclaim staff disabled AI sessions for the organization.
|
|
3062
|
+
* Contact Reclaim support.
|
|
3063
|
+
* - `503`: Builder couldn't create or register the organization's
|
|
3064
|
+
* application key. Builder doesn't charge a verification. Retry the
|
|
3065
|
+
* request.
|
|
2975
3066
|
* - `409`: The organization has no callback subscription.
|
|
2976
3067
|
* - `429` or `402`: The quota or credits are spent. The body has
|
|
2977
3068
|
* `event: billing_required` and a terminal `sessionId`.
|
|
@@ -3001,10 +3092,13 @@ export interface paths {
|
|
|
3001
3092
|
* `error`. Poll every second or two while it's `resolving`.
|
|
3002
3093
|
*
|
|
3003
3094
|
* `candidates` lists the pages to open, best first, each with a
|
|
3004
|
-
* `source` of `catalog
|
|
3005
|
-
*
|
|
3006
|
-
*
|
|
3007
|
-
*
|
|
3095
|
+
* `source` of `caller`, `catalog`, or `web`. URLs you sent in
|
|
3096
|
+
* `loginUrls` come first, up to 10 candidates in all. Without
|
|
3097
|
+
* `loginUrls`, it usually has one page, and several (up to 3) only when
|
|
3098
|
+
* their `confidence` values are within 0.1 of the best page's value. In
|
|
3099
|
+
* that case, the user picks one on the session's `verificationUrl`.
|
|
3100
|
+
* After the user picks a page, `status` is `started` and
|
|
3101
|
+
* `selectedLoginUrl` holds it.
|
|
3008
3102
|
*
|
|
3009
3103
|
* The `OrgToken` must resolve to the session's organization. To track
|
|
3010
3104
|
* the session's status, call `GET /verifications/sessions/{sessionId}`.
|
|
@@ -3021,6 +3115,66 @@ export interface paths {
|
|
|
3021
3115
|
patch?: never;
|
|
3022
3116
|
trace?: never;
|
|
3023
3117
|
};
|
|
3118
|
+
"/verifications/ai-sessions/{sessionId}/start": {
|
|
3119
|
+
parameters: {
|
|
3120
|
+
query?: never;
|
|
3121
|
+
header?: never;
|
|
3122
|
+
path?: never;
|
|
3123
|
+
cookie?: never;
|
|
3124
|
+
};
|
|
3125
|
+
get?: never;
|
|
3126
|
+
put?: never;
|
|
3127
|
+
/**
|
|
3128
|
+
* Start an AI verification session on a chosen page
|
|
3129
|
+
* @description Starts the verification on one of the session's `candidates` and returns the URL of the remote browser where the user signs in. The share page calls this endpoint. The registered `x-reclaim-vc-id` must match the client selected when the session was created. `loginUrl` must be one of the session's candidates. The call is idempotent: after the session starts, it returns the same `verificationUrl` and ignores `loginUrl`. The call returns `409` while the lookup is `resolving` or after it `failed`, and when the session has finished.
|
|
3130
|
+
*/
|
|
3131
|
+
post: operations["StartAiVerificationSession"];
|
|
3132
|
+
delete?: never;
|
|
3133
|
+
options?: never;
|
|
3134
|
+
head?: never;
|
|
3135
|
+
patch?: never;
|
|
3136
|
+
trace?: never;
|
|
3137
|
+
};
|
|
3138
|
+
"/verifications/ai-sessions/{sessionId}/proofs": {
|
|
3139
|
+
parameters: {
|
|
3140
|
+
query?: never;
|
|
3141
|
+
header?: never;
|
|
3142
|
+
path?: never;
|
|
3143
|
+
cookie?: never;
|
|
3144
|
+
};
|
|
3145
|
+
get?: never;
|
|
3146
|
+
put?: never;
|
|
3147
|
+
/**
|
|
3148
|
+
* Receive the proofs of an AI verification session
|
|
3149
|
+
* @description Callback that Reclaim Popcorn calls when the user finishes an AI verification. Consumers don't call this endpoint. The body is the array of proofs. Builder verifies them, checks that any values in the session's `context` match the extracted values (ignoring case and surrounding whitespace), and records the result. Every required data point must have a non-empty extracted value. If any is missing, the session ends as `rejected` with `reasonCode` `missing-data-points`, and the problem detail names the missing data points, never their values. It then delivers the result, with the proofs and extracted parameters, to your callback subscriptions. The `x-reclaim-session-id` header must equal the ID that Builder stored when it started the session; otherwise the endpoint returns `404`. The endpoint returns `400` for invalid proofs and doesn't change the session. If the session has already finished, the endpoint returns `200` and does nothing.
|
|
3150
|
+
*/
|
|
3151
|
+
post: operations["ReceiveAiVerificationProofs"];
|
|
3152
|
+
delete?: never;
|
|
3153
|
+
options?: never;
|
|
3154
|
+
head?: never;
|
|
3155
|
+
patch?: never;
|
|
3156
|
+
trace?: never;
|
|
3157
|
+
};
|
|
3158
|
+
"/verifications/ai-sessions/{sessionId}/cancel": {
|
|
3159
|
+
parameters: {
|
|
3160
|
+
query?: never;
|
|
3161
|
+
header?: never;
|
|
3162
|
+
path?: never;
|
|
3163
|
+
cookie?: never;
|
|
3164
|
+
};
|
|
3165
|
+
get?: never;
|
|
3166
|
+
put?: never;
|
|
3167
|
+
/**
|
|
3168
|
+
* Receive the cancellation of an AI verification session
|
|
3169
|
+
* @description Callback that Reclaim Popcorn calls when an AI verification is cancelled or fails. Consumers don't call this endpoint. Builder ends the session with status `error`, using `message` from the body (a string of up to 500 characters) as the error message, and delivers the failure to your `verification_error` callbacks. The `x-reclaim-session-id` header must equal the ID that Builder stored when it started the session; otherwise the endpoint returns `404`. If the session has already finished, the endpoint returns `200` and does nothing.
|
|
3170
|
+
*/
|
|
3171
|
+
post: operations["ReceiveAiVerificationCancel"];
|
|
3172
|
+
delete?: never;
|
|
3173
|
+
options?: never;
|
|
3174
|
+
head?: never;
|
|
3175
|
+
patch?: never;
|
|
3176
|
+
trace?: never;
|
|
3177
|
+
};
|
|
3024
3178
|
"/verifications/sessions/{sessionId}": {
|
|
3025
3179
|
parameters: {
|
|
3026
3180
|
query?: never;
|
|
@@ -3414,13 +3568,19 @@ export interface paths {
|
|
|
3414
3568
|
* has exhausted its `ZKFETCH` pool is refused (`402`/`429`) and never
|
|
3415
3569
|
* receives a usable token.
|
|
3416
3570
|
*
|
|
3571
|
+
* Attestor authentication is optional. If the deployment doesn't use
|
|
3572
|
+
* it (no `ATTESTOR_AUTH_PRIVATE_KEY`), the request is still
|
|
3573
|
+
* authenticated, counted against the `ZKFETCH` pool, and logged, but
|
|
3574
|
+
* the response is an empty object. In that case, connect to the
|
|
3575
|
+
* attestor without an auth request.
|
|
3576
|
+
*
|
|
3417
3577
|
* `host` is recorded for observability only — the minted token is
|
|
3418
3578
|
* **not** restricted to it and today authorizes a proof against any
|
|
3419
3579
|
* host, exactly like every other Builder-issued attestor token. Host
|
|
3420
3580
|
* enforcement, if it ships, will be a server-side change rather than a
|
|
3421
3581
|
* breaking one.
|
|
3422
3582
|
*
|
|
3423
|
-
* `expiresAt` is
|
|
3583
|
+
* When present, `expiresAt` is about ten seconds after issuance. The attestor
|
|
3424
3584
|
* checks expiry only once, at the auth handshake — never again for the
|
|
3425
3585
|
* life of the connection — so this window only has to cover Builder
|
|
3426
3586
|
* issuing the token and the caller opening its attestor connection; the
|
|
@@ -3520,11 +3680,24 @@ export interface components {
|
|
|
3520
3680
|
ProviderID: string;
|
|
3521
3681
|
/** Format: uuid */
|
|
3522
3682
|
OrgID: string;
|
|
3523
|
-
/** @description Body for `POST /verifications/ai-sessions`. */
|
|
3683
|
+
/** @description Body for `POST /verifications/ai-sessions`. Send a `prompt`, at least one entry in `dataPoints`, or both. */
|
|
3524
3684
|
CreateAiVerificationSessionRequest: {
|
|
3525
|
-
/** @description What to verify, in plain language, such as "verify I'm a student at Manipal University". Builder rejects a prompt that contains credentials, card numbers, instructions for the AI, or a sensitive claim. */
|
|
3526
|
-
prompt
|
|
3527
|
-
/** @description
|
|
3685
|
+
/** @description What to verify, in plain language, such as "verify I'm a student at Manipal University". Required unless `dataPoints` has at least one item. Builder rejects a prompt that contains credentials, card numbers, instructions for the AI, or a sensitive claim. The prompt and the data point lines together can't exceed 10,000 characters. */
|
|
3686
|
+
prompt?: string;
|
|
3687
|
+
/** @description The values to verify. Required unless you send a `prompt`. Names must be unique, and at least one data point must be required (its `isOptional` is `false` or absent). When you send data points, Builder keeps them and adds only optional data points that the prompt implies. When you send none, Builder chooses the data points from the prompt. Every required data point must appear in the verified proofs. If one is missing, the session ends as `rejected` with `reasonCode` `missing-data-points`. */
|
|
3688
|
+
dataPoints?: {
|
|
3689
|
+
/** @description Name of the value, such as `username`. Starts with a letter or underscore, followed by up to 63 letters, digits, or underscores. */
|
|
3690
|
+
name: string;
|
|
3691
|
+
/** @description What the value is and why it proves the claim. */
|
|
3692
|
+
description: string;
|
|
3693
|
+
/** @description Defaults to `false`. If `true`, the claim can be proven without this value, and the proofs can omit it. If `false` or absent, the data point is required, and a session whose proofs omit it ends as `rejected` with `reasonCode` `missing-data-points`. */
|
|
3694
|
+
isOptional?: boolean;
|
|
3695
|
+
}[];
|
|
3696
|
+
/** @description Pages where the user signs in, such as `https://portal.example.edu/login`. Builder shows them first as candidates with source `caller`, and skips the web search. Each URL must use `http` or `https`, can't contain credentials, and must resolve to a public host. */
|
|
3697
|
+
loginUrls?: string[];
|
|
3698
|
+
/** @description Defaults to `false`. If `true`, the share page offers the user a choice to verify using email instead of signing in. If you omit it, the page doesn't offer that choice. */
|
|
3699
|
+
isEmailVerificationAllowed?: boolean;
|
|
3700
|
+
/** @description Values you already know, such as `{"fullName": "Asha Rao"}`. Builder merges them over the values the prompt states and returns the result in `context`. Must not contain `attestationNonce` or `attestationNonceData`; bind those after you create the session. Also must not contain `reclaimSessionId`, `extractedParameters`, or `builderSessionId`. Omit if you have none. */
|
|
3528
3701
|
context?: {
|
|
3529
3702
|
[key: string]: unknown;
|
|
3530
3703
|
};
|
|
@@ -3533,6 +3706,45 @@ export interface components {
|
|
|
3533
3706
|
/** @description ISO 3166-1 alpha-2 country code, such as `IN`. Builder searches the web from this country (Google's `gl` parameter), so portals for that country rank first. If you omit it, the search has no country preference. */
|
|
3534
3707
|
geoLocation?: string;
|
|
3535
3708
|
};
|
|
3709
|
+
/** @description Body for `POST /verifications/ai-sessions/{sessionId}/start`. */
|
|
3710
|
+
StartAiVerificationSessionRequest: {
|
|
3711
|
+
/**
|
|
3712
|
+
* Format: uri
|
|
3713
|
+
* @description The page to open. Must be the `loginUrl` of one of the session's `candidates`.
|
|
3714
|
+
*/
|
|
3715
|
+
loginUrl: string;
|
|
3716
|
+
};
|
|
3717
|
+
StartAiVerificationSessionResponse: {
|
|
3718
|
+
/**
|
|
3719
|
+
* Format: uri
|
|
3720
|
+
* @description URL of the remote browser where the user signs in.
|
|
3721
|
+
*/
|
|
3722
|
+
verificationUrl: string;
|
|
3723
|
+
};
|
|
3724
|
+
AiVerificationCallbackAck: {
|
|
3725
|
+
/** @description Always `true`. */
|
|
3726
|
+
ok: boolean;
|
|
3727
|
+
};
|
|
3728
|
+
/** @description Metadata of an organization's AI application key. The response never includes the key's secret. */
|
|
3729
|
+
AdminOrgAiAppKey: {
|
|
3730
|
+
/** @description Public identifier (an Ethereum address) of the key. */
|
|
3731
|
+
appId: string;
|
|
3732
|
+
/**
|
|
3733
|
+
* Format: date-time
|
|
3734
|
+
* @description When Builder created the key.
|
|
3735
|
+
*/
|
|
3736
|
+
createdAt: string;
|
|
3737
|
+
/**
|
|
3738
|
+
* Format: date-time
|
|
3739
|
+
* @description When Builder registered the key with the AI SDK backend, or `null` if registration hasn't completed.
|
|
3740
|
+
*/
|
|
3741
|
+
registeredAt: string | null;
|
|
3742
|
+
/**
|
|
3743
|
+
* Format: date-time
|
|
3744
|
+
* @description When the key was disabled, or `null` if it's active.
|
|
3745
|
+
*/
|
|
3746
|
+
disabledAt: string | null;
|
|
3747
|
+
};
|
|
3536
3748
|
/** @description The lookup `POST /verifications/ai-sessions` started for a session: its status, and once `ready`, the pages to open and the data points to verify there. */
|
|
3537
3749
|
AiVerificationSession: {
|
|
3538
3750
|
/**
|
|
@@ -3541,27 +3753,34 @@ export interface components {
|
|
|
3541
3753
|
*/
|
|
3542
3754
|
sessionId: string;
|
|
3543
3755
|
/**
|
|
3544
|
-
* @description `resolving` while Builder looks up the pages and data points. `ready` when `candidates` and `dataPoints` are set. `failed` when the lookup failed: `error` says why, the session ended with status `error`, and its verification was refunded.
|
|
3756
|
+
* @description `resolving` while Builder looks up the pages and data points. `ready` when `candidates` and `dataPoints` are set. `started` when the user has picked a page and the verification is running; the session's own status stays `pending` until it finishes. `failed` when the lookup failed: `error` says why, the session ended with status `error`, and its verification was refunded.
|
|
3545
3757
|
* @enum {string}
|
|
3546
3758
|
*/
|
|
3547
|
-
status: "resolving" | "ready" | "failed";
|
|
3759
|
+
status: "resolving" | "ready" | "started" | "failed";
|
|
3548
3760
|
/** @description Why the lookup failed. Only when `status` is `failed`. Its `status` is 422 when the prompt isn't a request to verify something about the user, 404 when no login page was found, and 503 when the AI model or web search stayed unavailable. */
|
|
3549
3761
|
error?: components["schemas"]["Problem"];
|
|
3550
|
-
/** @description Only when `status` is `ready`. The
|
|
3762
|
+
/** @description Only when `status` is `ready` or `started`. The data points to verify, required data points first. They combine the data points you sent with any optional ones Builder added. If you sent none, Builder chooses the fewest that prove the prompt's claim. A data point for a value the prompt or `context` states is always required. */
|
|
3551
3763
|
dataPoints?: {
|
|
3552
|
-
/** @description
|
|
3764
|
+
/** @description Name of the value, such as `username`. */
|
|
3553
3765
|
name: string;
|
|
3554
3766
|
/** @description What the value is and why it proves the claim. */
|
|
3555
3767
|
description: string;
|
|
3556
|
-
/** @description If `true`, the claim can be proven without this value, as with `isOptional` on a provider's `ResponseMatch`. If
|
|
3557
|
-
isOptional
|
|
3768
|
+
/** @description If `true`, the claim can be proven without this value, as with `isOptional` on a provider's `ResponseMatch`. If `false`, the data point is required. */
|
|
3769
|
+
isOptional: boolean;
|
|
3558
3770
|
}[];
|
|
3559
3771
|
/** @description Values the signed-in account must show, such as `{"fullName": "Asha Rao"}`. Each key is the `dataPoints` name that the value pins. It combines the values the prompt states with the request's `context`. It's empty if neither has any. It's the session's `context`. If the prompt names a specific page, such as a post, `pageUrl` holds it: the page to open after the user logs in on the candidate's site. */
|
|
3560
3772
|
context: {
|
|
3561
3773
|
[key: string]: unknown;
|
|
3562
3774
|
};
|
|
3563
|
-
/** @description Only when `status` is `ready`. Pages to open, best first. Each is the page that shows the data after the user signs in (it sends the user to sign in first), or else the sign-in page.
|
|
3775
|
+
/** @description Only when `status` is `ready` or `started`. Pages to open, best first. Each is the page that shows the data after the user signs in (it sends the user to sign in first), or else the sign-in page. URLs you sent in `loginUrls` come first (source `caller`, confidence 1), up to 10 candidates in all. Otherwise it's usually one page, and several pages appear only when the choice is ambiguous, such as a college with two or three student portals whose `confidence` values are within 0.1 of the best. In that case, the user picks one on the session's `verificationUrl`. At most one page per host. */
|
|
3564
3776
|
candidates?: components["schemas"]["ResolvedLoginPage"][];
|
|
3777
|
+
/** @description Whether the share page offers the user a choice to verify using email. Matches the value you sent when you created the session. */
|
|
3778
|
+
isEmailVerificationAllowed: boolean;
|
|
3779
|
+
/**
|
|
3780
|
+
* Format: uri
|
|
3781
|
+
* @description The page the user picked. Only when `status` is `started`.
|
|
3782
|
+
*/
|
|
3783
|
+
selectedLoginUrl?: string;
|
|
3565
3784
|
};
|
|
3566
3785
|
/** @description A page for the user to open and sign in to. */
|
|
3567
3786
|
ResolvedLoginPage: {
|
|
@@ -3573,10 +3792,10 @@ export interface components {
|
|
|
3573
3792
|
/** @description Estimated likelihood, from 0 to 1, that signing in here shows the claim. Candidates below 0.5 are never returned. */
|
|
3574
3793
|
confidence: number;
|
|
3575
3794
|
/**
|
|
3576
|
-
* @description Where the page came from. `catalog` is the page of a provider in the catalog (public, or your organization's own). `web` is a page that a web search found; it has no provider yet.
|
|
3795
|
+
* @description Where the page came from. `caller` is a URL you sent in `loginUrls`. `catalog` is the page of a provider in the catalog (public, or your organization's own). `web` is a page that a web search found; it has no provider yet.
|
|
3577
3796
|
* @enum {string}
|
|
3578
3797
|
*/
|
|
3579
|
-
source: "catalog" | "web";
|
|
3798
|
+
source: "caller" | "catalog" | "web";
|
|
3580
3799
|
};
|
|
3581
3800
|
/** @description A verification client id used as a filter. Hyphens are ignored. */
|
|
3582
3801
|
VerificationClientIDFilter: string;
|
|
@@ -3623,14 +3842,14 @@ export interface components {
|
|
|
3623
3842
|
*/
|
|
3624
3843
|
host: string;
|
|
3625
3844
|
};
|
|
3626
|
-
/** @description A short-lived attestor authorization for one zkFetch call. */
|
|
3845
|
+
/** @description A short-lived attestor authorization for one zkFetch call. Both `token` and `expiresAt` are absent when the deployment doesn't use attestor authentication. The caller then connects to the attestor without an auth request. */
|
|
3627
3846
|
FetchAuthorization: {
|
|
3628
3847
|
/**
|
|
3629
3848
|
* Format: byte
|
|
3630
3849
|
* @description Base64-encoded legacy attestor authorization — the same form `POST /verifications/sessions/{sessionId}/attestor-auth` returns. Decode it back into the native `AuthenticationRequest` to open the attestor connection.
|
|
3631
3850
|
*/
|
|
3632
|
-
token
|
|
3633
|
-
expiresAt
|
|
3851
|
+
token?: string;
|
|
3852
|
+
expiresAt?: components["schemas"]["Timestamp"];
|
|
3634
3853
|
};
|
|
3635
3854
|
/**
|
|
3636
3855
|
* Format: uuid
|
|
@@ -4514,6 +4733,29 @@ export interface components {
|
|
|
4514
4733
|
orgId: components["schemas"]["OrgID"];
|
|
4515
4734
|
orgName: string;
|
|
4516
4735
|
}[];
|
|
4736
|
+
/** @description Prompts callers sent to `POST /verifications/ai-sessions` in the window, most recent first, with how each resolved and ended. Never holds proofs, extracted values or the verification URL. */
|
|
4737
|
+
aiSessionPrompts: {
|
|
4738
|
+
/** Format: uuid */
|
|
4739
|
+
sessionId: string;
|
|
4740
|
+
/** Format: date-time */
|
|
4741
|
+
createdAt: string;
|
|
4742
|
+
orgId: components["schemas"]["OrgID"];
|
|
4743
|
+
orgName: string;
|
|
4744
|
+
prompt: string;
|
|
4745
|
+
geoLocation?: string;
|
|
4746
|
+
requiredDataPoints: string[];
|
|
4747
|
+
optionalDataPoints: string[];
|
|
4748
|
+
/** @enum {string} */
|
|
4749
|
+
taskStatus: "resolving" | "ready" | "started" | "failed";
|
|
4750
|
+
/** @description Login pages found, by host only. */
|
|
4751
|
+
candidates: {
|
|
4752
|
+
host: string;
|
|
4753
|
+
source: string;
|
|
4754
|
+
}[];
|
|
4755
|
+
errorTitle?: string;
|
|
4756
|
+
sessionStatus: string;
|
|
4757
|
+
outcomeReasonCode?: string;
|
|
4758
|
+
}[];
|
|
4517
4759
|
/** @description Coding-agent activity reported by the Reclaim MCP server in the window. `toolCalls` and `clients` come from a daily rollup that refreshes every 15 minutes. The `orgId` filter doesn't apply here. */
|
|
4518
4760
|
agents: {
|
|
4519
4761
|
/**
|
|
@@ -6288,7 +6530,7 @@ export interface components {
|
|
|
6288
6530
|
* @description UUID v7 session id (also echoed in context as `reclaimSessionId`).
|
|
6289
6531
|
*/
|
|
6290
6532
|
id: string;
|
|
6291
|
-
/** @description The providers this session verifies, in run order. The Verification Client runs each (sequentially, in one browser session) and submits one combined result; all are required. */
|
|
6533
|
+
/** @description The providers this session verifies, in run order. The Verification Client runs each (sequentially, in one browser session) and submits one combined result; all are required. AI sessions have no providers, so the array is empty. */
|
|
6292
6534
|
providers: components["schemas"]["SessionProvider"][];
|
|
6293
6535
|
/** @description The organization that owns this session. */
|
|
6294
6536
|
orgId: components["schemas"]["OrgID"];
|
|
@@ -6709,10 +6951,12 @@ export interface components {
|
|
|
6709
6951
|
} & {
|
|
6710
6952
|
[key: string]: unknown;
|
|
6711
6953
|
};
|
|
6712
|
-
/** @description One entry per verified provider (success only), in run order. Each carries that provider's proven requests. */
|
|
6954
|
+
/** @description One entry per verified provider (success only), in run order. Each carries that provider's proven requests. AI sessions have no provider, so they carry a single entry without `provider_id` and `resolved_version`. */
|
|
6713
6955
|
results?: ({
|
|
6714
|
-
|
|
6715
|
-
|
|
6956
|
+
/** @description Absent for AI sessions. */
|
|
6957
|
+
provider_id?: components["schemas"]["ProviderID"];
|
|
6958
|
+
/** @description Absent for AI sessions. */
|
|
6959
|
+
resolved_version?: string;
|
|
6716
6960
|
/** @description One entry per proven request for this provider. */
|
|
6717
6961
|
requests: ({
|
|
6718
6962
|
request_id?: string;
|
|
@@ -7698,7 +7942,7 @@ export interface operations {
|
|
|
7698
7942
|
/** @description Set to `csv` to download one section as a spreadsheet instead of rendering the page. Pair it with `section`. A CSV export returns up to 1000 rows, where the page shows only the leading rows of each ranked section. */
|
|
7699
7943
|
format?: "csv";
|
|
7700
7944
|
/** @description Which section `format=csv` exports. Each section has its own columns, so one download holds one section. Defaults to `providers`. */
|
|
7701
|
-
section?: "providers" | "revenue" | "usage" | "goals" | "tools" | "agents" | "funnel";
|
|
7945
|
+
section?: "providers" | "revenue" | "usage" | "goals" | "ai-session-prompts" | "tools" | "agents" | "funnel";
|
|
7702
7946
|
};
|
|
7703
7947
|
header?: never;
|
|
7704
7948
|
path?: never;
|
|
@@ -8060,6 +8304,81 @@ export interface operations {
|
|
|
8060
8304
|
default: components["responses"]["ProblemResponse"];
|
|
8061
8305
|
};
|
|
8062
8306
|
};
|
|
8307
|
+
AdminGetOrgAiAppKey: {
|
|
8308
|
+
parameters: {
|
|
8309
|
+
query?: never;
|
|
8310
|
+
header?: never;
|
|
8311
|
+
path: {
|
|
8312
|
+
orgId: components["schemas"]["OrgID"];
|
|
8313
|
+
};
|
|
8314
|
+
cookie?: never;
|
|
8315
|
+
};
|
|
8316
|
+
requestBody?: never;
|
|
8317
|
+
responses: {
|
|
8318
|
+
/** @description The key's metadata. */
|
|
8319
|
+
200: {
|
|
8320
|
+
headers: {
|
|
8321
|
+
[name: string]: unknown;
|
|
8322
|
+
};
|
|
8323
|
+
content: {
|
|
8324
|
+
"application/json": components["schemas"]["AdminOrgAiAppKey"];
|
|
8325
|
+
};
|
|
8326
|
+
};
|
|
8327
|
+
403: components["responses"]["ForbiddenResponse"];
|
|
8328
|
+
404: components["responses"]["ProblemResponse"];
|
|
8329
|
+
default: components["responses"]["ProblemResponse"];
|
|
8330
|
+
};
|
|
8331
|
+
};
|
|
8332
|
+
AdminRotateOrgAiAppKey: {
|
|
8333
|
+
parameters: {
|
|
8334
|
+
query?: never;
|
|
8335
|
+
header?: never;
|
|
8336
|
+
path: {
|
|
8337
|
+
orgId: components["schemas"]["OrgID"];
|
|
8338
|
+
};
|
|
8339
|
+
cookie?: never;
|
|
8340
|
+
};
|
|
8341
|
+
requestBody?: never;
|
|
8342
|
+
responses: {
|
|
8343
|
+
/** @description The key's metadata. */
|
|
8344
|
+
200: {
|
|
8345
|
+
headers: {
|
|
8346
|
+
[name: string]: unknown;
|
|
8347
|
+
};
|
|
8348
|
+
content: {
|
|
8349
|
+
"application/json": components["schemas"]["AdminOrgAiAppKey"];
|
|
8350
|
+
};
|
|
8351
|
+
};
|
|
8352
|
+
403: components["responses"]["ForbiddenResponse"];
|
|
8353
|
+
404: components["responses"]["ProblemResponse"];
|
|
8354
|
+
default: components["responses"]["ProblemResponse"];
|
|
8355
|
+
};
|
|
8356
|
+
};
|
|
8357
|
+
AdminDisableOrgAiAppKey: {
|
|
8358
|
+
parameters: {
|
|
8359
|
+
query?: never;
|
|
8360
|
+
header?: never;
|
|
8361
|
+
path: {
|
|
8362
|
+
orgId: components["schemas"]["OrgID"];
|
|
8363
|
+
};
|
|
8364
|
+
cookie?: never;
|
|
8365
|
+
};
|
|
8366
|
+
requestBody?: never;
|
|
8367
|
+
responses: {
|
|
8368
|
+
/** @description The key's metadata. */
|
|
8369
|
+
200: {
|
|
8370
|
+
headers: {
|
|
8371
|
+
[name: string]: unknown;
|
|
8372
|
+
};
|
|
8373
|
+
content: {
|
|
8374
|
+
"application/json": components["schemas"]["AdminOrgAiAppKey"];
|
|
8375
|
+
};
|
|
8376
|
+
};
|
|
8377
|
+
403: components["responses"]["ForbiddenResponse"];
|
|
8378
|
+
404: components["responses"]["ProblemResponse"];
|
|
8379
|
+
default: components["responses"]["ProblemResponse"];
|
|
8380
|
+
};
|
|
8381
|
+
};
|
|
8063
8382
|
AdminGrantOrgCredit: {
|
|
8064
8383
|
parameters: {
|
|
8065
8384
|
query?: never;
|
|
@@ -11682,6 +12001,15 @@ export interface operations {
|
|
|
11682
12001
|
"application/problem+json": components["schemas"]["Problem"];
|
|
11683
12002
|
};
|
|
11684
12003
|
};
|
|
12004
|
+
/** @description Reclaim staff disabled AI sessions for the organization. Contact Reclaim support. */
|
|
12005
|
+
403: {
|
|
12006
|
+
headers: {
|
|
12007
|
+
[name: string]: unknown;
|
|
12008
|
+
};
|
|
12009
|
+
content: {
|
|
12010
|
+
"application/problem+json": components["schemas"]["Problem"];
|
|
12011
|
+
};
|
|
12012
|
+
};
|
|
11685
12013
|
/** @description The organization has no callback subscription. */
|
|
11686
12014
|
409: {
|
|
11687
12015
|
headers: {
|
|
@@ -11700,6 +12028,15 @@ export interface operations {
|
|
|
11700
12028
|
"application/problem+json": components["schemas"]["Problem"];
|
|
11701
12029
|
};
|
|
11702
12030
|
};
|
|
12031
|
+
/** @description Builder couldn't create or register the organization's AI application key. Nothing is charged. */
|
|
12032
|
+
503: {
|
|
12033
|
+
headers: {
|
|
12034
|
+
[name: string]: unknown;
|
|
12035
|
+
};
|
|
12036
|
+
content: {
|
|
12037
|
+
"application/problem+json": components["schemas"]["Problem"];
|
|
12038
|
+
};
|
|
12039
|
+
};
|
|
11703
12040
|
default: components["responses"]["ProblemResponse"];
|
|
11704
12041
|
};
|
|
11705
12042
|
};
|
|
@@ -11735,6 +12072,110 @@ export interface operations {
|
|
|
11735
12072
|
default: components["responses"]["ProblemResponse"];
|
|
11736
12073
|
};
|
|
11737
12074
|
};
|
|
12075
|
+
StartAiVerificationSession: {
|
|
12076
|
+
parameters: {
|
|
12077
|
+
query?: never;
|
|
12078
|
+
header?: never;
|
|
12079
|
+
path: {
|
|
12080
|
+
sessionId: components["schemas"]["SessionID"];
|
|
12081
|
+
};
|
|
12082
|
+
cookie?: never;
|
|
12083
|
+
};
|
|
12084
|
+
requestBody: {
|
|
12085
|
+
content: {
|
|
12086
|
+
"application/json": components["schemas"]["StartAiVerificationSessionRequest"];
|
|
12087
|
+
};
|
|
12088
|
+
};
|
|
12089
|
+
responses: {
|
|
12090
|
+
/** @description The session started. */
|
|
12091
|
+
200: {
|
|
12092
|
+
headers: {
|
|
12093
|
+
[name: string]: unknown;
|
|
12094
|
+
};
|
|
12095
|
+
content: {
|
|
12096
|
+
"application/json": components["schemas"]["StartAiVerificationSessionResponse"];
|
|
12097
|
+
};
|
|
12098
|
+
};
|
|
12099
|
+
404: components["responses"]["ProblemResponse"];
|
|
12100
|
+
/** @description The lookup is still `resolving`, it `failed`, or the session has finished. */
|
|
12101
|
+
409: {
|
|
12102
|
+
headers: {
|
|
12103
|
+
[name: string]: unknown;
|
|
12104
|
+
};
|
|
12105
|
+
content: {
|
|
12106
|
+
"application/problem+json": components["schemas"]["Problem"];
|
|
12107
|
+
};
|
|
12108
|
+
};
|
|
12109
|
+
default: components["responses"]["ProblemResponse"];
|
|
12110
|
+
};
|
|
12111
|
+
};
|
|
12112
|
+
ReceiveAiVerificationProofs: {
|
|
12113
|
+
parameters: {
|
|
12114
|
+
query?: never;
|
|
12115
|
+
header: {
|
|
12116
|
+
/** @description ID of the AI SDK session that Popcorn is reporting. */
|
|
12117
|
+
"x-reclaim-session-id": string;
|
|
12118
|
+
};
|
|
12119
|
+
path: {
|
|
12120
|
+
sessionId: components["schemas"]["SessionID"];
|
|
12121
|
+
};
|
|
12122
|
+
cookie?: never;
|
|
12123
|
+
};
|
|
12124
|
+
requestBody: {
|
|
12125
|
+
content: {
|
|
12126
|
+
"application/json": {
|
|
12127
|
+
[key: string]: unknown;
|
|
12128
|
+
}[];
|
|
12129
|
+
};
|
|
12130
|
+
};
|
|
12131
|
+
responses: {
|
|
12132
|
+
/** @description Builder accepted the proofs. */
|
|
12133
|
+
200: {
|
|
12134
|
+
headers: {
|
|
12135
|
+
[name: string]: unknown;
|
|
12136
|
+
};
|
|
12137
|
+
content: {
|
|
12138
|
+
"application/json": components["schemas"]["AiVerificationCallbackAck"];
|
|
12139
|
+
};
|
|
12140
|
+
};
|
|
12141
|
+
400: components["responses"]["ProblemResponse"];
|
|
12142
|
+
404: components["responses"]["ProblemResponse"];
|
|
12143
|
+
default: components["responses"]["ProblemResponse"];
|
|
12144
|
+
};
|
|
12145
|
+
};
|
|
12146
|
+
ReceiveAiVerificationCancel: {
|
|
12147
|
+
parameters: {
|
|
12148
|
+
query?: never;
|
|
12149
|
+
header: {
|
|
12150
|
+
/** @description ID of the AI SDK session that Popcorn is reporting. */
|
|
12151
|
+
"x-reclaim-session-id": string;
|
|
12152
|
+
};
|
|
12153
|
+
path: {
|
|
12154
|
+
sessionId: components["schemas"]["SessionID"];
|
|
12155
|
+
};
|
|
12156
|
+
cookie?: never;
|
|
12157
|
+
};
|
|
12158
|
+
requestBody: {
|
|
12159
|
+
content: {
|
|
12160
|
+
"application/json": {
|
|
12161
|
+
[key: string]: unknown;
|
|
12162
|
+
};
|
|
12163
|
+
};
|
|
12164
|
+
};
|
|
12165
|
+
responses: {
|
|
12166
|
+
/** @description Builder recorded the cancellation. */
|
|
12167
|
+
200: {
|
|
12168
|
+
headers: {
|
|
12169
|
+
[name: string]: unknown;
|
|
12170
|
+
};
|
|
12171
|
+
content: {
|
|
12172
|
+
"application/json": components["schemas"]["AiVerificationCallbackAck"];
|
|
12173
|
+
};
|
|
12174
|
+
};
|
|
12175
|
+
404: components["responses"]["ProblemResponse"];
|
|
12176
|
+
default: components["responses"]["ProblemResponse"];
|
|
12177
|
+
};
|
|
12178
|
+
};
|
|
11738
12179
|
GetVerificationSession: {
|
|
11739
12180
|
parameters: {
|
|
11740
12181
|
query?: never;
|
|
@@ -12184,7 +12625,7 @@ export interface operations {
|
|
|
12184
12625
|
};
|
|
12185
12626
|
};
|
|
12186
12627
|
responses: {
|
|
12187
|
-
/** @description Attestor authorization minted. */
|
|
12628
|
+
/** @description Attestor authorization minted, or an empty object if the deployment doesn't use attestor authentication. */
|
|
12188
12629
|
200: {
|
|
12189
12630
|
headers: {
|
|
12190
12631
|
[name: string]: unknown;
|