import type { OperationOptions } from "retry"; import { Response, ClientConfig } from "@commerce-apps/core"; import type { RequestInit } from "node-fetch"; export type LoginRequest = { client_id?: string; response_type?: "code"; redirect_uri: string; state?: string; scope?: string; usid?: string; channel_id?: string; code_challenge?: string; } & { [key: string]: any; }; export type TokenRequest = { refresh_token?: string; code?: string; usid?: string; grant_type: string; redirect_uri?: string; code_verifier?: string; client_id?: string; channel_id?: string; } & { [key: string]: any; }; export type TokenResponse = { access_token: string; id_token: string; refresh_token: string; expires_in: number; token_type: string; usid: string; customer_id: string; enc_user_id: string; idp_access_token: string; } & { [key: string]: any; }; export interface ISlasClient { authenticateCustomer(options: { parameters?: { organizationId?: string; } & { [key in `c_${string}`]: any; }; retrySettings?: OperationOptions; headers?: { [key: string]: string; }; fetchOptions?: RequestInit; body: LoginRequest; }, rawResponse?: boolean): Promise; authorizeCustomer(options?: { parameters?: { organizationId?: string; redirect_uri: string; response_type: "code"; client_id?: string; scope?: string; state?: string; usid?: string; hint?: string; channel_id?: string; code_challenge: string; } & { [key in `c_${string}`]: any; }; retrySettings?: OperationOptions; fetchOptions?: RequestInit; headers?: { [key: string]: string; }; }, rawResponse?: boolean): Promise; getAccessToken(options: { parameters?: { organizationId?: string; } & { [key in `c_${string}`]: any; }; retrySettings?: OperationOptions; fetchOptions?: RequestInit; headers?: { [key: string]: string; }; body: TokenRequest; }, rawResponse?: boolean): Promise; logoutCustomer(options?: { parameters?: { organizationId?: string; client_id?: string; refresh_token: string; channel_id?: string; } & { [key in `c_${string}`]: any; }; retrySettings?: OperationOptions; fetchOptions?: RequestInit; headers?: { [key: string]: string; }; }, rawResponse?: boolean): Promise; clientConfig: ClientConfig; }