@onkernel/sdk 0.101.0 → 0.102.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 +14 -0
- package/package.json +1 -1
- package/resources/auth/connections.d.mts +6 -0
- package/resources/auth/connections.d.mts.map +1 -1
- package/resources/auth/connections.d.ts +6 -0
- package/resources/auth/connections.d.ts.map +1 -1
- package/resources/browsers/computer.d.mts +6 -2
- package/resources/browsers/computer.d.mts.map +1 -1
- package/resources/browsers/computer.d.ts +6 -2
- package/resources/browsers/computer.d.ts.map +1 -1
- package/resources/config-registry/config-registry.d.mts +44 -1
- package/resources/config-registry/config-registry.d.mts.map +1 -1
- package/resources/config-registry/config-registry.d.ts +44 -1
- 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 +390 -27
- package/resources/vaults/items.d.mts.map +1 -1
- package/resources/vaults/items.d.ts +390 -27
- package/resources/vaults/items.d.ts.map +1 -1
- package/resources/vaults/items.js +22 -9
- package/resources/vaults/items.js.map +1 -1
- package/resources/vaults/items.mjs +22 -9
- 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 +7 -0
- package/src/resources/browsers/computer.ts +6 -2
- package/src/resources/config-registry/config-registry.ts +56 -1
- package/src/resources/vaults/index.ts +9 -0
- package/src/resources/vaults/items.ts +509 -26
- package/src/resources/vaults/vaults.ts +18 -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
|
@@ -74,9 +74,11 @@ export class Items extends APIResource {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
|
-
* Unresolved payment operations block deletion, including operations on
|
|
78
|
-
* cards of a wallet.
|
|
79
|
-
*
|
|
77
|
+
* Unresolved payment operations normally block deletion, including operations on
|
|
78
|
+
* child cards of a wallet. An AgentCard card in recovery_required whose checkout
|
|
79
|
+
* create response returned no authorization ID may be explicitly abandoned by
|
|
80
|
+
* deleting that card directly; deleting its wallet or vault remains blocked.
|
|
81
|
+
* Deleting or recreating an item is not proof that a payment did not occur.
|
|
80
82
|
*
|
|
81
83
|
* @example
|
|
82
84
|
* ```ts
|
|
@@ -111,16 +113,27 @@ export class Items extends APIResource {
|
|
|
111
113
|
|
|
112
114
|
/**
|
|
113
115
|
* Retrieve the item first and invoke only an operation listed in
|
|
114
|
-
* `available_operations`, following its natural-language description.
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
116
|
+
* `available_operations`, following its natural-language description. Availability
|
|
117
|
+
* is rechecked at execution time; unavailable operations return 409. Authorization
|
|
118
|
+
* and preparation may call an external provider and return updated state. Link
|
|
119
|
+
* cards advertise authorize without checkout context. Eligible unused AgentCard
|
|
120
|
+
* cards advertise prepare_checkout, which requires checkout context and obtains
|
|
121
|
+
* device approval before native Square Pay. Keep the returned approval page open,
|
|
122
|
+
* poll until ready_to_submit, then submit before preparation.expires_at. Unused
|
|
123
|
+
* preparations expire automatically and cannot be reused. If spend-request
|
|
124
|
+
* creation is rate limited, returns HTTP 429 with code
|
|
119
125
|
* `spend_request_rate_limited`; stop and back off before retrying.
|
|
120
126
|
*
|
|
127
|
+
* Fill returns a value-free execution result. Validation failures before writing
|
|
128
|
+
* return 400 (invalid request or targets), 403 (access or destination denied), 404
|
|
129
|
+
* (resource not found), or 409 (item or browser not ready). Once writing starts,
|
|
130
|
+
* known partial failures and indeterminate field outcomes return 200 with status
|
|
131
|
+
* `failed` or `unknown`, not an automatic-retry signal. A transport error may
|
|
132
|
+
* leave the outcome unknown; do not automatically retry.
|
|
133
|
+
*
|
|
121
134
|
* @example
|
|
122
135
|
* ```ts
|
|
123
|
-
* const
|
|
136
|
+
* const vaultItemOperationResponse =
|
|
124
137
|
* await client.vaults.items.performOperation('key', {
|
|
125
138
|
* id_or_name: 'id_or_name',
|
|
126
139
|
* type: 'authorize',
|
|
@@ -131,7 +144,7 @@ export class Items extends APIResource {
|
|
|
131
144
|
key: string,
|
|
132
145
|
params: ItemPerformOperationParams,
|
|
133
146
|
options?: RequestOptions,
|
|
134
|
-
): APIPromise<
|
|
147
|
+
): APIPromise<VaultItemOperationResponse> {
|
|
135
148
|
const { id_or_name, ...body } = params;
|
|
136
149
|
return this._client.post(path`/vaults/${id_or_name}/items/${key}/operations`, { body, ...options });
|
|
137
150
|
}
|
|
@@ -223,6 +236,50 @@ export interface AgentcardCheckoutAuthorization {
|
|
|
223
236
|
replay_status?: number;
|
|
224
237
|
}
|
|
225
238
|
|
|
239
|
+
/**
|
|
240
|
+
* One-use Square checkout preparation. Keep the approval page open through token
|
|
241
|
+
* handoff. The amount is display-only and does not constrain the merchant's
|
|
242
|
+
* eventual charge.
|
|
243
|
+
*/
|
|
244
|
+
export interface AgentcardCheckoutPreparation {
|
|
245
|
+
browser_id: string;
|
|
246
|
+
|
|
247
|
+
created_at: string;
|
|
248
|
+
|
|
249
|
+
environment: 'production' | 'sandbox';
|
|
250
|
+
|
|
251
|
+
merchant_origin: string;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Preparation consumed means egress claimed the preparation and it cannot be
|
|
255
|
+
* reused. It does not mean the attempt settled. Use the enclosing item's status as
|
|
256
|
+
* the lifecycle indicator; item consumed means the attempt settled, not that an
|
|
257
|
+
* order or charge succeeded.
|
|
258
|
+
*/
|
|
259
|
+
status: 'creating' | 'awaiting_approval' | 'ready' | 'consumed' | 'cancelled' | 'expired' | 'unknown';
|
|
260
|
+
|
|
261
|
+
id?: string;
|
|
262
|
+
|
|
263
|
+
approval_url?: string;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* When ready, the absolute deadline to submit the first native request; no later
|
|
267
|
+
* than provider readiness expiry or 30 seconds after Kernel first observes
|
|
268
|
+
* readiness. Polling never extends this deadline.
|
|
269
|
+
*/
|
|
270
|
+
expires_at?: string;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Authorize a Link card using its existing purchase specification. Use only after
|
|
275
|
+
* explicit user approval and when the item advertises authorize. Do not
|
|
276
|
+
* automatically retry provider failures or indeterminate outcomes. Checkout
|
|
277
|
+
* context is not accepted.
|
|
278
|
+
*/
|
|
279
|
+
export interface AuthorizeVaultItemOperationRequest {
|
|
280
|
+
type: 'authorize';
|
|
281
|
+
}
|
|
282
|
+
|
|
226
283
|
/**
|
|
227
284
|
* Live payment card. Test-mode card creation is not supported.
|
|
228
285
|
*/
|
|
@@ -398,12 +455,27 @@ export namespace CardVaultItemState {
|
|
|
398
455
|
provider: 'agentcard';
|
|
399
456
|
|
|
400
457
|
/**
|
|
401
|
-
*
|
|
402
|
-
*
|
|
403
|
-
*
|
|
404
|
-
*
|
|
458
|
+
* ready_to_submit is device readiness for at most 30 seconds. consumed means the
|
|
459
|
+
* prepared attempt has settled, not that an order succeeded. stopped cannot be
|
|
460
|
+
* reused. outcome_unknown requires merchant reconciliation and blocks new
|
|
461
|
+
* requests. recovery_required means the original checkout outcome is unresolved.
|
|
462
|
+
* Automatic reuse is blocked. Known authorization IDs must be reconciled through
|
|
463
|
+
* provider observations or support. When no authorization ID was returned, an
|
|
464
|
+
* explicitly confirmed item deletion may abandon the unresolved attempt so the
|
|
465
|
+
* caller can create a replacement; deletion does not prove that the original
|
|
466
|
+
* attempt failed. It does not mean declined or expired.
|
|
405
467
|
*/
|
|
406
|
-
status:
|
|
468
|
+
status:
|
|
469
|
+
| 'requested'
|
|
470
|
+
| 'ready'
|
|
471
|
+
| 'preparing'
|
|
472
|
+
| 'ready_to_submit'
|
|
473
|
+
| 'pending_approval'
|
|
474
|
+
| 'consumed'
|
|
475
|
+
| 'stopped'
|
|
476
|
+
| 'outcome_unknown'
|
|
477
|
+
| 'degraded'
|
|
478
|
+
| 'recovery_required';
|
|
407
479
|
|
|
408
480
|
aliases?: ItemsAPI.VaultCardAliases;
|
|
409
481
|
|
|
@@ -415,6 +487,13 @@ export namespace CardVaultItemState {
|
|
|
415
487
|
|
|
416
488
|
masks?: AgentCardCardState.Masks;
|
|
417
489
|
|
|
490
|
+
/**
|
|
491
|
+
* One-use Square checkout preparation. Keep the approval page open through token
|
|
492
|
+
* handoff. The amount is display-only and does not constrain the merchant's
|
|
493
|
+
* eventual charge.
|
|
494
|
+
*/
|
|
495
|
+
preparation?: ItemsAPI.AgentcardCheckoutPreparation;
|
|
496
|
+
|
|
418
497
|
status_reason?: string;
|
|
419
498
|
}
|
|
420
499
|
|
|
@@ -429,6 +508,98 @@ export namespace CardVaultItemState {
|
|
|
429
508
|
}
|
|
430
509
|
}
|
|
431
510
|
|
|
511
|
+
/**
|
|
512
|
+
* Fill selected fields from one ready, unexpired card into a browser linked to its
|
|
513
|
+
* vault. Only supported for card items created from Link wallets. Only invoke when
|
|
514
|
+
* the item advertises `fill`. Browser and vault must belong to the same project.
|
|
515
|
+
* Kernel checks access and allowed destinations before filling; providing a page
|
|
516
|
+
* URL does not authorize a destination.
|
|
517
|
+
*
|
|
518
|
+
* Find exactly one open page matching `page_url`. For each selector, search the
|
|
519
|
+
* main frame and all descendant frames for editable inputs or selects matched
|
|
520
|
+
* directly or contained within matching elements. Each selector must resolve to
|
|
521
|
+
* one unique editable element across all frames; zero or multiple candidates fail.
|
|
522
|
+
* Count each element once, even if multiple matching containers contain it.
|
|
523
|
+
* Validate all bindings before filling. Select elements match an option by its
|
|
524
|
+
* value, not its label. If the page navigates or a target disappears during
|
|
525
|
+
* filling, stop rather than selecting a different page or element.
|
|
526
|
+
*
|
|
527
|
+
* Fill in request order and stop on the first failure. This operation is not
|
|
528
|
+
* atomic: previously filled fields are not rolled back. Never submit the form or
|
|
529
|
+
* click buttons, though input/change events may trigger site behavior. Fill is the
|
|
530
|
+
* preferred browser-checkout path. Aliases remain an alternative for explicitly
|
|
531
|
+
* chosen egress-substitution integrations. Do not automatically retry or fall back
|
|
532
|
+
* to aliases after a failed or indeterminate operation.
|
|
533
|
+
*
|
|
534
|
+
* Secret values are never returned or included in operation logs, traces, audit
|
|
535
|
+
* events, or error details. This does not prevent an agent with unrestricted
|
|
536
|
+
* browser access from reading values from the page or other browser observation
|
|
537
|
+
* surfaces.
|
|
538
|
+
*/
|
|
539
|
+
export interface FillVaultItemOperationRequest {
|
|
540
|
+
/**
|
|
541
|
+
* Browser session ID, not a reusable browser name.
|
|
542
|
+
*/
|
|
543
|
+
browser_id: string;
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* Field bindings for this step. No two bindings may resolve to the same element.
|
|
547
|
+
*/
|
|
548
|
+
fields: Array<VaultCardFillField>;
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* Exact current top-level page URL, including path, query, and fragment. Must
|
|
552
|
+
* match exactly one open page in the browser; zero or multiple matches fail. No
|
|
553
|
+
* prefix or glob matching. Must use HTTPS without embedded credentials.
|
|
554
|
+
*/
|
|
555
|
+
page_url: string;
|
|
556
|
+
|
|
557
|
+
type: 'fill';
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* Total operation deadline in milliseconds, not a per-field timeout.
|
|
561
|
+
*/
|
|
562
|
+
timeout_ms?: number;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
export interface FillVaultItemOperationResult {
|
|
566
|
+
/**
|
|
567
|
+
* Exactly one result per request binding, in request order. After the first failed
|
|
568
|
+
* or unknown field, all remaining fields are not_attempted.
|
|
569
|
+
*/
|
|
570
|
+
fields: Array<VaultFillFieldResult>;
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* Completed only when all fields were filled. Failed when execution stopped with
|
|
574
|
+
* known outcomes. Unknown when any field's outcome cannot be determined. None of
|
|
575
|
+
* these statuses confirms payment or merchant acceptance.
|
|
576
|
+
*/
|
|
577
|
+
status: 'completed' | 'failed' | 'unknown';
|
|
578
|
+
|
|
579
|
+
type: 'fill';
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* Prepare an unused AgentCard card for Square checkout. Deliver the returned
|
|
584
|
+
* approval URL and keep the approval page open. Poll the item until
|
|
585
|
+
* ready_to_submit, then submit native Pay before preparation.expires_at. Readiness
|
|
586
|
+
* lasts at most 30 seconds. Unused preparations expire automatically. Preparations
|
|
587
|
+
* are single-use even after failure or expiry; do not automatically retry and
|
|
588
|
+
* reconcile uncertain outcomes with the merchant.
|
|
589
|
+
*/
|
|
590
|
+
export interface PrepareCheckoutVaultItemOperationRequest {
|
|
591
|
+
/**
|
|
592
|
+
* Required when preparing an unused AgentCard card for Square. Consent is bound to
|
|
593
|
+
* this browser and declared merchant origin, not a tab. Wait for the item's
|
|
594
|
+
* ready_to_submit status before native Pay and submit within its readiness
|
|
595
|
+
* deadline. Unused preparations expire automatically; every preparation is
|
|
596
|
+
* single-use, including after failure or expiry.
|
|
597
|
+
*/
|
|
598
|
+
checkout: VaultCheckoutContext;
|
|
599
|
+
|
|
600
|
+
type: 'prepare_checkout';
|
|
601
|
+
}
|
|
602
|
+
|
|
432
603
|
export interface VaultCardAliases {
|
|
433
604
|
cvc: string;
|
|
434
605
|
|
|
@@ -439,6 +610,112 @@ export interface VaultCardAliases {
|
|
|
439
610
|
number: string;
|
|
440
611
|
}
|
|
441
612
|
|
|
613
|
+
/**
|
|
614
|
+
* Combined expiration derived from the stored month and year; not a separate
|
|
615
|
+
* stored secret.
|
|
616
|
+
*/
|
|
617
|
+
export type VaultCardFillField =
|
|
618
|
+
| VaultCardFillField.VaultCardStoredFillField
|
|
619
|
+
| VaultCardFillField.VaultCardExpirationFillField;
|
|
620
|
+
|
|
621
|
+
export namespace VaultCardFillField {
|
|
622
|
+
export interface VaultCardStoredFillField {
|
|
623
|
+
/**
|
|
624
|
+
* Field in the decrypted card, not an alias. Number and CVC preserve leading
|
|
625
|
+
* zeros; month uses two digits and year uses four digits. Billing fields use the
|
|
626
|
+
* provider's stored billing address (name, line1, line2, city, state, postal_code,
|
|
627
|
+
* country) without reformatting. Request only needed billing fields. An absent or
|
|
628
|
+
* empty requested billing field returns 400 field_unavailable before any browser
|
|
629
|
+
* writes; it does not make other card fields unavailable.
|
|
630
|
+
*/
|
|
631
|
+
field:
|
|
632
|
+
| 'number'
|
|
633
|
+
| 'exp_month'
|
|
634
|
+
| 'exp_year'
|
|
635
|
+
| 'cvc'
|
|
636
|
+
| 'billing_name'
|
|
637
|
+
| 'billing_line1'
|
|
638
|
+
| 'billing_line2'
|
|
639
|
+
| 'billing_city'
|
|
640
|
+
| 'billing_state'
|
|
641
|
+
| 'billing_postal_code'
|
|
642
|
+
| 'billing_country';
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* CSS selector for an editable input or select, or a containing element. Must
|
|
646
|
+
* resolve to one unique editable element across all page frames.
|
|
647
|
+
*/
|
|
648
|
+
selector: string;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* Combined expiration derived from the stored month and year; not a separate
|
|
653
|
+
* stored secret.
|
|
654
|
+
*/
|
|
655
|
+
export interface VaultCardExpirationFillField {
|
|
656
|
+
field: 'expiration';
|
|
657
|
+
|
|
658
|
+
format: 'MM/YY' | 'MM/YYYY';
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* CSS selector for an editable input or select, or a containing element. Must
|
|
662
|
+
* resolve to one unique editable element across all page frames.
|
|
663
|
+
*/
|
|
664
|
+
selector: string;
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* Required when preparing an unused AgentCard card for Square. Consent is bound to
|
|
670
|
+
* this browser and declared merchant origin, not a tab. Wait for the item's
|
|
671
|
+
* ready_to_submit status before native Pay and submit within its readiness
|
|
672
|
+
* deadline. Unused preparations expire automatically; every preparation is
|
|
673
|
+
* single-use, including after failure or expiry.
|
|
674
|
+
*/
|
|
675
|
+
export interface VaultCheckoutContext {
|
|
676
|
+
/**
|
|
677
|
+
* Active browser session with this vault bound to it.
|
|
678
|
+
*/
|
|
679
|
+
browser_id: string;
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Square environment, independent of the AgentCard credential mode.
|
|
683
|
+
*/
|
|
684
|
+
environment: 'production' | 'sandbox';
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* Canonical HTTPS origin of the top-level merchant document, not the Square
|
|
688
|
+
* iframe. HTTP localhost is accepted for tests.
|
|
689
|
+
*/
|
|
690
|
+
merchant_origin: string;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
export interface VaultFillFieldResult {
|
|
694
|
+
/**
|
|
695
|
+
* Zero-based index into the request fields array.
|
|
696
|
+
*/
|
|
697
|
+
index: number;
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* Filled means the fill action completed, not that the website retained or
|
|
701
|
+
* accepted the value.
|
|
702
|
+
*/
|
|
703
|
+
status: 'filled' | 'failed' | 'not_attempted' | 'unknown';
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* Present only for failed or unknown fields. Never includes secret values, DOM
|
|
707
|
+
* content, or raw browser errors.
|
|
708
|
+
*/
|
|
709
|
+
error_code?:
|
|
710
|
+
| 'target_changed'
|
|
711
|
+
| 'element_not_found'
|
|
712
|
+
| 'ambiguous_selector'
|
|
713
|
+
| 'element_not_editable'
|
|
714
|
+
| 'option_not_found'
|
|
715
|
+
| 'timeout'
|
|
716
|
+
| 'execution_failed';
|
|
717
|
+
}
|
|
718
|
+
|
|
442
719
|
export type VaultItem = VaultItem.WalletVaultItem | VaultItem.CardVaultItem;
|
|
443
720
|
|
|
444
721
|
export namespace VaultItem {
|
|
@@ -500,7 +777,7 @@ export namespace VaultItem {
|
|
|
500
777
|
export interface AvailableOperation {
|
|
501
778
|
description: string;
|
|
502
779
|
|
|
503
|
-
type: 'authorize';
|
|
780
|
+
type: 'authorize' | 'prepare_checkout' | 'fill';
|
|
504
781
|
}
|
|
505
782
|
|
|
506
783
|
/**
|
|
@@ -559,7 +836,7 @@ export namespace VaultItem {
|
|
|
559
836
|
export interface AvailableOperation {
|
|
560
837
|
description: string;
|
|
561
838
|
|
|
562
|
-
type: 'authorize';
|
|
839
|
+
type: 'authorize' | 'prepare_checkout' | 'fill';
|
|
563
840
|
}
|
|
564
841
|
}
|
|
565
842
|
}
|
|
@@ -624,6 +901,139 @@ export interface VaultItemEvent {
|
|
|
624
901
|
data?: { [key: string]: unknown };
|
|
625
902
|
}
|
|
626
903
|
|
|
904
|
+
/**
|
|
905
|
+
* Authorization and preparation return the existing item shape. Fill returns a
|
|
906
|
+
* value-free execution result; it does not persist transient field outcomes on the
|
|
907
|
+
* item.
|
|
908
|
+
*/
|
|
909
|
+
export type VaultItemOperationResponse =
|
|
910
|
+
| VaultItemOperationResponse.WalletVaultItem
|
|
911
|
+
| VaultItemOperationResponse.CardVaultItem
|
|
912
|
+
| FillVaultItemOperationResult;
|
|
913
|
+
|
|
914
|
+
export namespace VaultItemOperationResponse {
|
|
915
|
+
export interface WalletVaultItem {
|
|
916
|
+
id: string;
|
|
917
|
+
|
|
918
|
+
available_expansions: Array<WalletVaultItem.AvailableExpansion>;
|
|
919
|
+
|
|
920
|
+
available_operations: Array<WalletVaultItem.AvailableOperation>;
|
|
921
|
+
|
|
922
|
+
created_at: string;
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* Immutable item key assigned when the item is created.
|
|
926
|
+
*/
|
|
927
|
+
key: string;
|
|
928
|
+
|
|
929
|
+
/**
|
|
930
|
+
* AgentCard wallet. Omit provider_config to use Kernel-managed credentials, or
|
|
931
|
+
* select a customer-owned configuration. Mode (sandbox vs live) is determined by
|
|
932
|
+
* the selected credential; there is no per-item test flag. Without user_id,
|
|
933
|
+
* creation returns a hosted enrollment action and Kernel polls until the user
|
|
934
|
+
* connects. user_id may only reference a user already enrolled by a wallet in this
|
|
935
|
+
* organization under the same configuration.
|
|
936
|
+
*/
|
|
937
|
+
spec: ItemsAPI.WalletVaultItemSpec;
|
|
938
|
+
|
|
939
|
+
state: ItemsAPI.WalletVaultItemState;
|
|
940
|
+
|
|
941
|
+
type: 'wallet';
|
|
942
|
+
|
|
943
|
+
updated_at: string;
|
|
944
|
+
|
|
945
|
+
action?: ItemsAPI.VaultItemAction;
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* Live, non-persisted data requested through the item GET expand parameter.
|
|
949
|
+
*/
|
|
950
|
+
expanded?: WalletVaultItem.Expanded;
|
|
951
|
+
|
|
952
|
+
expires_at?: string;
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
export namespace WalletVaultItem {
|
|
956
|
+
/**
|
|
957
|
+
* Live data that can currently be requested by passing its type to the item GET
|
|
958
|
+
* expand parameter.
|
|
959
|
+
*/
|
|
960
|
+
export interface AvailableExpansion {
|
|
961
|
+
description: string;
|
|
962
|
+
|
|
963
|
+
type: 'payment_methods';
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
/**
|
|
967
|
+
* An operation that is currently valid for this item. Read the description before
|
|
968
|
+
* invoking it through the item operations endpoint.
|
|
969
|
+
*/
|
|
970
|
+
export interface AvailableOperation {
|
|
971
|
+
description: string;
|
|
972
|
+
|
|
973
|
+
type: 'authorize' | 'prepare_checkout' | 'fill';
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
/**
|
|
977
|
+
* Live, non-persisted data requested through the item GET expand parameter.
|
|
978
|
+
*/
|
|
979
|
+
export interface Expanded {
|
|
980
|
+
payment_methods?: Array<ItemsAPI.VaultPaymentMethod>;
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
export interface CardVaultItem {
|
|
985
|
+
id: string;
|
|
986
|
+
|
|
987
|
+
available_expansions: Array<CardVaultItem.AvailableExpansion>;
|
|
988
|
+
|
|
989
|
+
available_operations: Array<CardVaultItem.AvailableOperation>;
|
|
990
|
+
|
|
991
|
+
created_at: string;
|
|
992
|
+
|
|
993
|
+
/**
|
|
994
|
+
* Immutable item key assigned when the item is created.
|
|
995
|
+
*/
|
|
996
|
+
key: string;
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
* Live payment card. Test-mode card creation is not supported.
|
|
1000
|
+
*/
|
|
1001
|
+
spec: ItemsAPI.CardVaultItemSpec;
|
|
1002
|
+
|
|
1003
|
+
state: ItemsAPI.CardVaultItemState;
|
|
1004
|
+
|
|
1005
|
+
type: 'card';
|
|
1006
|
+
|
|
1007
|
+
updated_at: string;
|
|
1008
|
+
|
|
1009
|
+
action?: ItemsAPI.VaultItemAction;
|
|
1010
|
+
|
|
1011
|
+
expires_at?: string;
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
export namespace CardVaultItem {
|
|
1015
|
+
/**
|
|
1016
|
+
* Live data that can currently be requested by passing its type to the item GET
|
|
1017
|
+
* expand parameter.
|
|
1018
|
+
*/
|
|
1019
|
+
export interface AvailableExpansion {
|
|
1020
|
+
description: string;
|
|
1021
|
+
|
|
1022
|
+
type: 'payment_methods';
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* An operation that is currently valid for this item. Read the description before
|
|
1027
|
+
* invoking it through the item operations endpoint.
|
|
1028
|
+
*/
|
|
1029
|
+
export interface AvailableOperation {
|
|
1030
|
+
description: string;
|
|
1031
|
+
|
|
1032
|
+
type: 'authorize' | 'prepare_checkout' | 'fill';
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
|
|
627
1037
|
export interface VaultPaymentMethod {
|
|
628
1038
|
id: string;
|
|
629
1039
|
|
|
@@ -847,16 +1257,80 @@ export interface ItemEventsParams {
|
|
|
847
1257
|
wait?: number;
|
|
848
1258
|
}
|
|
849
1259
|
|
|
850
|
-
export
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
id_or_name: string;
|
|
1260
|
+
export type ItemPerformOperationParams =
|
|
1261
|
+
| ItemPerformOperationParams.AuthorizeVaultItemOperationRequest
|
|
1262
|
+
| ItemPerformOperationParams.PrepareCheckoutVaultItemOperationRequest
|
|
1263
|
+
| ItemPerformOperationParams.FillVaultItemOperationRequest;
|
|
855
1264
|
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
1265
|
+
export declare namespace ItemPerformOperationParams {
|
|
1266
|
+
export interface AuthorizeVaultItemOperationRequest {
|
|
1267
|
+
/**
|
|
1268
|
+
* Path param
|
|
1269
|
+
*/
|
|
1270
|
+
id_or_name: string;
|
|
1271
|
+
|
|
1272
|
+
/**
|
|
1273
|
+
* Body param
|
|
1274
|
+
*/
|
|
1275
|
+
type: 'authorize';
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
export interface PrepareCheckoutVaultItemOperationRequest {
|
|
1279
|
+
/**
|
|
1280
|
+
* Path param
|
|
1281
|
+
*/
|
|
1282
|
+
id_or_name: string;
|
|
1283
|
+
|
|
1284
|
+
/**
|
|
1285
|
+
* Body param: Required when preparing an unused AgentCard card for Square. Consent
|
|
1286
|
+
* is bound to this browser and declared merchant origin, not a tab. Wait for the
|
|
1287
|
+
* item's ready_to_submit status before native Pay and submit within its readiness
|
|
1288
|
+
* deadline. Unused preparations expire automatically; every preparation is
|
|
1289
|
+
* single-use, including after failure or expiry.
|
|
1290
|
+
*/
|
|
1291
|
+
checkout: VaultCheckoutContext;
|
|
1292
|
+
|
|
1293
|
+
/**
|
|
1294
|
+
* Body param
|
|
1295
|
+
*/
|
|
1296
|
+
type: 'prepare_checkout';
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
export interface FillVaultItemOperationRequest {
|
|
1300
|
+
/**
|
|
1301
|
+
* Path param
|
|
1302
|
+
*/
|
|
1303
|
+
id_or_name: string;
|
|
1304
|
+
|
|
1305
|
+
/**
|
|
1306
|
+
* Body param: Browser session ID, not a reusable browser name.
|
|
1307
|
+
*/
|
|
1308
|
+
browser_id: string;
|
|
1309
|
+
|
|
1310
|
+
/**
|
|
1311
|
+
* Body param: Field bindings for this step. No two bindings may resolve to the
|
|
1312
|
+
* same element.
|
|
1313
|
+
*/
|
|
1314
|
+
fields: Array<VaultCardFillField>;
|
|
1315
|
+
|
|
1316
|
+
/**
|
|
1317
|
+
* Body param: Exact current top-level page URL, including path, query, and
|
|
1318
|
+
* fragment. Must match exactly one open page in the browser; zero or multiple
|
|
1319
|
+
* matches fail. No prefix or glob matching. Must use HTTPS without embedded
|
|
1320
|
+
* credentials.
|
|
1321
|
+
*/
|
|
1322
|
+
page_url: string;
|
|
1323
|
+
|
|
1324
|
+
/**
|
|
1325
|
+
* Body param
|
|
1326
|
+
*/
|
|
1327
|
+
type: 'fill';
|
|
1328
|
+
|
|
1329
|
+
/**
|
|
1330
|
+
* Body param: Total operation deadline in milliseconds, not a per-field timeout.
|
|
1331
|
+
*/
|
|
1332
|
+
timeout_ms?: number;
|
|
1333
|
+
}
|
|
860
1334
|
}
|
|
861
1335
|
|
|
862
1336
|
export type ItemUpsertParams =
|
|
@@ -1053,12 +1527,21 @@ export declare namespace ItemUpsertParams {
|
|
|
1053
1527
|
export declare namespace Items {
|
|
1054
1528
|
export {
|
|
1055
1529
|
type AgentcardCheckoutAuthorization as AgentcardCheckoutAuthorization,
|
|
1530
|
+
type AgentcardCheckoutPreparation as AgentcardCheckoutPreparation,
|
|
1531
|
+
type AuthorizeVaultItemOperationRequest as AuthorizeVaultItemOperationRequest,
|
|
1056
1532
|
type CardVaultItemSpec as CardVaultItemSpec,
|
|
1057
1533
|
type CardVaultItemState as CardVaultItemState,
|
|
1534
|
+
type FillVaultItemOperationRequest as FillVaultItemOperationRequest,
|
|
1535
|
+
type FillVaultItemOperationResult as FillVaultItemOperationResult,
|
|
1536
|
+
type PrepareCheckoutVaultItemOperationRequest as PrepareCheckoutVaultItemOperationRequest,
|
|
1058
1537
|
type VaultCardAliases as VaultCardAliases,
|
|
1538
|
+
type VaultCardFillField as VaultCardFillField,
|
|
1539
|
+
type VaultCheckoutContext as VaultCheckoutContext,
|
|
1540
|
+
type VaultFillFieldResult as VaultFillFieldResult,
|
|
1059
1541
|
type VaultItem as VaultItem,
|
|
1060
1542
|
type VaultItemAction as VaultItemAction,
|
|
1061
1543
|
type VaultItemEvent as VaultItemEvent,
|
|
1544
|
+
type VaultItemOperationResponse as VaultItemOperationResponse,
|
|
1062
1545
|
type VaultPaymentMethod as VaultPaymentMethod,
|
|
1063
1546
|
type WalletVaultItemSpec as WalletVaultItemSpec,
|
|
1064
1547
|
type WalletVaultItemState as WalletVaultItemState,
|
|
@@ -4,8 +4,12 @@ import { APIResource } from '../../core/resource';
|
|
|
4
4
|
import * as ItemsAPI from './items';
|
|
5
5
|
import {
|
|
6
6
|
AgentcardCheckoutAuthorization,
|
|
7
|
+
AgentcardCheckoutPreparation,
|
|
8
|
+
AuthorizeVaultItemOperationRequest,
|
|
7
9
|
CardVaultItemSpec,
|
|
8
10
|
CardVaultItemState,
|
|
11
|
+
FillVaultItemOperationRequest,
|
|
12
|
+
FillVaultItemOperationResult,
|
|
9
13
|
ItemDeleteParams,
|
|
10
14
|
ItemEventsParams,
|
|
11
15
|
ItemEventsResponse,
|
|
@@ -15,10 +19,15 @@ import {
|
|
|
15
19
|
ItemUpdateParams,
|
|
16
20
|
ItemUpsertParams,
|
|
17
21
|
Items,
|
|
22
|
+
PrepareCheckoutVaultItemOperationRequest,
|
|
18
23
|
VaultCardAliases,
|
|
24
|
+
VaultCardFillField,
|
|
25
|
+
VaultCheckoutContext,
|
|
26
|
+
VaultFillFieldResult,
|
|
19
27
|
VaultItem,
|
|
20
28
|
VaultItemAction,
|
|
21
29
|
VaultItemEvent,
|
|
30
|
+
VaultItemOperationResponse,
|
|
22
31
|
VaultPaymentMethod,
|
|
23
32
|
WalletVaultItemSpec,
|
|
24
33
|
WalletVaultItemState,
|
|
@@ -133,12 +142,21 @@ export declare namespace Vaults {
|
|
|
133
142
|
export {
|
|
134
143
|
Items as Items,
|
|
135
144
|
type AgentcardCheckoutAuthorization as AgentcardCheckoutAuthorization,
|
|
145
|
+
type AgentcardCheckoutPreparation as AgentcardCheckoutPreparation,
|
|
146
|
+
type AuthorizeVaultItemOperationRequest as AuthorizeVaultItemOperationRequest,
|
|
136
147
|
type CardVaultItemSpec as CardVaultItemSpec,
|
|
137
148
|
type CardVaultItemState as CardVaultItemState,
|
|
149
|
+
type FillVaultItemOperationRequest as FillVaultItemOperationRequest,
|
|
150
|
+
type FillVaultItemOperationResult as FillVaultItemOperationResult,
|
|
151
|
+
type PrepareCheckoutVaultItemOperationRequest as PrepareCheckoutVaultItemOperationRequest,
|
|
138
152
|
type VaultCardAliases as VaultCardAliases,
|
|
153
|
+
type VaultCardFillField as VaultCardFillField,
|
|
154
|
+
type VaultCheckoutContext as VaultCheckoutContext,
|
|
155
|
+
type VaultFillFieldResult as VaultFillFieldResult,
|
|
139
156
|
type VaultItem as VaultItem,
|
|
140
157
|
type VaultItemAction as VaultItemAction,
|
|
141
158
|
type VaultItemEvent as VaultItemEvent,
|
|
159
|
+
type VaultItemOperationResponse as VaultItemOperationResponse,
|
|
142
160
|
type VaultPaymentMethod as VaultPaymentMethod,
|
|
143
161
|
type WalletVaultItemSpec as WalletVaultItemSpec,
|
|
144
162
|
type WalletVaultItemState as WalletVaultItemState,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.102.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.102.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.102.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|