@onkernel/sdk 0.118.0 → 0.120.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.
Files changed (111) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/package.json +1 -1
  3. package/resources/auth/connections.d.mts +1 -1
  4. package/resources/auth/connections.d.mts.map +1 -1
  5. package/resources/auth/connections.d.ts +1 -1
  6. package/resources/auth/connections.d.ts.map +1 -1
  7. package/resources/browser-pools.d.mts +4 -4
  8. package/resources/browser-pools.d.mts.map +1 -1
  9. package/resources/browser-pools.d.ts +4 -4
  10. package/resources/browser-pools.d.ts.map +1 -1
  11. package/resources/browsers/browsers.d.mts +31 -9
  12. package/resources/browsers/browsers.d.mts.map +1 -1
  13. package/resources/browsers/browsers.d.ts +31 -9
  14. package/resources/browsers/browsers.d.ts.map +1 -1
  15. package/resources/browsers/browsers.js +2 -2
  16. package/resources/browsers/browsers.js.map +1 -1
  17. package/resources/browsers/browsers.mjs +2 -2
  18. package/resources/browsers/browsers.mjs.map +1 -1
  19. package/resources/browsers/index.d.mts +1 -1
  20. package/resources/browsers/index.d.mts.map +1 -1
  21. package/resources/browsers/index.d.ts +1 -1
  22. package/resources/browsers/index.d.ts.map +1 -1
  23. package/resources/browsers/index.js +4 -4
  24. package/resources/browsers/index.js.map +1 -1
  25. package/resources/browsers/index.mjs +1 -1
  26. package/resources/browsers/index.mjs.map +1 -1
  27. package/resources/browsers/playwright/executors.d.mts +95 -0
  28. package/resources/browsers/playwright/executors.d.mts.map +1 -0
  29. package/resources/browsers/playwright/executors.d.ts +95 -0
  30. package/resources/browsers/playwright/executors.d.ts.map +1 -0
  31. package/resources/browsers/playwright/executors.js +57 -0
  32. package/resources/browsers/playwright/executors.js.map +1 -0
  33. package/resources/browsers/playwright/executors.mjs +53 -0
  34. package/resources/browsers/playwright/executors.mjs.map +1 -0
  35. package/resources/browsers/playwright/index.d.mts +3 -0
  36. package/resources/browsers/playwright/index.d.mts.map +1 -0
  37. package/resources/browsers/playwright/index.d.ts +3 -0
  38. package/resources/browsers/playwright/index.d.ts.map +1 -0
  39. package/resources/browsers/playwright/index.js +9 -0
  40. package/resources/browsers/playwright/index.js.map +1 -0
  41. package/resources/browsers/playwright/index.mjs +4 -0
  42. package/resources/browsers/playwright/index.mjs.map +1 -0
  43. package/resources/browsers/playwright/playwright.d.mts +149 -0
  44. package/resources/browsers/playwright/playwright.d.mts.map +1 -0
  45. package/resources/browsers/playwright/playwright.d.ts +149 -0
  46. package/resources/browsers/playwright/playwright.d.ts.map +1 -0
  47. package/resources/browsers/playwright/playwright.js +76 -0
  48. package/resources/browsers/playwright/playwright.js.map +1 -0
  49. package/resources/browsers/playwright/playwright.mjs +71 -0
  50. package/resources/browsers/playwright/playwright.mjs.map +1 -0
  51. package/resources/browsers/playwright.d.mts +1 -68
  52. package/resources/browsers/playwright.d.mts.map +1 -1
  53. package/resources/browsers/playwright.d.ts +1 -68
  54. package/resources/browsers/playwright.d.ts.map +1 -1
  55. package/resources/browsers/playwright.js +2 -29
  56. package/resources/browsers/playwright.js.map +1 -1
  57. package/resources/browsers/playwright.mjs +1 -27
  58. package/resources/browsers/playwright.mjs.map +1 -1
  59. package/resources/browsers/telemetry.d.mts +17 -15
  60. package/resources/browsers/telemetry.d.mts.map +1 -1
  61. package/resources/browsers/telemetry.d.ts +17 -15
  62. package/resources/browsers/telemetry.d.ts.map +1 -1
  63. package/resources/invocations.d.mts +1 -1
  64. package/resources/invocations.d.mts.map +1 -1
  65. package/resources/invocations.d.ts +1 -1
  66. package/resources/invocations.d.ts.map +1 -1
  67. package/resources/search/search.d.mts +4 -2
  68. package/resources/search/search.d.mts.map +1 -1
  69. package/resources/search/search.d.ts +4 -2
  70. package/resources/search/search.d.ts.map +1 -1
  71. package/resources/search/search.js.map +1 -1
  72. package/resources/search/search.mjs.map +1 -1
  73. package/resources/vaults/index.d.mts +1 -1
  74. package/resources/vaults/index.d.mts.map +1 -1
  75. package/resources/vaults/index.d.ts +1 -1
  76. package/resources/vaults/index.d.ts.map +1 -1
  77. package/resources/vaults/index.js.map +1 -1
  78. package/resources/vaults/index.mjs.map +1 -1
  79. package/resources/vaults/items.d.mts +140 -40
  80. package/resources/vaults/items.d.mts.map +1 -1
  81. package/resources/vaults/items.d.ts +140 -40
  82. package/resources/vaults/items.d.ts.map +1 -1
  83. package/resources/vaults/items.js +4 -3
  84. package/resources/vaults/items.js.map +1 -1
  85. package/resources/vaults/items.mjs +4 -3
  86. package/resources/vaults/items.mjs.map +1 -1
  87. package/resources/vaults/vaults.d.mts +2 -2
  88. package/resources/vaults/vaults.d.mts.map +1 -1
  89. package/resources/vaults/vaults.d.ts +2 -2
  90. package/resources/vaults/vaults.d.ts.map +1 -1
  91. package/resources/vaults/vaults.js.map +1 -1
  92. package/resources/vaults/vaults.mjs.map +1 -1
  93. package/src/resources/auth/connections.ts +1 -1
  94. package/src/resources/browser-pools.ts +4 -4
  95. package/src/resources/browsers/browsers.ts +39 -8
  96. package/src/resources/browsers/index.ts +7 -1
  97. package/src/resources/browsers/playwright/executors.ts +123 -0
  98. package/src/resources/browsers/playwright/index.ts +10 -0
  99. package/src/resources/browsers/playwright/playwright.ts +186 -0
  100. package/src/resources/browsers/playwright.ts +1 -87
  101. package/src/resources/browsers/telemetry.ts +17 -14
  102. package/src/resources/invocations.ts +1 -1
  103. package/src/resources/search/search.ts +4 -2
  104. package/src/resources/vaults/index.ts +4 -0
  105. package/src/resources/vaults/items.ts +160 -39
  106. package/src/resources/vaults/vaults.ts +8 -0
  107. package/src/version.ts +1 -1
  108. package/version.d.mts +1 -1
  109. package/version.d.ts +1 -1
  110. package/version.js +1 -1
  111. package/version.mjs +1 -1
