@inferencesh/sdk 0.24.0 → 0.26.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 +16 -0
- package/dist/types.d.ts +512 -24
- package/dist/types.js +77 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.26.0] - 2026-10-12
|
|
11
|
+
|
|
12
|
+
Breaking (types only, following the API's credential model): `CredentialRequirement.provider` is now a `ProviderSeed` object (`{ name?, website? }`) instead of a string, and the requirement's `name`, `website` and `key` fields moved into it. Requirements are keyed by slug.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- Generated types for the credential model: `ProviderSeed`, `ProviderSummary`, `ConnectTokens`, `SecretField`, `CredentialRequirements`, and the auth scheme vocabulary (`AuthSchemeKind`, `AuthSchemeFlow`, `AuthSchemeAPIKeyIn`, `AuthSchemeHTTPScheme`, `AuthSchemeClientAuth`), plus `provider_info` and MCP credentials on the DTOs.
|
|
17
|
+
|
|
18
|
+
## [0.25.0] - 2026-10-12
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- Generated types follow the API: device authorization records the starting device and proximity (`DeviceAuthCodeInfo.device` with `client`, `client_version`, `proximity`, `scopes`), `DeviceAuthStatusSlowDown` and the poll `interval`, the `code_confirmation_required` and `invalid_scope` error codes, and `cached_tokens` / `cache_write_tokens` on LLM usage and text meta items.
|
|
23
|
+
|
|
24
|
+
## [0.24.0] - 2026-10-11
|
|
25
|
+
|
|
10
26
|
### Added
|
|
11
27
|
|
|
12
28
|
- Client tools can return files. A `ClientToolHandlerFn` may return `{ result: string; attachments?: FileRef[] }` (new `ClientToolResult` type) besides a string; the files are uploaded first with POST /files (`client.files.upload`, the chat's `uploadFile`) and sent as `attachments` with the result. Images reach the model as image input when it supports images. `submitToolResult` (agent api, `Agent`, `AgentsAPI`, the React chat actions) takes optional `attachments`, sent only when non-empty. `ToolResultRequest.attachments` is added by hand to the generated types until the next `make types` picks it up from the API. String returns work as before.
|
package/dist/types.d.ts
CHANGED
|
@@ -548,7 +548,7 @@ export interface AppVersionInput {
|
|
|
548
548
|
};
|
|
549
549
|
kernel?: string;
|
|
550
550
|
required_secrets?: SecretRequirement[];
|
|
551
|
-
required_credentials?:
|
|
551
|
+
required_credentials?: CredentialRequirements;
|
|
552
552
|
resources?: AppResources;
|
|
553
553
|
}
|
|
554
554
|
/**
|
|
@@ -645,6 +645,12 @@ export interface DeviceAuthPollResponse {
|
|
|
645
645
|
* credential comes with it.
|
|
646
646
|
*/
|
|
647
647
|
admin_until?: string;
|
|
648
|
+
/**
|
|
649
|
+
* Interval is the polling interval in seconds the device is now held
|
|
650
|
+
* to, set with status slow_down (RFC 8628 3.5: each one raises it by
|
|
651
|
+
* five seconds).
|
|
652
|
+
*/
|
|
653
|
+
interval?: number;
|
|
648
654
|
}
|
|
649
655
|
/**
|
|
650
656
|
* AdminElevateRequest is the body of POST /device/auth/elevate: a platform
|
|
@@ -1402,7 +1408,7 @@ export interface AppFunction {
|
|
|
1402
1408
|
* in app code. Each must be covered by the app-wide list in inf.yml.
|
|
1403
1409
|
* Empty means the function gets the app-wide list.
|
|
1404
1410
|
*/
|
|
1405
|
-
credentials?:
|
|
1411
|
+
credentials?: CredentialRequirements;
|
|
1406
1412
|
/**
|
|
1407
1413
|
* Annotations are MCP tool hints (read-only, destructive, idempotent,
|
|
1408
1414
|
* open-world) declared on the function. Hints only: nothing trusts
|
|
@@ -1442,33 +1448,63 @@ export interface SecretRequirement {
|
|
|
1442
1448
|
optional?: boolean;
|
|
1443
1449
|
}
|
|
1444
1450
|
/**
|
|
1445
|
-
* CredentialRequirement is an entry under credentials: in inf.yml:
|
|
1446
|
-
*
|
|
1447
|
-
*
|
|
1448
|
-
* credential), Scopes what to ask for (an OAuth one)
|
|
1451
|
+
* CredentialRequirement is an entry under credentials: in inf.yml: a
|
|
1452
|
+
* credential the app uses, keyed by the credential's slug (what
|
|
1453
|
+
* Credential.Provider stores). Secrets lists the keys to inject from it (an
|
|
1454
|
+
* API key credential), Scopes what to ask for (an OAuth one), Capabilities
|
|
1455
|
+
* the platform-defined grants it needs ("x.tweet.read", "google.sheets":
|
|
1456
|
+
* an OAuth grant with the scopes it implies), each a capability of the
|
|
1457
|
+
* entry's own provider. Provider seeds the catalog row for the company the
|
|
1458
|
+
* first time it is seen and never overwrites it; Auth seeds the auth scheme
|
|
1459
|
+
* when the slug is free.
|
|
1449
1460
|
* credentials:
|
|
1450
|
-
*
|
|
1451
|
-
*
|
|
1452
|
-
*
|
|
1461
|
+
* slack:
|
|
1462
|
+
* capabilities: [slack.channels.write]
|
|
1463
|
+
* acme:
|
|
1453
1464
|
* secrets: [ACME_API_KEY]
|
|
1454
|
-
*
|
|
1455
|
-
*
|
|
1456
|
-
*
|
|
1465
|
+
* provider: {name: Acme CRM, website: acme.com}
|
|
1466
|
+
* The list form that preceded it is still read: `- provider: acme` names
|
|
1467
|
+
* the slug, `- key: x.tweet.read` a capability (its slug is the part
|
|
1468
|
+
* before the first dot), `name:` and `website:` seed the provider.
|
|
1457
1469
|
*/
|
|
1458
1470
|
export interface CredentialRequirement {
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
* Name and Website describe a provider the platform does not list: the
|
|
1462
|
-
* name its credential is shown under and the site its logo comes from.
|
|
1463
|
-
*/
|
|
1464
|
-
name?: string;
|
|
1465
|
-
website?: string;
|
|
1466
|
-
key?: string;
|
|
1471
|
+
slug?: string;
|
|
1472
|
+
capabilities?: string[];
|
|
1467
1473
|
description?: string;
|
|
1468
1474
|
optional?: boolean;
|
|
1469
1475
|
secrets?: string[];
|
|
1470
1476
|
scopes?: string[];
|
|
1477
|
+
/**
|
|
1478
|
+
* Provider describes the company the credential belongs to, for a
|
|
1479
|
+
* catalog row that does not exist yet. Its slug defaults to the
|
|
1480
|
+
* credential slug.
|
|
1481
|
+
*/
|
|
1482
|
+
provider?: ProviderSeed;
|
|
1483
|
+
/**
|
|
1484
|
+
* Auth is the credential's auth scheme, for a slug no row defines yet.
|
|
1485
|
+
*/
|
|
1486
|
+
auth?: AuthSchemeSpec;
|
|
1471
1487
|
}
|
|
1488
|
+
/**
|
|
1489
|
+
* ProviderSeed is a provider (the company behind a credential) as an app
|
|
1490
|
+
* declares it: enough to create its catalog row when none exists.
|
|
1491
|
+
*/
|
|
1492
|
+
export interface ProviderSeed {
|
|
1493
|
+
slug?: string;
|
|
1494
|
+
name?: string;
|
|
1495
|
+
description?: string;
|
|
1496
|
+
website?: string;
|
|
1497
|
+
logo_uri?: string;
|
|
1498
|
+
docs_uri?: string;
|
|
1499
|
+
tos_uri?: string;
|
|
1500
|
+
policy_uri?: string;
|
|
1501
|
+
}
|
|
1502
|
+
/**
|
|
1503
|
+
* CredentialRequirements is the credentials: list of a manifest. It reads
|
|
1504
|
+
* both forms: a map keyed by credential slug (the current one) and a list
|
|
1505
|
+
* of entries; it is always written as a list.
|
|
1506
|
+
*/
|
|
1507
|
+
export type CredentialRequirements = CredentialRequirement[];
|
|
1472
1508
|
/**
|
|
1473
1509
|
* AppDTO is the API response for a full app.
|
|
1474
1510
|
*/
|
|
@@ -1565,7 +1601,7 @@ export interface AppVersionDTO extends BaseModelDTO {
|
|
|
1565
1601
|
};
|
|
1566
1602
|
kernel: string;
|
|
1567
1603
|
required_secrets?: SecretRequirement[];
|
|
1568
|
-
required_credentials?:
|
|
1604
|
+
required_credentials?: CredentialRequirements;
|
|
1569
1605
|
resources: AppResources;
|
|
1570
1606
|
/**
|
|
1571
1607
|
* Sandbox is the version's declared sandbox exceptions. Absent on a
|
|
@@ -2443,6 +2479,16 @@ export interface ToolExplanationDTO {
|
|
|
2443
2479
|
*/
|
|
2444
2480
|
risk: string;
|
|
2445
2481
|
}
|
|
2482
|
+
/**
|
|
2483
|
+
* ConnectTokens are tokens a provider minted while connecting, for grants
|
|
2484
|
+
* that need no redirect (OAuth client credentials): the credential service
|
|
2485
|
+
* saves them on the login it writes. They travel inside the process only.
|
|
2486
|
+
*/
|
|
2487
|
+
export interface ConnectTokens {
|
|
2488
|
+
AccessToken: SensitiveString;
|
|
2489
|
+
RefreshToken: SensitiveString;
|
|
2490
|
+
ExpiresAt?: string;
|
|
2491
|
+
}
|
|
2446
2492
|
/**
|
|
2447
2493
|
* CredentialDTO is the API response for a credential (never exposes secrets).
|
|
2448
2494
|
*/
|
|
@@ -2472,12 +2518,32 @@ export interface CredentialDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
2472
2518
|
is_primary: boolean;
|
|
2473
2519
|
error_message?: string;
|
|
2474
2520
|
}
|
|
2521
|
+
/**
|
|
2522
|
+
* ProviderSummary is the company a credential slug belongs to: the
|
|
2523
|
+
* providers row's identity, for grouping and display.
|
|
2524
|
+
*/
|
|
2525
|
+
export interface ProviderSummary {
|
|
2526
|
+
slug: string;
|
|
2527
|
+
name: string;
|
|
2528
|
+
icon_url?: string;
|
|
2529
|
+
website?: string;
|
|
2530
|
+
docs_url?: string;
|
|
2531
|
+
}
|
|
2475
2532
|
/**
|
|
2476
2533
|
* CredentialConfigDTO is the merged view: provider catalog + credential state.
|
|
2477
2534
|
*/
|
|
2478
2535
|
export interface CredentialConfigDTO {
|
|
2479
2536
|
slug: string;
|
|
2537
|
+
/**
|
|
2538
|
+
* Provider is the credential slug (what Credential.Provider stores):
|
|
2539
|
+
* one way to authenticate. The company it belongs to is ProviderInfo.
|
|
2540
|
+
*/
|
|
2480
2541
|
provider: string;
|
|
2542
|
+
/**
|
|
2543
|
+
* ProviderInfo is the company this slug belongs to, for grouping: the
|
|
2544
|
+
* providers row its auth scheme names, else the slug's own identity.
|
|
2545
|
+
*/
|
|
2546
|
+
provider_info?: ProviderSummary;
|
|
2481
2547
|
type: string;
|
|
2482
2548
|
name: string;
|
|
2483
2549
|
short_name: string;
|
|
@@ -2801,7 +2867,7 @@ export interface DecideEntitlementRequestRequest {
|
|
|
2801
2867
|
* and APIError.Code on the legacy envelope. Clients branch on these, so a
|
|
2802
2868
|
* code is a named const here, where it generates into models and the SDKs.
|
|
2803
2869
|
*/
|
|
2804
|
-
export type ErrorCode = "invalid_request" | "validation_error" | "unauthorized" | "forbidden" | "not_found" | "conflict" | "name_conflict" | "already_exists" | "not_configured" | "method_not_allowed" | "rate_limited" | "internal_error" | "team_role_required" | "blocked_by_usage_policy" | "last_owner" | "account_deactivated" | "account_banned" | "person_required" | "otp_required" | "requires_sign_in" | "insufficient_scope" | "impersonation_reason_required" | "mcp_auth_expired" | "admin_session_required" | "admin_scopes_not_approved" | "cli_session_required" | "admin_required" | "same_admin_required" | "browser_session_required" | "invalid_ttl" | "admin_authenticator_required" | "limit_exceeded" | "feature_not_available" | "entitlement_unavailable" | "payment_required" | "payment_method_required" | "form_closed" | "already_submitted" | "already_claimed" | "already_entitled" | "request_open" | "invalid_code" | "already_processed" | "expired" | "app_retired" | "app_maintenance" | "invalid_transition" | "SESSION_NOT_FOUND" | "SESSION_EXPIRED" | "SESSION_ENDED" | "WORKER_LEASED" | "APP_MISMATCH" | "VERSION_MISMATCH" | "agents_disabled" | "remote_offline" | "remote_timeout" | "harness_not_drivable" | "harness_too_old";
|
|
2870
|
+
export type ErrorCode = "invalid_request" | "validation_error" | "unauthorized" | "forbidden" | "not_found" | "conflict" | "name_conflict" | "already_exists" | "not_configured" | "method_not_allowed" | "rate_limited" | "internal_error" | "team_role_required" | "blocked_by_usage_policy" | "last_owner" | "account_deactivated" | "account_banned" | "person_required" | "otp_required" | "requires_sign_in" | "insufficient_scope" | "invalid_scope" | "impersonation_reason_required" | "mcp_auth_expired" | "admin_session_required" | "admin_scopes_not_approved" | "cli_session_required" | "admin_required" | "same_admin_required" | "browser_session_required" | "invalid_ttl" | "admin_authenticator_required" | "limit_exceeded" | "feature_not_available" | "entitlement_unavailable" | "payment_required" | "payment_method_required" | "form_closed" | "already_submitted" | "already_claimed" | "already_entitled" | "request_open" | "invalid_code" | "already_processed" | "expired" | "code_confirmation_required" | "app_retired" | "app_maintenance" | "invalid_transition" | "SESSION_NOT_FOUND" | "SESSION_EXPIRED" | "SESSION_ENDED" | "WORKER_LEASED" | "APP_MISMATCH" | "VERSION_MISMATCH" | "agents_disabled" | "remote_offline" | "remote_timeout" | "harness_not_drivable" | "harness_too_old";
|
|
2805
2871
|
export declare const ErrorCodeInvalidRequest: ErrorCode;
|
|
2806
2872
|
export declare const ErrorCodeValidationError: ErrorCode;
|
|
2807
2873
|
export declare const ErrorCodeUnauthorized: ErrorCode;
|
|
@@ -2860,6 +2926,12 @@ export declare const ErrorCodeRequiresSignIn: ErrorCode;
|
|
|
2860
2926
|
* narrowed login granted less). The detail names the scope.
|
|
2861
2927
|
*/
|
|
2862
2928
|
export declare const ErrorCodeInsufficientScope: ErrorCode;
|
|
2929
|
+
/**
|
|
2930
|
+
* ErrorCodeInvalidScope (400): a grant request (an OAuth authorization,
|
|
2931
|
+
* a device sign-in's approval) named only scopes this server does not
|
|
2932
|
+
* know. The detail names them.
|
|
2933
|
+
*/
|
|
2934
|
+
export declare const ErrorCodeInvalidScope: ErrorCode;
|
|
2863
2935
|
/**
|
|
2864
2936
|
* ErrorCodeImpersonationReasonRequired (403): a platform admin named a
|
|
2865
2937
|
* team they are not a member of without a live impersonation grant.
|
|
@@ -2938,6 +3010,11 @@ export declare const ErrorCodeRequestOpen: ErrorCode;
|
|
|
2938
3010
|
export declare const ErrorCodeInvalidCode: ErrorCode;
|
|
2939
3011
|
export declare const ErrorCodeAlreadyProcessed: ErrorCode;
|
|
2940
3012
|
export declare const ErrorCodeExpired: ErrorCode;
|
|
3013
|
+
/**
|
|
3014
|
+
* A device sign-in started away from the approver is approved only
|
|
3015
|
+
* with the code typed from the device (400).
|
|
3016
|
+
*/
|
|
3017
|
+
export declare const ErrorCodeCodeConfirmationRequired: ErrorCode;
|
|
2941
3018
|
/**
|
|
2942
3019
|
* Run-time refusals. AppRetired (410): the app no longer runs.
|
|
2943
3020
|
* AppMaintenance (503, Retry-After): the owner paused it; the message is
|
|
@@ -3953,6 +4030,13 @@ export interface MCPServerDTO {
|
|
|
3953
4030
|
*/
|
|
3954
4031
|
setup?: MCPServerSetup;
|
|
3955
4032
|
documentation_url: string;
|
|
4033
|
+
/**
|
|
4034
|
+
* Credentials is what the server needs to be called (the same shape as
|
|
4035
|
+
* an app's inf.yml credentials). CredentialSlug is the first entry's
|
|
4036
|
+
* slug: the vault entry a call sends, so a page can link to it.
|
|
4037
|
+
*/
|
|
4038
|
+
credentials?: CredentialRequirements;
|
|
4039
|
+
credential_slug?: string;
|
|
3956
4040
|
connection_status?: string;
|
|
3957
4041
|
/**
|
|
3958
4042
|
* ConnectionScope is who the caller's connection to this server belongs
|
|
@@ -4464,7 +4548,7 @@ export interface SetupAction {
|
|
|
4464
4548
|
*/
|
|
4465
4549
|
export interface CheckRequirementsRequest {
|
|
4466
4550
|
secrets?: SecretRequirement[];
|
|
4467
|
-
credentials?:
|
|
4551
|
+
credentials?: CredentialRequirements;
|
|
4468
4552
|
}
|
|
4469
4553
|
/**
|
|
4470
4554
|
* CheckRequirementsResponse is the API response for checking requirements
|
|
@@ -4517,6 +4601,23 @@ export interface SecretDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
4517
4601
|
*/
|
|
4518
4602
|
credential_id?: string;
|
|
4519
4603
|
}
|
|
4604
|
+
/**
|
|
4605
|
+
* SensitiveString is a string type that prevents accidental exposure of secrets.
|
|
4606
|
+
* It redacts in JSON/fmt output unless explicitly accessed via .Expose().
|
|
4607
|
+
* Encryption at rest is handled by the GORM "sensitive" serializer
|
|
4608
|
+
* (api/internal/lib/secrets). Fields must be tagged: `gorm:"serializer:sensitive"`
|
|
4609
|
+
* Note: map-based GORM Updates (map[string]any{"value": ...}) bypass serializers.
|
|
4610
|
+
* Always use struct-based operations for SensitiveString fields.
|
|
4611
|
+
* Redaction:
|
|
4612
|
+
* - JSON serialization: always returns "" (empty string)
|
|
4613
|
+
* - fmt.Sprintf with %s, %v, %#v: always returns "[REDACTED]"
|
|
4614
|
+
* - Only .Expose() returns the actual value
|
|
4615
|
+
* Encryption is enabled when SECRETS_ENCRYPTION_KEY env var is set.
|
|
4616
|
+
* Values are stored as "enc:v2:<encrypted_dek>:<encrypted_data>" in the database.
|
|
4617
|
+
* Key rotation only re-encrypts the DEK, not the data.
|
|
4618
|
+
*/
|
|
4619
|
+
export interface SensitiveString {
|
|
4620
|
+
}
|
|
4520
4621
|
/**
|
|
4521
4622
|
* SocketAccess is where one end of a socket dials and the credential it
|
|
4522
4623
|
* presents. The task's caller gets one in the run response; the worker gets
|
|
@@ -5022,6 +5123,12 @@ export interface ToolInvocationDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
5022
5123
|
export interface MetaItem {
|
|
5023
5124
|
type: MetaItemType;
|
|
5024
5125
|
tokens?: number;
|
|
5126
|
+
/**
|
|
5127
|
+
* CachedTokens and CacheWriteTokens are the parts of Tokens (on an input
|
|
5128
|
+
* text item) read from and written to the provider's prompt cache.
|
|
5129
|
+
*/
|
|
5130
|
+
cached_tokens?: number;
|
|
5131
|
+
cache_write_tokens?: number;
|
|
5025
5132
|
width?: number;
|
|
5026
5133
|
height?: number;
|
|
5027
5134
|
resolution_mp?: number;
|
|
@@ -5387,6 +5494,372 @@ export declare const GPUTypeIntel: GPUType;
|
|
|
5387
5494
|
export declare const GPUTypeNvidia: GPUType;
|
|
5388
5495
|
export declare const GPUTypeAMD: GPUType;
|
|
5389
5496
|
export declare const GPUTypeApple: GPUType;
|
|
5497
|
+
/**
|
|
5498
|
+
* AuthSchemeKind is how a provider authenticates: the kinds of an OpenAPI
|
|
5499
|
+
* Security Scheme Object (oauth2, apiKey, http), named the same so a
|
|
5500
|
+
* vendor's spec maps onto a scheme without translation.
|
|
5501
|
+
*/
|
|
5502
|
+
export type AuthSchemeKind = "oauth2" | "api_key" | "http" | "oauth2_authorization_code";
|
|
5503
|
+
/**
|
|
5504
|
+
* AuthSchemeOAuth2 is OAuth 2.0; Flow says which grant.
|
|
5505
|
+
*/
|
|
5506
|
+
export declare const AuthSchemeOAuth2: AuthSchemeKind;
|
|
5507
|
+
/**
|
|
5508
|
+
* AuthSchemeAPIKey is one or more keys a person pastes, sent as a
|
|
5509
|
+
* header or query parameter.
|
|
5510
|
+
*/
|
|
5511
|
+
export declare const AuthSchemeAPIKey: AuthSchemeKind;
|
|
5512
|
+
/**
|
|
5513
|
+
* AuthSchemeHTTP is a pasted secret sent as an HTTP auth scheme
|
|
5514
|
+
* (Authorization: Bearer or Basic).
|
|
5515
|
+
*/
|
|
5516
|
+
export declare const AuthSchemeHTTP: AuthSchemeKind;
|
|
5517
|
+
/**
|
|
5518
|
+
* Deprecated: the kind is AuthSchemeOAuth2 with AuthSchemeFlowAuthorizationCode.
|
|
5519
|
+
* Same value, so comparisons keep working; rows still stored as
|
|
5520
|
+
* "oauth2_authorization_code" are read as oauth2 (UnmarshalJSON).
|
|
5521
|
+
*/
|
|
5522
|
+
export declare const AuthSchemeOAuth2AuthorizationCode: "oauth2";
|
|
5523
|
+
/**
|
|
5524
|
+
* AuthSchemeFlow is the OAuth 2.0 grant an oauth2 scheme uses.
|
|
5525
|
+
*/
|
|
5526
|
+
export type AuthSchemeFlow = "authorization_code" | "client_credentials";
|
|
5527
|
+
/**
|
|
5528
|
+
* AuthSchemeFlowAuthorizationCode is the user-consent flow: authorization
|
|
5529
|
+
* endpoint → code → token endpoint, optionally with PKCE. The default.
|
|
5530
|
+
*/
|
|
5531
|
+
export declare const AuthSchemeFlowAuthorizationCode: AuthSchemeFlow;
|
|
5532
|
+
/**
|
|
5533
|
+
* AuthSchemeFlowClientCredentials is server-to-server: the app's client
|
|
5534
|
+
* id and secret are exchanged at the token endpoint, no redirect, no
|
|
5535
|
+
* user. The login is the app's own.
|
|
5536
|
+
*/
|
|
5537
|
+
export declare const AuthSchemeFlowClientCredentials: AuthSchemeFlow;
|
|
5538
|
+
/**
|
|
5539
|
+
* AuthSchemeAPIKeyIn is where an api_key scheme's key travels.
|
|
5540
|
+
*/
|
|
5541
|
+
export type AuthSchemeAPIKeyIn = "header" | "query";
|
|
5542
|
+
export declare const AuthSchemeAPIKeyInHeader: AuthSchemeAPIKeyIn;
|
|
5543
|
+
export declare const AuthSchemeAPIKeyInQuery: AuthSchemeAPIKeyIn;
|
|
5544
|
+
/**
|
|
5545
|
+
* AuthSchemeHTTPScheme is the Authorization scheme of an http scheme.
|
|
5546
|
+
*/
|
|
5547
|
+
export type AuthSchemeHTTPScheme = "bearer" | "basic";
|
|
5548
|
+
export declare const AuthSchemeHTTPBearer: AuthSchemeHTTPScheme;
|
|
5549
|
+
export declare const AuthSchemeHTTPBasic: AuthSchemeHTTPScheme;
|
|
5550
|
+
/**
|
|
5551
|
+
* SecretField is one value a person pastes to connect an api_key or http
|
|
5552
|
+
* scheme: its vault key and how the form asks for it. Several fields make
|
|
5553
|
+
* a multi-secret provider (Kling's access and secret key).
|
|
5554
|
+
*/
|
|
5555
|
+
export interface SecretField {
|
|
5556
|
+
key: string;
|
|
5557
|
+
label?: string;
|
|
5558
|
+
placeholder?: string;
|
|
5559
|
+
sensitive?: boolean;
|
|
5560
|
+
optional?: boolean;
|
|
5561
|
+
}
|
|
5562
|
+
/**
|
|
5563
|
+
* AuthSchemeClientAuth is how client_id/client_secret reach the token
|
|
5564
|
+
* endpoint. Most providers accept either; a few insist on one.
|
|
5565
|
+
*/
|
|
5566
|
+
export type AuthSchemeClientAuth = "basic" | "body";
|
|
5567
|
+
/**
|
|
5568
|
+
* AuthSchemeClientAuthBasic sends them as an HTTP Basic Authorization
|
|
5569
|
+
* header (RFC 6749 §2.3.1, the default).
|
|
5570
|
+
*/
|
|
5571
|
+
export declare const AuthSchemeClientAuthBasic: AuthSchemeClientAuth;
|
|
5572
|
+
/**
|
|
5573
|
+
* AuthSchemeClientAuthBody sends them as form fields in the request body.
|
|
5574
|
+
*/
|
|
5575
|
+
export declare const AuthSchemeClientAuthBody: AuthSchemeClientAuth;
|
|
5576
|
+
/**
|
|
5577
|
+
* AuthSchemeTokenRequest is the token request's body encoding.
|
|
5578
|
+
*/
|
|
5579
|
+
export type AuthSchemeTokenRequest = "form" | "json";
|
|
5580
|
+
export declare const AuthSchemeTokenRequestForm: AuthSchemeTokenRequest;
|
|
5581
|
+
export declare const AuthSchemeTokenRequestJSON: AuthSchemeTokenRequest;
|
|
5582
|
+
/**
|
|
5583
|
+
* AuthSchemeRefresh is when an access token is refreshed.
|
|
5584
|
+
*/
|
|
5585
|
+
export type AuthSchemeRefresh = "" | "always";
|
|
5586
|
+
/**
|
|
5587
|
+
* AuthSchemeRefreshWhenExpiring refreshes within five minutes of the
|
|
5588
|
+
* reported expiry; a token with no expiry is treated as long-lived
|
|
5589
|
+
* (Slack without token rotation, Notion).
|
|
5590
|
+
*/
|
|
5591
|
+
export declare const AuthSchemeRefreshWhenExpiring: AuthSchemeRefresh;
|
|
5592
|
+
/**
|
|
5593
|
+
* AuthSchemeRefreshAlways refreshes on every read: the provider reports
|
|
5594
|
+
* no expiry but the token does expire (Salesforce's session timeout is
|
|
5595
|
+
* per org and not reported).
|
|
5596
|
+
*/
|
|
5597
|
+
export declare const AuthSchemeRefreshAlways: AuthSchemeRefresh;
|
|
5598
|
+
/**
|
|
5599
|
+
* AuthSchemeRevokeStyle is how the token reaches the revoke endpoint.
|
|
5600
|
+
*/
|
|
5601
|
+
export type AuthSchemeRevokeStyle = "bearer" | "query" | "form";
|
|
5602
|
+
export declare const AuthSchemeRevokeBearer: AuthSchemeRevokeStyle;
|
|
5603
|
+
export declare const AuthSchemeRevokeQuery: AuthSchemeRevokeStyle;
|
|
5604
|
+
export declare const AuthSchemeRevokeForm: AuthSchemeRevokeStyle;
|
|
5605
|
+
/**
|
|
5606
|
+
* AuthSchemeRevoke is the optional token revocation on disconnect.
|
|
5607
|
+
*/
|
|
5608
|
+
export interface AuthSchemeRevoke {
|
|
5609
|
+
url: string;
|
|
5610
|
+
style: AuthSchemeRevokeStyle;
|
|
5611
|
+
/**
|
|
5612
|
+
* ClientAuth also sends client_id and client_secret in the form
|
|
5613
|
+
* (Discord).
|
|
5614
|
+
*/
|
|
5615
|
+
client_auth?: boolean;
|
|
5616
|
+
}
|
|
5617
|
+
/**
|
|
5618
|
+
* AuthSchemeAppKey is one key of the OAuth app a login goes through. The
|
|
5619
|
+
* client id and secret are implied (PREFIX_CLIENT_ID, PREFIX_CLIENT_SECRET);
|
|
5620
|
+
* listing them only overrides their label and placeholder. Other keys
|
|
5621
|
+
* (bot_token, signing_secret, tenant_id) are optional extras the app holds,
|
|
5622
|
+
* read back by name in templates as {app.<name>} and by hooks.
|
|
5623
|
+
*/
|
|
5624
|
+
export interface AuthSchemeAppKey {
|
|
5625
|
+
/**
|
|
5626
|
+
* Name is the key's role: client_id, client_secret, bot_token, …
|
|
5627
|
+
*/
|
|
5628
|
+
name: string;
|
|
5629
|
+
/**
|
|
5630
|
+
* Key is the vault key; default PREFIX_<NAME>.
|
|
5631
|
+
*/
|
|
5632
|
+
key?: string;
|
|
5633
|
+
label?: string;
|
|
5634
|
+
placeholder?: string;
|
|
5635
|
+
sensitive?: boolean;
|
|
5636
|
+
/**
|
|
5637
|
+
* Optional is implied for every name but client_id and client_secret.
|
|
5638
|
+
*/
|
|
5639
|
+
optional?: boolean;
|
|
5640
|
+
}
|
|
5641
|
+
/**
|
|
5642
|
+
* AuthSchemeLookup is a call made after the token exchange, with the new
|
|
5643
|
+
* access token as bearer; its decoded response becomes a document root of
|
|
5644
|
+
* its name for the identity, metadata and later lookups ({user.email},
|
|
5645
|
+
* {resources.0.id}). userinfo_url is shorthand for the lookup named user.
|
|
5646
|
+
* URL, body and headers are templates.
|
|
5647
|
+
*/
|
|
5648
|
+
export interface AuthSchemeLookup {
|
|
5649
|
+
name: string;
|
|
5650
|
+
url: string;
|
|
5651
|
+
method?: string;
|
|
5652
|
+
/**
|
|
5653
|
+
* Body is sent as is; a JSON body is the default content type
|
|
5654
|
+
* (Dropbox's "null", Linear's GraphQL query).
|
|
5655
|
+
*/
|
|
5656
|
+
body?: string;
|
|
5657
|
+
content_type?: string;
|
|
5658
|
+
headers?: {
|
|
5659
|
+
[key: string]: string;
|
|
5660
|
+
};
|
|
5661
|
+
}
|
|
5662
|
+
/**
|
|
5663
|
+
* AuthSchemeCapability is something an app can ask for from this provider,
|
|
5664
|
+
* satisfied by a connection holding its scopes. Scopes are in the scheme's
|
|
5665
|
+
* own (friendly) names, the ones a credential stores.
|
|
5666
|
+
*/
|
|
5667
|
+
export interface AuthSchemeCapability {
|
|
5668
|
+
key: string;
|
|
5669
|
+
scopes?: string[];
|
|
5670
|
+
satisfies?: string[];
|
|
5671
|
+
display_name: string;
|
|
5672
|
+
description?: string;
|
|
5673
|
+
}
|
|
5674
|
+
/**
|
|
5675
|
+
* AuthSchemeSpec is one way to authenticate against a provider, as data.
|
|
5676
|
+
* Everything a standard OAuth2 provider needs is a field; where a provider
|
|
5677
|
+
* deviates in a way data cannot express, the spec names a hook and Go
|
|
5678
|
+
* supplies it (authprovider.RegisterTokenResponseHook and friends).
|
|
5679
|
+
* Templates: URLs, headers, lookup bodies, identifier, name, metadata and
|
|
5680
|
+
* env values are strings with {{path}} placeholders. A path is read from
|
|
5681
|
+
* the flow's document, which grows as the flow goes:
|
|
5682
|
+
* client_id from the authorize step on
|
|
5683
|
+
* vars.* (and each var bare) what the vars hook produced, e.g. {{tenant}}
|
|
5684
|
+
* access_token, token.* after the token exchange (token.* is the
|
|
5685
|
+
* decoded response)
|
|
5686
|
+
* callback.* the other query params the callback carried
|
|
5687
|
+
* (QuickBooks' realmId, Shopify's shop)
|
|
5688
|
+
* <lookup>.* each lookup's response, by its name; user.*
|
|
5689
|
+
* is the userinfo lookup
|
|
5690
|
+
* expires_at, metadata.*, app.* env only: the token's expiry (RFC 3339),
|
|
5691
|
+
* the stored metadata, the app's extra keys
|
|
5692
|
+
* Array elements are indexed: {{resources.0.id}}. {{a|b}} takes the first
|
|
5693
|
+
* path present. A template none of whose placeholders resolve renders "":
|
|
5694
|
+
* omitted from env and metadata, blank as identifier or name.
|
|
5695
|
+
*/
|
|
5696
|
+
export interface AuthSchemeSpec {
|
|
5697
|
+
kind: AuthSchemeKind;
|
|
5698
|
+
/**
|
|
5699
|
+
* Flow is the oauth2 grant; empty means authorization_code.
|
|
5700
|
+
*/
|
|
5701
|
+
flow?: AuthSchemeFlow;
|
|
5702
|
+
/**
|
|
5703
|
+
* Fields are what a person pastes (api_key and http kinds).
|
|
5704
|
+
*/
|
|
5705
|
+
fields?: SecretField[];
|
|
5706
|
+
/**
|
|
5707
|
+
* In and ParamName say where an api_key key goes on a request: the
|
|
5708
|
+
* header or query parameter of that name. ValuePrefix is prepended to
|
|
5709
|
+
* the value ("Bearer "). Not needed to connect; read by injection.
|
|
5710
|
+
*/
|
|
5711
|
+
in?: AuthSchemeAPIKeyIn;
|
|
5712
|
+
param_name?: string;
|
|
5713
|
+
value_prefix?: string;
|
|
5714
|
+
/**
|
|
5715
|
+
* Scheme and BearerFormat describe an http kind's Authorization header.
|
|
5716
|
+
*/
|
|
5717
|
+
scheme?: AuthSchemeHTTPScheme;
|
|
5718
|
+
bearer_format?: string;
|
|
5719
|
+
authorization_endpoint?: string;
|
|
5720
|
+
scopes?: string[];
|
|
5721
|
+
/**
|
|
5722
|
+
* ScopeAliases map the scheme's own scope names to what the provider
|
|
5723
|
+
* wants on the wire ("gmail.send" → "https://www.googleapis.com/auth/
|
|
5724
|
+
* gmail.send"). Credentials store the alias; the wire form is used only
|
|
5725
|
+
* in requests. A scope with no alias is sent as is.
|
|
5726
|
+
*/
|
|
5727
|
+
scope_aliases?: {
|
|
5728
|
+
[key: string]: string;
|
|
5729
|
+
};
|
|
5730
|
+
scope_param?: string;
|
|
5731
|
+
scope_separator?: string;
|
|
5732
|
+
omit_scope_param?: boolean;
|
|
5733
|
+
pkce?: boolean;
|
|
5734
|
+
/**
|
|
5735
|
+
* ClientIDParam is the name the client id travels under in the
|
|
5736
|
+
* authorize URL and the token body; default "client_id" (TikTok:
|
|
5737
|
+
* "client_key").
|
|
5738
|
+
*/
|
|
5739
|
+
client_id_param?: string;
|
|
5740
|
+
/**
|
|
5741
|
+
* ExtraAuthorizeParams are appended to the authorize URL verbatim
|
|
5742
|
+
* (Google's access_type=offline). AddScopesParams override them when
|
|
5743
|
+
* re-authorizing for more scopes (Google's include_granted_scopes).
|
|
5744
|
+
*/
|
|
5745
|
+
extra_authorize_params?: {
|
|
5746
|
+
[key: string]: string;
|
|
5747
|
+
};
|
|
5748
|
+
add_scopes_params?: {
|
|
5749
|
+
[key: string]: string;
|
|
5750
|
+
};
|
|
5751
|
+
/**
|
|
5752
|
+
* AccountHintParam is the authorize param that names the account to sign
|
|
5753
|
+
* in with (Google's and Microsoft's "login_hint"). When re-authorizing
|
|
5754
|
+
* for more scopes it carries the login's account identifier, so the
|
|
5755
|
+
* provider goes to that account instead of offering a chooser. Empty =
|
|
5756
|
+
* no hint sent.
|
|
5757
|
+
*/
|
|
5758
|
+
account_hint_param?: string;
|
|
5759
|
+
/**
|
|
5760
|
+
* AnotherAccountParams are authorize params for connecting an account
|
|
5761
|
+
* next to one already connected: the provider shows its account chooser
|
|
5762
|
+
* instead of signing the user back in to the account it remembers
|
|
5763
|
+
* (Google prompt=select_account). They override ExtraAuthorizeParams.
|
|
5764
|
+
*/
|
|
5765
|
+
another_account_params?: {
|
|
5766
|
+
[key: string]: string;
|
|
5767
|
+
};
|
|
5768
|
+
/**
|
|
5769
|
+
* RequiredScopes are always requested, on a connect and when
|
|
5770
|
+
* re-authorizing for more scopes, whatever the caller asked for: the
|
|
5771
|
+
* scopes the identity lookup and token refresh need (Google's openid,
|
|
5772
|
+
* email and profile; X's users.read and offline.access). In the
|
|
5773
|
+
* scheme's own names, like Scopes. Empty = only what was asked for.
|
|
5774
|
+
*/
|
|
5775
|
+
required_scopes?: string[];
|
|
5776
|
+
/**
|
|
5777
|
+
* IncrementalAddScopes: re-authorizing for more scopes asks only for
|
|
5778
|
+
* the new ones (plus RequiredScopes), and the provider returns a token
|
|
5779
|
+
* that also covers what the login already holds (Google, with
|
|
5780
|
+
* include_granted_scopes in AddScopesParams). Without it the full list
|
|
5781
|
+
* is asked for again.
|
|
5782
|
+
*/
|
|
5783
|
+
incremental_add_scopes?: boolean;
|
|
5784
|
+
token_endpoint?: string;
|
|
5785
|
+
/**
|
|
5786
|
+
* RevocationEndpoint is the RFC 7009 endpoint, when the provider has
|
|
5787
|
+
* one and Revoke names no style of its own: tokens are revoked there
|
|
5788
|
+
* with a form POST.
|
|
5789
|
+
*/
|
|
5790
|
+
revocation_endpoint?: string;
|
|
5791
|
+
client_auth?: AuthSchemeClientAuth;
|
|
5792
|
+
token_request?: AuthSchemeTokenRequest;
|
|
5793
|
+
/**
|
|
5794
|
+
* Headers go on every request to the provider (User-Agent for Reddit,
|
|
5795
|
+
* Notion-Version); values are templates ({{client_id}} for Twitch's
|
|
5796
|
+
* Client-Id).
|
|
5797
|
+
*/
|
|
5798
|
+
headers?: {
|
|
5799
|
+
[key: string]: string;
|
|
5800
|
+
};
|
|
5801
|
+
/**
|
|
5802
|
+
* TokenResponseHook names the Go reader for a token response that is
|
|
5803
|
+
* not the RFC 6749 shape (Slack's nested authed_user). Empty = standard.
|
|
5804
|
+
*/
|
|
5805
|
+
token_response_hook?: string;
|
|
5806
|
+
refresh?: AuthSchemeRefresh;
|
|
5807
|
+
revoke?: AuthSchemeRevoke;
|
|
5808
|
+
/**
|
|
5809
|
+
* UserInfoURL is fetched with the new access token; the response is the
|
|
5810
|
+
* identity document (user.*). UserInfoURLPath instead reads that URL
|
|
5811
|
+
* from a path within the token response (Salesforce's "id"). Lookups
|
|
5812
|
+
* are further calls, each becoming a root of its name, in order, after
|
|
5813
|
+
* user. With none of these, the token response is all there is.
|
|
5814
|
+
*/
|
|
5815
|
+
userinfo_url?: string;
|
|
5816
|
+
userinfo_url_path?: string;
|
|
5817
|
+
lookups?: AuthSchemeLookup[];
|
|
5818
|
+
/**
|
|
5819
|
+
* Identifier is the connected account's stable, human-readable id
|
|
5820
|
+
* ("{{user.email}}", "@{{user.data.username}}"); Name its display name.
|
|
5821
|
+
*/
|
|
5822
|
+
identifier?: string;
|
|
5823
|
+
name?: string;
|
|
5824
|
+
/**
|
|
5825
|
+
* AccountID is the account's id as the provider keeps it and never
|
|
5826
|
+
* changes it ("{{user.sub}}" for Google, "{{user.data.id}}" for X), as
|
|
5827
|
+
* opposed to Identifier, which the user may rename. Logins are matched
|
|
5828
|
+
* and chosen by it. Empty = Identifier, for providers whose identifier
|
|
5829
|
+
* already is such an id (Slack, Notion).
|
|
5830
|
+
*/
|
|
5831
|
+
account_id?: string;
|
|
5832
|
+
/**
|
|
5833
|
+
* IdentityHook names Go code that derives identifier and name when a
|
|
5834
|
+
* template cannot (Discord's discriminator rule). It wins over both.
|
|
5835
|
+
*/
|
|
5836
|
+
identity_hook?: string;
|
|
5837
|
+
/**
|
|
5838
|
+
* Metadata is what the credential stores about the account, by key.
|
|
5839
|
+
*/
|
|
5840
|
+
metadata?: {
|
|
5841
|
+
[key: string]: string;
|
|
5842
|
+
};
|
|
5843
|
+
/**
|
|
5844
|
+
* Env is what a run reads, by variable. Empty = PREFIX_ACCESS_TOKEN and
|
|
5845
|
+
* PREFIX_ACCESS_TOKEN_EXPIRES_AT.
|
|
5846
|
+
*/
|
|
5847
|
+
env?: {
|
|
5848
|
+
[key: string]: string;
|
|
5849
|
+
};
|
|
5850
|
+
/**
|
|
5851
|
+
* AppKeys are the OAuth app's keys beyond the implied client id and
|
|
5852
|
+
* secret, and label overrides for those.
|
|
5853
|
+
*/
|
|
5854
|
+
app_keys?: AuthSchemeAppKey[];
|
|
5855
|
+
/**
|
|
5856
|
+
* VarsHook names Go code that turns the app's extra keys into the
|
|
5857
|
+
* {var} values substituted into the URLs (Microsoft's tenant,
|
|
5858
|
+
* Salesforce's sandbox host).
|
|
5859
|
+
*/
|
|
5860
|
+
vars_hook?: string;
|
|
5861
|
+
capabilities?: AuthSchemeCapability[];
|
|
5862
|
+
}
|
|
5390
5863
|
/**
|
|
5391
5864
|
* Visibility represents the visibility level of a resource
|
|
5392
5865
|
*/
|
|
@@ -6288,11 +6761,16 @@ export declare const OpIsNull: FilterOperator;
|
|
|
6288
6761
|
export declare const OpIsNotNull: FilterOperator;
|
|
6289
6762
|
export declare const OpIsEmpty: FilterOperator;
|
|
6290
6763
|
export declare const OpIsNotEmpty: FilterOperator;
|
|
6291
|
-
export type DeviceAuthStatus = "pending" | "approved" | "expired" | "denied" | "valid" | "invalid" | "loading";
|
|
6764
|
+
export type DeviceAuthStatus = "pending" | "approved" | "expired" | "denied" | "slow_down" | "valid" | "invalid" | "loading";
|
|
6292
6765
|
export declare const DeviceAuthStatusPending: DeviceAuthStatus;
|
|
6293
6766
|
export declare const DeviceAuthStatusApproved: DeviceAuthStatus;
|
|
6294
6767
|
export declare const DeviceAuthStatusExpired: DeviceAuthStatus;
|
|
6295
6768
|
export declare const DeviceAuthStatusDenied: DeviceAuthStatus;
|
|
6769
|
+
/**
|
|
6770
|
+
* DeviceAuthStatusSlowDown: still pending, and the device polled sooner
|
|
6771
|
+
* than its interval, which is now five seconds longer (RFC 8628 3.5).
|
|
6772
|
+
*/
|
|
6773
|
+
export declare const DeviceAuthStatusSlowDown: DeviceAuthStatus;
|
|
6296
6774
|
export declare const DeviceAuthStatusValid: DeviceAuthStatus;
|
|
6297
6775
|
export declare const DeviceAuthStatusInvalid: DeviceAuthStatus;
|
|
6298
6776
|
export declare const DeviceAuthStatusLoading: DeviceAuthStatus;
|
|
@@ -7310,7 +7788,17 @@ export interface LLMUsage {
|
|
|
7310
7788
|
stop_reason: string;
|
|
7311
7789
|
time_to_first_token: number;
|
|
7312
7790
|
tokens_per_second: number;
|
|
7791
|
+
/**
|
|
7792
|
+
* PromptTokens counts every input token, cached ones included
|
|
7793
|
+
* (OpenAI, xAI and OpenRouter count them this way).
|
|
7794
|
+
*/
|
|
7313
7795
|
prompt_tokens: number;
|
|
7796
|
+
/**
|
|
7797
|
+
* CachedTokens is how many of PromptTokens were read from the provider's
|
|
7798
|
+
* prompt cache; CacheWriteTokens how many were written to it.
|
|
7799
|
+
*/
|
|
7800
|
+
cached_tokens: number;
|
|
7801
|
+
cache_write_tokens: number;
|
|
7314
7802
|
completion_tokens: number;
|
|
7315
7803
|
total_tokens: number;
|
|
7316
7804
|
reasoning_tokens: number;
|
package/dist/types.js
CHANGED
|
@@ -434,6 +434,12 @@ export const ErrorCodeRequiresSignIn = "requires_sign_in";
|
|
|
434
434
|
* narrowed login granted less). The detail names the scope.
|
|
435
435
|
*/
|
|
436
436
|
export const ErrorCodeInsufficientScope = "insufficient_scope";
|
|
437
|
+
/**
|
|
438
|
+
* ErrorCodeInvalidScope (400): a grant request (an OAuth authorization,
|
|
439
|
+
* a device sign-in's approval) named only scopes this server does not
|
|
440
|
+
* know. The detail names them.
|
|
441
|
+
*/
|
|
442
|
+
export const ErrorCodeInvalidScope = "invalid_scope";
|
|
437
443
|
/**
|
|
438
444
|
* ErrorCodeImpersonationReasonRequired (403): a platform admin named a
|
|
439
445
|
* team they are not a member of without a live impersonation grant.
|
|
@@ -512,6 +518,11 @@ export const ErrorCodeRequestOpen = "request_open";
|
|
|
512
518
|
export const ErrorCodeInvalidCode = "invalid_code";
|
|
513
519
|
export const ErrorCodeAlreadyProcessed = "already_processed";
|
|
514
520
|
export const ErrorCodeExpired = "expired";
|
|
521
|
+
/**
|
|
522
|
+
* A device sign-in started away from the approver is approved only
|
|
523
|
+
* with the code typed from the device (400).
|
|
524
|
+
*/
|
|
525
|
+
export const ErrorCodeCodeConfirmationRequired = "code_confirmation_required";
|
|
515
526
|
/**
|
|
516
527
|
* Run-time refusals. AppRetired (410): the app no longer runs.
|
|
517
528
|
* AppMaintenance (503, Retry-After): the owner paused it; the message is
|
|
@@ -731,6 +742,67 @@ export const GPUTypeIntel = "intel";
|
|
|
731
742
|
export const GPUTypeNvidia = "nvidia";
|
|
732
743
|
export const GPUTypeAMD = "amd";
|
|
733
744
|
export const GPUTypeApple = "apple";
|
|
745
|
+
/**
|
|
746
|
+
* AuthSchemeOAuth2 is OAuth 2.0; Flow says which grant.
|
|
747
|
+
*/
|
|
748
|
+
export const AuthSchemeOAuth2 = "oauth2";
|
|
749
|
+
/**
|
|
750
|
+
* AuthSchemeAPIKey is one or more keys a person pastes, sent as a
|
|
751
|
+
* header or query parameter.
|
|
752
|
+
*/
|
|
753
|
+
export const AuthSchemeAPIKey = "api_key";
|
|
754
|
+
/**
|
|
755
|
+
* AuthSchemeHTTP is a pasted secret sent as an HTTP auth scheme
|
|
756
|
+
* (Authorization: Bearer or Basic).
|
|
757
|
+
*/
|
|
758
|
+
export const AuthSchemeHTTP = "http";
|
|
759
|
+
/**
|
|
760
|
+
* Deprecated: the kind is AuthSchemeOAuth2 with AuthSchemeFlowAuthorizationCode.
|
|
761
|
+
* Same value, so comparisons keep working; rows still stored as
|
|
762
|
+
* "oauth2_authorization_code" are read as oauth2 (UnmarshalJSON).
|
|
763
|
+
*/
|
|
764
|
+
export const AuthSchemeOAuth2AuthorizationCode = AuthSchemeOAuth2;
|
|
765
|
+
/**
|
|
766
|
+
* AuthSchemeFlowAuthorizationCode is the user-consent flow: authorization
|
|
767
|
+
* endpoint → code → token endpoint, optionally with PKCE. The default.
|
|
768
|
+
*/
|
|
769
|
+
export const AuthSchemeFlowAuthorizationCode = "authorization_code";
|
|
770
|
+
/**
|
|
771
|
+
* AuthSchemeFlowClientCredentials is server-to-server: the app's client
|
|
772
|
+
* id and secret are exchanged at the token endpoint, no redirect, no
|
|
773
|
+
* user. The login is the app's own.
|
|
774
|
+
*/
|
|
775
|
+
export const AuthSchemeFlowClientCredentials = "client_credentials";
|
|
776
|
+
export const AuthSchemeAPIKeyInHeader = "header";
|
|
777
|
+
export const AuthSchemeAPIKeyInQuery = "query";
|
|
778
|
+
export const AuthSchemeHTTPBearer = "bearer";
|
|
779
|
+
export const AuthSchemeHTTPBasic = "basic";
|
|
780
|
+
/**
|
|
781
|
+
* AuthSchemeClientAuthBasic sends them as an HTTP Basic Authorization
|
|
782
|
+
* header (RFC 6749 §2.3.1, the default).
|
|
783
|
+
*/
|
|
784
|
+
export const AuthSchemeClientAuthBasic = "basic";
|
|
785
|
+
/**
|
|
786
|
+
* AuthSchemeClientAuthBody sends them as form fields in the request body.
|
|
787
|
+
*/
|
|
788
|
+
export const AuthSchemeClientAuthBody = "body";
|
|
789
|
+
export const AuthSchemeTokenRequestForm = "form";
|
|
790
|
+
export const AuthSchemeTokenRequestJSON = "json";
|
|
791
|
+
/**
|
|
792
|
+
* AuthSchemeRefreshWhenExpiring refreshes within five minutes of the
|
|
793
|
+
* reported expiry; a token with no expiry is treated as long-lived
|
|
794
|
+
* (Slack without token rotation, Notion).
|
|
795
|
+
*/
|
|
796
|
+
export const AuthSchemeRefreshWhenExpiring = "";
|
|
797
|
+
/**
|
|
798
|
+
* AuthSchemeRefreshAlways refreshes on every read: the provider reports
|
|
799
|
+
* no expiry but the token does expire (Salesforce's session timeout is
|
|
800
|
+
* per org and not reported).
|
|
801
|
+
*/
|
|
802
|
+
export const AuthSchemeRefreshAlways = "always";
|
|
803
|
+
export const AuthSchemeRevokeBearer = "bearer";
|
|
804
|
+
export const AuthSchemeRevokeQuery = "query";
|
|
805
|
+
export const AuthSchemeRevokeForm = "form";
|
|
734
806
|
export const VisibilityPrivate = "private";
|
|
735
807
|
export const VisibilityTeam = "team";
|
|
736
808
|
/**
|
|
@@ -1054,6 +1126,11 @@ export const DeviceAuthStatusPending = "pending";
|
|
|
1054
1126
|
export const DeviceAuthStatusApproved = "approved";
|
|
1055
1127
|
export const DeviceAuthStatusExpired = "expired";
|
|
1056
1128
|
export const DeviceAuthStatusDenied = "denied";
|
|
1129
|
+
/**
|
|
1130
|
+
* DeviceAuthStatusSlowDown: still pending, and the device polled sooner
|
|
1131
|
+
* than its interval, which is now five seconds longer (RFC 8628 3.5).
|
|
1132
|
+
*/
|
|
1133
|
+
export const DeviceAuthStatusSlowDown = "slow_down";
|
|
1057
1134
|
export const DeviceAuthStatusValid = "valid";
|
|
1058
1135
|
export const DeviceAuthStatusInvalid = "invalid";
|
|
1059
1136
|
export const DeviceAuthStatusLoading = "loading";
|