@scalemule/sdk 0.0.27 → 0.0.29
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/dist/index.d.mts +236 -1
- package/dist/index.d.ts +236 -1
- package/dist/index.js +408 -14
- package/dist/index.mjs +397 -14
- package/package.json +3 -6
package/dist/index.d.mts
CHANGED
|
@@ -129,6 +129,30 @@ interface ScaleMuleConfig {
|
|
|
129
129
|
enableOfflineQueue?: boolean;
|
|
130
130
|
/** Enable multi-account session pool (Google Account Chooser style). Default: false */
|
|
131
131
|
enableMultiSession?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Enable the account switcher — remembers which accounts have logged in on
|
|
134
|
+
* this device so users can pick an account and re-authenticate.
|
|
135
|
+
*
|
|
136
|
+
* Unlike enableMultiSession, this stores **no tokens** for inactive accounts.
|
|
137
|
+
* Only display metadata (email, name, avatar) is persisted.
|
|
138
|
+
* Switching accounts always requires re-authentication.
|
|
139
|
+
*
|
|
140
|
+
* Default: false
|
|
141
|
+
*/
|
|
142
|
+
enableAccountSwitcher?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Privacy level for the account switcher.
|
|
145
|
+
*
|
|
146
|
+
* Controls how much identifying information is stored for inactive accounts:
|
|
147
|
+
* - `'full'` — Full email, name, avatar stored (like Google). Default.
|
|
148
|
+
* - `'masked'` — Email masked (j***@g***.com), name shows initial only, no avatar.
|
|
149
|
+
* Masked at write time — the full email is never persisted.
|
|
150
|
+
* - `'minimal'` — Only userId and provider stored. No PII at all.
|
|
151
|
+
*
|
|
152
|
+
* Privacy downgrades are lossy: switching from minimal/masked to full cannot
|
|
153
|
+
* recover stripped fields for existing entries until those accounts log in again.
|
|
154
|
+
*/
|
|
155
|
+
accountSwitcherPrivacy?: AccountSwitcherPrivacy;
|
|
132
156
|
}
|
|
133
157
|
/**
|
|
134
158
|
* A session entry in the multi-account session pool.
|
|
@@ -142,6 +166,55 @@ interface SessionPoolEntry {
|
|
|
142
166
|
expiresAt?: string;
|
|
143
167
|
addedAt: string;
|
|
144
168
|
}
|
|
169
|
+
/**
|
|
170
|
+
* A remembered account for the account switcher.
|
|
171
|
+
*
|
|
172
|
+
* Contains display metadata only — NO tokens or session data.
|
|
173
|
+
* Switching to a known account requires re-authentication.
|
|
174
|
+
* This is the secure alternative to SessionPoolEntry which stores tokens.
|
|
175
|
+
*/
|
|
176
|
+
interface KnownAccount {
|
|
177
|
+
/** User ID */
|
|
178
|
+
userId: string;
|
|
179
|
+
/** Email address (used for login pre-fill) */
|
|
180
|
+
email: string;
|
|
181
|
+
/** Display name */
|
|
182
|
+
fullName?: string;
|
|
183
|
+
/** Avatar URL */
|
|
184
|
+
avatarUrl?: string;
|
|
185
|
+
/** How the user last authenticated ('email', 'google', 'apple', etc.) */
|
|
186
|
+
provider?: string;
|
|
187
|
+
/** ISO timestamp of last successful login on this device */
|
|
188
|
+
lastActiveAt: string;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Privacy level for the account switcher.
|
|
192
|
+
*/
|
|
193
|
+
type AccountSwitcherPrivacy = 'full' | 'masked' | 'minimal';
|
|
194
|
+
/**
|
|
195
|
+
* A known account after privacy transforms have been applied.
|
|
196
|
+
*
|
|
197
|
+
* This is what gets stored and returned to the UI. In 'masked' mode, email
|
|
198
|
+
* is partially masked and avatarUrl is stripped. In 'minimal' mode, all PII
|
|
199
|
+
* is stripped and only userId/provider/displayLabel/colorIndex remain.
|
|
200
|
+
*/
|
|
201
|
+
interface KnownAccountDisplay {
|
|
202
|
+
userId: string;
|
|
203
|
+
/** Masked or full email, absent in 'minimal' mode */
|
|
204
|
+
email?: string;
|
|
205
|
+
/** Full name, first initial, or absent depending on privacy mode */
|
|
206
|
+
fullName?: string;
|
|
207
|
+
/** Avatar URL, absent in 'masked' and 'minimal' modes */
|
|
208
|
+
avatarUrl?: string;
|
|
209
|
+
/** Authentication provider ('email', 'google', etc.) */
|
|
210
|
+
provider?: string;
|
|
211
|
+
/** ISO timestamp of last successful login on this device */
|
|
212
|
+
lastActiveAt: string;
|
|
213
|
+
/** Display label for 'minimal' mode (constant "Account") */
|
|
214
|
+
displayLabel?: string;
|
|
215
|
+
/** Stable color index derived from userId hash (0-7), for avatar circles */
|
|
216
|
+
colorIndex?: number;
|
|
217
|
+
}
|
|
145
218
|
/**
|
|
146
219
|
* Per-request options that override client defaults.
|
|
147
220
|
*/
|
|
@@ -267,6 +340,9 @@ declare class ScaleMuleClient {
|
|
|
267
340
|
private anonymousId;
|
|
268
341
|
private multiSessionEnabled;
|
|
269
342
|
private sessionPool;
|
|
343
|
+
private accountSwitcherEnabled;
|
|
344
|
+
private accountSwitcherPrivacy;
|
|
345
|
+
private knownAccounts;
|
|
270
346
|
constructor(config: ScaleMuleConfig);
|
|
271
347
|
initialize(): Promise<void>;
|
|
272
348
|
setSession(token: string, userId: string): Promise<void>;
|
|
@@ -293,6 +369,23 @@ declare class ScaleMuleClient {
|
|
|
293
369
|
clearAllAccounts(): Promise<void>;
|
|
294
370
|
/** Persist session pool to storage */
|
|
295
371
|
private persistSessionPool;
|
|
372
|
+
isAccountSwitcherEnabled(): boolean;
|
|
373
|
+
getAccountSwitcherPrivacy(): AccountSwitcherPrivacy;
|
|
374
|
+
/** Get all known accounts that have logged in on this device (privacy-transformed) */
|
|
375
|
+
getKnownAccounts(): KnownAccountDisplay[];
|
|
376
|
+
/**
|
|
377
|
+
* Record an account as "known" on this device.
|
|
378
|
+
* Applies privacy transforms before storing — full email is never persisted
|
|
379
|
+
* in masked/minimal modes. Evicts oldest accounts if over the cap.
|
|
380
|
+
* Called automatically after successful login/register when account switcher is enabled.
|
|
381
|
+
*/
|
|
382
|
+
addKnownAccount(account: KnownAccount): Promise<void>;
|
|
383
|
+
/** Remove a specific account from the known accounts list ("forget this account") */
|
|
384
|
+
removeKnownAccount(userId: string): Promise<void>;
|
|
385
|
+
/** Clear all known accounts ("forget all accounts on this device") */
|
|
386
|
+
clearKnownAccounts(): Promise<void>;
|
|
387
|
+
/** Persist known accounts to storage */
|
|
388
|
+
private persistKnownAccounts;
|
|
296
389
|
getBaseUrl(): string;
|
|
297
390
|
getApiKey(): string;
|
|
298
391
|
isOnline(): boolean;
|
|
@@ -4651,6 +4744,121 @@ declare class FlagContentService extends ServiceModule {
|
|
|
4651
4744
|
getAppeal(id: string, options?: RequestOptions): Promise<ApiResponse<Appeal>>;
|
|
4652
4745
|
}
|
|
4653
4746
|
|
|
4747
|
+
/**
|
|
4748
|
+
* Creator Maker Service Module
|
|
4749
|
+
*
|
|
4750
|
+
* Thin integration for AI image/clip generation via the creator-maker service.
|
|
4751
|
+
* For rich features (React hooks, waitForJob, WebSocket status), use
|
|
4752
|
+
* the standalone @scalemule/creator-maker package instead.
|
|
4753
|
+
*/
|
|
4754
|
+
|
|
4755
|
+
interface GenerateInput {
|
|
4756
|
+
project_id?: string;
|
|
4757
|
+
output_type: 'image' | 'clip';
|
|
4758
|
+
content_mode: 'promo' | 'cartoon';
|
|
4759
|
+
aspect_ratio: '9:16' | '16:9' | '1:1';
|
|
4760
|
+
style_preset_slug?: string;
|
|
4761
|
+
prompt: string;
|
|
4762
|
+
provider_mode?: 'auto' | 'fast' | 'balanced' | 'quality';
|
|
4763
|
+
source_assets?: Array<{
|
|
4764
|
+
storage_file_id: string;
|
|
4765
|
+
role: 'reference' | 'init_image' | 'style_ref';
|
|
4766
|
+
weight?: number;
|
|
4767
|
+
}>;
|
|
4768
|
+
composition?: {
|
|
4769
|
+
caption?: string;
|
|
4770
|
+
watermark?: boolean;
|
|
4771
|
+
};
|
|
4772
|
+
}
|
|
4773
|
+
interface GenerationJob {
|
|
4774
|
+
id: string;
|
|
4775
|
+
project_id: string;
|
|
4776
|
+
output_type: string;
|
|
4777
|
+
content_mode: string;
|
|
4778
|
+
aspect_ratio: string;
|
|
4779
|
+
prompt: string;
|
|
4780
|
+
status: string;
|
|
4781
|
+
estimated_credits: number;
|
|
4782
|
+
actual_credits?: number;
|
|
4783
|
+
outputs: GenerationOutput[];
|
|
4784
|
+
error_code?: string;
|
|
4785
|
+
error_message?: string;
|
|
4786
|
+
created_at: string;
|
|
4787
|
+
completed_at?: string;
|
|
4788
|
+
}
|
|
4789
|
+
interface GenerationOutput {
|
|
4790
|
+
id: string;
|
|
4791
|
+
output_type: string;
|
|
4792
|
+
cdn_url?: string;
|
|
4793
|
+
width: number;
|
|
4794
|
+
height: number;
|
|
4795
|
+
mime_type: string;
|
|
4796
|
+
created_at: string;
|
|
4797
|
+
}
|
|
4798
|
+
interface StylePreset {
|
|
4799
|
+
id: string;
|
|
4800
|
+
mode: string;
|
|
4801
|
+
slug: string;
|
|
4802
|
+
name: string;
|
|
4803
|
+
description?: string;
|
|
4804
|
+
thumbnail_url?: string;
|
|
4805
|
+
estimated_credits: number;
|
|
4806
|
+
}
|
|
4807
|
+
interface CreatorUsage {
|
|
4808
|
+
balance_credits: number;
|
|
4809
|
+
total_generations: number;
|
|
4810
|
+
completed_generations: number;
|
|
4811
|
+
}
|
|
4812
|
+
interface CreateProjectInput {
|
|
4813
|
+
title?: string;
|
|
4814
|
+
content_mode: 'promo' | 'cartoon';
|
|
4815
|
+
}
|
|
4816
|
+
interface CreatorProject {
|
|
4817
|
+
id: string;
|
|
4818
|
+
title: string;
|
|
4819
|
+
content_mode: string;
|
|
4820
|
+
created_at: string;
|
|
4821
|
+
updated_at: string;
|
|
4822
|
+
}
|
|
4823
|
+
declare class CreatorMakerService extends ServiceModule {
|
|
4824
|
+
protected basePath: string;
|
|
4825
|
+
/** Submit a generation job. */
|
|
4826
|
+
generate(data: GenerateInput, options?: RequestOptions): Promise<ApiResponse<GenerationJob>>;
|
|
4827
|
+
/** Get a generation job by ID. */
|
|
4828
|
+
getJob(jobId: string, options?: RequestOptions): Promise<ApiResponse<GenerationJob>>;
|
|
4829
|
+
/** Long-poll for job completion (server holds up to 30s). */
|
|
4830
|
+
pollJob(jobId: string, options?: RequestOptions): Promise<ApiResponse<GenerationJob>>;
|
|
4831
|
+
/** List the current user's generation jobs. */
|
|
4832
|
+
listJobs(params?: Record<string, unknown>, options?: RequestOptions): Promise<PaginatedResponse<GenerationJob>>;
|
|
4833
|
+
/** Cancel a pending or queued job. */
|
|
4834
|
+
cancelJob(jobId: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
4835
|
+
id: string;
|
|
4836
|
+
status: string;
|
|
4837
|
+
}>>;
|
|
4838
|
+
/** Retry a failed job. */
|
|
4839
|
+
retryJob(jobId: string, options?: RequestOptions): Promise<ApiResponse<GenerationJob>>;
|
|
4840
|
+
/** Generate variations of a completed job. */
|
|
4841
|
+
generateVariations(jobId: string, options?: RequestOptions): Promise<ApiResponse<GenerationJob[]>>;
|
|
4842
|
+
/** List available style presets, optionally filtered by mode. */
|
|
4843
|
+
listPresets(params?: {
|
|
4844
|
+
mode?: string;
|
|
4845
|
+
}, options?: RequestOptions): Promise<ApiResponse<StylePreset[]>>;
|
|
4846
|
+
/** Get a style preset by slug. */
|
|
4847
|
+
getPreset(slug: string, options?: RequestOptions): Promise<ApiResponse<StylePreset>>;
|
|
4848
|
+
/** Create a project. */
|
|
4849
|
+
createProject(data: CreateProjectInput, options?: RequestOptions): Promise<ApiResponse<CreatorProject>>;
|
|
4850
|
+
/** List the current user's projects. */
|
|
4851
|
+
listProjects(params?: Record<string, unknown>, options?: RequestOptions): Promise<PaginatedResponse<CreatorProject>>;
|
|
4852
|
+
/** Get generation usage and credit balance. */
|
|
4853
|
+
getUsage(options?: RequestOptions): Promise<ApiResponse<CreatorUsage>>;
|
|
4854
|
+
/** Get a generation output by ID. */
|
|
4855
|
+
getOutput(outputId: string, options?: RequestOptions): Promise<ApiResponse<GenerationOutput>>;
|
|
4856
|
+
/** Get a download URL for a generation output. */
|
|
4857
|
+
getDownloadUrl(outputId: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
4858
|
+
cdn_url: string;
|
|
4859
|
+
}>>;
|
|
4860
|
+
}
|
|
4861
|
+
|
|
4654
4862
|
interface AuthRegisterAgentRequest {
|
|
4655
4863
|
name: string;
|
|
4656
4864
|
agent_platform: string;
|
|
@@ -4952,6 +5160,10 @@ interface Task {
|
|
|
4952
5160
|
metadata?: Record<string, unknown>;
|
|
4953
5161
|
created_at: string;
|
|
4954
5162
|
updated_at: string;
|
|
5163
|
+
pipeline_id?: string;
|
|
5164
|
+
pipeline_version?: number;
|
|
5165
|
+
current_phase?: string;
|
|
5166
|
+
phase_entered_at?: string;
|
|
4955
5167
|
}
|
|
4956
5168
|
interface ClaimResult {
|
|
4957
5169
|
task_id: string;
|
|
@@ -5075,6 +5287,7 @@ declare class AgentProjectsService extends ServiceModule {
|
|
|
5075
5287
|
priority?: string;
|
|
5076
5288
|
due_date?: string;
|
|
5077
5289
|
metadata?: Record<string, unknown>;
|
|
5290
|
+
pipeline_id?: string;
|
|
5078
5291
|
}, applicationId?: string, options?: RequestOptions): Promise<ApiResponse<Task>>;
|
|
5079
5292
|
listTasks(projectId: string, params?: PaginationParams & {
|
|
5080
5293
|
application_id?: string;
|
|
@@ -5098,6 +5311,10 @@ declare class AgentProjectsService extends ServiceModule {
|
|
|
5098
5311
|
heartbeat(taskId: string, agentId: string, applicationId?: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
5099
5312
|
lease_expires_at: string;
|
|
5100
5313
|
}>>;
|
|
5314
|
+
startTask(taskId: string, agentId: string, applicationId?: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
5315
|
+
task_id: string;
|
|
5316
|
+
status: string;
|
|
5317
|
+
}>>;
|
|
5101
5318
|
submit(taskId: string, data: {
|
|
5102
5319
|
agent_id: string;
|
|
5103
5320
|
idempotency_key: string;
|
|
@@ -5562,6 +5779,7 @@ declare class ScaleMule {
|
|
|
5562
5779
|
readonly functions: FunctionsService;
|
|
5563
5780
|
readonly photo: PhotoService;
|
|
5564
5781
|
readonly flagContent: FlagContentService;
|
|
5782
|
+
readonly creatorMaker: CreatorMakerService;
|
|
5565
5783
|
readonly compliance: ComplianceService;
|
|
5566
5784
|
readonly orchestrator: OrchestratorService;
|
|
5567
5785
|
readonly agentAuth: AgentAuthService;
|
|
@@ -5605,6 +5823,23 @@ declare class ScaleMule {
|
|
|
5605
5823
|
removeAccount(userId: string): Promise<void>;
|
|
5606
5824
|
/** Clear all accounts from the pool */
|
|
5607
5825
|
clearAllAccounts(): Promise<void>;
|
|
5826
|
+
/** Whether the account switcher is enabled */
|
|
5827
|
+
isAccountSwitcherEnabled(): boolean;
|
|
5828
|
+
/** The configured privacy level for the account switcher */
|
|
5829
|
+
getAccountSwitcherPrivacy(): AccountSwitcherPrivacy;
|
|
5830
|
+
/**
|
|
5831
|
+
* Get all accounts that have previously logged in on this device.
|
|
5832
|
+
* Returns privacy-transformed display data — no raw PII in masked/minimal modes.
|
|
5833
|
+
* Requires `enableAccountSwitcher: true` in config.
|
|
5834
|
+
*/
|
|
5835
|
+
getKnownAccounts(): KnownAccountDisplay[];
|
|
5836
|
+
/**
|
|
5837
|
+
* Forget a specific account — removes it from the known accounts list.
|
|
5838
|
+
* Does NOT affect any active session.
|
|
5839
|
+
*/
|
|
5840
|
+
removeKnownAccount(userId: string): Promise<void>;
|
|
5841
|
+
/** Forget all known accounts on this device. */
|
|
5842
|
+
clearKnownAccounts(): Promise<void>;
|
|
5608
5843
|
/** The base URL being used for API requests. */
|
|
5609
5844
|
getBaseUrl(): string;
|
|
5610
5845
|
/** The application ID, or null if not configured. */
|
|
@@ -5617,4 +5852,4 @@ declare class ScaleMule {
|
|
|
5617
5852
|
getClient(): ScaleMuleClient;
|
|
5618
5853
|
}
|
|
5619
5854
|
|
|
5620
|
-
export { type AccountBalance, AccountsService, type ActiveUsers, type ActivityItem, AgentAuthService, AgentModelsService, type AgentProfile, AgentProjectsService, type AgentResponse, type AgentSecurityPolicy, AgentSessionsService, type AgentSigningKey, type AgentToken, type AgentToolEntitlement, AgentToolsService, type Workspace as AgentWorkspace, AgentsService, type AggregateOptions, type AggregateResult, type AnalyticsEvent, AnalyticsService, type ApiError, type ApiKey, type ApiResponse, type Appeal, type Application, type Attachment, type Attendee, type AuditLog, type AuthRegisterAgentRequest, type AuthRegisterAgentResponse, AuthService, type AuthSession, type AuthUser, type BackupCodes, BillingService, type CacheEntry, CacheService, type CalendarEvent, type CatalogEntry, CatalogService, type ChatMessage, type ChatReaction, ChatService, type ClaimResult, type Client, type ClientContext, type Collection, type Comment, CommunicationService, type CompletedPart, ComplianceService, type CompressionConfig, type ConnectedAccount, type ConnectedAccountSubscription, type ConnectedSetupIntentResponse, type ConnectedSubscriptionListParams, type ConnectionStatus, type ContentFlag, type Conversation, type CostReportDay, type CreateFlagRequest, type CreateRuleRequest, type CreateSegmentRequest, type CreateSessionResponse, type CreateVariantRequest, type Credential, type CredentialScope, type Customer, type DataAccessPolicy, type DataExport, DataService, type DataSource, type DeadLetterJob, type DeviceInfo, type Document, type ErrorCode, ErrorCodes, type EventAggregation, EventsService, type FileInfo, type FlagAuditEntry, type FlagCheck, type FlagCondition, FlagContentService, type FlagDefinition, type FlagDetail, type FlagEnvironment, type FlagEvaluation, type FlagSegment, type FlagVariant, FlagsService, type FollowStatus, type FunctionExecution, type FunctionMetrics, FunctionsService, type Funnel, type FunnelConversion, type GdprRequest, type GrantInfo, type GraphEdge, type GraphNode, GraphService, IdentityService, type IdentityType, type IncomingRequestLike, type Invoice, type JobExecution, type JobStats, type Leaderboard, type LeaderboardEntry, LeaderboardService, type Like, type ListNotificationsParams, type Listing, ListingsService, type LogEntry, type LogInput, type LogQueryParams, type LogQueryResponse, type LogRecord, LoggerService, type LoginActivitySummary, type LoginDeviceInfo, type LoginHistoryEntry, type LoginRiskInfo, type MessageCallback, type MessageStatus, type MetricDataPoint, type MfaStatus, type Model, type ModelEntitlement, type ModelPricing, type ModelProvider, type UsageSummary as ModelUsageSummary, type MultipartCompleteResponse, type MultipartConfig, type MultipartPartUrl, type MultipartPartUrlsResponse, type MultipartStartResponse, type NetworkClass, type Notification, type NotificationListResponse, NotificationsService, type OAuthProvider, type OAuthUrl, OrchestratorService, PHOTO_BREAKPOINTS, type PaginatedResponse, type PaginationMetadata, type PaginationParams, type PartResult, type PartUrl, type Participant, type Payment, type PaymentListParams, type PaymentMethod, type PaymentStatusResponse, type Payout, type PayoutSchedule, type PermissionCheck, type PermissionMatrix, PermissionsService, type PhotoInfo, PhotoService, type Pipeline, type PipelineVersion, type Policy, type PresenceCallback, type PresenceEvent, type PresignedUploadResponse, type Price, type Product, type Project, type ProjectDocument, type ProjectGrant, type ProjectMember, type PushApiFetcher, type PushPreferences, type PushSettings, type PushSubscriptionInfo, type PushToken, type PushTokenAssociationResult, type PushTopic, type QueryFilter, type QueryOptions, type QuerySort, type QueueJob, QueueService, type ReadStatus, RealtimeService, type RedeemResult, type ReferralAnalytics, type ReferralCampaign, type ReferralProfile, type ReferralStats, ReferralsService, type Refund, type RegisterAgentRequest, type RegisterAgentResponse, type RegisterPushTokenData, type RequestOptions, type ResolvedReferral, type ResumeSession, type Role, type RuntimeTemplate, type RuntimeTemplateVersion, type S3MultipartOptions, type S3MultipartResult, type S3SingleUploadOptions, type S3SingleUploadResult, type S3UploadProgress, ScaleMule, ScaleMuleClient, type ScaleMuleConfig, type SchedulerJob, SchedulerService, type SearchResult, SearchService, type SecurityLayers, type ServerlessFunction, type ServiceHealth, ServiceModule, type Session, type SessionArtifact, type SessionInfo, type SessionLog, type SessionPoolEntry, type Severity, type ShareLink, type ShortestPathResult, type SignedUrlResponse, type SocialPost, SocialService, type SocialUser, type SsoConfig, type StatusCallback, type StorageAdapter, StorageService, type StrategyResult, type SubmitResult, type Subscription, type TargetingRule, type Task, type TaskAttempt, type TaskTransition, type Team, type TeamInvitation, type TeamMember, TeamsService, type TelemetryPayload, type Tool, type ToolCapability, type ToolIntegration, type TopEvent, type TotpSetup, type Transaction, type TransactionListParams, type TransactionSummary, type TransactionSummaryParams, type Transfer, type TransformOptions, type TransformResult, type TraversalResult, type UnreadCountResponse, type UpdateFlagRequest, type UpdateRuleRequest, type UpdateSegmentRequest, type UpdateVariantRequest, type UploadCompleteResponse, type UploadEngineConfig, type UploadFailureReport, type UploadFailureReportResponse, type UploadOptions, type UploadPlan, UploadResumeStore, type UploadStrategy, UploadTelemetry, type UploadTelemetryConfig, type UploadTelemetryEvent, type UpsertEnvironmentRequest, type UsageRecord, type UsageSummary$1 as UsageSummary, type UserRank, type VideoInfo, VideoService, type VideoUploadOptions, WEB_PUSH_SERVICE_WORKER, WebPushManager, type WebPushManagerOptions, type WebPushSubscriptionData, type Webhook, WebhooksService, type Workflow, type WorkflowExecution, type Workspace$1 as Workspace, type WorkspaceInvitation, type WorkspaceMember, WorkspacesService, buildClientContextHeaders, calculateTotalParts, canPerform, createUploadPlan, ScaleMule as default, detectNetworkClass, extractClientContext, generateUploadSessionId, getMeasuredBandwidthMbps, getPartRange, hasMinRoleLevel, resolveStrategy, uploadMultipartToS3, uploadSingleToS3, validateIP };
|
|
5855
|
+
export { type AccountBalance, type AccountSwitcherPrivacy, AccountsService, type ActiveUsers, type ActivityItem, AgentAuthService, AgentModelsService, type AgentProfile, AgentProjectsService, type AgentResponse, type AgentSecurityPolicy, AgentSessionsService, type AgentSigningKey, type AgentToken, type AgentToolEntitlement, AgentToolsService, type Workspace as AgentWorkspace, AgentsService, type AggregateOptions, type AggregateResult, type AnalyticsEvent, AnalyticsService, type ApiError, type ApiKey, type ApiResponse, type Appeal, type Application, type Attachment, type Attendee, type AuditLog, type AuthRegisterAgentRequest, type AuthRegisterAgentResponse, AuthService, type AuthSession, type AuthUser, type BackupCodes, BillingService, type CacheEntry, CacheService, type CalendarEvent, type CatalogEntry, CatalogService, type ChatMessage, type ChatReaction, ChatService, type ClaimResult, type Client, type ClientContext, type Collection, type Comment, CommunicationService, type CompletedPart, ComplianceService, type CompressionConfig, type ConnectedAccount, type ConnectedAccountSubscription, type ConnectedSetupIntentResponse, type ConnectedSubscriptionListParams, type ConnectionStatus, type ContentFlag, type Conversation, type CostReportDay, type CreateProjectInput as CreateCreatorProjectInput, type CreateFlagRequest, type CreateRuleRequest, type CreateSegmentRequest, type CreateSessionResponse, type CreateVariantRequest, type GenerationJob as CreatorJob, CreatorMakerService, type GenerationOutput as CreatorOutput, type CreatorProject, type CreatorUsage, type Credential, type CredentialScope, type Customer, type DataAccessPolicy, type DataExport, DataService, type DataSource, type DeadLetterJob, type DeviceInfo, type Document, type ErrorCode, ErrorCodes, type EventAggregation, EventsService, type FileInfo, type FlagAuditEntry, type FlagCheck, type FlagCondition, FlagContentService, type FlagDefinition, type FlagDetail, type FlagEnvironment, type FlagEvaluation, type FlagSegment, type FlagVariant, FlagsService, type FollowStatus, type FunctionExecution, type FunctionMetrics, FunctionsService, type Funnel, type FunnelConversion, type GdprRequest, type GenerateInput, type GrantInfo, type GraphEdge, type GraphNode, GraphService, IdentityService, type IdentityType, type IncomingRequestLike, type Invoice, type JobExecution, type JobStats, type KnownAccount, type KnownAccountDisplay, type Leaderboard, type LeaderboardEntry, LeaderboardService, type Like, type ListNotificationsParams, type Listing, ListingsService, type LogEntry, type LogInput, type LogQueryParams, type LogQueryResponse, type LogRecord, LoggerService, type LoginActivitySummary, type LoginDeviceInfo, type LoginHistoryEntry, type LoginRiskInfo, type MessageCallback, type MessageStatus, type MetricDataPoint, type MfaStatus, type Model, type ModelEntitlement, type ModelPricing, type ModelProvider, type UsageSummary as ModelUsageSummary, type MultipartCompleteResponse, type MultipartConfig, type MultipartPartUrl, type MultipartPartUrlsResponse, type MultipartStartResponse, type NetworkClass, type Notification, type NotificationListResponse, NotificationsService, type OAuthProvider, type OAuthUrl, OrchestratorService, PHOTO_BREAKPOINTS, type PaginatedResponse, type PaginationMetadata, type PaginationParams, type PartResult, type PartUrl, type Participant, type Payment, type PaymentListParams, type PaymentMethod, type PaymentStatusResponse, type Payout, type PayoutSchedule, type PermissionCheck, type PermissionMatrix, PermissionsService, type PhotoInfo, PhotoService, type Pipeline, type PipelineVersion, type Policy, type PresenceCallback, type PresenceEvent, type PresignedUploadResponse, type Price, type Product, type Project, type ProjectDocument, type ProjectGrant, type ProjectMember, type PushApiFetcher, type PushPreferences, type PushSettings, type PushSubscriptionInfo, type PushToken, type PushTokenAssociationResult, type PushTopic, type QueryFilter, type QueryOptions, type QuerySort, type QueueJob, QueueService, type ReadStatus, RealtimeService, type RedeemResult, type ReferralAnalytics, type ReferralCampaign, type ReferralProfile, type ReferralStats, ReferralsService, type Refund, type RegisterAgentRequest, type RegisterAgentResponse, type RegisterPushTokenData, type RequestOptions, type ResolvedReferral, type ResumeSession, type Role, type RuntimeTemplate, type RuntimeTemplateVersion, type S3MultipartOptions, type S3MultipartResult, type S3SingleUploadOptions, type S3SingleUploadResult, type S3UploadProgress, ScaleMule, ScaleMuleClient, type ScaleMuleConfig, type SchedulerJob, SchedulerService, type SearchResult, SearchService, type SecurityLayers, type ServerlessFunction, type ServiceHealth, ServiceModule, type Session, type SessionArtifact, type SessionInfo, type SessionLog, type SessionPoolEntry, type Severity, type ShareLink, type ShortestPathResult, type SignedUrlResponse, type SocialPost, SocialService, type SocialUser, type SsoConfig, type StatusCallback, type StorageAdapter, StorageService, type StrategyResult, type StylePreset, type SubmitResult, type Subscription, type TargetingRule, type Task, type TaskAttempt, type TaskTransition, type Team, type TeamInvitation, type TeamMember, TeamsService, type TelemetryPayload, type Tool, type ToolCapability, type ToolIntegration, type TopEvent, type TotpSetup, type Transaction, type TransactionListParams, type TransactionSummary, type TransactionSummaryParams, type Transfer, type TransformOptions, type TransformResult, type TraversalResult, type UnreadCountResponse, type UpdateFlagRequest, type UpdateRuleRequest, type UpdateSegmentRequest, type UpdateVariantRequest, type UploadCompleteResponse, type UploadEngineConfig, type UploadFailureReport, type UploadFailureReportResponse, type UploadOptions, type UploadPlan, UploadResumeStore, type UploadStrategy, UploadTelemetry, type UploadTelemetryConfig, type UploadTelemetryEvent, type UpsertEnvironmentRequest, type UsageRecord, type UsageSummary$1 as UsageSummary, type UserRank, type VideoInfo, VideoService, type VideoUploadOptions, WEB_PUSH_SERVICE_WORKER, WebPushManager, type WebPushManagerOptions, type WebPushSubscriptionData, type Webhook, WebhooksService, type Workflow, type WorkflowExecution, type Workspace$1 as Workspace, type WorkspaceInvitation, type WorkspaceMember, WorkspacesService, buildClientContextHeaders, calculateTotalParts, canPerform, createUploadPlan, ScaleMule as default, detectNetworkClass, extractClientContext, generateUploadSessionId, getMeasuredBandwidthMbps, getPartRange, hasMinRoleLevel, resolveStrategy, uploadMultipartToS3, uploadSingleToS3, validateIP };
|
package/dist/index.d.ts
CHANGED
|
@@ -129,6 +129,30 @@ interface ScaleMuleConfig {
|
|
|
129
129
|
enableOfflineQueue?: boolean;
|
|
130
130
|
/** Enable multi-account session pool (Google Account Chooser style). Default: false */
|
|
131
131
|
enableMultiSession?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Enable the account switcher — remembers which accounts have logged in on
|
|
134
|
+
* this device so users can pick an account and re-authenticate.
|
|
135
|
+
*
|
|
136
|
+
* Unlike enableMultiSession, this stores **no tokens** for inactive accounts.
|
|
137
|
+
* Only display metadata (email, name, avatar) is persisted.
|
|
138
|
+
* Switching accounts always requires re-authentication.
|
|
139
|
+
*
|
|
140
|
+
* Default: false
|
|
141
|
+
*/
|
|
142
|
+
enableAccountSwitcher?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Privacy level for the account switcher.
|
|
145
|
+
*
|
|
146
|
+
* Controls how much identifying information is stored for inactive accounts:
|
|
147
|
+
* - `'full'` — Full email, name, avatar stored (like Google). Default.
|
|
148
|
+
* - `'masked'` — Email masked (j***@g***.com), name shows initial only, no avatar.
|
|
149
|
+
* Masked at write time — the full email is never persisted.
|
|
150
|
+
* - `'minimal'` — Only userId and provider stored. No PII at all.
|
|
151
|
+
*
|
|
152
|
+
* Privacy downgrades are lossy: switching from minimal/masked to full cannot
|
|
153
|
+
* recover stripped fields for existing entries until those accounts log in again.
|
|
154
|
+
*/
|
|
155
|
+
accountSwitcherPrivacy?: AccountSwitcherPrivacy;
|
|
132
156
|
}
|
|
133
157
|
/**
|
|
134
158
|
* A session entry in the multi-account session pool.
|
|
@@ -142,6 +166,55 @@ interface SessionPoolEntry {
|
|
|
142
166
|
expiresAt?: string;
|
|
143
167
|
addedAt: string;
|
|
144
168
|
}
|
|
169
|
+
/**
|
|
170
|
+
* A remembered account for the account switcher.
|
|
171
|
+
*
|
|
172
|
+
* Contains display metadata only — NO tokens or session data.
|
|
173
|
+
* Switching to a known account requires re-authentication.
|
|
174
|
+
* This is the secure alternative to SessionPoolEntry which stores tokens.
|
|
175
|
+
*/
|
|
176
|
+
interface KnownAccount {
|
|
177
|
+
/** User ID */
|
|
178
|
+
userId: string;
|
|
179
|
+
/** Email address (used for login pre-fill) */
|
|
180
|
+
email: string;
|
|
181
|
+
/** Display name */
|
|
182
|
+
fullName?: string;
|
|
183
|
+
/** Avatar URL */
|
|
184
|
+
avatarUrl?: string;
|
|
185
|
+
/** How the user last authenticated ('email', 'google', 'apple', etc.) */
|
|
186
|
+
provider?: string;
|
|
187
|
+
/** ISO timestamp of last successful login on this device */
|
|
188
|
+
lastActiveAt: string;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Privacy level for the account switcher.
|
|
192
|
+
*/
|
|
193
|
+
type AccountSwitcherPrivacy = 'full' | 'masked' | 'minimal';
|
|
194
|
+
/**
|
|
195
|
+
* A known account after privacy transforms have been applied.
|
|
196
|
+
*
|
|
197
|
+
* This is what gets stored and returned to the UI. In 'masked' mode, email
|
|
198
|
+
* is partially masked and avatarUrl is stripped. In 'minimal' mode, all PII
|
|
199
|
+
* is stripped and only userId/provider/displayLabel/colorIndex remain.
|
|
200
|
+
*/
|
|
201
|
+
interface KnownAccountDisplay {
|
|
202
|
+
userId: string;
|
|
203
|
+
/** Masked or full email, absent in 'minimal' mode */
|
|
204
|
+
email?: string;
|
|
205
|
+
/** Full name, first initial, or absent depending on privacy mode */
|
|
206
|
+
fullName?: string;
|
|
207
|
+
/** Avatar URL, absent in 'masked' and 'minimal' modes */
|
|
208
|
+
avatarUrl?: string;
|
|
209
|
+
/** Authentication provider ('email', 'google', etc.) */
|
|
210
|
+
provider?: string;
|
|
211
|
+
/** ISO timestamp of last successful login on this device */
|
|
212
|
+
lastActiveAt: string;
|
|
213
|
+
/** Display label for 'minimal' mode (constant "Account") */
|
|
214
|
+
displayLabel?: string;
|
|
215
|
+
/** Stable color index derived from userId hash (0-7), for avatar circles */
|
|
216
|
+
colorIndex?: number;
|
|
217
|
+
}
|
|
145
218
|
/**
|
|
146
219
|
* Per-request options that override client defaults.
|
|
147
220
|
*/
|
|
@@ -267,6 +340,9 @@ declare class ScaleMuleClient {
|
|
|
267
340
|
private anonymousId;
|
|
268
341
|
private multiSessionEnabled;
|
|
269
342
|
private sessionPool;
|
|
343
|
+
private accountSwitcherEnabled;
|
|
344
|
+
private accountSwitcherPrivacy;
|
|
345
|
+
private knownAccounts;
|
|
270
346
|
constructor(config: ScaleMuleConfig);
|
|
271
347
|
initialize(): Promise<void>;
|
|
272
348
|
setSession(token: string, userId: string): Promise<void>;
|
|
@@ -293,6 +369,23 @@ declare class ScaleMuleClient {
|
|
|
293
369
|
clearAllAccounts(): Promise<void>;
|
|
294
370
|
/** Persist session pool to storage */
|
|
295
371
|
private persistSessionPool;
|
|
372
|
+
isAccountSwitcherEnabled(): boolean;
|
|
373
|
+
getAccountSwitcherPrivacy(): AccountSwitcherPrivacy;
|
|
374
|
+
/** Get all known accounts that have logged in on this device (privacy-transformed) */
|
|
375
|
+
getKnownAccounts(): KnownAccountDisplay[];
|
|
376
|
+
/**
|
|
377
|
+
* Record an account as "known" on this device.
|
|
378
|
+
* Applies privacy transforms before storing — full email is never persisted
|
|
379
|
+
* in masked/minimal modes. Evicts oldest accounts if over the cap.
|
|
380
|
+
* Called automatically after successful login/register when account switcher is enabled.
|
|
381
|
+
*/
|
|
382
|
+
addKnownAccount(account: KnownAccount): Promise<void>;
|
|
383
|
+
/** Remove a specific account from the known accounts list ("forget this account") */
|
|
384
|
+
removeKnownAccount(userId: string): Promise<void>;
|
|
385
|
+
/** Clear all known accounts ("forget all accounts on this device") */
|
|
386
|
+
clearKnownAccounts(): Promise<void>;
|
|
387
|
+
/** Persist known accounts to storage */
|
|
388
|
+
private persistKnownAccounts;
|
|
296
389
|
getBaseUrl(): string;
|
|
297
390
|
getApiKey(): string;
|
|
298
391
|
isOnline(): boolean;
|
|
@@ -4651,6 +4744,121 @@ declare class FlagContentService extends ServiceModule {
|
|
|
4651
4744
|
getAppeal(id: string, options?: RequestOptions): Promise<ApiResponse<Appeal>>;
|
|
4652
4745
|
}
|
|
4653
4746
|
|
|
4747
|
+
/**
|
|
4748
|
+
* Creator Maker Service Module
|
|
4749
|
+
*
|
|
4750
|
+
* Thin integration for AI image/clip generation via the creator-maker service.
|
|
4751
|
+
* For rich features (React hooks, waitForJob, WebSocket status), use
|
|
4752
|
+
* the standalone @scalemule/creator-maker package instead.
|
|
4753
|
+
*/
|
|
4754
|
+
|
|
4755
|
+
interface GenerateInput {
|
|
4756
|
+
project_id?: string;
|
|
4757
|
+
output_type: 'image' | 'clip';
|
|
4758
|
+
content_mode: 'promo' | 'cartoon';
|
|
4759
|
+
aspect_ratio: '9:16' | '16:9' | '1:1';
|
|
4760
|
+
style_preset_slug?: string;
|
|
4761
|
+
prompt: string;
|
|
4762
|
+
provider_mode?: 'auto' | 'fast' | 'balanced' | 'quality';
|
|
4763
|
+
source_assets?: Array<{
|
|
4764
|
+
storage_file_id: string;
|
|
4765
|
+
role: 'reference' | 'init_image' | 'style_ref';
|
|
4766
|
+
weight?: number;
|
|
4767
|
+
}>;
|
|
4768
|
+
composition?: {
|
|
4769
|
+
caption?: string;
|
|
4770
|
+
watermark?: boolean;
|
|
4771
|
+
};
|
|
4772
|
+
}
|
|
4773
|
+
interface GenerationJob {
|
|
4774
|
+
id: string;
|
|
4775
|
+
project_id: string;
|
|
4776
|
+
output_type: string;
|
|
4777
|
+
content_mode: string;
|
|
4778
|
+
aspect_ratio: string;
|
|
4779
|
+
prompt: string;
|
|
4780
|
+
status: string;
|
|
4781
|
+
estimated_credits: number;
|
|
4782
|
+
actual_credits?: number;
|
|
4783
|
+
outputs: GenerationOutput[];
|
|
4784
|
+
error_code?: string;
|
|
4785
|
+
error_message?: string;
|
|
4786
|
+
created_at: string;
|
|
4787
|
+
completed_at?: string;
|
|
4788
|
+
}
|
|
4789
|
+
interface GenerationOutput {
|
|
4790
|
+
id: string;
|
|
4791
|
+
output_type: string;
|
|
4792
|
+
cdn_url?: string;
|
|
4793
|
+
width: number;
|
|
4794
|
+
height: number;
|
|
4795
|
+
mime_type: string;
|
|
4796
|
+
created_at: string;
|
|
4797
|
+
}
|
|
4798
|
+
interface StylePreset {
|
|
4799
|
+
id: string;
|
|
4800
|
+
mode: string;
|
|
4801
|
+
slug: string;
|
|
4802
|
+
name: string;
|
|
4803
|
+
description?: string;
|
|
4804
|
+
thumbnail_url?: string;
|
|
4805
|
+
estimated_credits: number;
|
|
4806
|
+
}
|
|
4807
|
+
interface CreatorUsage {
|
|
4808
|
+
balance_credits: number;
|
|
4809
|
+
total_generations: number;
|
|
4810
|
+
completed_generations: number;
|
|
4811
|
+
}
|
|
4812
|
+
interface CreateProjectInput {
|
|
4813
|
+
title?: string;
|
|
4814
|
+
content_mode: 'promo' | 'cartoon';
|
|
4815
|
+
}
|
|
4816
|
+
interface CreatorProject {
|
|
4817
|
+
id: string;
|
|
4818
|
+
title: string;
|
|
4819
|
+
content_mode: string;
|
|
4820
|
+
created_at: string;
|
|
4821
|
+
updated_at: string;
|
|
4822
|
+
}
|
|
4823
|
+
declare class CreatorMakerService extends ServiceModule {
|
|
4824
|
+
protected basePath: string;
|
|
4825
|
+
/** Submit a generation job. */
|
|
4826
|
+
generate(data: GenerateInput, options?: RequestOptions): Promise<ApiResponse<GenerationJob>>;
|
|
4827
|
+
/** Get a generation job by ID. */
|
|
4828
|
+
getJob(jobId: string, options?: RequestOptions): Promise<ApiResponse<GenerationJob>>;
|
|
4829
|
+
/** Long-poll for job completion (server holds up to 30s). */
|
|
4830
|
+
pollJob(jobId: string, options?: RequestOptions): Promise<ApiResponse<GenerationJob>>;
|
|
4831
|
+
/** List the current user's generation jobs. */
|
|
4832
|
+
listJobs(params?: Record<string, unknown>, options?: RequestOptions): Promise<PaginatedResponse<GenerationJob>>;
|
|
4833
|
+
/** Cancel a pending or queued job. */
|
|
4834
|
+
cancelJob(jobId: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
4835
|
+
id: string;
|
|
4836
|
+
status: string;
|
|
4837
|
+
}>>;
|
|
4838
|
+
/** Retry a failed job. */
|
|
4839
|
+
retryJob(jobId: string, options?: RequestOptions): Promise<ApiResponse<GenerationJob>>;
|
|
4840
|
+
/** Generate variations of a completed job. */
|
|
4841
|
+
generateVariations(jobId: string, options?: RequestOptions): Promise<ApiResponse<GenerationJob[]>>;
|
|
4842
|
+
/** List available style presets, optionally filtered by mode. */
|
|
4843
|
+
listPresets(params?: {
|
|
4844
|
+
mode?: string;
|
|
4845
|
+
}, options?: RequestOptions): Promise<ApiResponse<StylePreset[]>>;
|
|
4846
|
+
/** Get a style preset by slug. */
|
|
4847
|
+
getPreset(slug: string, options?: RequestOptions): Promise<ApiResponse<StylePreset>>;
|
|
4848
|
+
/** Create a project. */
|
|
4849
|
+
createProject(data: CreateProjectInput, options?: RequestOptions): Promise<ApiResponse<CreatorProject>>;
|
|
4850
|
+
/** List the current user's projects. */
|
|
4851
|
+
listProjects(params?: Record<string, unknown>, options?: RequestOptions): Promise<PaginatedResponse<CreatorProject>>;
|
|
4852
|
+
/** Get generation usage and credit balance. */
|
|
4853
|
+
getUsage(options?: RequestOptions): Promise<ApiResponse<CreatorUsage>>;
|
|
4854
|
+
/** Get a generation output by ID. */
|
|
4855
|
+
getOutput(outputId: string, options?: RequestOptions): Promise<ApiResponse<GenerationOutput>>;
|
|
4856
|
+
/** Get a download URL for a generation output. */
|
|
4857
|
+
getDownloadUrl(outputId: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
4858
|
+
cdn_url: string;
|
|
4859
|
+
}>>;
|
|
4860
|
+
}
|
|
4861
|
+
|
|
4654
4862
|
interface AuthRegisterAgentRequest {
|
|
4655
4863
|
name: string;
|
|
4656
4864
|
agent_platform: string;
|
|
@@ -4952,6 +5160,10 @@ interface Task {
|
|
|
4952
5160
|
metadata?: Record<string, unknown>;
|
|
4953
5161
|
created_at: string;
|
|
4954
5162
|
updated_at: string;
|
|
5163
|
+
pipeline_id?: string;
|
|
5164
|
+
pipeline_version?: number;
|
|
5165
|
+
current_phase?: string;
|
|
5166
|
+
phase_entered_at?: string;
|
|
4955
5167
|
}
|
|
4956
5168
|
interface ClaimResult {
|
|
4957
5169
|
task_id: string;
|
|
@@ -5075,6 +5287,7 @@ declare class AgentProjectsService extends ServiceModule {
|
|
|
5075
5287
|
priority?: string;
|
|
5076
5288
|
due_date?: string;
|
|
5077
5289
|
metadata?: Record<string, unknown>;
|
|
5290
|
+
pipeline_id?: string;
|
|
5078
5291
|
}, applicationId?: string, options?: RequestOptions): Promise<ApiResponse<Task>>;
|
|
5079
5292
|
listTasks(projectId: string, params?: PaginationParams & {
|
|
5080
5293
|
application_id?: string;
|
|
@@ -5098,6 +5311,10 @@ declare class AgentProjectsService extends ServiceModule {
|
|
|
5098
5311
|
heartbeat(taskId: string, agentId: string, applicationId?: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
5099
5312
|
lease_expires_at: string;
|
|
5100
5313
|
}>>;
|
|
5314
|
+
startTask(taskId: string, agentId: string, applicationId?: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
5315
|
+
task_id: string;
|
|
5316
|
+
status: string;
|
|
5317
|
+
}>>;
|
|
5101
5318
|
submit(taskId: string, data: {
|
|
5102
5319
|
agent_id: string;
|
|
5103
5320
|
idempotency_key: string;
|
|
@@ -5562,6 +5779,7 @@ declare class ScaleMule {
|
|
|
5562
5779
|
readonly functions: FunctionsService;
|
|
5563
5780
|
readonly photo: PhotoService;
|
|
5564
5781
|
readonly flagContent: FlagContentService;
|
|
5782
|
+
readonly creatorMaker: CreatorMakerService;
|
|
5565
5783
|
readonly compliance: ComplianceService;
|
|
5566
5784
|
readonly orchestrator: OrchestratorService;
|
|
5567
5785
|
readonly agentAuth: AgentAuthService;
|
|
@@ -5605,6 +5823,23 @@ declare class ScaleMule {
|
|
|
5605
5823
|
removeAccount(userId: string): Promise<void>;
|
|
5606
5824
|
/** Clear all accounts from the pool */
|
|
5607
5825
|
clearAllAccounts(): Promise<void>;
|
|
5826
|
+
/** Whether the account switcher is enabled */
|
|
5827
|
+
isAccountSwitcherEnabled(): boolean;
|
|
5828
|
+
/** The configured privacy level for the account switcher */
|
|
5829
|
+
getAccountSwitcherPrivacy(): AccountSwitcherPrivacy;
|
|
5830
|
+
/**
|
|
5831
|
+
* Get all accounts that have previously logged in on this device.
|
|
5832
|
+
* Returns privacy-transformed display data — no raw PII in masked/minimal modes.
|
|
5833
|
+
* Requires `enableAccountSwitcher: true` in config.
|
|
5834
|
+
*/
|
|
5835
|
+
getKnownAccounts(): KnownAccountDisplay[];
|
|
5836
|
+
/**
|
|
5837
|
+
* Forget a specific account — removes it from the known accounts list.
|
|
5838
|
+
* Does NOT affect any active session.
|
|
5839
|
+
*/
|
|
5840
|
+
removeKnownAccount(userId: string): Promise<void>;
|
|
5841
|
+
/** Forget all known accounts on this device. */
|
|
5842
|
+
clearKnownAccounts(): Promise<void>;
|
|
5608
5843
|
/** The base URL being used for API requests. */
|
|
5609
5844
|
getBaseUrl(): string;
|
|
5610
5845
|
/** The application ID, or null if not configured. */
|
|
@@ -5617,4 +5852,4 @@ declare class ScaleMule {
|
|
|
5617
5852
|
getClient(): ScaleMuleClient;
|
|
5618
5853
|
}
|
|
5619
5854
|
|
|
5620
|
-
export { type AccountBalance, AccountsService, type ActiveUsers, type ActivityItem, AgentAuthService, AgentModelsService, type AgentProfile, AgentProjectsService, type AgentResponse, type AgentSecurityPolicy, AgentSessionsService, type AgentSigningKey, type AgentToken, type AgentToolEntitlement, AgentToolsService, type Workspace as AgentWorkspace, AgentsService, type AggregateOptions, type AggregateResult, type AnalyticsEvent, AnalyticsService, type ApiError, type ApiKey, type ApiResponse, type Appeal, type Application, type Attachment, type Attendee, type AuditLog, type AuthRegisterAgentRequest, type AuthRegisterAgentResponse, AuthService, type AuthSession, type AuthUser, type BackupCodes, BillingService, type CacheEntry, CacheService, type CalendarEvent, type CatalogEntry, CatalogService, type ChatMessage, type ChatReaction, ChatService, type ClaimResult, type Client, type ClientContext, type Collection, type Comment, CommunicationService, type CompletedPart, ComplianceService, type CompressionConfig, type ConnectedAccount, type ConnectedAccountSubscription, type ConnectedSetupIntentResponse, type ConnectedSubscriptionListParams, type ConnectionStatus, type ContentFlag, type Conversation, type CostReportDay, type CreateFlagRequest, type CreateRuleRequest, type CreateSegmentRequest, type CreateSessionResponse, type CreateVariantRequest, type Credential, type CredentialScope, type Customer, type DataAccessPolicy, type DataExport, DataService, type DataSource, type DeadLetterJob, type DeviceInfo, type Document, type ErrorCode, ErrorCodes, type EventAggregation, EventsService, type FileInfo, type FlagAuditEntry, type FlagCheck, type FlagCondition, FlagContentService, type FlagDefinition, type FlagDetail, type FlagEnvironment, type FlagEvaluation, type FlagSegment, type FlagVariant, FlagsService, type FollowStatus, type FunctionExecution, type FunctionMetrics, FunctionsService, type Funnel, type FunnelConversion, type GdprRequest, type GrantInfo, type GraphEdge, type GraphNode, GraphService, IdentityService, type IdentityType, type IncomingRequestLike, type Invoice, type JobExecution, type JobStats, type Leaderboard, type LeaderboardEntry, LeaderboardService, type Like, type ListNotificationsParams, type Listing, ListingsService, type LogEntry, type LogInput, type LogQueryParams, type LogQueryResponse, type LogRecord, LoggerService, type LoginActivitySummary, type LoginDeviceInfo, type LoginHistoryEntry, type LoginRiskInfo, type MessageCallback, type MessageStatus, type MetricDataPoint, type MfaStatus, type Model, type ModelEntitlement, type ModelPricing, type ModelProvider, type UsageSummary as ModelUsageSummary, type MultipartCompleteResponse, type MultipartConfig, type MultipartPartUrl, type MultipartPartUrlsResponse, type MultipartStartResponse, type NetworkClass, type Notification, type NotificationListResponse, NotificationsService, type OAuthProvider, type OAuthUrl, OrchestratorService, PHOTO_BREAKPOINTS, type PaginatedResponse, type PaginationMetadata, type PaginationParams, type PartResult, type PartUrl, type Participant, type Payment, type PaymentListParams, type PaymentMethod, type PaymentStatusResponse, type Payout, type PayoutSchedule, type PermissionCheck, type PermissionMatrix, PermissionsService, type PhotoInfo, PhotoService, type Pipeline, type PipelineVersion, type Policy, type PresenceCallback, type PresenceEvent, type PresignedUploadResponse, type Price, type Product, type Project, type ProjectDocument, type ProjectGrant, type ProjectMember, type PushApiFetcher, type PushPreferences, type PushSettings, type PushSubscriptionInfo, type PushToken, type PushTokenAssociationResult, type PushTopic, type QueryFilter, type QueryOptions, type QuerySort, type QueueJob, QueueService, type ReadStatus, RealtimeService, type RedeemResult, type ReferralAnalytics, type ReferralCampaign, type ReferralProfile, type ReferralStats, ReferralsService, type Refund, type RegisterAgentRequest, type RegisterAgentResponse, type RegisterPushTokenData, type RequestOptions, type ResolvedReferral, type ResumeSession, type Role, type RuntimeTemplate, type RuntimeTemplateVersion, type S3MultipartOptions, type S3MultipartResult, type S3SingleUploadOptions, type S3SingleUploadResult, type S3UploadProgress, ScaleMule, ScaleMuleClient, type ScaleMuleConfig, type SchedulerJob, SchedulerService, type SearchResult, SearchService, type SecurityLayers, type ServerlessFunction, type ServiceHealth, ServiceModule, type Session, type SessionArtifact, type SessionInfo, type SessionLog, type SessionPoolEntry, type Severity, type ShareLink, type ShortestPathResult, type SignedUrlResponse, type SocialPost, SocialService, type SocialUser, type SsoConfig, type StatusCallback, type StorageAdapter, StorageService, type StrategyResult, type SubmitResult, type Subscription, type TargetingRule, type Task, type TaskAttempt, type TaskTransition, type Team, type TeamInvitation, type TeamMember, TeamsService, type TelemetryPayload, type Tool, type ToolCapability, type ToolIntegration, type TopEvent, type TotpSetup, type Transaction, type TransactionListParams, type TransactionSummary, type TransactionSummaryParams, type Transfer, type TransformOptions, type TransformResult, type TraversalResult, type UnreadCountResponse, type UpdateFlagRequest, type UpdateRuleRequest, type UpdateSegmentRequest, type UpdateVariantRequest, type UploadCompleteResponse, type UploadEngineConfig, type UploadFailureReport, type UploadFailureReportResponse, type UploadOptions, type UploadPlan, UploadResumeStore, type UploadStrategy, UploadTelemetry, type UploadTelemetryConfig, type UploadTelemetryEvent, type UpsertEnvironmentRequest, type UsageRecord, type UsageSummary$1 as UsageSummary, type UserRank, type VideoInfo, VideoService, type VideoUploadOptions, WEB_PUSH_SERVICE_WORKER, WebPushManager, type WebPushManagerOptions, type WebPushSubscriptionData, type Webhook, WebhooksService, type Workflow, type WorkflowExecution, type Workspace$1 as Workspace, type WorkspaceInvitation, type WorkspaceMember, WorkspacesService, buildClientContextHeaders, calculateTotalParts, canPerform, createUploadPlan, ScaleMule as default, detectNetworkClass, extractClientContext, generateUploadSessionId, getMeasuredBandwidthMbps, getPartRange, hasMinRoleLevel, resolveStrategy, uploadMultipartToS3, uploadSingleToS3, validateIP };
|
|
5855
|
+
export { type AccountBalance, type AccountSwitcherPrivacy, AccountsService, type ActiveUsers, type ActivityItem, AgentAuthService, AgentModelsService, type AgentProfile, AgentProjectsService, type AgentResponse, type AgentSecurityPolicy, AgentSessionsService, type AgentSigningKey, type AgentToken, type AgentToolEntitlement, AgentToolsService, type Workspace as AgentWorkspace, AgentsService, type AggregateOptions, type AggregateResult, type AnalyticsEvent, AnalyticsService, type ApiError, type ApiKey, type ApiResponse, type Appeal, type Application, type Attachment, type Attendee, type AuditLog, type AuthRegisterAgentRequest, type AuthRegisterAgentResponse, AuthService, type AuthSession, type AuthUser, type BackupCodes, BillingService, type CacheEntry, CacheService, type CalendarEvent, type CatalogEntry, CatalogService, type ChatMessage, type ChatReaction, ChatService, type ClaimResult, type Client, type ClientContext, type Collection, type Comment, CommunicationService, type CompletedPart, ComplianceService, type CompressionConfig, type ConnectedAccount, type ConnectedAccountSubscription, type ConnectedSetupIntentResponse, type ConnectedSubscriptionListParams, type ConnectionStatus, type ContentFlag, type Conversation, type CostReportDay, type CreateProjectInput as CreateCreatorProjectInput, type CreateFlagRequest, type CreateRuleRequest, type CreateSegmentRequest, type CreateSessionResponse, type CreateVariantRequest, type GenerationJob as CreatorJob, CreatorMakerService, type GenerationOutput as CreatorOutput, type CreatorProject, type CreatorUsage, type Credential, type CredentialScope, type Customer, type DataAccessPolicy, type DataExport, DataService, type DataSource, type DeadLetterJob, type DeviceInfo, type Document, type ErrorCode, ErrorCodes, type EventAggregation, EventsService, type FileInfo, type FlagAuditEntry, type FlagCheck, type FlagCondition, FlagContentService, type FlagDefinition, type FlagDetail, type FlagEnvironment, type FlagEvaluation, type FlagSegment, type FlagVariant, FlagsService, type FollowStatus, type FunctionExecution, type FunctionMetrics, FunctionsService, type Funnel, type FunnelConversion, type GdprRequest, type GenerateInput, type GrantInfo, type GraphEdge, type GraphNode, GraphService, IdentityService, type IdentityType, type IncomingRequestLike, type Invoice, type JobExecution, type JobStats, type KnownAccount, type KnownAccountDisplay, type Leaderboard, type LeaderboardEntry, LeaderboardService, type Like, type ListNotificationsParams, type Listing, ListingsService, type LogEntry, type LogInput, type LogQueryParams, type LogQueryResponse, type LogRecord, LoggerService, type LoginActivitySummary, type LoginDeviceInfo, type LoginHistoryEntry, type LoginRiskInfo, type MessageCallback, type MessageStatus, type MetricDataPoint, type MfaStatus, type Model, type ModelEntitlement, type ModelPricing, type ModelProvider, type UsageSummary as ModelUsageSummary, type MultipartCompleteResponse, type MultipartConfig, type MultipartPartUrl, type MultipartPartUrlsResponse, type MultipartStartResponse, type NetworkClass, type Notification, type NotificationListResponse, NotificationsService, type OAuthProvider, type OAuthUrl, OrchestratorService, PHOTO_BREAKPOINTS, type PaginatedResponse, type PaginationMetadata, type PaginationParams, type PartResult, type PartUrl, type Participant, type Payment, type PaymentListParams, type PaymentMethod, type PaymentStatusResponse, type Payout, type PayoutSchedule, type PermissionCheck, type PermissionMatrix, PermissionsService, type PhotoInfo, PhotoService, type Pipeline, type PipelineVersion, type Policy, type PresenceCallback, type PresenceEvent, type PresignedUploadResponse, type Price, type Product, type Project, type ProjectDocument, type ProjectGrant, type ProjectMember, type PushApiFetcher, type PushPreferences, type PushSettings, type PushSubscriptionInfo, type PushToken, type PushTokenAssociationResult, type PushTopic, type QueryFilter, type QueryOptions, type QuerySort, type QueueJob, QueueService, type ReadStatus, RealtimeService, type RedeemResult, type ReferralAnalytics, type ReferralCampaign, type ReferralProfile, type ReferralStats, ReferralsService, type Refund, type RegisterAgentRequest, type RegisterAgentResponse, type RegisterPushTokenData, type RequestOptions, type ResolvedReferral, type ResumeSession, type Role, type RuntimeTemplate, type RuntimeTemplateVersion, type S3MultipartOptions, type S3MultipartResult, type S3SingleUploadOptions, type S3SingleUploadResult, type S3UploadProgress, ScaleMule, ScaleMuleClient, type ScaleMuleConfig, type SchedulerJob, SchedulerService, type SearchResult, SearchService, type SecurityLayers, type ServerlessFunction, type ServiceHealth, ServiceModule, type Session, type SessionArtifact, type SessionInfo, type SessionLog, type SessionPoolEntry, type Severity, type ShareLink, type ShortestPathResult, type SignedUrlResponse, type SocialPost, SocialService, type SocialUser, type SsoConfig, type StatusCallback, type StorageAdapter, StorageService, type StrategyResult, type StylePreset, type SubmitResult, type Subscription, type TargetingRule, type Task, type TaskAttempt, type TaskTransition, type Team, type TeamInvitation, type TeamMember, TeamsService, type TelemetryPayload, type Tool, type ToolCapability, type ToolIntegration, type TopEvent, type TotpSetup, type Transaction, type TransactionListParams, type TransactionSummary, type TransactionSummaryParams, type Transfer, type TransformOptions, type TransformResult, type TraversalResult, type UnreadCountResponse, type UpdateFlagRequest, type UpdateRuleRequest, type UpdateSegmentRequest, type UpdateVariantRequest, type UploadCompleteResponse, type UploadEngineConfig, type UploadFailureReport, type UploadFailureReportResponse, type UploadOptions, type UploadPlan, UploadResumeStore, type UploadStrategy, UploadTelemetry, type UploadTelemetryConfig, type UploadTelemetryEvent, type UpsertEnvironmentRequest, type UsageRecord, type UsageSummary$1 as UsageSummary, type UserRank, type VideoInfo, VideoService, type VideoUploadOptions, WEB_PUSH_SERVICE_WORKER, WebPushManager, type WebPushManagerOptions, type WebPushSubscriptionData, type Webhook, WebhooksService, type Workflow, type WorkflowExecution, type Workspace$1 as Workspace, type WorkspaceInvitation, type WorkspaceMember, WorkspacesService, buildClientContextHeaders, calculateTotalParts, canPerform, createUploadPlan, ScaleMule as default, detectNetworkClass, extractClientContext, generateUploadSessionId, getMeasuredBandwidthMbps, getPartRange, hasMinRoleLevel, resolveStrategy, uploadMultipartToS3, uploadSingleToS3, validateIP };
|