@@ -4325,12 +4325,13 @@ export namespace BrowserPlatformAPICallEvent {
4325
4325
 
4326
4326
  /**
4327
4327
  * A branded proxy-layer failure observed by the browser. Emitted when the metro
4328
- * egress host-proxy serves a branded 5xx error page whose response carries the
4329
- * X-Kernel-Proxy-Error header. Low-volume and carries a typed code. Its value is
4330
- * per-session and per-URL attribution for sessions that already capture the
4331
- * network stream: proxy failures are only observable while the CDP network
4332
- * collector is running, so this is an opt-in refinement of the raw network events
4333
- * rather than a default-on alerting signal.
4328
+ * egress host-proxy serves a branded error page whose response carries the
4329
+ * X-Kernel-Proxy-Error header: a 502 for proxy-layer failures, or a 403 when the
4330
+ * session's network policy blocks the destination. Low-volume and carries a typed
4331
+ * code. Its value is per-session and per-URL attribution for sessions that already
4332
+ * capture the network stream: proxy failures are only observable while the CDP
4333
+ * network collector is running, so this is an opt-in refinement of the raw network
4334
+ * events rather than a default-on alerting signal.
4334
4335
  */
4335
4336
  export interface BrowserProxyErrorEvent {
4336
4337
  category: 'network';
@@ -4369,17 +4370,18 @@ export namespace BrowserProxyErrorEvent {
4369
4370
  export interface Data extends TelemetryAPI.BrowserEventContext {
4370
4371
  /**
4371
4372
  * Proxy-layer error code: the X-Kernel-Proxy-Error response header value from a
4372
- * branded 5xx error page served by the metro egress host-proxy. Values mirror what
4373
- * the proxy emits: destination_blocked, destination_route_unavailable,
4374
- * provider_blacklisted, provider_unreachable, provider_rejected,
4375
- * origin_tls_timeout, origin_response_incomplete, proxy_unavailable,
4376
- * restricted_route_unavailable, upstream_timeout, upstream_dns_failure,
4377
- * upstream_connect_failed. A header value the browser image does not recognize is
4378
- * reported as unknown, with the header value in raw_code.
4373
+ * branded error page served by the metro egress host-proxy. Values mirror what the
4374
+ * proxy emits: destination_blocked, destination_route_unavailable,
4375
+ * network_policy_denied, provider_blacklisted, provider_unreachable,
4376
+ * provider_rejected, origin_tls_timeout, origin_response_incomplete,
4377
+ * proxy_unavailable, restricted_route_unavailable, upstream_timeout,
4378
+ * upstream_dns_failure, upstream_connect_failed. A header value the browser image
4379
+ * does not recognize is reported as unknown, with the header value in raw_code.
4379
4380
  */
4380
4381
  code:
4381
4382
  | 'destination_blocked'
4382
4383
  | 'destination_route_unavailable'
4384
+ | 'network_policy_denied'
4383
4385
  | 'provider_blacklisted'
4384
4386
  | 'provider_unreachable'
4385
4387
  | 'provider_rejected'
@@ -4398,7 +4400,8 @@ export namespace BrowserProxyErrorEvent {
4398
4400
  request_id: string;
4399
4401
 
4400
4402
  /**
4401
- * HTTP response status of the branded error page (502).
4403
+ * HTTP response status of the branded error page (502, or 403 for
4404
+ * network_policy_denied).
4402
4405
  */
4403
4406
  status: number;
4404
4407
 
@@ -471,7 +471,7 @@ export namespace InvocationListBrowsersResponse {
471
471
  /**
472
472
  * Geographic region of the browser session. Fixed once the session is created.
473
473
  */
474
- region: 'us-east' | 'eu-west' | 'ap-southeast';
474
+ region: 'us-east' | 'us-west' | 'eu-west' | 'ap-southeast';
475
475
 
476
476
  /**
477
477
  * Unique identifier for the browser session
@@ -202,7 +202,8 @@ export namespace ProviderTarget {
202
202
  */
203
203
  export interface Contents {
204
204
  /**
205
- * Return query-relevant provider excerpts.
205
+ * Return query-relevant provider excerpts. Defaults to true for Exa search
206
+ * requests; set false to disable.
206
207
  */
207
208
  highlights?: boolean;
208
209
 
@@ -255,7 +256,8 @@ export namespace ProviderTarget {
255
256
  query?: Array<string>;
256
257
 
257
258
  /**
258
- * Provider context size supported by the selected model.
259
+ * Amount of page content Perplexity extracts per result. Defaults to medium unless
260
+ * max_tokens or max_tokens_per_page is set.
259
261
  */
260
262
  search_context_size?: 'low' | 'medium' | 'high';
261
263
 
@@ -33,6 +33,10 @@ export {
33
33
  type KernelCredentialVaultItemState,
34
34
  type KernelWalletState,
35
35
  type KernelWalletVaultItemSpec,
36
+ type ManagedAuthCredentialVaultField,
37
+ type ManagedAuthCredentialVaultItemSpec,
38
+ type ManagedAuthCredentialVaultItemSpecInput,
39
+ type ManagedAuthCredentialVaultItemState,
36
40
  type OnePasswordCredentialAccountSpec,
37
41
  type OnePasswordCredentialAccountState,
38
42
  type OnePasswordCredentialVaultItemSpec,
@@ -93,7 +93,8 @@ export class Items extends APIResource {
93
93
  * recovery_required whose checkout create response returned no authorization ID
94
94
  * may be explicitly abandoned by deleting that card directly; deleting its wallet
95
95
  * or vault remains blocked. Deleting or recreating an item is not proof that a
96
- * payment did not occur.
96
+ * payment did not occur. Deleting a managed auth credential item leaves the
97
+ * connection and its saved credential unchanged.
97
98
  *
98
99
  * @example
99
100
  * ```ts
@@ -185,8 +186,8 @@ export class Items extends APIResource {
185
186
  * ```ts
186
187
  * const vaultItem = await client.vaults.items.upsert('x', {
187
188
  * id_or_name: 'id_or_name',
188
- * spec: { provider: 'link' },
189
- * type: 'card',
189
+ * spec: { provider: 'managed_auth' },
190
+ * type: 'credential',
190
191
  * });
191
192
  * ```
192
193
  */
@@ -839,7 +840,8 @@ export interface CredentialVaultItem {
839
840
  * Kernel credentials advertise collect and fill when eligible. 1Password
840
841
  * credentials advertise 1pw_create_access_request until a request is made,
841
842
  * 1pw_access_request_status while its approval is pending, and 1pw_fill after
842
- * access is granted.
843
+ * access is granted. Managed auth credentials advertise fill while ready and
844
+ * nothing otherwise.
843
845
  */
844
846
  available_operations: Array<CredentialVaultItem.AvailableOperation>;
845
847
 
@@ -864,7 +866,8 @@ export interface CredentialVaultItem {
864
866
 
865
867
  /**
866
868
  * Starts at 1 and increments on PATCH and successful hosted submission, but not
867
- * collection-link renewal.
869
+ * collection-link renewal. Managed auth credentials stay at 1; changes to the
870
+ * underlying credential are read at fill time and do not change the version.
868
871
  */
869
872
  version: number;
870
873
 
@@ -956,7 +959,9 @@ export namespace CredentialVaultItem {
956
959
  * declare fields and may enter pending_collection. 1Password credentials either
957
960
  * reference a connected credential_account or store a supplied access token and
958
961
  * integration key encrypted on the item. They store no login values or selectors.
959
- * Repeating the original creation request returns the current item without
962
+ * Managed auth credentials reference a managed auth connection in the same project
963
+ * that already has a saved credential, and read it at fill time; they store no
964
+ * values. Repeating the original creation request returns the current item without
960
965
  * overwriting later state. A different request at the same key returns 409.
961
966
  */
962
967
  export interface CredentialVaultItemRequest {
@@ -976,7 +981,10 @@ export interface CredentialVaultItemRequest {
976
981
  * Stored-token credentials omit account and never return access_token or
977
982
  * integration_key.
978
983
  */
979
- export type CredentialVaultItemSpec = KernelCredentialVaultItemSpec | OnePasswordCredentialVaultItemSpec;
984
+ export type CredentialVaultItemSpec =
985
+ | KernelCredentialVaultItemSpec
986
+ | OnePasswordCredentialVaultItemSpec
987
+ | ManagedAuthCredentialVaultItemSpec;
980
988
 
981
989
  /**
982
990
  * Credential fields are for login and other non-payment credentials. Do not store,
@@ -987,7 +995,8 @@ export type CredentialVaultItemSpec = KernelCredentialVaultItemSpec | OnePasswor
987
995
  */
988
996
  export type CredentialVaultItemSpecInput =
989
997
  | KernelCredentialVaultItemSpecInput
990
- | OnePasswordCredentialVaultItemSpecInput;
998
+ | OnePasswordCredentialVaultItemSpecInput
999
+ | ManagedAuthCredentialVaultItemSpecInput;
991
1000
 
992
1001
  export interface CredentialVaultItemSpecUpdate {
993
1002
  /**
@@ -1000,7 +1009,10 @@ export interface CredentialVaultItemSpecUpdate {
1000
1009
  fields?: { [key: string]: CredentialVaultFieldUpdate };
1001
1010
  }
1002
1011
 
1003
- export type CredentialVaultItemState = KernelCredentialVaultItemState | OnePasswordCredentialVaultItemState;
1012
+ export type CredentialVaultItemState =
1013
+ | KernelCredentialVaultItemState
1014
+ | OnePasswordCredentialVaultItemState
1015
+ | ManagedAuthCredentialVaultItemState;
1004
1016
 
1005
1017
  /**
1006
1018
  * Atomically update description and selected values. Omitted properties are
@@ -1010,7 +1022,8 @@ export type CredentialVaultItemState = KernelCredentialVaultItemState | OnePassw
1010
1022
  * invalidates outstanding Kernel-hosted collection sessions. If required values
1011
1023
  * remain missing, return pending_collection and a fresh collection action.
1012
1024
  * Otherwise return ready without an action; collect can open the form again
1013
- * without clearing values. Customer URLs have no Kernel-managed expiry.
1025
+ * without clearing values. Customer URLs have no Kernel-managed expiry. 1Password
1026
+ * and managed auth credentials return 409.
1014
1027
  */
1015
1028
  export interface CredentialVaultItemUpdateRequest {
1016
1029
  spec: CredentialVaultItemSpecUpdate;
@@ -1110,22 +1123,24 @@ export interface FillVaultItemOperationResult {
1110
1123
  /**
1111
1124
  * A ready Kernel card retains its encrypted network token and one-time code for
1112
1125
  * the fill operation until the item's expires_at. Fill and submit checkout before
1113
- * then. Visa cards can be enrolled, but Visa purchases are not yet supported and
1114
- * authorize returns 400; supported Mastercard purchases need no cardholder
1115
- * approval. masks.last4 is the enrolled card's last four digits; masks.token_last4
1116
- * is the network token's last four digits shown to the merchant. Kernel cards do
1117
- * not expose aliases or support egress substitution. Kernel does not observe
1118
- * whether the merchant charged the card.
1126
+ * then. Visa purchases require a spend_approval action before the code is issued;
1127
+ * Mastercard purchases need no hosted approval. masks.last4 is the enrolled card's
1128
+ * last four digits; masks.token_last4 is the network token's last four digits
1129
+ * shown to the merchant. Kernel cards do not expose aliases or support egress
1130
+ * substitution. Kernel does not observe whether the merchant charged the card.
1119
1131
  */
1120
1132
  export interface KernelCardState {
1121
1133
  provider: 'kernel';
1122
1134
 
1123
1135
  /**
1124
- * recovery_required means issuing the one-time code has an unresolved outcome.
1125
- * Kernel never issues another code for the item automatically, and the item cannot
1126
- * be deleted or replaced until the original attempt is reconciled with support.
1127
- * When status_reason says the provider refused retrieval before acceptance, no
1128
- * code was issued and a later read retries.
1136
+ * pending_authorization on a Visa purchase waits for the cardholder to approve it
1137
+ * through the spend_approval action; an unused link expires after 30 minutes.
1138
+ * recovery_required means approving the purchase or issuing the one-time code has
1139
+ * an unresolved outcome. Kernel never approves again or issues another code for
1140
+ * the item automatically, and the item cannot be deleted or replaced until the
1141
+ * original attempt is reconciled with support. When status_reason says the
1142
+ * provider refused retrieval before acceptance, no code was issued and a later
1143
+ * read retries. declined means the card network refused to issue a code.
1129
1144
  */
1130
1145
  status:
1131
1146
  | 'requested'
@@ -1166,10 +1181,12 @@ export namespace KernelCardState {
1166
1181
  * network token number, expiry and one-time 3-digit code. They are stored
1167
1182
  * encrypted for the fill operation, which types them only on merchant_url's
1168
1183
  * origin; the merchant's own checkout submits the payment. The one-time code is
1169
- * valid until the item's expires_at; fill and submit checkout before then. Visa
1170
- * cards can be enrolled, but Visa purchases are not yet supported: authorize
1171
- * returns 400. Supported Mastercard purchases need no cardholder approval. Card
1172
- * updates are not supported; delete and create a new item instead.
1184
+ * valid until the item's expires_at; fill and submit checkout before then.
1185
+ * Mastercard purchases need no cardholder approval. A Visa purchase returns a
1186
+ * spend_approval action: the cardholder approves it with a Visa passkey, and
1187
+ * Kernel registers a Visa intent for one transaction up to the amount before
1188
+ * issuing the code. Card updates are not supported; delete and create a new item
1189
+ * instead.
1173
1190
  */
1174
1191
  export interface KernelCardVaultItemSpec {
1175
1192
  /**
@@ -1197,6 +1214,12 @@ export interface KernelCardVaultItemSpec {
1197
1214
  * Key of the Kernel wallet item whose enrolled card pays.
1198
1215
  */
1199
1216
  wallet: string;
1217
+
1218
+ /**
1219
+ * The merchant's ISO 3166-1 alpha-2 country code. Required for Visa cards, whose
1220
+ * one-time code is issued for the merchant's country.
1221
+ */
1222
+ merchant_country?: string;
1200
1223
  }
1201
1224
 
1202
1225
  export interface KernelCredentialVaultItemSpec {
@@ -1260,10 +1283,11 @@ export interface KernelWalletState {
1260
1283
 
1261
1284
  /**
1262
1285
  * pending_authorization asks the cardholder to use the card_enrollment action.
1263
- * connected is ready for supported purchases. reconnect_required asks the
1264
- * cardholder to use a new card_enrollment action after an uncertain enrollment was
1265
- * safely removed. degraded means the enrollment outcome is unknown and the wallet
1266
- * must be deleted before adding another card.
1286
+ * connected means the card is stored; it can pay once payment_methods reports
1287
+ * capabilities.single_use_card.eligible. reconnect_required asks the cardholder to
1288
+ * use a new card_enrollment action after an uncertain enrollment was safely
1289
+ * removed. degraded means the enrollment outcome is unknown and the wallet must be
1290
+ * deleted before adding another card.
1267
1291
  */
1268
1292
  status: 'pending_authorization' | 'connected' | 'reconnect_required' | 'degraded';
1269
1293
 
@@ -1271,18 +1295,109 @@ export interface KernelWalletState {
1271
1295
  }
1272
1296
 
1273
1297
  /**
1274
- * One card Kernel enrolls for Visa or Mastercard agentic network tokens using
1275
- * Kernel-managed credentials. Creation returns a card_enrollment action: the
1276
- * cardholder enters the card and their email on a Kernel-hosted page, then Kernel
1277
- * enrolls the securely stored card. The card number never reaches Kernel. The
1278
- * connected wallet's payment_methods expansion lists the enrolled card. Visa cards
1279
- * can be enrolled, but Visa purchases are not yet supported: authorize
1280
- * returns 400.
1298
+ * One card stored with Kernel-managed credentials. Creation returns a
1299
+ * card*enrollment action: the cardholder enters the card and their email on a
1300
+ * Kernel-hosted page, and the wallet connects once the card is stored. Kernel then
1301
+ * enrolls it for an agentic network token when the issuer supports it. The card
1302
+ * number never reaches Kernel. The connected wallet's payment_methods expansion
1303
+ * lists the card; capabilities.single_use_card.eligible is false, with a
1304
+ * network_token*\* reason, until the card has a network token, and authorize
1305
+ * returns 400 for such a card. Visa purchases require the cardholder to complete a
1306
+ * spend_approval action before Kernel issues a one-time code; Mastercard purchases
1307
+ * need no hosted approval.
1281
1308
  */
1282
1309
  export interface KernelWalletVaultItemSpec {
1283
1310
  provider: 'kernel';
1284
1311
  }
1285
1312
 
1313
+ export interface ManagedAuthCredentialVaultField {
1314
+ /**
1315
+ * Text, email, and password have form inputs; totp does not and is omitted from
1316
+ * both Kernel-hosted and customer React forms. Password and totp must be
1317
+ * sensitive. A totp value is an RFC 4648 Base32 generator seed (case-insensitive,
1318
+ * optional trailing padding), not an otpauth URI or current code. Reject invalid
1319
+ * or empty decoded seeds. Browser fill generates an RFC 6238 code at execution
1320
+ * time using HMAC-SHA1, 6 digits, and a 30-second period. Preserve leading zeros;
1321
+ * never fill the seed. Custom algorithms, digits, periods, and form enrollment are
1322
+ * unsupported.
1323
+ */
1324
+ type: CredentialVaultFieldType;
1325
+ }
1326
+
1327
+ export interface ManagedAuthCredentialVaultItemSpec {
1328
+ /**
1329
+ * ID of the managed auth connection whose saved credential this item reads. List
1330
+ * connections with `GET /auth/connections`.
1331
+ */
1332
+ connection_id: string;
1333
+
1334
+ provider: 'managed_auth';
1335
+
1336
+ /**
1337
+ * Display text supplied when the item was created. Omitted when none was given.
1338
+ */
1339
+ description?: string;
1340
+ }
1341
+
1342
+ /**
1343
+ * A credential backed by a managed auth connection. The item stores no values: it
1344
+ * reads the connection's saved credential at fill time, so updates made through
1345
+ * managed auth apply immediately. The connection must be in the vault's project
1346
+ * and hold a saved Kernel credential. The check is the saved credential, not
1347
+ * connection status: a connection that needs re-authentication qualifies, and an
1348
+ * authenticated one without a saved credential does not. Returns 404 for an
1349
+ * unknown connection, and 409 when the connection is in another project, has no
1350
+ * saved credential yet, or uses an external credential provider such as 1Password.
1351
+ * No collection form is offered; managed auth collects the login.
1352
+ */
1353
+ export interface ManagedAuthCredentialVaultItemSpecInput {
1354
+ /**
1355
+ * ID of the managed auth connection whose saved credential this item reads. List
1356
+ * connections with `GET /auth/connections`.
1357
+ */
1358
+ connection_id: string;
1359
+
1360
+ provider: 'managed_auth';
1361
+
1362
+ /**
1363
+ * Optional display text for the item, such as the site or service name. Set at
1364
+ * creation and cannot be changed later; repeating the request with a different
1365
+ * description returns 409. At most 16 KiB in UTF-8 bytes.
1366
+ */
1367
+ description?: string;
1368
+ }
1369
+
1370
+ export interface ManagedAuthCredentialVaultItemState {
1371
+ provider: 'managed_auth';
1372
+
1373
+ /**
1374
+ * Items are created ready, which means the connection has a saved Kernel
1375
+ * credential that stores values or a TOTP seed (what has_values or has_totp_secret
1376
+ * report on credentials), not that a login succeeded. Unavailable means it no
1377
+ * longer does; such items advertise no operations.
1378
+ */
1379
+ status: 'ready' | 'unavailable';
1380
+
1381
+ /**
1382
+ * One entry per non-empty value on the connection's saved credential, keyed by the
1383
+ * field name to use in fill bindings. Included on single-item responses (create
1384
+ * and get) and omitted from list responses, like `value_keys` on credentials.
1385
+ * Empty when unavailable or when every stored value is empty. A stored value named
1386
+ * totp_secret is never listed or filled. Values are never returned. A totp entry
1387
+ * is present when the credential has a TOTP seed; fill writes a generated code for
1388
+ * it. Entries follow the connection's credential.
1389
+ */
1390
+ fields?: { [key: string]: ManagedAuthCredentialVaultField };
1391
+
1392
+ /**
1393
+ * Present when status is unavailable. connection_not_found means the connection
1394
+ * was deleted. no_credential means the connection's credential was deleted or
1395
+ * emptied after the item was created. external_credential means the connection was
1396
+ * moved to an external credential provider.
1397
+ */
1398
+ status_reason?: 'connection_not_found' | 'no_credential' | 'external_credential';
1399
+ }
1400
+
1286
1401
  export interface OnePasswordCredentialAccountSpec {
1287
1402
  authorization: OnePasswordCredentialAccountSpec.Authorization;
1288
1403
 
@@ -1798,8 +1913,9 @@ export interface VaultCheckoutContext {
1798
1913
 
1799
1914
  export interface VaultFillField {
1800
1915
  /**
1801
- * A declared credential field name or a supported card field. Unset credential
1802
- * fields cannot be filled.
1916
+ * A credential field name from the item's declared fields (Kernel) or state.fields
1917
+ * from a single-item read (managed auth), or a supported card field. Unset
1918
+ * credential fields cannot be filled.
1803
1919
  */
1804
1920
  field: string;
1805
1921
 
@@ -2503,7 +2619,8 @@ export interface ItemRetrieveParams {
2503
2619
  * authorization, approval, or credential collection. Return the current item when
2504
2620
  * ready or when the wait elapses. This does not wait for edits to an already-ready
2505
2621
  * credential; poll GET without wait and compare version to observe changes after
2506
- * collect.
2622
+ * collect. Managed auth credentials are created ready, so wait returns
2623
+ * immediately.
2507
2624
  */
2508
2625
  wait?: number;
2509
2626
  }
@@ -3112,6 +3229,10 @@ export declare namespace Items {
3112
3229
  type KernelCredentialVaultItemState as KernelCredentialVaultItemState,
3113
3230
  type KernelWalletState as KernelWalletState,
3114
3231
  type KernelWalletVaultItemSpec as KernelWalletVaultItemSpec,
3232
+ type ManagedAuthCredentialVaultField as ManagedAuthCredentialVaultField,
3233
+ type ManagedAuthCredentialVaultItemSpec as ManagedAuthCredentialVaultItemSpec,
3234
+ type ManagedAuthCredentialVaultItemSpecInput as ManagedAuthCredentialVaultItemSpecInput,
3235
+ type ManagedAuthCredentialVaultItemState as ManagedAuthCredentialVaultItemState,
3115
3236
  type OnePasswordCredentialAccountSpec as OnePasswordCredentialAccountSpec,
3116
3237
  type OnePasswordCredentialAccountState as OnePasswordCredentialAccountState,
3117
3238
  type OnePasswordCredentialVaultItemSpec as OnePasswordCredentialVaultItemSpec,
@@ -43,6 +43,10 @@ import {
43
43
  KernelCredentialVaultItemState,
44
44
  KernelWalletState,
45
45
  KernelWalletVaultItemSpec,
46
+ ManagedAuthCredentialVaultField,
47
+ ManagedAuthCredentialVaultItemSpec,
48
+ ManagedAuthCredentialVaultItemSpecInput,
49
+ ManagedAuthCredentialVaultItemState,
46
50
  OnePasswordCredentialAccountSpec,
47
51
  OnePasswordCredentialAccountState,
48
52
  OnePasswordCredentialVaultItemSpec,
@@ -217,6 +221,10 @@ export declare namespace Vaults {
217
221
  type KernelCredentialVaultItemState as KernelCredentialVaultItemState,
218
222
  type KernelWalletState as KernelWalletState,
219
223
  type KernelWalletVaultItemSpec as KernelWalletVaultItemSpec,
224
+ type ManagedAuthCredentialVaultField as ManagedAuthCredentialVaultField,
225
+ type ManagedAuthCredentialVaultItemSpec as ManagedAuthCredentialVaultItemSpec,
226
+ type ManagedAuthCredentialVaultItemSpecInput as ManagedAuthCredentialVaultItemSpecInput,
227
+ type ManagedAuthCredentialVaultItemState as ManagedAuthCredentialVaultItemState,
220
228
  type OnePasswordCredentialAccountSpec as OnePasswordCredentialAccountSpec,
221
229
  type OnePasswordCredentialAccountState as OnePasswordCredentialAccountState,
222
230
  type OnePasswordCredentialVaultItemSpec as OnePasswordCredentialVaultItemSpec,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.118.0'; // x-release-please-version
1
+ export const VERSION = '0.120.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.118.0";
1
+ export declare const VERSION = "0.120.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.118.0";
1
+ export declare const VERSION = "0.120.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.118.0'; // x-release-please-version
4
+ exports.VERSION = '0.120.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.118.0'; // x-release-please-version
1
+ export const VERSION = '0.120.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map