import type { HttpClient } from '../http.js'; export type CommerceEnvironment = 'sandbox' | 'live'; export type CommerceProviderKey = 'mock' | 'plural'; export type CommercePassportType = 'browse' | 'checkout'; export type CommercePaymentStatus = 'created' | 'authorized' | 'checkout_created' | 'payment_pending' | 'paid' | 'failed' | 'cancelled' | 'expired'; export type CommerceRecord = Record; export interface CommerceDataResponse { data: T; audit_event_id?: string; [key: string]: unknown; } export interface CommerceListResponse { items: T[]; next_cursor?: string | null; [key: string]: unknown; } export interface CommerceProfile extends CommerceRecord { version?: string; merchant?: CommerceRecord & { merchant_id?: string; display_name?: string; environment?: CommerceEnvironment; default_currency?: string; country_code?: string; }; supported_tools?: string[]; capabilities?: unknown[]; } export interface CommerceIdempotentRequest { idempotencyKey: string; } export interface CommerceTenantCreateParams extends CommerceRecord { tenant_id?: string; display_name?: string; } export interface CommerceTenantUpdateParams extends CommerceRecord { display_name?: string; status?: 'active' | 'disabled'; } export interface CommerceDeveloperTenantBindParams extends CommerceRecord { developer_id: string; tenant_id: string; role?: string; } export interface CommerceMerchantCreateParams extends CommerceRecord { display_name: string; category_preset: string; environment?: CommerceEnvironment; default_currency?: string; country_code?: string; agentic_commerce_requested?: boolean; } export interface CommerceMerchantUpdateParams extends CommerceRecord { display_name?: string; category_preset?: string; default_currency?: string; country_code?: string; agentic_commerce_requested?: boolean; agentic_commerce_enabled?: boolean; } export interface CommerceAgentCreateParams extends CommerceRecord { merchant_id: string; display_name: string; agentic_org_agent_id?: string; trust_status?: string; } export interface CommerceAgentUpdateParams extends CommerceRecord { display_name?: string; trust_status?: string; disabled?: boolean; } export interface CommerceCatalogVariantInput extends CommerceRecord { sku: string; price_amount: number; currency?: string; availability_status?: 'in_stock' | 'out_of_stock' | 'pre_order' | 'back_order' | 'unknown'; } export interface CommerceCatalogProductCreateParams extends CommerceRecord { merchant_id: string; product_id: string; title: string; category_preset: string; variants: CommerceCatalogVariantInput[]; } export interface CommerceCatalogProductUpdateParams extends CommerceRecord { title?: string; brand?: string | null; description?: string | null; image_url?: string | null; category_preset?: string; status?: 'active' | 'archived'; variants?: CommerceRecord[]; } export interface CommerceCatalogProductListParams { merchant_id?: string; query?: string; category_preset?: string; status?: 'active' | 'archived' | 'all'; limit?: number; cursor?: string; } export interface CommerceCatalogSearchParams extends CommerceRecord { merchant_id?: string; query?: string; filters?: CommerceRecord; limit?: number; cursor?: string; } export interface CommerceCartCreateParams extends CommerceIdempotentRequest { merchant_id: string; currency: string; line_items: Array<{ variant_id: string; quantity: number; }>; agent_id?: string; } export interface CommerceConsentRequestCreateParams extends CommerceRecord { merchant_id: string; passport_type: CommercePassportType; requested_scopes?: string[]; max_amount?: number; currency?: string; user_principal_hint?: string; ttl_seconds?: number; } export interface CommerceConsentExchangeParams { consent_request_id: string; } export interface CommercePassportVerifyParams { passport_jwt: string; mode?: 'read_only' | 'payment_affecting'; expected_merchant_id?: string; } export interface CommercePassportRevokeParams { jti: string; reason?: string; } export interface CommercePolicyCreateParams extends CommerceRecord { merchant_id: string; rules: CommerceRecord; } export interface CommercePolicyEvaluateParams extends CommerceRecord { merchant_id: string; agent_id: string; passport_jwt: string; action_scope: string; amount_minor_units?: number; currency?: string; } export interface CommercePaymentIntentCreateParams extends CommerceIdempotentRequest { merchant_id: string; cart_id: string; passport_jwt: string; amount_minor_units: number; currency: string; provider_key?: CommerceProviderKey; agent_id?: string; metadata?: CommerceRecord; } export interface CommercePaymentIntentListParams { merchant_id?: string; status?: CommercePaymentStatus; limit?: number; } export interface CommerceCheckoutLinkCreateParams extends CommerceIdempotentRequest { passport_jwt: string; success_url: string; cancel_url: string; } export interface CommerceProviderCredentialCreateParams extends CommerceRecord { merchant_id: string; provider_key: CommerceProviderKey; environment: CommerceEnvironment; credential_payload: CommerceRecord; } export interface CommerceProviderCredentialPatchParams extends CommerceRecord { credential_payload?: CommerceRecord; status?: 'disabled'; } export interface CommerceProviderCredentialListParams { merchant_id?: string; provider_key?: CommerceProviderKey; environment?: CommerceEnvironment; } export interface CommerceWebhookSourceCreateParams extends CommerceRecord { merchant_id: string; source_key: string; display_name: string; } export interface CommerceWebhookSourceListParams { merchant_id?: string; } export interface CommerceOpsHealthParams { merchant_id?: string; environment?: CommerceEnvironment; } export interface CommerceProviderWebhookEventListParams { merchant_id?: string; processing_status?: 'received' | 'processed' | 'ignored' | 'failed'; provider_key?: CommerceProviderKey; limit?: number; } export interface CommerceProviderWebhookReplayParams { reason: string; dry_run?: boolean; } export interface CommerceMcpJsonRpcRequest extends CommerceRecord { jsonrpc: '2.0'; id?: string | number; method: string; params?: CommerceRecord; } export declare class CommerceClient { #private; constructor(http: HttpClient); getProfile(params?: { merchantId?: string; }): Promise; mcp(request: CommerceMcpJsonRpcRequest): Promise; createTenant(params: CommerceTenantCreateParams): Promise; listTenants(): Promise; updateTenant(tenantId: string, params: CommerceTenantUpdateParams): Promise; bindDeveloperTenant(params: CommerceDeveloperTenantBindParams): Promise; createMerchant(params: CommerceMerchantCreateParams): Promise; getMerchant(merchantId: string): Promise; updateMerchant(merchantId: string, params: CommerceMerchantUpdateParams): Promise; createAgent(params: CommerceAgentCreateParams): Promise; listAgents(params?: { merchant_id?: string; limit?: number; cursor?: string; }): Promise; getAgent(agentId: string): Promise; updateAgent(agentId: string, params: CommerceAgentUpdateParams): Promise; createCatalogProduct(params: CommerceCatalogProductCreateParams): Promise; listCatalogProducts(params: CommerceCatalogProductListParams): Promise; bulkUpsertCatalogProducts(params: CommerceRecord): Promise; getCatalogProduct(productId: string, params?: { merchant_id?: string; }): Promise; updateCatalogProduct(productId: string, params: CommerceCatalogProductUpdateParams, query?: { merchant_id?: string; }): Promise; deleteCatalogProduct(productId: string): Promise; searchCatalog(params: CommerceCatalogSearchParams): Promise; listAuditEvents(params?: CommerceRecord): Promise; createCart(params: CommerceCartCreateParams): Promise; getCart(cartId: string): Promise; createConsentRequest(params: CommerceConsentRequestCreateParams): Promise; exchangeConsentForPassport(params: CommerceConsentExchangeParams): Promise; listPassports(): Promise; verifyPassport(params: CommercePassportVerifyParams): Promise; revokePassport(params: CommercePassportRevokeParams): Promise; createPolicy(params: CommercePolicyCreateParams): Promise; listPolicies(params?: { merchant_id?: string; status?: string; limit?: number; }): Promise; getPolicy(policyId: string): Promise; activatePolicy(policyId: string): Promise; evaluatePolicy(params: CommercePolicyEvaluateParams): Promise; createPaymentIntent(params: CommercePaymentIntentCreateParams): Promise; listPaymentIntents(params?: CommercePaymentIntentListParams): Promise; getPaymentIntent(paymentIntentId: string): Promise; createCheckoutLink(paymentIntentId: string, params: CommerceCheckoutLinkCreateParams): Promise; reconcilePaymentIntent(paymentIntentId: string): Promise; createProviderCredential(params: CommerceProviderCredentialCreateParams): Promise; listProviderCredentials(params?: CommerceProviderCredentialListParams): Promise; patchProviderCredential(credentialId: string, params: CommerceProviderCredentialPatchParams): Promise; validateProviderCredential(credentialId: string): Promise; createWebhookSource(params: CommerceWebhookSourceCreateParams): Promise; listWebhookSources(params?: CommerceWebhookSourceListParams): Promise; updateWebhookSource(sourceKey: string, params: CommerceRecord): Promise; rotateWebhookSourceSecret(sourceKey: string): Promise; getOpsHealth(params?: CommerceOpsHealthParams): Promise; listProviderWebhookEvents(params?: CommerceProviderWebhookEventListParams): Promise; replayProviderWebhookEvent(eventId: string, params: CommerceProviderWebhookReplayParams): Promise; handleProviderWebhook(providerKey: CommerceProviderKey, payload: CommerceRecord, options?: { headers?: Record; }): Promise; } //# sourceMappingURL=commerce.d.ts.map