@onkernel/sdk 0.102.0 → 0.104.0
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/CHANGELOG.md +22 -0
- package/package.json +1 -1
- package/resources/auth/connections.d.mts +8 -0
- package/resources/auth/connections.d.mts.map +1 -1
- package/resources/auth/connections.d.ts +8 -0
- package/resources/auth/connections.d.ts.map +1 -1
- package/resources/browsers/webmcp.d.mts +15 -5
- package/resources/browsers/webmcp.d.mts.map +1 -1
- package/resources/browsers/webmcp.d.ts +15 -5
- package/resources/browsers/webmcp.d.ts.map +1 -1
- package/resources/browsers/webmcp.js +8 -4
- package/resources/browsers/webmcp.js.map +1 -1
- package/resources/browsers/webmcp.mjs +8 -4
- package/resources/browsers/webmcp.mjs.map +1 -1
- package/resources/config-registry/config-registry.d.mts +10 -0
- package/resources/config-registry/config-registry.d.mts.map +1 -1
- package/resources/config-registry/config-registry.d.ts +10 -0
- package/resources/config-registry/config-registry.d.ts.map +1 -1
- package/resources/config-registry/config-registry.js.map +1 -1
- package/resources/config-registry/config-registry.mjs.map +1 -1
- package/resources/vaults/index.d.mts +1 -1
- package/resources/vaults/index.d.mts.map +1 -1
- package/resources/vaults/index.d.ts +1 -1
- package/resources/vaults/index.d.ts.map +1 -1
- package/resources/vaults/index.js.map +1 -1
- package/resources/vaults/index.mjs.map +1 -1
- package/resources/vaults/items.d.mts +456 -54
- package/resources/vaults/items.d.mts.map +1 -1
- package/resources/vaults/items.d.ts +456 -54
- package/resources/vaults/items.d.ts.map +1 -1
- package/resources/vaults/items.js +30 -11
- package/resources/vaults/items.js.map +1 -1
- package/resources/vaults/items.mjs +30 -11
- package/resources/vaults/items.mjs.map +1 -1
- package/resources/vaults/vaults.d.mts +2 -2
- package/resources/vaults/vaults.d.mts.map +1 -1
- package/resources/vaults/vaults.d.ts +2 -2
- package/resources/vaults/vaults.d.ts.map +1 -1
- package/resources/vaults/vaults.js.map +1 -1
- package/resources/vaults/vaults.mjs.map +1 -1
- package/src/resources/auth/connections.ts +10 -0
- package/src/resources/browsers/webmcp.ts +15 -5
- package/src/resources/config-registry/config-registry.ts +12 -0
- package/src/resources/vaults/index.ts +15 -0
- package/src/resources/vaults/items.ts +530 -53
- package/src/resources/vaults/vaults.ts +30 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -8,7 +8,11 @@ export declare class Items extends APIResource {
|
|
|
8
8
|
* and live data that can be requested through `expand`. Read each operation's
|
|
9
9
|
* description before using it. Expanded data is fetched from the provider and is
|
|
10
10
|
* not persisted in the vault item. Requesting an unavailable expansion returns 409
|
|
11
|
-
* instead of a partial item.
|
|
11
|
+
* instead of a partial item. Pending credential items return a collection action.
|
|
12
|
+
* Kernel-hosted active collection links are renewed atomically on expiry for ready
|
|
13
|
+
* or pending items without changing the item version. Invoke collect to open a
|
|
14
|
+
* form for a ready item without clearing values. Sensitive credential values are
|
|
15
|
+
* never returned.
|
|
12
16
|
*
|
|
13
17
|
* @example
|
|
14
18
|
* ```ts
|
|
@@ -19,13 +23,18 @@ export declare class Items extends APIResource {
|
|
|
19
23
|
*/
|
|
20
24
|
retrieve(key: string, params: ItemRetrieveParams, options?: RequestOptions): APIPromise<VaultItem>;
|
|
21
25
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
26
|
+
* Credential updates require type credential and the current version, and change
|
|
27
|
+
* only values or description; omitted values are preserved, nonempty strings
|
|
28
|
+
* replace, and null or empty strings clear supported fields. Clearing required
|
|
29
|
+
* text/email/password values returns pending_collection; browser forms still
|
|
30
|
+
* require nonempty required inputs. Card updates may omit type for compatibility
|
|
31
|
+
* with legacy requests. Requested cards accept a replacement specification.
|
|
32
|
+
* Pending issuance requests may update provider-supported fields on their existing
|
|
33
|
+
* request, subject to atomic provider approval checks; omitted optional fields
|
|
34
|
+
* remain unchanged and explicit empty lists clear them. Wallet/provider binding
|
|
35
|
+
* and unsupported fields cannot change after authorization starts. An uncertain
|
|
36
|
+
* update enters recovery_required and must not be retried. Checkout cards may be
|
|
37
|
+
* edited between authorizations.
|
|
29
38
|
*
|
|
30
39
|
* @example
|
|
31
40
|
* ```ts
|
|
@@ -42,12 +51,15 @@ export declare class Items extends APIResource {
|
|
|
42
51
|
* context:
|
|
43
52
|
* 'The order total changed to USD 30.00 including shipping and taxes for one notebook. Update this unapproved request rather than creating a second payment.',
|
|
44
53
|
* },
|
|
54
|
+
* type: 'card',
|
|
45
55
|
* });
|
|
46
56
|
* ```
|
|
47
57
|
*/
|
|
48
58
|
update(key: string, params: ItemUpdateParams, options?: RequestOptions): APIPromise<VaultItem>;
|
|
49
59
|
/**
|
|
50
|
-
*
|
|
60
|
+
* Credential entries include safe field metadata and non-sensitive values. Listing
|
|
61
|
+
* never creates or renews collection sessions; only an existing unexpired active
|
|
62
|
+
* session is included. Use single-item GET or collect to obtain a fresh link.
|
|
51
63
|
*
|
|
52
64
|
* @example
|
|
53
65
|
* ```ts
|
|
@@ -120,7 +132,10 @@ export declare class Items extends APIResource {
|
|
|
120
132
|
* card in any lifecycle state without polling the provider, reauthorizing,
|
|
121
133
|
* replacing aliases, or resetting recovery. Conflicting specifications return 409.
|
|
122
134
|
* Provider-specific authorization requirements and retry behavior are described in
|
|
123
|
-
* the item's request schema.
|
|
135
|
+
* the item's request schema. Do not use credential items to store, collect, or
|
|
136
|
+
* fill credit card data, including card numbers (PANs), security codes (CVV/CVC),
|
|
137
|
+
* or expiration dates. Use wallet and card item types for credit cards and payment
|
|
138
|
+
* checkout instead.
|
|
124
139
|
*
|
|
125
140
|
* @example
|
|
126
141
|
* ```ts
|
|
@@ -367,20 +382,330 @@ export declare namespace CardVaultItemState {
|
|
|
367
382
|
}
|
|
368
383
|
}
|
|
369
384
|
/**
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
*
|
|
385
|
+
* Return the credential item with its collection action. Supported for ready and
|
|
386
|
+
* pending_collection credential items. Always render the same form from every
|
|
387
|
+
* form-supported field; totp fields have no form input and are omitted. No
|
|
388
|
+
* caller-selected field subsets or form overrides are accepted. Reuse an active
|
|
389
|
+
* Kernel-hosted session or renew an expired session atomically. Customer-hosted
|
|
390
|
+
* forms use their own backend and ordinary item GET/PATCH. Opening the form does
|
|
391
|
+
* not clear values or change readiness or item version. To observe edits on a
|
|
392
|
+
* ready item, record its version and poll GET without wait until the version
|
|
393
|
+
* changes, then reconcile the returned state. Version changes may also come from
|
|
394
|
+
* PATCH; they do not identify a particular form submission. Customer-hosted apps
|
|
395
|
+
* use their own submission callback, including for unchanged forms. The wait
|
|
396
|
+
* parameter waits for readiness, not edits.
|
|
397
|
+
*/
|
|
398
|
+
export interface CollectVaultItemOperationRequest {
|
|
399
|
+
type: 'collect';
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* One schema-derived form for the item, available in ready or pending_collection
|
|
403
|
+
* state. Render every form-supported field as editable; omit totp fields and
|
|
404
|
+
* preserve their stored seeds. Prefill non-sensitive values, and allow existing
|
|
405
|
+
* sensitive values to be preserved or replaced without ever revealing them. No
|
|
406
|
+
* field subsets or per-request form configuration exist. Validate required fields
|
|
407
|
+
* against the resulting values, including preserved secrets. Submit changed values
|
|
408
|
+
* only, using the version used to render the form. Scoped hosted submission
|
|
409
|
+
* rejects totp edits; seed writes require the ordinary authenticated item API.
|
|
410
|
+
* Customer forms likewise omit totp from their payloads. Save edits atomically. A
|
|
411
|
+
* successful hosted submission increments the version, marks ready, and consumes
|
|
412
|
+
* the session; an empty edit may complete collection while preserving values. A
|
|
413
|
+
* customer form uses PATCH for changed values and does not send an empty PATCH
|
|
414
|
+
* when nothing changed. Kernel-hosted bearer sessions require no Kernel account
|
|
415
|
+
* and are bound to the item version. Expired, superseded, consumed, or
|
|
416
|
+
* deleted-item sessions cannot submit. Authenticated item GET renews expired
|
|
417
|
+
* active sessions for ready or pending items; pending items always receive an
|
|
418
|
+
* action. A ready item with no active session omits the action until collect is
|
|
419
|
+
* invoked. Concurrent renewals return the same link. Renewal changes neither
|
|
420
|
+
* values nor item version. An expired link cannot renew itself. The hosted form
|
|
421
|
+
* handles its collection protocol; callers only open the returned URL and do not
|
|
422
|
+
* extract or submit its token through the public API. For customer-hosted forms,
|
|
423
|
+
* use @onkernel/vault-react and an authenticated customer backend calling the
|
|
424
|
+
* ordinary item GET/PATCH API. Kernel does not store customer collection URLs or
|
|
425
|
+
* authenticate the customer's end users. Treat URLs and submitted values as
|
|
426
|
+
* secrets and exclude them from logs, traces, and errors.
|
|
427
|
+
*/
|
|
428
|
+
export interface CredentialCollectionAction {
|
|
429
|
+
/**
|
|
430
|
+
* Expiry of the Kernel-hosted collection link (30 minutes after issuance).
|
|
431
|
+
*/
|
|
432
|
+
expires_at: string;
|
|
433
|
+
name: 'collect';
|
|
434
|
+
/**
|
|
435
|
+
* Time-scoped hosted form URL (vault.kernel.sh in production). Open this URL as
|
|
436
|
+
* returned; treat it as a secret.
|
|
437
|
+
*/
|
|
438
|
+
url: string;
|
|
439
|
+
}
|
|
440
|
+
export interface CredentialVaultFieldDefinition {
|
|
441
|
+
/**
|
|
442
|
+
* Whether a nonempty value is required for readiness and form submission.
|
|
443
|
+
*/
|
|
444
|
+
required: boolean;
|
|
445
|
+
/**
|
|
446
|
+
* Whether the value is omitted from every item response. Reserve true for secrets
|
|
447
|
+
* such as passwords, API tokens, and TOTP seeds. Ordinary usernames and email
|
|
448
|
+
* addresses should be false so the form can display and prefill them.
|
|
449
|
+
*/
|
|
450
|
+
sensitive: boolean;
|
|
451
|
+
/**
|
|
452
|
+
* Text, email, and password have form inputs; totp does not and is omitted from
|
|
453
|
+
* both Kernel-hosted and customer React forms. Password and totp must be
|
|
454
|
+
* sensitive. A totp value is an RFC 4648 Base32 generator seed (case-insensitive,
|
|
455
|
+
* optional trailing padding), not an otpauth URI or current code. Reject invalid
|
|
456
|
+
* or empty decoded seeds. Browser fill generates an RFC 6238 code at execution
|
|
457
|
+
* time using HMAC-SHA1, 6 digits, and a 30-second period. Preserve leading zeros;
|
|
458
|
+
* never fill the seed. Custom algorithms, digits, periods, and form enrollment are
|
|
459
|
+
* unsupported.
|
|
460
|
+
*/
|
|
461
|
+
type: CredentialVaultFieldType;
|
|
462
|
+
}
|
|
463
|
+
export interface CredentialVaultFieldInput {
|
|
464
|
+
/**
|
|
465
|
+
* Text, email, and password have form inputs; totp does not and is omitted from
|
|
466
|
+
* both Kernel-hosted and customer React forms. Password and totp must be
|
|
467
|
+
* sensitive. A totp value is an RFC 4648 Base32 generator seed (case-insensitive,
|
|
468
|
+
* optional trailing padding), not an otpauth URI or current code. Reject invalid
|
|
469
|
+
* or empty decoded seeds. Browser fill generates an RFC 6238 code at execution
|
|
470
|
+
* time using HMAC-SHA1, 6 digits, and a 30-second period. Preserve leading zeros;
|
|
471
|
+
* never fill the seed. Custom algorithms, digits, periods, and form enrollment are
|
|
472
|
+
* unsupported.
|
|
473
|
+
*/
|
|
474
|
+
type: CredentialVaultFieldType;
|
|
475
|
+
required?: boolean;
|
|
476
|
+
/**
|
|
477
|
+
* Set false explicitly for ordinary usernames, email addresses, and other
|
|
478
|
+
* non-secret identifiers. Reserve true for secrets such as passwords, API tokens,
|
|
479
|
+
* and TOTP seeds. Password and totp fields must be true. Omission defaults to true
|
|
480
|
+
* for safety; do not rely on that default for every field. False permits API reads
|
|
481
|
+
* and form prefilling.
|
|
482
|
+
*/
|
|
483
|
+
sensitive?: boolean;
|
|
484
|
+
/**
|
|
485
|
+
* Optional initial value satisfying the declared type, at most 16 KiB in UTF-8
|
|
486
|
+
* bytes. Omit to leave unset; null and empty strings are rejected on creation.
|
|
487
|
+
* Sensitive values are encrypted and never copied into the returned spec.
|
|
488
|
+
*/
|
|
489
|
+
value?: string;
|
|
490
|
+
}
|
|
491
|
+
export interface CredentialVaultFieldState {
|
|
492
|
+
has_value: boolean;
|
|
493
|
+
/**
|
|
494
|
+
* Present exactly when has_value is true and the field is not sensitive. Reflects
|
|
495
|
+
* the latest developer or human edit. For totp, has_value indicates a stored seed;
|
|
496
|
+
* neither the seed nor a generated code is returned.
|
|
497
|
+
*/
|
|
498
|
+
value?: string;
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Text, email, and password have form inputs; totp does not and is omitted from
|
|
502
|
+
* both Kernel-hosted and customer React forms. Password and totp must be
|
|
503
|
+
* sensitive. A totp value is an RFC 4648 Base32 generator seed (case-insensitive,
|
|
504
|
+
* optional trailing padding), not an otpauth URI or current code. Reject invalid
|
|
505
|
+
* or empty decoded seeds. Browser fill generates an RFC 6238 code at execution
|
|
506
|
+
* time using HMAC-SHA1, 6 digits, and a 30-second period. Preserve leading zeros;
|
|
507
|
+
* never fill the seed. Custom algorithms, digits, periods, and form enrollment are
|
|
508
|
+
* unsupported.
|
|
509
|
+
*/
|
|
510
|
+
export type CredentialVaultFieldType = 'text' | 'email' | 'password' | 'totp';
|
|
511
|
+
export interface CredentialVaultFieldUpdate {
|
|
512
|
+
/**
|
|
513
|
+
* Replacement value (at most 16 KiB in UTF-8 bytes), or null or an empty string to
|
|
514
|
+
* immediately clear the stored value. Clearing a required form-supported field
|
|
515
|
+
* reopens collection; clearing an optional field does not prevent readiness.
|
|
516
|
+
* Values must satisfy the declared field type. For totp, value is the generator
|
|
517
|
+
* seed, never a current code. Clearing a required totp field returns 400 because
|
|
518
|
+
* it cannot be collected in a form.
|
|
519
|
+
*/
|
|
520
|
+
value: string | null;
|
|
521
|
+
}
|
|
522
|
+
export interface CredentialVaultItem {
|
|
523
|
+
id: string;
|
|
524
|
+
available_expansions: Array<CredentialVaultItem.AvailableExpansion>;
|
|
525
|
+
/**
|
|
526
|
+
* Advertises collect for ready and pending_collection items. Browser fill is
|
|
527
|
+
* advertised only when separately implemented and eligible.
|
|
528
|
+
*/
|
|
529
|
+
available_operations: Array<CredentialVaultItem.AvailableOperation>;
|
|
530
|
+
created_at: string;
|
|
531
|
+
/**
|
|
532
|
+
* Immutable item key assigned when the item is created.
|
|
533
|
+
*/
|
|
534
|
+
key: string;
|
|
535
|
+
spec: CredentialVaultItemSpec;
|
|
536
|
+
state: CredentialVaultItemState;
|
|
537
|
+
type: 'credential';
|
|
538
|
+
updated_at: string;
|
|
539
|
+
/**
|
|
540
|
+
* Starts at 1 and increments on PATCH and successful hosted submission, but not
|
|
541
|
+
* collection-link renewal.
|
|
542
|
+
*/
|
|
543
|
+
version: number;
|
|
544
|
+
/**
|
|
545
|
+
* One schema-derived form for the item, available in ready or pending_collection
|
|
546
|
+
* state. Render every form-supported field as editable; omit totp fields and
|
|
547
|
+
* preserve their stored seeds. Prefill non-sensitive values, and allow existing
|
|
548
|
+
* sensitive values to be preserved or replaced without ever revealing them. No
|
|
549
|
+
* field subsets or per-request form configuration exist. Validate required fields
|
|
550
|
+
* against the resulting values, including preserved secrets. Submit changed values
|
|
551
|
+
* only, using the version used to render the form. Scoped hosted submission
|
|
552
|
+
* rejects totp edits; seed writes require the ordinary authenticated item API.
|
|
553
|
+
* Customer forms likewise omit totp from their payloads. Save edits atomically. A
|
|
554
|
+
* successful hosted submission increments the version, marks ready, and consumes
|
|
555
|
+
* the session; an empty edit may complete collection while preserving values. A
|
|
556
|
+
* customer form uses PATCH for changed values and does not send an empty PATCH
|
|
557
|
+
* when nothing changed. Kernel-hosted bearer sessions require no Kernel account
|
|
558
|
+
* and are bound to the item version. Expired, superseded, consumed, or
|
|
559
|
+
* deleted-item sessions cannot submit. Authenticated item GET renews expired
|
|
560
|
+
* active sessions for ready or pending items; pending items always receive an
|
|
561
|
+
* action. A ready item with no active session omits the action until collect is
|
|
562
|
+
* invoked. Concurrent renewals return the same link. Renewal changes neither
|
|
563
|
+
* values nor item version. An expired link cannot renew itself. The hosted form
|
|
564
|
+
* handles its collection protocol; callers only open the returned URL and do not
|
|
565
|
+
* extract or submit its token through the public API. For customer-hosted forms,
|
|
566
|
+
* use @onkernel/vault-react and an authenticated customer backend calling the
|
|
567
|
+
* ordinary item GET/PATCH API. Kernel does not store customer collection URLs or
|
|
568
|
+
* authenticate the customer's end users. Treat URLs and submitted values as
|
|
569
|
+
* secrets and exclude them from logs, traces, and errors.
|
|
570
|
+
*/
|
|
571
|
+
action?: CredentialCollectionAction;
|
|
572
|
+
}
|
|
573
|
+
export declare namespace CredentialVaultItem {
|
|
574
|
+
/**
|
|
575
|
+
* Live data that can currently be requested by passing its type to the item GET
|
|
576
|
+
* expand parameter.
|
|
577
|
+
*/
|
|
578
|
+
interface AvailableExpansion {
|
|
579
|
+
description: string;
|
|
580
|
+
type: 'payment_methods';
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* An operation that is currently valid for this item. Read the description before
|
|
584
|
+
* invoking it through the item operations endpoint.
|
|
585
|
+
*/
|
|
586
|
+
interface AvailableOperation {
|
|
587
|
+
description: string;
|
|
588
|
+
type: 'authorize' | 'collect' | 'prepare_checkout' | 'fill';
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* Create a credential item without a wallet or external provider. Do not use
|
|
593
|
+
* credential items to store, collect, or fill credit card data, including card
|
|
594
|
+
* numbers (PANs), security codes (CVV/CVC), or expiration dates. Use wallet and
|
|
595
|
+
* card item types for credit cards and payment checkout instead. If all required
|
|
596
|
+
* fields have values, return ready without a collection action; collect can still
|
|
597
|
+
* open its form. Otherwise return pending_collection with a time-scoped
|
|
598
|
+
* Kernel-hosted collection action. Missing optional fields alone do not trigger
|
|
599
|
+
* collection. Repeating the original creation request returns the current item
|
|
600
|
+
* without overwriting later edits; a different request at the same key
|
|
601
|
+
* returns 409. Use PATCH for updates. Required totp fields must include a valid
|
|
602
|
+
* seed on creation; otherwise return 400 rather than opening a form that cannot
|
|
603
|
+
* collect it. Optional totp fields may be unset and populated later through PATCH.
|
|
604
|
+
*/
|
|
605
|
+
export interface CredentialVaultItemRequest {
|
|
606
|
+
/**
|
|
607
|
+
* Credential fields are for login and other non-payment credentials. Do not store,
|
|
608
|
+
* collect, or fill credit card data in credential items. Use wallet and card item
|
|
609
|
+
* types for credit cards and payment checkout instead.
|
|
610
|
+
*/
|
|
611
|
+
spec: CredentialVaultItemSpecInput;
|
|
612
|
+
type: 'credential';
|
|
613
|
+
}
|
|
614
|
+
export interface CredentialVaultItemSpec {
|
|
615
|
+
fields: {
|
|
616
|
+
[key: string]: CredentialVaultFieldDefinition;
|
|
617
|
+
};
|
|
618
|
+
/**
|
|
619
|
+
* Recognizable site or service name displayed verbatim as the form title, without
|
|
620
|
+
* suffixes such as sign-in credentials. Display text only, not an enforced
|
|
621
|
+
* destination policy.
|
|
622
|
+
*/
|
|
623
|
+
description?: string;
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Credential fields are for login and other non-payment credentials. Do not store,
|
|
627
|
+
* collect, or fill credit card data in credential items. Use wallet and card item
|
|
628
|
+
* types for credit cards and payment checkout instead.
|
|
629
|
+
*/
|
|
630
|
+
export interface CredentialVaultItemSpecInput {
|
|
631
|
+
fields: {
|
|
632
|
+
[key: string]: CredentialVaultFieldInput;
|
|
633
|
+
};
|
|
634
|
+
/**
|
|
635
|
+
* The site's recognizable display name, used verbatim as the user-facing form
|
|
636
|
+
* title (for example, Hacker News). Use only the site or service name; do not
|
|
637
|
+
* append sign-in, login, credentials, or task instructions. This is display text,
|
|
638
|
+
* not an enforced destination policy. At most 16 KiB in UTF-8 bytes.
|
|
639
|
+
*/
|
|
640
|
+
description?: string;
|
|
641
|
+
}
|
|
642
|
+
export interface CredentialVaultItemSpecUpdate {
|
|
643
|
+
/**
|
|
644
|
+
* Recognizable site or service name used as the form title, without suffixes such
|
|
645
|
+
* as sign-in credentials. An empty string clears it. Display text only, not an
|
|
646
|
+
* enforced destination policy. The server also enforces a 16 KiB UTF-8 byte limit.
|
|
647
|
+
*/
|
|
648
|
+
description?: string;
|
|
649
|
+
fields?: {
|
|
650
|
+
[key: string]: CredentialVaultFieldUpdate;
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
export interface CredentialVaultItemState {
|
|
654
|
+
/**
|
|
655
|
+
* Exactly one entry for each declared field.
|
|
656
|
+
*/
|
|
657
|
+
fields: {
|
|
658
|
+
[key: string]: CredentialVaultFieldState;
|
|
659
|
+
};
|
|
660
|
+
/**
|
|
661
|
+
* Ready means all required fields have values, not that a login succeeded.
|
|
662
|
+
* Optional fields may remain unset.
|
|
663
|
+
*/
|
|
664
|
+
status: 'pending_collection' | 'ready';
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
667
|
+
* Atomically update description and selected values. Omitted properties are
|
|
668
|
+
* preserved. Field names, types, required flags, and sensitivity cannot change.
|
|
669
|
+
* Unknown field names return 400; stale versions or mismatched item types return
|
|
670
|
+
* 409 without changing the item. A successful update increments version and
|
|
671
|
+
* invalidates outstanding Kernel-hosted collection sessions. If required values
|
|
672
|
+
* remain missing, return pending_collection and a fresh collection action.
|
|
673
|
+
* Otherwise return ready without an action; collect can open the form again
|
|
674
|
+
* without clearing values. Customer URLs have no Kernel-managed expiry.
|
|
675
|
+
*/
|
|
676
|
+
export interface CredentialVaultItemUpdateRequest {
|
|
677
|
+
spec: CredentialVaultItemSpecUpdate;
|
|
678
|
+
type: 'credential';
|
|
679
|
+
/**
|
|
680
|
+
* Expected current item version from the latest read.
|
|
681
|
+
*/
|
|
682
|
+
version: number;
|
|
683
|
+
/**
|
|
684
|
+
* Optional immutable item ID precondition. Returns 409 if the key now identifies a
|
|
685
|
+
* different item. Accepted writes target this immutable ID, preventing
|
|
686
|
+
* replacement-key races. Supply this when submitting a form bound to a previously
|
|
687
|
+
* read item.
|
|
688
|
+
*/
|
|
689
|
+
expected_item_id?: string;
|
|
690
|
+
}
|
|
691
|
+
/**
|
|
692
|
+
* Fill selected fields from one ready credential or ready, unexpired Link card
|
|
693
|
+
* into a browser linked to its vault. Only invoke when the item advertises `fill`.
|
|
694
|
+
* Browser and vault must belong to the same project. Kernel checks access and
|
|
695
|
+
* allowed destinations before filling; providing a page URL does not authorize a
|
|
696
|
+
* destination.
|
|
375
697
|
*
|
|
376
|
-
* Find exactly one open page matching `page_url`.
|
|
377
|
-
*
|
|
378
|
-
*
|
|
379
|
-
*
|
|
380
|
-
*
|
|
381
|
-
*
|
|
382
|
-
*
|
|
383
|
-
*
|
|
698
|
+
* Find exactly one open page matching `page_url`. Credential items may omit
|
|
699
|
+
* `page_url` to require exactly one open page; cards require an HTTPS page URL.
|
|
700
|
+
* Credentials have no destination allowlist. TOTP fields generate a current code
|
|
701
|
+
* immediately before writing; their seeds never enter the browser. For each
|
|
702
|
+
* selector, search the main frame and all descendant frames for editable inputs or
|
|
703
|
+
* selects matched directly or contained within matching elements. Each selector
|
|
704
|
+
* must resolve to one unique editable element across all frames; zero or multiple
|
|
705
|
+
* candidates fail. Count each element once, even if multiple matching containers
|
|
706
|
+
* contain it. Validate all bindings before filling. Select elements match an
|
|
707
|
+
* option by its value, not its label. If the page navigates or a target disappears
|
|
708
|
+
* during filling, stop rather than selecting a different page or element.
|
|
384
709
|
*
|
|
385
710
|
* Fill in request order and stop on the first failure. This operation is not
|
|
386
711
|
* atomic: previously filled fields are not rolled back. Never submit the form or
|
|
@@ -402,14 +727,16 @@ export interface FillVaultItemOperationRequest {
|
|
|
402
727
|
/**
|
|
403
728
|
* Field bindings for this step. No two bindings may resolve to the same element.
|
|
404
729
|
*/
|
|
405
|
-
fields: Array<
|
|
730
|
+
fields: Array<VaultFillField>;
|
|
731
|
+
type: 'fill';
|
|
406
732
|
/**
|
|
407
733
|
* Exact current top-level page URL, including path, query, and fragment. Must
|
|
408
734
|
* match exactly one open page in the browser; zero or multiple matches fail. No
|
|
409
|
-
* prefix or glob matching.
|
|
735
|
+
* prefix or glob matching. Required for cards, which must use HTTPS without
|
|
736
|
+
* embedded credentials. Optional for credentials, where omission requires exactly
|
|
737
|
+
* one open page.
|
|
410
738
|
*/
|
|
411
|
-
page_url
|
|
412
|
-
type: 'fill';
|
|
739
|
+
page_url?: string;
|
|
413
740
|
/**
|
|
414
741
|
* Total operation deadline in milliseconds, not a per-field timeout.
|
|
415
742
|
*/
|
|
@@ -512,6 +839,19 @@ export interface VaultCheckoutContext {
|
|
|
512
839
|
*/
|
|
513
840
|
merchant_origin: string;
|
|
514
841
|
}
|
|
842
|
+
export interface VaultFillField {
|
|
843
|
+
/**
|
|
844
|
+
* A declared credential field name or a supported card field. Unset credential
|
|
845
|
+
* fields cannot be filled.
|
|
846
|
+
*/
|
|
847
|
+
field: string;
|
|
848
|
+
selector: string;
|
|
849
|
+
/**
|
|
850
|
+
* Required only for a card's combined expiration field. Forbidden for other card
|
|
851
|
+
* fields and all credential fields.
|
|
852
|
+
*/
|
|
853
|
+
format?: 'MM/YY' | 'MM/YYYY';
|
|
854
|
+
}
|
|
515
855
|
export interface VaultFillFieldResult {
|
|
516
856
|
/**
|
|
517
857
|
* Zero-based index into the request fields array.
|
|
@@ -528,7 +868,7 @@ export interface VaultFillFieldResult {
|
|
|
528
868
|
*/
|
|
529
869
|
error_code?: 'target_changed' | 'element_not_found' | 'ambiguous_selector' | 'element_not_editable' | 'option_not_found' | 'timeout' | 'execution_failed';
|
|
530
870
|
}
|
|
531
|
-
export type VaultItem = VaultItem.WalletVaultItem | VaultItem.CardVaultItem;
|
|
871
|
+
export type VaultItem = VaultItem.WalletVaultItem | VaultItem.CardVaultItem | CredentialVaultItem;
|
|
532
872
|
export declare namespace VaultItem {
|
|
533
873
|
interface WalletVaultItem {
|
|
534
874
|
id: string;
|
|
@@ -573,7 +913,7 @@ export declare namespace VaultItem {
|
|
|
573
913
|
*/
|
|
574
914
|
interface AvailableOperation {
|
|
575
915
|
description: string;
|
|
576
|
-
type: 'authorize' | 'prepare_checkout' | 'fill';
|
|
916
|
+
type: 'authorize' | 'collect' | 'prepare_checkout' | 'fill';
|
|
577
917
|
}
|
|
578
918
|
/**
|
|
579
919
|
* Live, non-persisted data requested through the item GET expand parameter.
|
|
@@ -616,7 +956,7 @@ export declare namespace VaultItem {
|
|
|
616
956
|
*/
|
|
617
957
|
interface AvailableOperation {
|
|
618
958
|
description: string;
|
|
619
|
-
type: 'authorize' | 'prepare_checkout' | 'fill';
|
|
959
|
+
type: 'authorize' | 'collect' | 'prepare_checkout' | 'fill';
|
|
620
960
|
}
|
|
621
961
|
}
|
|
622
962
|
}
|
|
@@ -664,7 +1004,7 @@ export interface VaultItemEvent {
|
|
|
664
1004
|
* value-free execution result; it does not persist transient field outcomes on the
|
|
665
1005
|
* item.
|
|
666
1006
|
*/
|
|
667
|
-
export type VaultItemOperationResponse = VaultItemOperationResponse.WalletVaultItem | VaultItemOperationResponse.CardVaultItem | FillVaultItemOperationResult;
|
|
1007
|
+
export type VaultItemOperationResponse = VaultItemOperationResponse.WalletVaultItem | VaultItemOperationResponse.CardVaultItem | CredentialVaultItem | FillVaultItemOperationResult;
|
|
668
1008
|
export declare namespace VaultItemOperationResponse {
|
|
669
1009
|
interface WalletVaultItem {
|
|
670
1010
|
id: string;
|
|
@@ -709,7 +1049,7 @@ export declare namespace VaultItemOperationResponse {
|
|
|
709
1049
|
*/
|
|
710
1050
|
interface AvailableOperation {
|
|
711
1051
|
description: string;
|
|
712
|
-
type: 'authorize' | 'prepare_checkout' | 'fill';
|
|
1052
|
+
type: 'authorize' | 'collect' | 'prepare_checkout' | 'fill';
|
|
713
1053
|
}
|
|
714
1054
|
/**
|
|
715
1055
|
* Live, non-persisted data requested through the item GET expand parameter.
|
|
@@ -752,7 +1092,7 @@ export declare namespace VaultItemOperationResponse {
|
|
|
752
1092
|
*/
|
|
753
1093
|
interface AvailableOperation {
|
|
754
1094
|
description: string;
|
|
755
|
-
type: 'authorize' | 'prepare_checkout' | 'fill';
|
|
1095
|
+
type: 'authorize' | 'collect' | 'prepare_checkout' | 'fill';
|
|
756
1096
|
}
|
|
757
1097
|
}
|
|
758
1098
|
}
|
|
@@ -898,19 +1238,54 @@ export interface ItemRetrieveParams {
|
|
|
898
1238
|
expand?: Array<'payment_methods'>;
|
|
899
1239
|
/**
|
|
900
1240
|
* Query param: Hold for up to this many seconds while the item is pending
|
|
901
|
-
* authorization or
|
|
1241
|
+
* authorization, approval, or credential collection. Return the current item when
|
|
1242
|
+
* ready or when the wait elapses. This does not wait for edits to an already-ready
|
|
1243
|
+
* credential; poll GET without wait and compare version to observe changes after
|
|
1244
|
+
* collect.
|
|
902
1245
|
*/
|
|
903
1246
|
wait?: number;
|
|
904
1247
|
}
|
|
905
|
-
export
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
1248
|
+
export type ItemUpdateParams = ItemUpdateParams.CardVaultItemUpdateRequest | ItemUpdateParams.CredentialVaultItemUpdateRequest;
|
|
1249
|
+
export declare namespace ItemUpdateParams {
|
|
1250
|
+
interface CardVaultItemUpdateRequest {
|
|
1251
|
+
/**
|
|
1252
|
+
* Path param
|
|
1253
|
+
*/
|
|
1254
|
+
id_or_name: string;
|
|
1255
|
+
/**
|
|
1256
|
+
* Body param: Live payment card. Test-mode card creation is not supported.
|
|
1257
|
+
*/
|
|
1258
|
+
spec: CardVaultItemSpec;
|
|
1259
|
+
/**
|
|
1260
|
+
* Body param
|
|
1261
|
+
*/
|
|
1262
|
+
type?: 'card';
|
|
1263
|
+
}
|
|
1264
|
+
interface CredentialVaultItemUpdateRequest {
|
|
1265
|
+
/**
|
|
1266
|
+
* Path param
|
|
1267
|
+
*/
|
|
1268
|
+
id_or_name: string;
|
|
1269
|
+
/**
|
|
1270
|
+
* Body param
|
|
1271
|
+
*/
|
|
1272
|
+
spec: CredentialVaultItemSpecUpdate;
|
|
1273
|
+
/**
|
|
1274
|
+
* Body param
|
|
1275
|
+
*/
|
|
1276
|
+
type: 'credential';
|
|
1277
|
+
/**
|
|
1278
|
+
* Body param: Expected current item version from the latest read.
|
|
1279
|
+
*/
|
|
1280
|
+
version: number;
|
|
1281
|
+
/**
|
|
1282
|
+
* Body param: Optional immutable item ID precondition. Returns 409 if the key now
|
|
1283
|
+
* identifies a different item. Accepted writes target this immutable ID,
|
|
1284
|
+
* preventing replacement-key races. Supply this when submitting a form bound to a
|
|
1285
|
+
* previously read item.
|
|
1286
|
+
*/
|
|
1287
|
+
expected_item_id?: string;
|
|
1288
|
+
}
|
|
914
1289
|
}
|
|
915
1290
|
export interface ItemDeleteParams {
|
|
916
1291
|
id_or_name: string;
|
|
@@ -929,7 +1304,7 @@ export interface ItemEventsParams {
|
|
|
929
1304
|
*/
|
|
930
1305
|
wait?: number;
|
|
931
1306
|
}
|
|
932
|
-
export type ItemPerformOperationParams = ItemPerformOperationParams.AuthorizeVaultItemOperationRequest | ItemPerformOperationParams.PrepareCheckoutVaultItemOperationRequest | ItemPerformOperationParams.FillVaultItemOperationRequest;
|
|
1307
|
+
export type ItemPerformOperationParams = ItemPerformOperationParams.AuthorizeVaultItemOperationRequest | ItemPerformOperationParams.CollectVaultItemOperationRequest | ItemPerformOperationParams.PrepareCheckoutVaultItemOperationRequest | ItemPerformOperationParams.FillVaultItemOperationRequest;
|
|
933
1308
|
export declare namespace ItemPerformOperationParams {
|
|
934
1309
|
interface AuthorizeVaultItemOperationRequest {
|
|
935
1310
|
/**
|
|
@@ -941,6 +1316,16 @@ export declare namespace ItemPerformOperationParams {
|
|
|
941
1316
|
*/
|
|
942
1317
|
type: 'authorize';
|
|
943
1318
|
}
|
|
1319
|
+
interface CollectVaultItemOperationRequest {
|
|
1320
|
+
/**
|
|
1321
|
+
* Path param
|
|
1322
|
+
*/
|
|
1323
|
+
id_or_name: string;
|
|
1324
|
+
/**
|
|
1325
|
+
* Body param
|
|
1326
|
+
*/
|
|
1327
|
+
type: 'collect';
|
|
1328
|
+
}
|
|
944
1329
|
interface PrepareCheckoutVaultItemOperationRequest {
|
|
945
1330
|
/**
|
|
946
1331
|
* Path param
|
|
@@ -972,25 +1357,26 @@ export declare namespace ItemPerformOperationParams {
|
|
|
972
1357
|
* Body param: Field bindings for this step. No two bindings may resolve to the
|
|
973
1358
|
* same element.
|
|
974
1359
|
*/
|
|
975
|
-
fields: Array<
|
|
976
|
-
/**
|
|
977
|
-
* Body param: Exact current top-level page URL, including path, query, and
|
|
978
|
-
* fragment. Must match exactly one open page in the browser; zero or multiple
|
|
979
|
-
* matches fail. No prefix or glob matching. Must use HTTPS without embedded
|
|
980
|
-
* credentials.
|
|
981
|
-
*/
|
|
982
|
-
page_url: string;
|
|
1360
|
+
fields: Array<VaultFillField>;
|
|
983
1361
|
/**
|
|
984
1362
|
* Body param
|
|
985
1363
|
*/
|
|
986
1364
|
type: 'fill';
|
|
1365
|
+
/**
|
|
1366
|
+
* Body param: Exact current top-level page URL, including path, query, and
|
|
1367
|
+
* fragment. Must match exactly one open page in the browser; zero or multiple
|
|
1368
|
+
* matches fail. No prefix or glob matching. Required for cards, which must use
|
|
1369
|
+
* HTTPS without embedded credentials. Optional for credentials, where omission
|
|
1370
|
+
* requires exactly one open page.
|
|
1371
|
+
*/
|
|
1372
|
+
page_url?: string;
|
|
987
1373
|
/**
|
|
988
1374
|
* Body param: Total operation deadline in milliseconds, not a per-field timeout.
|
|
989
1375
|
*/
|
|
990
1376
|
timeout_ms?: number;
|
|
991
1377
|
}
|
|
992
1378
|
}
|
|
993
|
-
export type ItemUpsertParams = ItemUpsertParams.WalletVaultItemRequest | ItemUpsertParams.CardVaultItemRequest;
|
|
1379
|
+
export type ItemUpsertParams = ItemUpsertParams.WalletVaultItemRequest | ItemUpsertParams.CardVaultItemRequest | ItemUpsertParams.CredentialVaultItemRequest;
|
|
994
1380
|
export declare namespace ItemUpsertParams {
|
|
995
1381
|
interface WalletVaultItemRequest {
|
|
996
1382
|
/**
|
|
@@ -1148,8 +1534,24 @@ export declare namespace ItemUpsertParams {
|
|
|
1148
1534
|
*/
|
|
1149
1535
|
type: 'card';
|
|
1150
1536
|
}
|
|
1537
|
+
interface CredentialVaultItemRequest {
|
|
1538
|
+
/**
|
|
1539
|
+
* Path param
|
|
1540
|
+
*/
|
|
1541
|
+
id_or_name: string;
|
|
1542
|
+
/**
|
|
1543
|
+
* Body param: Credential fields are for login and other non-payment credentials.
|
|
1544
|
+
* Do not store, collect, or fill credit card data in credential items. Use wallet
|
|
1545
|
+
* and card item types for credit cards and payment checkout instead.
|
|
1546
|
+
*/
|
|
1547
|
+
spec: CredentialVaultItemSpecInput;
|
|
1548
|
+
/**
|
|
1549
|
+
* Body param
|
|
1550
|
+
*/
|
|
1551
|
+
type: 'credential';
|
|
1552
|
+
}
|
|
1151
1553
|
}
|
|
1152
1554
|
export declare namespace Items {
|
|
1153
|
-
export { type AgentcardCheckoutAuthorization as AgentcardCheckoutAuthorization, type AgentcardCheckoutPreparation as AgentcardCheckoutPreparation, type AuthorizeVaultItemOperationRequest as AuthorizeVaultItemOperationRequest, type CardVaultItemSpec as CardVaultItemSpec, type CardVaultItemState as CardVaultItemState, type FillVaultItemOperationRequest as FillVaultItemOperationRequest, type FillVaultItemOperationResult as FillVaultItemOperationResult, type PrepareCheckoutVaultItemOperationRequest as PrepareCheckoutVaultItemOperationRequest, type VaultCardAliases as VaultCardAliases, type VaultCardFillField as VaultCardFillField, type VaultCheckoutContext as VaultCheckoutContext, type VaultFillFieldResult as VaultFillFieldResult, type VaultItem as VaultItem, type VaultItemAction as VaultItemAction, type VaultItemEvent as VaultItemEvent, type VaultItemOperationResponse as VaultItemOperationResponse, type VaultPaymentMethod as VaultPaymentMethod, type WalletVaultItemSpec as WalletVaultItemSpec, type WalletVaultItemState as WalletVaultItemState, type ItemListResponse as ItemListResponse, type ItemEventsResponse as ItemEventsResponse, type ItemRetrieveParams as ItemRetrieveParams, type ItemUpdateParams as ItemUpdateParams, type ItemDeleteParams as ItemDeleteParams, type ItemEventsParams as ItemEventsParams, type ItemPerformOperationParams as ItemPerformOperationParams, type ItemUpsertParams as ItemUpsertParams, };
|
|
1555
|
+
export { type AgentcardCheckoutAuthorization as AgentcardCheckoutAuthorization, type AgentcardCheckoutPreparation as AgentcardCheckoutPreparation, type AuthorizeVaultItemOperationRequest as AuthorizeVaultItemOperationRequest, type CardVaultItemSpec as CardVaultItemSpec, type CardVaultItemState as CardVaultItemState, type CollectVaultItemOperationRequest as CollectVaultItemOperationRequest, type CredentialCollectionAction as CredentialCollectionAction, type CredentialVaultFieldDefinition as CredentialVaultFieldDefinition, type CredentialVaultFieldInput as CredentialVaultFieldInput, type CredentialVaultFieldState as CredentialVaultFieldState, type CredentialVaultFieldType as CredentialVaultFieldType, type CredentialVaultFieldUpdate as CredentialVaultFieldUpdate, type CredentialVaultItem as CredentialVaultItem, type CredentialVaultItemRequest as CredentialVaultItemRequest, type CredentialVaultItemSpec as CredentialVaultItemSpec, type CredentialVaultItemSpecInput as CredentialVaultItemSpecInput, type CredentialVaultItemSpecUpdate as CredentialVaultItemSpecUpdate, type CredentialVaultItemState as CredentialVaultItemState, type CredentialVaultItemUpdateRequest as CredentialVaultItemUpdateRequest, type FillVaultItemOperationRequest as FillVaultItemOperationRequest, type FillVaultItemOperationResult as FillVaultItemOperationResult, type PrepareCheckoutVaultItemOperationRequest as PrepareCheckoutVaultItemOperationRequest, type VaultCardAliases as VaultCardAliases, type VaultCardFillField as VaultCardFillField, type VaultCheckoutContext as VaultCheckoutContext, type VaultFillField as VaultFillField, type VaultFillFieldResult as VaultFillFieldResult, type VaultItem as VaultItem, type VaultItemAction as VaultItemAction, type VaultItemEvent as VaultItemEvent, type VaultItemOperationResponse as VaultItemOperationResponse, type VaultPaymentMethod as VaultPaymentMethod, type WalletVaultItemSpec as WalletVaultItemSpec, type WalletVaultItemState as WalletVaultItemState, type ItemListResponse as ItemListResponse, type ItemEventsResponse as ItemEventsResponse, type ItemRetrieveParams as ItemRetrieveParams, type ItemUpdateParams as ItemUpdateParams, type ItemDeleteParams as ItemDeleteParams, type ItemEventsParams as ItemEventsParams, type ItemPerformOperationParams as ItemPerformOperationParams, type ItemUpsertParams as ItemUpsertParams, };
|
|
1154
1556
|
}
|
|
1155
1557
|
//# sourceMappingURL=items.d.mts.map
|