@siglume/api-sdk 0.10.8 → 1.0.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/README.md +97 -99
- package/dist/bin/siglume.cjs +43 -285
- package/dist/bin/siglume.cjs.map +1 -1
- package/dist/bin/siglume.js +43 -285
- package/dist/bin/siglume.js.map +1 -1
- package/dist/cli/index.cjs +43 -285
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts +0 -67
- package/dist/cli/index.d.ts +0 -67
- package/dist/cli/index.js +43 -285
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +3 -133
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -111
- package/dist/index.d.ts +1 -111
- package/dist/index.js +3 -133
- package/dist/index.js.map +1 -1
- package/package.json +58 -58
package/dist/index.d.cts
CHANGED
|
@@ -211,12 +211,6 @@ interface CapabilityPersistencePolicy {
|
|
|
211
211
|
*/
|
|
212
212
|
save_data_schema?: Record<string, unknown>;
|
|
213
213
|
}
|
|
214
|
-
interface ConnectedAccountRef {
|
|
215
|
-
provider_key: string;
|
|
216
|
-
session_token: string;
|
|
217
|
-
scopes?: string[];
|
|
218
|
-
environment?: Environment;
|
|
219
|
-
}
|
|
220
214
|
interface AppManifest {
|
|
221
215
|
capability_key: string;
|
|
222
216
|
version?: string;
|
|
@@ -259,7 +253,6 @@ interface ExecutionContext {
|
|
|
259
253
|
source_type?: string;
|
|
260
254
|
environment?: Environment;
|
|
261
255
|
execution_kind?: ExecutionKind;
|
|
262
|
-
connected_accounts?: Record<string, ConnectedAccountRef>;
|
|
263
256
|
budget_remaining_minor?: number | null;
|
|
264
257
|
trace_id?: string;
|
|
265
258
|
idempotency_key?: string;
|
|
@@ -460,23 +453,6 @@ interface CapabilitySaveStateRecord {
|
|
|
460
453
|
exists: boolean;
|
|
461
454
|
raw: Record<string, unknown>;
|
|
462
455
|
}
|
|
463
|
-
interface ConnectedAccountOAuthStart {
|
|
464
|
-
authorize_url: string;
|
|
465
|
-
state: string;
|
|
466
|
-
provider_key: string;
|
|
467
|
-
scopes: string[];
|
|
468
|
-
pkce_method?: string | null;
|
|
469
|
-
}
|
|
470
|
-
interface ConnectedAccountLifecycleResult {
|
|
471
|
-
connected_account_id: string;
|
|
472
|
-
provider_key: string;
|
|
473
|
-
expires_at?: string | null;
|
|
474
|
-
scopes: string[];
|
|
475
|
-
refreshed_at?: string | null;
|
|
476
|
-
connection_status?: string | null;
|
|
477
|
-
provider_revoked?: boolean | null;
|
|
478
|
-
revoked_at?: string | null;
|
|
479
|
-
}
|
|
480
456
|
interface BundleMember {
|
|
481
457
|
capability_listing_id: string;
|
|
482
458
|
capability_key?: string | null;
|
|
@@ -512,7 +488,6 @@ interface AutoRegistrationReceipt {
|
|
|
512
488
|
auto_manifest: Record<string, unknown>;
|
|
513
489
|
confidence: Record<string, unknown>;
|
|
514
490
|
validation_report?: Record<string, unknown>;
|
|
515
|
-
oauth_status?: Record<string, unknown>;
|
|
516
491
|
review_url?: string | null;
|
|
517
492
|
trace_id?: string | null;
|
|
518
493
|
request_id?: string | null;
|
|
@@ -557,7 +532,6 @@ interface SandboxSession {
|
|
|
557
532
|
dry_run_supported: boolean;
|
|
558
533
|
approval_mode?: string | null;
|
|
559
534
|
required_connected_accounts: unknown[];
|
|
560
|
-
connected_accounts: Array<Record<string, unknown>>;
|
|
561
535
|
stub_providers_enabled: boolean;
|
|
562
536
|
simulated_receipts: boolean;
|
|
563
537
|
approval_simulator: boolean;
|
|
@@ -593,19 +567,6 @@ interface GrantBindingResult {
|
|
|
593
567
|
request_id?: string | null;
|
|
594
568
|
raw: Record<string, unknown>;
|
|
595
569
|
}
|
|
596
|
-
interface ConnectedAccountRecord {
|
|
597
|
-
connected_account_id: string;
|
|
598
|
-
provider_key: string;
|
|
599
|
-
account_role: string;
|
|
600
|
-
display_name?: string | null;
|
|
601
|
-
environment?: string | null;
|
|
602
|
-
connection_status?: string | null;
|
|
603
|
-
scopes: string[];
|
|
604
|
-
metadata: Record<string, unknown>;
|
|
605
|
-
created_at?: string | null;
|
|
606
|
-
updated_at?: string | null;
|
|
607
|
-
raw: Record<string, unknown>;
|
|
608
|
-
}
|
|
609
570
|
interface UsageEventRecord {
|
|
610
571
|
usage_event_id: string;
|
|
611
572
|
capability_key?: string | null;
|
|
@@ -1627,7 +1588,6 @@ interface SiglumeClientShape {
|
|
|
1627
1588
|
source_code?: string;
|
|
1628
1589
|
source_url?: string;
|
|
1629
1590
|
runtime_validation?: Record<string, unknown>;
|
|
1630
|
-
oauth_credentials?: Record<string, unknown> | unknown[];
|
|
1631
1591
|
source_context?: Record<string, unknown>;
|
|
1632
1592
|
input_form_spec?: Record<string, unknown>;
|
|
1633
1593
|
}): Promise<AutoRegistrationReceipt>;
|
|
@@ -1696,34 +1656,6 @@ interface SiglumeClientShape {
|
|
|
1696
1656
|
}): Promise<BundleListingRecord>;
|
|
1697
1657
|
remove_bundle_capability(bundle_id: string, capability_listing_id: string): Promise<BundleListingRecord>;
|
|
1698
1658
|
submit_bundle_for_review(bundle_id: string): Promise<BundleListingRecord>;
|
|
1699
|
-
start_connected_account_oauth(input: {
|
|
1700
|
-
listing_id: string;
|
|
1701
|
-
redirect_uri: string;
|
|
1702
|
-
scopes?: string[];
|
|
1703
|
-
account_role?: string;
|
|
1704
|
-
}): Promise<ConnectedAccountOAuthStart>;
|
|
1705
|
-
set_listing_oauth_credentials(listing_id: string, input: {
|
|
1706
|
-
provider_key: string;
|
|
1707
|
-
client_id: string;
|
|
1708
|
-
client_secret: string;
|
|
1709
|
-
authorize_url: string;
|
|
1710
|
-
token_url: string;
|
|
1711
|
-
revoke_url?: string;
|
|
1712
|
-
display_name?: string;
|
|
1713
|
-
scope_separator?: string;
|
|
1714
|
-
token_endpoint_auth?: string;
|
|
1715
|
-
pkce_required?: boolean;
|
|
1716
|
-
refresh_supported?: boolean;
|
|
1717
|
-
available_scopes?: string[];
|
|
1718
|
-
required_scopes?: string[];
|
|
1719
|
-
}): Promise<Record<string, unknown>>;
|
|
1720
|
-
get_listing_oauth_credentials_status(listing_id: string): Promise<Record<string, unknown>>;
|
|
1721
|
-
complete_connected_account_oauth(input: {
|
|
1722
|
-
state: string;
|
|
1723
|
-
code: string;
|
|
1724
|
-
}): Promise<Record<string, unknown>>;
|
|
1725
|
-
refresh_connected_account(account_id: string): Promise<ConnectedAccountLifecycleResult>;
|
|
1726
|
-
revoke_connected_account(account_id: string): Promise<ConnectedAccountLifecycleResult>;
|
|
1727
1659
|
get_developer_portal(): Promise<DeveloperPortalSummary>;
|
|
1728
1660
|
create_sandbox_session(options: {
|
|
1729
1661
|
agent_id: string;
|
|
@@ -2070,12 +2002,6 @@ interface SiglumeClientShape {
|
|
|
2070
2002
|
agent_id: string;
|
|
2071
2003
|
binding_status?: string;
|
|
2072
2004
|
}): Promise<GrantBindingResult>;
|
|
2073
|
-
list_connected_accounts(options?: {
|
|
2074
|
-
provider_key?: string;
|
|
2075
|
-
environment?: string;
|
|
2076
|
-
limit?: number;
|
|
2077
|
-
cursor?: string;
|
|
2078
|
-
}): Promise<CursorPage<ConnectedAccountRecord>>;
|
|
2079
2005
|
create_support_case(subject: string, body: string, options?: {
|
|
2080
2006
|
trace_id?: string;
|
|
2081
2007
|
case_type?: string;
|
|
@@ -2175,7 +2101,6 @@ declare class SiglumeClient implements SiglumeClientShape {
|
|
|
2175
2101
|
source_code?: string;
|
|
2176
2102
|
source_url?: string;
|
|
2177
2103
|
runtime_validation?: Record<string, unknown>;
|
|
2178
|
-
oauth_credentials?: Record<string, unknown> | unknown[];
|
|
2179
2104
|
source_context?: Record<string, unknown>;
|
|
2180
2105
|
input_form_spec?: Record<string, unknown>;
|
|
2181
2106
|
}): Promise<AutoRegistrationReceipt>;
|
|
@@ -2245,34 +2170,6 @@ declare class SiglumeClient implements SiglumeClientShape {
|
|
|
2245
2170
|
}): Promise<BundleListingRecord>;
|
|
2246
2171
|
remove_bundle_capability(bundle_id: string, capability_listing_id: string): Promise<BundleListingRecord>;
|
|
2247
2172
|
submit_bundle_for_review(bundle_id: string): Promise<BundleListingRecord>;
|
|
2248
|
-
start_connected_account_oauth(input: {
|
|
2249
|
-
listing_id: string;
|
|
2250
|
-
redirect_uri: string;
|
|
2251
|
-
scopes?: string[];
|
|
2252
|
-
account_role?: string;
|
|
2253
|
-
}): Promise<ConnectedAccountOAuthStart>;
|
|
2254
|
-
complete_connected_account_oauth(input: {
|
|
2255
|
-
state: string;
|
|
2256
|
-
code: string;
|
|
2257
|
-
}): Promise<Record<string, unknown>>;
|
|
2258
|
-
refresh_connected_account(account_id: string): Promise<ConnectedAccountLifecycleResult>;
|
|
2259
|
-
revoke_connected_account(account_id: string): Promise<ConnectedAccountLifecycleResult>;
|
|
2260
|
-
set_listing_oauth_credentials(listing_id: string, input: {
|
|
2261
|
-
provider_key: string;
|
|
2262
|
-
client_id: string;
|
|
2263
|
-
client_secret: string;
|
|
2264
|
-
authorize_url: string;
|
|
2265
|
-
token_url: string;
|
|
2266
|
-
revoke_url?: string;
|
|
2267
|
-
display_name?: string;
|
|
2268
|
-
scope_separator?: string;
|
|
2269
|
-
token_endpoint_auth?: string;
|
|
2270
|
-
pkce_required?: boolean;
|
|
2271
|
-
refresh_supported?: boolean;
|
|
2272
|
-
available_scopes?: string[];
|
|
2273
|
-
required_scopes?: string[];
|
|
2274
|
-
}): Promise<Record<string, unknown>>;
|
|
2275
|
-
get_listing_oauth_credentials_status(listing_id: string): Promise<Record<string, unknown>>;
|
|
2276
2173
|
get_developer_portal(): Promise<DeveloperPortalSummary>;
|
|
2277
2174
|
create_sandbox_session(options: {
|
|
2278
2175
|
agent_id: string;
|
|
@@ -2619,12 +2516,6 @@ declare class SiglumeClient implements SiglumeClientShape {
|
|
|
2619
2516
|
agent_id: string;
|
|
2620
2517
|
binding_status?: string;
|
|
2621
2518
|
}): Promise<GrantBindingResult>;
|
|
2622
|
-
list_connected_accounts(options?: {
|
|
2623
|
-
provider_key?: string;
|
|
2624
|
-
environment?: string;
|
|
2625
|
-
limit?: number;
|
|
2626
|
-
cursor?: string;
|
|
2627
|
-
}): Promise<CursorPageResult<ConnectedAccountRecord>>;
|
|
2628
2519
|
create_support_case(subject: string, body: string, options?: {
|
|
2629
2520
|
trace_id?: string;
|
|
2630
2521
|
case_type?: string;
|
|
@@ -2969,7 +2860,6 @@ declare class AppTestHarness {
|
|
|
2969
2860
|
validate_manifest(): Promise<string[]>;
|
|
2970
2861
|
validate_tool_manual(manual?: ToolManual | Record<string, unknown>): [boolean, ToolManualIssue[]];
|
|
2971
2862
|
validate_receipt(result: ExecutionResult): string[];
|
|
2972
|
-
simulate_connected_account_missing(task_type?: string, options?: Parameters<AppTestHarness["executeWithKind"]>[2]): Promise<ExecutionResult>;
|
|
2973
2863
|
simulate_metering(record: UsageRecord, options?: {
|
|
2974
2864
|
execution_result?: ExecutionResult | null;
|
|
2975
2865
|
}): Promise<MeteringSimulationResult>;
|
|
@@ -3183,4 +3073,4 @@ declare function validate_tool_manual(manualInput: ManualInput): [boolean, ToolM
|
|
|
3183
3073
|
|
|
3184
3074
|
declare function renderJson(value: unknown): string;
|
|
3185
3075
|
|
|
3186
|
-
export { type AccessGrantRecord, type AccountAlert, type AccountContentDeleteResult, type AccountContentPostResult, type AccountDigest, type AccountDigestItem, type AccountDigestSummary, type AccountFeedbackSubmission, type AccountPlan, type AccountPlanCancellation, type AccountPreferences, type AccountWatchlist, type AdsBilling, type AdsBillingSettlement, type AdsCampaignPostRecord, type AdsCampaignRecord, type AdsProfile, type AgentCharter, type AgentRecord, type AgentThreadRecord, type AgentTopicSubscription, AnthropicProvider, type AnthropicToolDefinition, AppAdapter, AppCategory, type AppListingRecord, type AppManifest, AppTestHarness, ApprovalMode, type ApprovalPolicy, type ApprovalRequestHint, type AutoRegistrationReceipt, type Awaitable, type BillingPortalLink, BreakingChange, type BudgetPolicy, type BundleListingRecord, type BundleMember, type CapabilityBindingRecord, type CapabilityDelistedEvent, type CapabilityEventData, type CapabilityListing, type CapabilityPersistencePolicy, type CapabilityPublishedEvent, type CapabilitySaveStateRecord, type CassetteFile, type CassetteInteraction, type Change, ChangeLevel, type CompanyPublisherRecord, type
|
|
3076
|
+
export { type AccessGrantRecord, type AccountAlert, type AccountContentDeleteResult, type AccountContentPostResult, type AccountDigest, type AccountDigestItem, type AccountDigestSummary, type AccountFeedbackSubmission, type AccountPlan, type AccountPlanCancellation, type AccountPreferences, type AccountWatchlist, type AdsBilling, type AdsBillingSettlement, type AdsCampaignPostRecord, type AdsCampaignRecord, type AdsProfile, type AgentCharter, type AgentRecord, type AgentThreadRecord, type AgentTopicSubscription, AnthropicProvider, type AnthropicToolDefinition, AppAdapter, AppCategory, type AppListingRecord, type AppManifest, AppTestHarness, ApprovalMode, type ApprovalPolicy, type ApprovalRequestHint, type AutoRegistrationReceipt, type Awaitable, type BillingPortalLink, BreakingChange, type BudgetPolicy, type BundleListingRecord, type BundleMember, type CapabilityBindingRecord, type CapabilityDelistedEvent, type CapabilityEventData, type CapabilityListing, type CapabilityPersistencePolicy, type CapabilityPublishedEvent, type CapabilitySaveStateRecord, type CassetteFile, type CassetteInteraction, type Change, ChangeLevel, type CompanyPublisherRecord, type CrossCurrencyQuote, type CursorPage, DEFAULT_OPERATION_AGENT_ID, DEFAULT_SIGLUME_API_BASE, DEFAULT_WEBHOOK_TOLERANCE_SECONDS, type DeveloperPortalSummary, type EmbeddedWalletCharge, type EnvelopeMeta, Environment, type ExecutionArtifact, type ExecutionCompletedEvent, type ExecutionCompletedEventData, type ExecutionContext, type ExecutionFailedEvent, type ExecutionFailedEventData, ExecutionKind, type ExecutionResult, type ExpressLikeRequest, type ExpressLikeResponse, type FavoriteAgent, type FavoriteAgentMutation, type GrantBindingResult, type HeaderLike, type HealthCheckResult, InMemoryWebhookDedupe, type InstalledToolBindingPolicyRecord, type InstalledToolConnectionReadiness, type InstalledToolExecutionRecord, type InstalledToolPolicyUpdateResult, type InstalledToolReceiptRecord, type InstalledToolReceiptStepRecord, type InstalledToolRecord, type JsonObject, type JsonPrimitive, type JsonValue, LLMProvider, ListingCurrency, type MarketNeedRecord, type MarketProposalActionResult, type MarketProposalRecord, type McpToolDescriptor, MeterClient, type MeterClientOptions, type MeterRecordResult, type MeteringInvoiceLinePreview, type MeteringSimulationResult, type NetworkClaimRecord, type NetworkContentDetail, type NetworkContentSummary, type NetworkEvidenceRecord, type NetworkRepliesPage, type OpenAIFunctionDefinition, OpenAIProvider, type OpenAIResponsesToolDefinition, type OperationExecution, type OperationMetadata, type PartnerApiKeyHandle, type PartnerApiKeyRecord, type PartnerDashboard, type PartnerUsage, type PaymentEventData, type PaymentFailedEvent, type PaymentSucceededEvent, PermissionClass, PersistenceMode, type PlanCheckoutSession, type PlanWeb3Mandate, type PolygonMandate, PriceModel, type QueuedWebhookEvent, type ReceiptRef, RecordMode, Recorder, type RecorderOptions, type RegistrationConfirmation, type RegistrationQuality, type SandboxSession, SettlementMode, type SettlementReceipt, type SideEffectRecord, SiglumeAPIError, SiglumeAssistError, SiglumeBuyerClient, type SiglumeBuyerClientOptions, SiglumeClient, SiglumeClientError, type SiglumeClientOptions, type SiglumeClientShape, SiglumeError, SiglumeExperimentalError, SiglumeExperimentalWarning, SiglumeNotFoundError, SiglumeProjectError, SiglumeValidationError, SiglumeWebhookError, type SiglumeWebhookEvent, SiglumeWebhookPayloadError, SiglumeWebhookReplayError, SiglumeWebhookSignatureError, StoreVertical, type StructuredGenerationUsage, StubProvider, type Subscription, type SubscriptionCancelledEvent, type SubscriptionCreatedEvent, type SubscriptionLifecycleEventData, type SubscriptionPausedEvent, type SubscriptionReinstatedEvent, type SubscriptionRenewedEvent, type SupportCaseRecord, TOOL_MANUAL_DRAFT_PROMPT, type ToolManual, type ToolManualAssistAttempt, type ToolManualAssistMetadata, type ToolManualAssistResult, type ToolManualGrade, type ToolManualIssue, type ToolManualIssueSeverity, ToolManualPermissionClass, type ToolManualQualityReport, type ToolSchemaExport, type UsageEventRecord, type UsageRecord, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPES, WEBHOOK_EVENT_TYPE_HEADER, WEBHOOK_SIGNATURE_HEADER, type WebhookCallback, type WebhookDeliveryRecord, type WebhookDispatchResult, type WebhookEventBase, type WebhookEventType, WebhookHandler, type WebhookSignatureVerification, type WebhookSubscriptionRecord, type WorksCategoryRecord, type WorksOwnerDashboard, type WorksOwnerDashboardAgent, type WorksOwnerDashboardOrder, type WorksOwnerDashboardPitch, type WorksOwnerDashboardStats, type WorksPosterDashboard, type WorksPosterDashboardJob, type WorksPosterDashboardOrder, type WorksPosterDashboardStats, type WorksRegistrationRecord, buildOperationMetadata, build_webhook_signature_header, compute_webhook_signature, defaultCapabilityKeyForOperation, defaultOperationOutputSchema, diff_manifest, diff_tool_manual, draft_tool_manual, fallbackOperationCatalog, fill_tool_manual_gaps, normalizeUsageRecord, parse_cross_currency_quote, parse_embedded_wallet_charge, parse_polygon_mandate, parse_queued_webhook_event, parse_settlement_receipt, parse_webhook_delivery, parse_webhook_event, parse_webhook_subscription, renderJson as render_json, score_tool_manual_offline, score_tool_manual_remote, simulate_embedded_wallet_charge, simulate_polygon_mandate, to_anthropic_tool, to_mcp_tool, to_openai_function, to_openai_responses_tool, tool_manual_to_dict, validate_tool_manual, verify_webhook_signature };
|
package/dist/index.d.ts
CHANGED
|
@@ -211,12 +211,6 @@ interface CapabilityPersistencePolicy {
|
|
|
211
211
|
*/
|
|
212
212
|
save_data_schema?: Record<string, unknown>;
|
|
213
213
|
}
|
|
214
|
-
interface ConnectedAccountRef {
|
|
215
|
-
provider_key: string;
|
|
216
|
-
session_token: string;
|
|
217
|
-
scopes?: string[];
|
|
218
|
-
environment?: Environment;
|
|
219
|
-
}
|
|
220
214
|
interface AppManifest {
|
|
221
215
|
capability_key: string;
|
|
222
216
|
version?: string;
|
|
@@ -259,7 +253,6 @@ interface ExecutionContext {
|
|
|
259
253
|
source_type?: string;
|
|
260
254
|
environment?: Environment;
|
|
261
255
|
execution_kind?: ExecutionKind;
|
|
262
|
-
connected_accounts?: Record<string, ConnectedAccountRef>;
|
|
263
256
|
budget_remaining_minor?: number | null;
|
|
264
257
|
trace_id?: string;
|
|
265
258
|
idempotency_key?: string;
|
|
@@ -460,23 +453,6 @@ interface CapabilitySaveStateRecord {
|
|
|
460
453
|
exists: boolean;
|
|
461
454
|
raw: Record<string, unknown>;
|
|
462
455
|
}
|
|
463
|
-
interface ConnectedAccountOAuthStart {
|
|
464
|
-
authorize_url: string;
|
|
465
|
-
state: string;
|
|
466
|
-
provider_key: string;
|
|
467
|
-
scopes: string[];
|
|
468
|
-
pkce_method?: string | null;
|
|
469
|
-
}
|
|
470
|
-
interface ConnectedAccountLifecycleResult {
|
|
471
|
-
connected_account_id: string;
|
|
472
|
-
provider_key: string;
|
|
473
|
-
expires_at?: string | null;
|
|
474
|
-
scopes: string[];
|
|
475
|
-
refreshed_at?: string | null;
|
|
476
|
-
connection_status?: string | null;
|
|
477
|
-
provider_revoked?: boolean | null;
|
|
478
|
-
revoked_at?: string | null;
|
|
479
|
-
}
|
|
480
456
|
interface BundleMember {
|
|
481
457
|
capability_listing_id: string;
|
|
482
458
|
capability_key?: string | null;
|
|
@@ -512,7 +488,6 @@ interface AutoRegistrationReceipt {
|
|
|
512
488
|
auto_manifest: Record<string, unknown>;
|
|
513
489
|
confidence: Record<string, unknown>;
|
|
514
490
|
validation_report?: Record<string, unknown>;
|
|
515
|
-
oauth_status?: Record<string, unknown>;
|
|
516
491
|
review_url?: string | null;
|
|
517
492
|
trace_id?: string | null;
|
|
518
493
|
request_id?: string | null;
|
|
@@ -557,7 +532,6 @@ interface SandboxSession {
|
|
|
557
532
|
dry_run_supported: boolean;
|
|
558
533
|
approval_mode?: string | null;
|
|
559
534
|
required_connected_accounts: unknown[];
|
|
560
|
-
connected_accounts: Array<Record<string, unknown>>;
|
|
561
535
|
stub_providers_enabled: boolean;
|
|
562
536
|
simulated_receipts: boolean;
|
|
563
537
|
approval_simulator: boolean;
|
|
@@ -593,19 +567,6 @@ interface GrantBindingResult {
|
|
|
593
567
|
request_id?: string | null;
|
|
594
568
|
raw: Record<string, unknown>;
|
|
595
569
|
}
|
|
596
|
-
interface ConnectedAccountRecord {
|
|
597
|
-
connected_account_id: string;
|
|
598
|
-
provider_key: string;
|
|
599
|
-
account_role: string;
|
|
600
|
-
display_name?: string | null;
|
|
601
|
-
environment?: string | null;
|
|
602
|
-
connection_status?: string | null;
|
|
603
|
-
scopes: string[];
|
|
604
|
-
metadata: Record<string, unknown>;
|
|
605
|
-
created_at?: string | null;
|
|
606
|
-
updated_at?: string | null;
|
|
607
|
-
raw: Record<string, unknown>;
|
|
608
|
-
}
|
|
609
570
|
interface UsageEventRecord {
|
|
610
571
|
usage_event_id: string;
|
|
611
572
|
capability_key?: string | null;
|
|
@@ -1627,7 +1588,6 @@ interface SiglumeClientShape {
|
|
|
1627
1588
|
source_code?: string;
|
|
1628
1589
|
source_url?: string;
|
|
1629
1590
|
runtime_validation?: Record<string, unknown>;
|
|
1630
|
-
oauth_credentials?: Record<string, unknown> | unknown[];
|
|
1631
1591
|
source_context?: Record<string, unknown>;
|
|
1632
1592
|
input_form_spec?: Record<string, unknown>;
|
|
1633
1593
|
}): Promise<AutoRegistrationReceipt>;
|
|
@@ -1696,34 +1656,6 @@ interface SiglumeClientShape {
|
|
|
1696
1656
|
}): Promise<BundleListingRecord>;
|
|
1697
1657
|
remove_bundle_capability(bundle_id: string, capability_listing_id: string): Promise<BundleListingRecord>;
|
|
1698
1658
|
submit_bundle_for_review(bundle_id: string): Promise<BundleListingRecord>;
|
|
1699
|
-
start_connected_account_oauth(input: {
|
|
1700
|
-
listing_id: string;
|
|
1701
|
-
redirect_uri: string;
|
|
1702
|
-
scopes?: string[];
|
|
1703
|
-
account_role?: string;
|
|
1704
|
-
}): Promise<ConnectedAccountOAuthStart>;
|
|
1705
|
-
set_listing_oauth_credentials(listing_id: string, input: {
|
|
1706
|
-
provider_key: string;
|
|
1707
|
-
client_id: string;
|
|
1708
|
-
client_secret: string;
|
|
1709
|
-
authorize_url: string;
|
|
1710
|
-
token_url: string;
|
|
1711
|
-
revoke_url?: string;
|
|
1712
|
-
display_name?: string;
|
|
1713
|
-
scope_separator?: string;
|
|
1714
|
-
token_endpoint_auth?: string;
|
|
1715
|
-
pkce_required?: boolean;
|
|
1716
|
-
refresh_supported?: boolean;
|
|
1717
|
-
available_scopes?: string[];
|
|
1718
|
-
required_scopes?: string[];
|
|
1719
|
-
}): Promise<Record<string, unknown>>;
|
|
1720
|
-
get_listing_oauth_credentials_status(listing_id: string): Promise<Record<string, unknown>>;
|
|
1721
|
-
complete_connected_account_oauth(input: {
|
|
1722
|
-
state: string;
|
|
1723
|
-
code: string;
|
|
1724
|
-
}): Promise<Record<string, unknown>>;
|
|
1725
|
-
refresh_connected_account(account_id: string): Promise<ConnectedAccountLifecycleResult>;
|
|
1726
|
-
revoke_connected_account(account_id: string): Promise<ConnectedAccountLifecycleResult>;
|
|
1727
1659
|
get_developer_portal(): Promise<DeveloperPortalSummary>;
|
|
1728
1660
|
create_sandbox_session(options: {
|
|
1729
1661
|
agent_id: string;
|
|
@@ -2070,12 +2002,6 @@ interface SiglumeClientShape {
|
|
|
2070
2002
|
agent_id: string;
|
|
2071
2003
|
binding_status?: string;
|
|
2072
2004
|
}): Promise<GrantBindingResult>;
|
|
2073
|
-
list_connected_accounts(options?: {
|
|
2074
|
-
provider_key?: string;
|
|
2075
|
-
environment?: string;
|
|
2076
|
-
limit?: number;
|
|
2077
|
-
cursor?: string;
|
|
2078
|
-
}): Promise<CursorPage<ConnectedAccountRecord>>;
|
|
2079
2005
|
create_support_case(subject: string, body: string, options?: {
|
|
2080
2006
|
trace_id?: string;
|
|
2081
2007
|
case_type?: string;
|
|
@@ -2175,7 +2101,6 @@ declare class SiglumeClient implements SiglumeClientShape {
|
|
|
2175
2101
|
source_code?: string;
|
|
2176
2102
|
source_url?: string;
|
|
2177
2103
|
runtime_validation?: Record<string, unknown>;
|
|
2178
|
-
oauth_credentials?: Record<string, unknown> | unknown[];
|
|
2179
2104
|
source_context?: Record<string, unknown>;
|
|
2180
2105
|
input_form_spec?: Record<string, unknown>;
|
|
2181
2106
|
}): Promise<AutoRegistrationReceipt>;
|
|
@@ -2245,34 +2170,6 @@ declare class SiglumeClient implements SiglumeClientShape {
|
|
|
2245
2170
|
}): Promise<BundleListingRecord>;
|
|
2246
2171
|
remove_bundle_capability(bundle_id: string, capability_listing_id: string): Promise<BundleListingRecord>;
|
|
2247
2172
|
submit_bundle_for_review(bundle_id: string): Promise<BundleListingRecord>;
|
|
2248
|
-
start_connected_account_oauth(input: {
|
|
2249
|
-
listing_id: string;
|
|
2250
|
-
redirect_uri: string;
|
|
2251
|
-
scopes?: string[];
|
|
2252
|
-
account_role?: string;
|
|
2253
|
-
}): Promise<ConnectedAccountOAuthStart>;
|
|
2254
|
-
complete_connected_account_oauth(input: {
|
|
2255
|
-
state: string;
|
|
2256
|
-
code: string;
|
|
2257
|
-
}): Promise<Record<string, unknown>>;
|
|
2258
|
-
refresh_connected_account(account_id: string): Promise<ConnectedAccountLifecycleResult>;
|
|
2259
|
-
revoke_connected_account(account_id: string): Promise<ConnectedAccountLifecycleResult>;
|
|
2260
|
-
set_listing_oauth_credentials(listing_id: string, input: {
|
|
2261
|
-
provider_key: string;
|
|
2262
|
-
client_id: string;
|
|
2263
|
-
client_secret: string;
|
|
2264
|
-
authorize_url: string;
|
|
2265
|
-
token_url: string;
|
|
2266
|
-
revoke_url?: string;
|
|
2267
|
-
display_name?: string;
|
|
2268
|
-
scope_separator?: string;
|
|
2269
|
-
token_endpoint_auth?: string;
|
|
2270
|
-
pkce_required?: boolean;
|
|
2271
|
-
refresh_supported?: boolean;
|
|
2272
|
-
available_scopes?: string[];
|
|
2273
|
-
required_scopes?: string[];
|
|
2274
|
-
}): Promise<Record<string, unknown>>;
|
|
2275
|
-
get_listing_oauth_credentials_status(listing_id: string): Promise<Record<string, unknown>>;
|
|
2276
2173
|
get_developer_portal(): Promise<DeveloperPortalSummary>;
|
|
2277
2174
|
create_sandbox_session(options: {
|
|
2278
2175
|
agent_id: string;
|
|
@@ -2619,12 +2516,6 @@ declare class SiglumeClient implements SiglumeClientShape {
|
|
|
2619
2516
|
agent_id: string;
|
|
2620
2517
|
binding_status?: string;
|
|
2621
2518
|
}): Promise<GrantBindingResult>;
|
|
2622
|
-
list_connected_accounts(options?: {
|
|
2623
|
-
provider_key?: string;
|
|
2624
|
-
environment?: string;
|
|
2625
|
-
limit?: number;
|
|
2626
|
-
cursor?: string;
|
|
2627
|
-
}): Promise<CursorPageResult<ConnectedAccountRecord>>;
|
|
2628
2519
|
create_support_case(subject: string, body: string, options?: {
|
|
2629
2520
|
trace_id?: string;
|
|
2630
2521
|
case_type?: string;
|
|
@@ -2969,7 +2860,6 @@ declare class AppTestHarness {
|
|
|
2969
2860
|
validate_manifest(): Promise<string[]>;
|
|
2970
2861
|
validate_tool_manual(manual?: ToolManual | Record<string, unknown>): [boolean, ToolManualIssue[]];
|
|
2971
2862
|
validate_receipt(result: ExecutionResult): string[];
|
|
2972
|
-
simulate_connected_account_missing(task_type?: string, options?: Parameters<AppTestHarness["executeWithKind"]>[2]): Promise<ExecutionResult>;
|
|
2973
2863
|
simulate_metering(record: UsageRecord, options?: {
|
|
2974
2864
|
execution_result?: ExecutionResult | null;
|
|
2975
2865
|
}): Promise<MeteringSimulationResult>;
|
|
@@ -3183,4 +3073,4 @@ declare function validate_tool_manual(manualInput: ManualInput): [boolean, ToolM
|
|
|
3183
3073
|
|
|
3184
3074
|
declare function renderJson(value: unknown): string;
|
|
3185
3075
|
|
|
3186
|
-
export { type AccessGrantRecord, type AccountAlert, type AccountContentDeleteResult, type AccountContentPostResult, type AccountDigest, type AccountDigestItem, type AccountDigestSummary, type AccountFeedbackSubmission, type AccountPlan, type AccountPlanCancellation, type AccountPreferences, type AccountWatchlist, type AdsBilling, type AdsBillingSettlement, type AdsCampaignPostRecord, type AdsCampaignRecord, type AdsProfile, type AgentCharter, type AgentRecord, type AgentThreadRecord, type AgentTopicSubscription, AnthropicProvider, type AnthropicToolDefinition, AppAdapter, AppCategory, type AppListingRecord, type AppManifest, AppTestHarness, ApprovalMode, type ApprovalPolicy, type ApprovalRequestHint, type AutoRegistrationReceipt, type Awaitable, type BillingPortalLink, BreakingChange, type BudgetPolicy, type BundleListingRecord, type BundleMember, type CapabilityBindingRecord, type CapabilityDelistedEvent, type CapabilityEventData, type CapabilityListing, type CapabilityPersistencePolicy, type CapabilityPublishedEvent, type CapabilitySaveStateRecord, type CassetteFile, type CassetteInteraction, type Change, ChangeLevel, type CompanyPublisherRecord, type
|
|
3076
|
+
export { type AccessGrantRecord, type AccountAlert, type AccountContentDeleteResult, type AccountContentPostResult, type AccountDigest, type AccountDigestItem, type AccountDigestSummary, type AccountFeedbackSubmission, type AccountPlan, type AccountPlanCancellation, type AccountPreferences, type AccountWatchlist, type AdsBilling, type AdsBillingSettlement, type AdsCampaignPostRecord, type AdsCampaignRecord, type AdsProfile, type AgentCharter, type AgentRecord, type AgentThreadRecord, type AgentTopicSubscription, AnthropicProvider, type AnthropicToolDefinition, AppAdapter, AppCategory, type AppListingRecord, type AppManifest, AppTestHarness, ApprovalMode, type ApprovalPolicy, type ApprovalRequestHint, type AutoRegistrationReceipt, type Awaitable, type BillingPortalLink, BreakingChange, type BudgetPolicy, type BundleListingRecord, type BundleMember, type CapabilityBindingRecord, type CapabilityDelistedEvent, type CapabilityEventData, type CapabilityListing, type CapabilityPersistencePolicy, type CapabilityPublishedEvent, type CapabilitySaveStateRecord, type CassetteFile, type CassetteInteraction, type Change, ChangeLevel, type CompanyPublisherRecord, type CrossCurrencyQuote, type CursorPage, DEFAULT_OPERATION_AGENT_ID, DEFAULT_SIGLUME_API_BASE, DEFAULT_WEBHOOK_TOLERANCE_SECONDS, type DeveloperPortalSummary, type EmbeddedWalletCharge, type EnvelopeMeta, Environment, type ExecutionArtifact, type ExecutionCompletedEvent, type ExecutionCompletedEventData, type ExecutionContext, type ExecutionFailedEvent, type ExecutionFailedEventData, ExecutionKind, type ExecutionResult, type ExpressLikeRequest, type ExpressLikeResponse, type FavoriteAgent, type FavoriteAgentMutation, type GrantBindingResult, type HeaderLike, type HealthCheckResult, InMemoryWebhookDedupe, type InstalledToolBindingPolicyRecord, type InstalledToolConnectionReadiness, type InstalledToolExecutionRecord, type InstalledToolPolicyUpdateResult, type InstalledToolReceiptRecord, type InstalledToolReceiptStepRecord, type InstalledToolRecord, type JsonObject, type JsonPrimitive, type JsonValue, LLMProvider, ListingCurrency, type MarketNeedRecord, type MarketProposalActionResult, type MarketProposalRecord, type McpToolDescriptor, MeterClient, type MeterClientOptions, type MeterRecordResult, type MeteringInvoiceLinePreview, type MeteringSimulationResult, type NetworkClaimRecord, type NetworkContentDetail, type NetworkContentSummary, type NetworkEvidenceRecord, type NetworkRepliesPage, type OpenAIFunctionDefinition, OpenAIProvider, type OpenAIResponsesToolDefinition, type OperationExecution, type OperationMetadata, type PartnerApiKeyHandle, type PartnerApiKeyRecord, type PartnerDashboard, type PartnerUsage, type PaymentEventData, type PaymentFailedEvent, type PaymentSucceededEvent, PermissionClass, PersistenceMode, type PlanCheckoutSession, type PlanWeb3Mandate, type PolygonMandate, PriceModel, type QueuedWebhookEvent, type ReceiptRef, RecordMode, Recorder, type RecorderOptions, type RegistrationConfirmation, type RegistrationQuality, type SandboxSession, SettlementMode, type SettlementReceipt, type SideEffectRecord, SiglumeAPIError, SiglumeAssistError, SiglumeBuyerClient, type SiglumeBuyerClientOptions, SiglumeClient, SiglumeClientError, type SiglumeClientOptions, type SiglumeClientShape, SiglumeError, SiglumeExperimentalError, SiglumeExperimentalWarning, SiglumeNotFoundError, SiglumeProjectError, SiglumeValidationError, SiglumeWebhookError, type SiglumeWebhookEvent, SiglumeWebhookPayloadError, SiglumeWebhookReplayError, SiglumeWebhookSignatureError, StoreVertical, type StructuredGenerationUsage, StubProvider, type Subscription, type SubscriptionCancelledEvent, type SubscriptionCreatedEvent, type SubscriptionLifecycleEventData, type SubscriptionPausedEvent, type SubscriptionReinstatedEvent, type SubscriptionRenewedEvent, type SupportCaseRecord, TOOL_MANUAL_DRAFT_PROMPT, type ToolManual, type ToolManualAssistAttempt, type ToolManualAssistMetadata, type ToolManualAssistResult, type ToolManualGrade, type ToolManualIssue, type ToolManualIssueSeverity, ToolManualPermissionClass, type ToolManualQualityReport, type ToolSchemaExport, type UsageEventRecord, type UsageRecord, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPES, WEBHOOK_EVENT_TYPE_HEADER, WEBHOOK_SIGNATURE_HEADER, type WebhookCallback, type WebhookDeliveryRecord, type WebhookDispatchResult, type WebhookEventBase, type WebhookEventType, WebhookHandler, type WebhookSignatureVerification, type WebhookSubscriptionRecord, type WorksCategoryRecord, type WorksOwnerDashboard, type WorksOwnerDashboardAgent, type WorksOwnerDashboardOrder, type WorksOwnerDashboardPitch, type WorksOwnerDashboardStats, type WorksPosterDashboard, type WorksPosterDashboardJob, type WorksPosterDashboardOrder, type WorksPosterDashboardStats, type WorksRegistrationRecord, buildOperationMetadata, build_webhook_signature_header, compute_webhook_signature, defaultCapabilityKeyForOperation, defaultOperationOutputSchema, diff_manifest, diff_tool_manual, draft_tool_manual, fallbackOperationCatalog, fill_tool_manual_gaps, normalizeUsageRecord, parse_cross_currency_quote, parse_embedded_wallet_charge, parse_polygon_mandate, parse_queued_webhook_event, parse_settlement_receipt, parse_webhook_delivery, parse_webhook_event, parse_webhook_subscription, renderJson as render_json, score_tool_manual_offline, score_tool_manual_remote, simulate_embedded_wallet_charge, simulate_polygon_mandate, to_anthropic_tool, to_mcp_tool, to_openai_function, to_openai_responses_tool, tool_manual_to_dict, validate_tool_manual, verify_webhook_signature };
|
package/dist/index.js
CHANGED
|
@@ -1749,18 +1749,6 @@ function parseBundleMember(data) {
|
|
|
1749
1749
|
link_id: stringOrNull2(data.link_id)
|
|
1750
1750
|
};
|
|
1751
1751
|
}
|
|
1752
|
-
function parseConnectedAccountLifecycle(data) {
|
|
1753
|
-
return {
|
|
1754
|
-
connected_account_id: String(data.connected_account_id ?? ""),
|
|
1755
|
-
provider_key: String(data.provider_key ?? ""),
|
|
1756
|
-
expires_at: stringOrNull2(data.expires_at),
|
|
1757
|
-
scopes: Array.isArray(data.scopes) ? data.scopes.filter((s) => typeof s === "string") : [],
|
|
1758
|
-
refreshed_at: stringOrNull2(data.refreshed_at),
|
|
1759
|
-
connection_status: stringOrNull2(data.connection_status),
|
|
1760
|
-
provider_revoked: typeof data.provider_revoked === "boolean" ? data.provider_revoked : null,
|
|
1761
|
-
revoked_at: stringOrNull2(data.revoked_at)
|
|
1762
|
-
};
|
|
1763
|
-
}
|
|
1764
1752
|
function parseBundle(data) {
|
|
1765
1753
|
const membersRaw = Array.isArray(data.members) ? data.members : [];
|
|
1766
1754
|
return {
|
|
@@ -1839,21 +1827,6 @@ function parseBinding(data) {
|
|
|
1839
1827
|
raw: { ...data }
|
|
1840
1828
|
};
|
|
1841
1829
|
}
|
|
1842
|
-
function parseConnectedAccount(data) {
|
|
1843
|
-
return {
|
|
1844
|
-
connected_account_id: String(data.connected_account_id ?? data.id ?? ""),
|
|
1845
|
-
provider_key: String(data.provider_key ?? ""),
|
|
1846
|
-
account_role: String(data.account_role ?? ""),
|
|
1847
|
-
display_name: stringOrNull2(data.display_name),
|
|
1848
|
-
environment: stringOrNull2(data.environment),
|
|
1849
|
-
connection_status: stringOrNull2(data.connection_status),
|
|
1850
|
-
scopes: Array.isArray(data.scopes) ? data.scopes.filter((item) => typeof item === "string") : [],
|
|
1851
|
-
metadata: toRecord2(data.metadata),
|
|
1852
|
-
created_at: stringOrNull2(data.created_at),
|
|
1853
|
-
updated_at: stringOrNull2(data.updated_at),
|
|
1854
|
-
raw: { ...data }
|
|
1855
|
-
};
|
|
1856
|
-
}
|
|
1857
1830
|
function parseSupportCase(data) {
|
|
1858
1831
|
return {
|
|
1859
1832
|
support_case_id: String(data.support_case_id ?? data.id ?? ""),
|
|
@@ -2892,13 +2865,6 @@ var init_client = __esm({
|
|
|
2892
2865
|
if (options.runtime_validation) {
|
|
2893
2866
|
payload.runtime_validation = coerceMapping(options.runtime_validation, "runtime_validation");
|
|
2894
2867
|
}
|
|
2895
|
-
if (options.oauth_credentials) {
|
|
2896
|
-
payload.oauth_credentials = Array.isArray(options.oauth_credentials) ? {
|
|
2897
|
-
items: options.oauth_credentials.map(
|
|
2898
|
-
(item, index) => coerceMapping(item, `oauth_credentials[${index}]`)
|
|
2899
|
-
)
|
|
2900
|
-
} : coerceMapping(options.oauth_credentials, "oauth_credentials");
|
|
2901
|
-
}
|
|
2902
2868
|
if (options.source_context) {
|
|
2903
2869
|
payload.source_context = coerceMapping(options.source_context, "source_context");
|
|
2904
2870
|
}
|
|
@@ -3028,7 +2994,6 @@ var init_client = __esm({
|
|
|
3028
2994
|
auto_manifest: toRecord2(data.auto_manifest),
|
|
3029
2995
|
confidence: toRecord2(data.confidence),
|
|
3030
2996
|
validation_report: toRecord2(data.validation_report),
|
|
3031
|
-
oauth_status: toRecord2(data.oauth_status),
|
|
3032
2997
|
review_url: stringOrNull2(data.review_url),
|
|
3033
2998
|
trace_id: meta.trace_id,
|
|
3034
2999
|
request_id: meta.request_id
|
|
@@ -3204,66 +3169,9 @@ var init_client = __esm({
|
|
|
3204
3169
|
return parseBundle(data);
|
|
3205
3170
|
}
|
|
3206
3171
|
// ----- end bundles -------------------------------------------------------
|
|
3207
|
-
// ----- Connected accounts
|
|
3208
|
-
//
|
|
3209
|
-
|
|
3210
|
-
const body = {
|
|
3211
|
-
listing_id: input.listing_id,
|
|
3212
|
-
redirect_uri: input.redirect_uri
|
|
3213
|
-
};
|
|
3214
|
-
if (input.scopes !== void 0) body.scopes = input.scopes;
|
|
3215
|
-
if (input.account_role !== void 0) body.account_role = input.account_role;
|
|
3216
|
-
const [data] = await this.request("POST", "/me/connected-accounts/oauth/authorize", {
|
|
3217
|
-
json_body: body
|
|
3218
|
-
});
|
|
3219
|
-
return {
|
|
3220
|
-
authorize_url: String(data.authorize_url ?? ""),
|
|
3221
|
-
state: String(data.state ?? ""),
|
|
3222
|
-
provider_key: String(data.provider_key ?? ""),
|
|
3223
|
-
scopes: Array.isArray(data.scopes) ? data.scopes.filter((s) => typeof s === "string") : [],
|
|
3224
|
-
pkce_method: stringOrNull2(data.pkce_method)
|
|
3225
|
-
};
|
|
3226
|
-
}
|
|
3227
|
-
async complete_connected_account_oauth(input) {
|
|
3228
|
-
const [data] = await this.request("POST", "/me/connected-accounts/oauth/callback", {
|
|
3229
|
-
json_body: { state: input.state, code: input.code }
|
|
3230
|
-
});
|
|
3231
|
-
return { ...data };
|
|
3232
|
-
}
|
|
3233
|
-
async refresh_connected_account(account_id) {
|
|
3234
|
-
const [data] = await this.request("POST", `/me/connected-accounts/${account_id}/refresh`);
|
|
3235
|
-
return parseConnectedAccountLifecycle(data);
|
|
3236
|
-
}
|
|
3237
|
-
async revoke_connected_account(account_id) {
|
|
3238
|
-
const [data] = await this.request("POST", `/me/connected-accounts/${account_id}/revoke`);
|
|
3239
|
-
return parseConnectedAccountLifecycle(data);
|
|
3240
|
-
}
|
|
3241
|
-
async set_listing_oauth_credentials(listing_id, input) {
|
|
3242
|
-
const body = {
|
|
3243
|
-
provider_key: input.provider_key,
|
|
3244
|
-
client_id: input.client_id,
|
|
3245
|
-
client_secret: input.client_secret,
|
|
3246
|
-
authorize_url: input.authorize_url,
|
|
3247
|
-
token_url: input.token_url
|
|
3248
|
-
};
|
|
3249
|
-
if (input.revoke_url !== void 0) body.revoke_url = input.revoke_url;
|
|
3250
|
-
if (input.display_name !== void 0) body.display_name = input.display_name;
|
|
3251
|
-
if (input.scope_separator !== void 0) body.scope_separator = input.scope_separator;
|
|
3252
|
-
if (input.token_endpoint_auth !== void 0) body.token_endpoint_auth = input.token_endpoint_auth;
|
|
3253
|
-
if (input.pkce_required !== void 0) body.pkce_required = input.pkce_required;
|
|
3254
|
-
if (input.refresh_supported !== void 0) body.refresh_supported = input.refresh_supported;
|
|
3255
|
-
if (input.available_scopes !== void 0) body.available_scopes = input.available_scopes;
|
|
3256
|
-
if (input.required_scopes !== void 0) body.required_scopes = input.required_scopes;
|
|
3257
|
-
const [data] = await this.request("PUT", `/market/capabilities/${listing_id}/oauth-credentials`, {
|
|
3258
|
-
json_body: body
|
|
3259
|
-
});
|
|
3260
|
-
return { ...data };
|
|
3261
|
-
}
|
|
3262
|
-
async get_listing_oauth_credentials_status(listing_id) {
|
|
3263
|
-
const [data] = await this.request("GET", `/market/capabilities/${listing_id}/oauth-credentials`);
|
|
3264
|
-
return { ...data };
|
|
3265
|
-
}
|
|
3266
|
-
// ----- end connected accounts --------------------------------------------
|
|
3172
|
+
// ----- Connected accounts ------------------------------------------------
|
|
3173
|
+
// Architecture B: publisher APIs own external OAuth and token storage.
|
|
3174
|
+
// The SDK no longer exposes platform OAuth or listing credential APIs.
|
|
3267
3175
|
async get_developer_portal() {
|
|
3268
3176
|
const [data, meta] = await this.request("GET", "/market/developer/portal");
|
|
3269
3177
|
return {
|
|
@@ -3296,7 +3204,6 @@ var init_client = __esm({
|
|
|
3296
3204
|
dry_run_supported: Boolean(data.dry_run_supported ?? false),
|
|
3297
3205
|
approval_mode: stringOrNull2(data.approval_mode),
|
|
3298
3206
|
required_connected_accounts: Array.isArray(data.required_connected_accounts) ? data.required_connected_accounts : [],
|
|
3299
|
-
connected_accounts: Array.isArray(data.connected_accounts) ? data.connected_accounts.filter((item) => isRecord2(item)).map((item) => ({ ...item })) : [],
|
|
3300
3207
|
stub_providers_enabled: Boolean(data.stub_providers_enabled ?? false),
|
|
3301
3208
|
simulated_receipts: Boolean(data.simulated_receipts ?? false),
|
|
3302
3209
|
approval_simulator: Boolean(data.approval_simulator ?? false),
|
|
@@ -4594,25 +4501,6 @@ var init_client = __esm({
|
|
|
4594
4501
|
raw: { ...data }
|
|
4595
4502
|
};
|
|
4596
4503
|
}
|
|
4597
|
-
async list_connected_accounts(options = {}) {
|
|
4598
|
-
const params = {
|
|
4599
|
-
provider_key: options.provider_key,
|
|
4600
|
-
environment: options.environment,
|
|
4601
|
-
limit: Math.max(1, Math.min(Math.trunc(options.limit ?? 50), 100)),
|
|
4602
|
-
cursor: options.cursor
|
|
4603
|
-
};
|
|
4604
|
-
const [data, meta] = await this.request("GET", "/market/connected-accounts", { params });
|
|
4605
|
-
const items = Array.isArray(data.items) ? data.items.filter((item) => isRecord2(item)).map(parseConnectedAccount) : [];
|
|
4606
|
-
const next_cursor = stringOrNull2(data.next_cursor);
|
|
4607
|
-
return new CursorPageResult({
|
|
4608
|
-
items,
|
|
4609
|
-
next_cursor,
|
|
4610
|
-
limit: typeof data.limit === "number" ? data.limit : params.limit,
|
|
4611
|
-
offset: typeof data.offset === "number" ? data.offset : null,
|
|
4612
|
-
meta,
|
|
4613
|
-
fetchNext: next_cursor ? (cursor) => this.list_connected_accounts({ ...options, cursor }) : void 0
|
|
4614
|
-
});
|
|
4615
|
-
}
|
|
4616
4504
|
async create_support_case(subject, body, options = {}) {
|
|
4617
4505
|
const summary = subject.trim();
|
|
4618
4506
|
const details = body.trim();
|
|
@@ -7367,24 +7255,12 @@ var AppTestHarness = class {
|
|
|
7367
7255
|
this.stubs = stubs;
|
|
7368
7256
|
}
|
|
7369
7257
|
async executeWithKind(execution_kind, task_type = "default", options = {}) {
|
|
7370
|
-
const connected_accounts = options.connected_accounts ?? Object.fromEntries(
|
|
7371
|
-
Object.keys(this.stubs).map((key) => [
|
|
7372
|
-
key,
|
|
7373
|
-
{
|
|
7374
|
-
provider_key: key,
|
|
7375
|
-
session_token: `stub-token-${key}`,
|
|
7376
|
-
environment: Environment.SANDBOX,
|
|
7377
|
-
scopes: []
|
|
7378
|
-
}
|
|
7379
|
-
])
|
|
7380
|
-
);
|
|
7381
7258
|
const ctx = {
|
|
7382
7259
|
agent_id: "test-agent-001",
|
|
7383
7260
|
owner_user_id: "test-owner-001",
|
|
7384
7261
|
task_type,
|
|
7385
7262
|
environment: Environment.SANDBOX,
|
|
7386
7263
|
execution_kind,
|
|
7387
|
-
connected_accounts,
|
|
7388
7264
|
input_params: options.input_params ?? {},
|
|
7389
7265
|
trace_id: options.trace_id,
|
|
7390
7266
|
idempotency_key: options.idempotency_key,
|
|
@@ -7474,12 +7350,6 @@ var AppTestHarness = class {
|
|
|
7474
7350
|
}
|
|
7475
7351
|
return issues;
|
|
7476
7352
|
}
|
|
7477
|
-
async simulate_connected_account_missing(task_type = "default", options = {}) {
|
|
7478
|
-
return this.executeWithKind("dry_run", task_type, {
|
|
7479
|
-
...options,
|
|
7480
|
-
connected_accounts: {}
|
|
7481
|
-
});
|
|
7482
|
-
}
|
|
7483
7353
|
async simulate_metering(record, options = {}) {
|
|
7484
7354
|
const { normalizeUsageRecord: normalizeUsageRecord2 } = await Promise.resolve().then(() => (init_metering(), metering_exports));
|
|
7485
7355
|
const manifest = await this.app.manifest();
|