@scalemule/sdk 0.0.31 → 0.0.33
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 +187 -1
- package/dist/index.d.ts +187 -1
- package/dist/index.js +119 -2
- package/dist/index.mjs +118 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -628,6 +628,56 @@ interface DataExport {
|
|
|
628
628
|
}>;
|
|
629
629
|
exported_at: string;
|
|
630
630
|
}
|
|
631
|
+
/** Summary fields returned by the user-directory list endpoint. */
|
|
632
|
+
interface DirectoryUser {
|
|
633
|
+
id: string;
|
|
634
|
+
sm_application_id: string;
|
|
635
|
+
email?: string;
|
|
636
|
+
email_verified: boolean;
|
|
637
|
+
phone?: string;
|
|
638
|
+
phone_verified: boolean;
|
|
639
|
+
full_name?: string;
|
|
640
|
+
avatar_url?: string;
|
|
641
|
+
status: string;
|
|
642
|
+
created_at: string;
|
|
643
|
+
last_login_at?: string;
|
|
644
|
+
login_count: number;
|
|
645
|
+
auth_methods: string[];
|
|
646
|
+
}
|
|
647
|
+
/** Detailed user record returned by the user-directory get-by-id endpoint. */
|
|
648
|
+
interface DirectoryUserDetail {
|
|
649
|
+
id: string;
|
|
650
|
+
sm_application_id: string;
|
|
651
|
+
email?: string;
|
|
652
|
+
email_verified: boolean;
|
|
653
|
+
phone?: string;
|
|
654
|
+
phone_verified: boolean;
|
|
655
|
+
full_name?: string;
|
|
656
|
+
username?: string;
|
|
657
|
+
avatar_url?: string;
|
|
658
|
+
status: string;
|
|
659
|
+
created_at: string;
|
|
660
|
+
locale?: string;
|
|
661
|
+
time_zone?: string;
|
|
662
|
+
external_role?: string;
|
|
663
|
+
auth_methods: string[];
|
|
664
|
+
}
|
|
665
|
+
interface DirectoryUsersListResponse {
|
|
666
|
+
users: DirectoryUser[];
|
|
667
|
+
total: number;
|
|
668
|
+
}
|
|
669
|
+
interface SearchUsersParams {
|
|
670
|
+
/** Substring match against email or full_name. */
|
|
671
|
+
search?: string;
|
|
672
|
+
/** Filter by user status (e.g. "active"). */
|
|
673
|
+
status?: string;
|
|
674
|
+
/** Filter by email verification state. */
|
|
675
|
+
email_verified?: boolean;
|
|
676
|
+
/** Filter by phone verification state. */
|
|
677
|
+
phone_verified?: boolean;
|
|
678
|
+
/** 1-indexed page. Server returns 50 results per page (non-configurable). */
|
|
679
|
+
page?: number;
|
|
680
|
+
}
|
|
631
681
|
declare class AuthMfaApi extends ServiceModule {
|
|
632
682
|
protected basePath: string;
|
|
633
683
|
getStatus(): Promise<ApiResponse<MfaStatus>>;
|
|
@@ -728,6 +778,25 @@ declare class AuthService extends ServiceModule {
|
|
|
728
778
|
logged_out: boolean;
|
|
729
779
|
}>>;
|
|
730
780
|
me(options?: RequestOptions): Promise<ApiResponse<AuthUser>>;
|
|
781
|
+
/**
|
|
782
|
+
* Search users within the caller's application.
|
|
783
|
+
*
|
|
784
|
+
* Results are automatically scoped to the caller's application via the
|
|
785
|
+
* x-app-id header injected by the gateway. Server-side page size is fixed
|
|
786
|
+
* at 50 (the `per_page` query param is not honored upstream).
|
|
787
|
+
*
|
|
788
|
+
* @example
|
|
789
|
+
* const res = await sm.auth.searchUsers({ search: 'alice' });
|
|
790
|
+
* res.data?.users.forEach(u => console.log(u.email));
|
|
791
|
+
*/
|
|
792
|
+
searchUsers(params?: SearchUsersParams, options?: RequestOptions): Promise<ApiResponse<DirectoryUsersListResponse>>;
|
|
793
|
+
/**
|
|
794
|
+
* Fetch a single user by ID within the caller's application.
|
|
795
|
+
*
|
|
796
|
+
* Returns 404 if the user is not in the caller's application — cross-tenant
|
|
797
|
+
* reads are blocked at the gateway via the x-app-id header scope.
|
|
798
|
+
*/
|
|
799
|
+
getUser(userId: string, options?: RequestOptions): Promise<ApiResponse<DirectoryUserDetail>>;
|
|
731
800
|
/** Refresh the session. Alias: refreshToken() */
|
|
732
801
|
refreshSession(data?: {
|
|
733
802
|
refresh_token?: string;
|
|
@@ -1857,6 +1926,122 @@ declare class ChatService extends ServiceModule {
|
|
|
1857
1926
|
}): Promise<ApiResponse<Conversation>>;
|
|
1858
1927
|
}
|
|
1859
1928
|
|
|
1929
|
+
/**
|
|
1930
|
+
* Conference Service Module
|
|
1931
|
+
*
|
|
1932
|
+
* Audio/video conferencing: call lifecycle, participants, recording, settings, stats.
|
|
1933
|
+
*
|
|
1934
|
+
* Routes:
|
|
1935
|
+
* POST /calls -> create call
|
|
1936
|
+
* GET /calls/{id} -> get call
|
|
1937
|
+
* GET /calls -> list calls
|
|
1938
|
+
* POST /calls/{id}/end -> end call
|
|
1939
|
+
* POST /calls/{id}/join -> join call
|
|
1940
|
+
* POST /calls/{id}/leave -> leave call
|
|
1941
|
+
* GET /calls/{id}/participants -> list participants
|
|
1942
|
+
* POST /calls/{id}/recording/start -> start recording
|
|
1943
|
+
* POST /calls/{id}/recording/stop -> stop recording
|
|
1944
|
+
* POST /calls/{id}/recording/consent -> consent to recording
|
|
1945
|
+
* GET /settings -> get settings
|
|
1946
|
+
* PUT /settings -> update settings
|
|
1947
|
+
* POST /calls/{id}/stats -> submit WebRTC stats
|
|
1948
|
+
*/
|
|
1949
|
+
|
|
1950
|
+
interface CallSession {
|
|
1951
|
+
id: string;
|
|
1952
|
+
conversation_id?: string;
|
|
1953
|
+
call_type: 'audio' | 'video' | 'screen_share';
|
|
1954
|
+
status: 'created' | 'active' | 'ended';
|
|
1955
|
+
created_by: string;
|
|
1956
|
+
started_at?: string;
|
|
1957
|
+
ended_at?: string;
|
|
1958
|
+
duration_seconds?: number;
|
|
1959
|
+
participant_count?: number;
|
|
1960
|
+
max_concurrent_participants?: number;
|
|
1961
|
+
metadata?: Record<string, unknown>;
|
|
1962
|
+
created_at: string;
|
|
1963
|
+
}
|
|
1964
|
+
interface CallParticipant {
|
|
1965
|
+
id: string;
|
|
1966
|
+
user_id: string;
|
|
1967
|
+
role: 'host' | 'participant' | 'viewer';
|
|
1968
|
+
status: 'invited' | 'joined' | 'left' | 'kicked';
|
|
1969
|
+
joined_at?: string;
|
|
1970
|
+
left_at?: string;
|
|
1971
|
+
duration_seconds?: number;
|
|
1972
|
+
has_audio: boolean;
|
|
1973
|
+
has_video: boolean;
|
|
1974
|
+
}
|
|
1975
|
+
interface JoinCallResponse {
|
|
1976
|
+
call_id: string;
|
|
1977
|
+
livekit_url: string;
|
|
1978
|
+
livekit_token: string;
|
|
1979
|
+
participant: CallParticipant;
|
|
1980
|
+
}
|
|
1981
|
+
interface ConferenceSettings {
|
|
1982
|
+
max_participants_per_call: number;
|
|
1983
|
+
max_concurrent_calls: number;
|
|
1984
|
+
max_call_duration_seconds: number;
|
|
1985
|
+
max_recording_storage_gb: number;
|
|
1986
|
+
recording_enabled: boolean;
|
|
1987
|
+
recording_auto_start: boolean;
|
|
1988
|
+
video_enabled: boolean;
|
|
1989
|
+
screen_share_enabled: boolean;
|
|
1990
|
+
}
|
|
1991
|
+
interface WebrtcStats {
|
|
1992
|
+
bitrate_kbps?: number;
|
|
1993
|
+
packet_loss_pct?: number;
|
|
1994
|
+
jitter_ms?: number;
|
|
1995
|
+
round_trip_ms?: number;
|
|
1996
|
+
audio_level?: number;
|
|
1997
|
+
video_resolution?: string;
|
|
1998
|
+
connection_quality?: 'excellent' | 'good' | 'poor' | 'lost';
|
|
1999
|
+
}
|
|
2000
|
+
declare class ConferenceService extends ServiceModule {
|
|
2001
|
+
protected basePath: string;
|
|
2002
|
+
createCall(data: {
|
|
2003
|
+
conversation_id?: string;
|
|
2004
|
+
call_type?: 'audio' | 'video' | 'screen_share';
|
|
2005
|
+
metadata?: Record<string, unknown>;
|
|
2006
|
+
}, options?: RequestOptions): Promise<ApiResponse<CallSession>>;
|
|
2007
|
+
getCall(callId: string, options?: RequestOptions): Promise<ApiResponse<CallSession>>;
|
|
2008
|
+
listCalls(params?: {
|
|
2009
|
+
conversation_id?: string;
|
|
2010
|
+
status?: string;
|
|
2011
|
+
page?: number;
|
|
2012
|
+
per_page?: number;
|
|
2013
|
+
}, options?: RequestOptions): Promise<ApiResponse<{
|
|
2014
|
+
data: CallSession[];
|
|
2015
|
+
pagination: {
|
|
2016
|
+
page: number;
|
|
2017
|
+
per_page: number;
|
|
2018
|
+
total: number;
|
|
2019
|
+
};
|
|
2020
|
+
}>>;
|
|
2021
|
+
endCall(callId: string, options?: RequestOptions): Promise<ApiResponse<CallSession>>;
|
|
2022
|
+
joinCall(callId: string, options?: RequestOptions): Promise<ApiResponse<JoinCallResponse>>;
|
|
2023
|
+
leaveCall(callId: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
2024
|
+
left: boolean;
|
|
2025
|
+
}>>;
|
|
2026
|
+
listParticipants(callId: string, options?: RequestOptions): Promise<ApiResponse<CallParticipant[]>>;
|
|
2027
|
+
startRecording(callId: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
2028
|
+
recording_id: string;
|
|
2029
|
+
status: string;
|
|
2030
|
+
}>>;
|
|
2031
|
+
stopRecording(callId: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
2032
|
+
recording_id: string;
|
|
2033
|
+
status: string;
|
|
2034
|
+
}>>;
|
|
2035
|
+
consentToRecording(callId: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
2036
|
+
granted: boolean;
|
|
2037
|
+
}>>;
|
|
2038
|
+
getSettings(options?: RequestOptions): Promise<ApiResponse<ConferenceSettings>>;
|
|
2039
|
+
updateSettings(data: Partial<ConferenceSettings>, options?: RequestOptions): Promise<ApiResponse<ConferenceSettings>>;
|
|
2040
|
+
submitStats(callId: string, stats: WebrtcStats, options?: RequestOptions): Promise<ApiResponse<{
|
|
2041
|
+
success: boolean;
|
|
2042
|
+
}>>;
|
|
2043
|
+
}
|
|
2044
|
+
|
|
1860
2045
|
/**
|
|
1861
2046
|
* Social Service Module
|
|
1862
2047
|
*
|
|
@@ -5754,6 +5939,7 @@ declare class ScaleMule {
|
|
|
5754
5939
|
readonly video: VideoService;
|
|
5755
5940
|
readonly data: DataService;
|
|
5756
5941
|
readonly chat: ChatService;
|
|
5942
|
+
readonly conference: ConferenceService;
|
|
5757
5943
|
readonly social: SocialService;
|
|
5758
5944
|
readonly referrals: ReferralsService;
|
|
5759
5945
|
readonly billing: BillingService;
|
|
@@ -5854,4 +6040,4 @@ declare class ScaleMule {
|
|
|
5854
6040
|
getClient(): ScaleMuleClient;
|
|
5855
6041
|
}
|
|
5856
6042
|
|
|
5857
|
-
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 };
|
|
6043
|
+
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 CallParticipant, type CallSession, type CatalogEntry, CatalogService, type ChatMessage, type ChatReaction, ChatService, type ClaimResult, type Client, type ClientContext, type Collection, type Comment, CommunicationService, type CompletedPart, ComplianceService, type CompressionConfig, ConferenceService, type ConferenceSettings, 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 DirectoryUser, type DirectoryUserDetail, type DirectoryUsersListResponse, 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 JoinCallResponse, 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 SearchUsersParams, 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 WebrtcStats, 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
|
@@ -628,6 +628,56 @@ interface DataExport {
|
|
|
628
628
|
}>;
|
|
629
629
|
exported_at: string;
|
|
630
630
|
}
|
|
631
|
+
/** Summary fields returned by the user-directory list endpoint. */
|
|
632
|
+
interface DirectoryUser {
|
|
633
|
+
id: string;
|
|
634
|
+
sm_application_id: string;
|
|
635
|
+
email?: string;
|
|
636
|
+
email_verified: boolean;
|
|
637
|
+
phone?: string;
|
|
638
|
+
phone_verified: boolean;
|
|
639
|
+
full_name?: string;
|
|
640
|
+
avatar_url?: string;
|
|
641
|
+
status: string;
|
|
642
|
+
created_at: string;
|
|
643
|
+
last_login_at?: string;
|
|
644
|
+
login_count: number;
|
|
645
|
+
auth_methods: string[];
|
|
646
|
+
}
|
|
647
|
+
/** Detailed user record returned by the user-directory get-by-id endpoint. */
|
|
648
|
+
interface DirectoryUserDetail {
|
|
649
|
+
id: string;
|
|
650
|
+
sm_application_id: string;
|
|
651
|
+
email?: string;
|
|
652
|
+
email_verified: boolean;
|
|
653
|
+
phone?: string;
|
|
654
|
+
phone_verified: boolean;
|
|
655
|
+
full_name?: string;
|
|
656
|
+
username?: string;
|
|
657
|
+
avatar_url?: string;
|
|
658
|
+
status: string;
|
|
659
|
+
created_at: string;
|
|
660
|
+
locale?: string;
|
|
661
|
+
time_zone?: string;
|
|
662
|
+
external_role?: string;
|
|
663
|
+
auth_methods: string[];
|
|
664
|
+
}
|
|
665
|
+
interface DirectoryUsersListResponse {
|
|
666
|
+
users: DirectoryUser[];
|
|
667
|
+
total: number;
|
|
668
|
+
}
|
|
669
|
+
interface SearchUsersParams {
|
|
670
|
+
/** Substring match against email or full_name. */
|
|
671
|
+
search?: string;
|
|
672
|
+
/** Filter by user status (e.g. "active"). */
|
|
673
|
+
status?: string;
|
|
674
|
+
/** Filter by email verification state. */
|
|
675
|
+
email_verified?: boolean;
|
|
676
|
+
/** Filter by phone verification state. */
|
|
677
|
+
phone_verified?: boolean;
|
|
678
|
+
/** 1-indexed page. Server returns 50 results per page (non-configurable). */
|
|
679
|
+
page?: number;
|
|
680
|
+
}
|
|
631
681
|
declare class AuthMfaApi extends ServiceModule {
|
|
632
682
|
protected basePath: string;
|
|
633
683
|
getStatus(): Promise<ApiResponse<MfaStatus>>;
|
|
@@ -728,6 +778,25 @@ declare class AuthService extends ServiceModule {
|
|
|
728
778
|
logged_out: boolean;
|
|
729
779
|
}>>;
|
|
730
780
|
me(options?: RequestOptions): Promise<ApiResponse<AuthUser>>;
|
|
781
|
+
/**
|
|
782
|
+
* Search users within the caller's application.
|
|
783
|
+
*
|
|
784
|
+
* Results are automatically scoped to the caller's application via the
|
|
785
|
+
* x-app-id header injected by the gateway. Server-side page size is fixed
|
|
786
|
+
* at 50 (the `per_page` query param is not honored upstream).
|
|
787
|
+
*
|
|
788
|
+
* @example
|
|
789
|
+
* const res = await sm.auth.searchUsers({ search: 'alice' });
|
|
790
|
+
* res.data?.users.forEach(u => console.log(u.email));
|
|
791
|
+
*/
|
|
792
|
+
searchUsers(params?: SearchUsersParams, options?: RequestOptions): Promise<ApiResponse<DirectoryUsersListResponse>>;
|
|
793
|
+
/**
|
|
794
|
+
* Fetch a single user by ID within the caller's application.
|
|
795
|
+
*
|
|
796
|
+
* Returns 404 if the user is not in the caller's application — cross-tenant
|
|
797
|
+
* reads are blocked at the gateway via the x-app-id header scope.
|
|
798
|
+
*/
|
|
799
|
+
getUser(userId: string, options?: RequestOptions): Promise<ApiResponse<DirectoryUserDetail>>;
|
|
731
800
|
/** Refresh the session. Alias: refreshToken() */
|
|
732
801
|
refreshSession(data?: {
|
|
733
802
|
refresh_token?: string;
|
|
@@ -1857,6 +1926,122 @@ declare class ChatService extends ServiceModule {
|
|
|
1857
1926
|
}): Promise<ApiResponse<Conversation>>;
|
|
1858
1927
|
}
|
|
1859
1928
|
|
|
1929
|
+
/**
|
|
1930
|
+
* Conference Service Module
|
|
1931
|
+
*
|
|
1932
|
+
* Audio/video conferencing: call lifecycle, participants, recording, settings, stats.
|
|
1933
|
+
*
|
|
1934
|
+
* Routes:
|
|
1935
|
+
* POST /calls -> create call
|
|
1936
|
+
* GET /calls/{id} -> get call
|
|
1937
|
+
* GET /calls -> list calls
|
|
1938
|
+
* POST /calls/{id}/end -> end call
|
|
1939
|
+
* POST /calls/{id}/join -> join call
|
|
1940
|
+
* POST /calls/{id}/leave -> leave call
|
|
1941
|
+
* GET /calls/{id}/participants -> list participants
|
|
1942
|
+
* POST /calls/{id}/recording/start -> start recording
|
|
1943
|
+
* POST /calls/{id}/recording/stop -> stop recording
|
|
1944
|
+
* POST /calls/{id}/recording/consent -> consent to recording
|
|
1945
|
+
* GET /settings -> get settings
|
|
1946
|
+
* PUT /settings -> update settings
|
|
1947
|
+
* POST /calls/{id}/stats -> submit WebRTC stats
|
|
1948
|
+
*/
|
|
1949
|
+
|
|
1950
|
+
interface CallSession {
|
|
1951
|
+
id: string;
|
|
1952
|
+
conversation_id?: string;
|
|
1953
|
+
call_type: 'audio' | 'video' | 'screen_share';
|
|
1954
|
+
status: 'created' | 'active' | 'ended';
|
|
1955
|
+
created_by: string;
|
|
1956
|
+
started_at?: string;
|
|
1957
|
+
ended_at?: string;
|
|
1958
|
+
duration_seconds?: number;
|
|
1959
|
+
participant_count?: number;
|
|
1960
|
+
max_concurrent_participants?: number;
|
|
1961
|
+
metadata?: Record<string, unknown>;
|
|
1962
|
+
created_at: string;
|
|
1963
|
+
}
|
|
1964
|
+
interface CallParticipant {
|
|
1965
|
+
id: string;
|
|
1966
|
+
user_id: string;
|
|
1967
|
+
role: 'host' | 'participant' | 'viewer';
|
|
1968
|
+
status: 'invited' | 'joined' | 'left' | 'kicked';
|
|
1969
|
+
joined_at?: string;
|
|
1970
|
+
left_at?: string;
|
|
1971
|
+
duration_seconds?: number;
|
|
1972
|
+
has_audio: boolean;
|
|
1973
|
+
has_video: boolean;
|
|
1974
|
+
}
|
|
1975
|
+
interface JoinCallResponse {
|
|
1976
|
+
call_id: string;
|
|
1977
|
+
livekit_url: string;
|
|
1978
|
+
livekit_token: string;
|
|
1979
|
+
participant: CallParticipant;
|
|
1980
|
+
}
|
|
1981
|
+
interface ConferenceSettings {
|
|
1982
|
+
max_participants_per_call: number;
|
|
1983
|
+
max_concurrent_calls: number;
|
|
1984
|
+
max_call_duration_seconds: number;
|
|
1985
|
+
max_recording_storage_gb: number;
|
|
1986
|
+
recording_enabled: boolean;
|
|
1987
|
+
recording_auto_start: boolean;
|
|
1988
|
+
video_enabled: boolean;
|
|
1989
|
+
screen_share_enabled: boolean;
|
|
1990
|
+
}
|
|
1991
|
+
interface WebrtcStats {
|
|
1992
|
+
bitrate_kbps?: number;
|
|
1993
|
+
packet_loss_pct?: number;
|
|
1994
|
+
jitter_ms?: number;
|
|
1995
|
+
round_trip_ms?: number;
|
|
1996
|
+
audio_level?: number;
|
|
1997
|
+
video_resolution?: string;
|
|
1998
|
+
connection_quality?: 'excellent' | 'good' | 'poor' | 'lost';
|
|
1999
|
+
}
|
|
2000
|
+
declare class ConferenceService extends ServiceModule {
|
|
2001
|
+
protected basePath: string;
|
|
2002
|
+
createCall(data: {
|
|
2003
|
+
conversation_id?: string;
|
|
2004
|
+
call_type?: 'audio' | 'video' | 'screen_share';
|
|
2005
|
+
metadata?: Record<string, unknown>;
|
|
2006
|
+
}, options?: RequestOptions): Promise<ApiResponse<CallSession>>;
|
|
2007
|
+
getCall(callId: string, options?: RequestOptions): Promise<ApiResponse<CallSession>>;
|
|
2008
|
+
listCalls(params?: {
|
|
2009
|
+
conversation_id?: string;
|
|
2010
|
+
status?: string;
|
|
2011
|
+
page?: number;
|
|
2012
|
+
per_page?: number;
|
|
2013
|
+
}, options?: RequestOptions): Promise<ApiResponse<{
|
|
2014
|
+
data: CallSession[];
|
|
2015
|
+
pagination: {
|
|
2016
|
+
page: number;
|
|
2017
|
+
per_page: number;
|
|
2018
|
+
total: number;
|
|
2019
|
+
};
|
|
2020
|
+
}>>;
|
|
2021
|
+
endCall(callId: string, options?: RequestOptions): Promise<ApiResponse<CallSession>>;
|
|
2022
|
+
joinCall(callId: string, options?: RequestOptions): Promise<ApiResponse<JoinCallResponse>>;
|
|
2023
|
+
leaveCall(callId: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
2024
|
+
left: boolean;
|
|
2025
|
+
}>>;
|
|
2026
|
+
listParticipants(callId: string, options?: RequestOptions): Promise<ApiResponse<CallParticipant[]>>;
|
|
2027
|
+
startRecording(callId: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
2028
|
+
recording_id: string;
|
|
2029
|
+
status: string;
|
|
2030
|
+
}>>;
|
|
2031
|
+
stopRecording(callId: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
2032
|
+
recording_id: string;
|
|
2033
|
+
status: string;
|
|
2034
|
+
}>>;
|
|
2035
|
+
consentToRecording(callId: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
2036
|
+
granted: boolean;
|
|
2037
|
+
}>>;
|
|
2038
|
+
getSettings(options?: RequestOptions): Promise<ApiResponse<ConferenceSettings>>;
|
|
2039
|
+
updateSettings(data: Partial<ConferenceSettings>, options?: RequestOptions): Promise<ApiResponse<ConferenceSettings>>;
|
|
2040
|
+
submitStats(callId: string, stats: WebrtcStats, options?: RequestOptions): Promise<ApiResponse<{
|
|
2041
|
+
success: boolean;
|
|
2042
|
+
}>>;
|
|
2043
|
+
}
|
|
2044
|
+
|
|
1860
2045
|
/**
|
|
1861
2046
|
* Social Service Module
|
|
1862
2047
|
*
|
|
@@ -5754,6 +5939,7 @@ declare class ScaleMule {
|
|
|
5754
5939
|
readonly video: VideoService;
|
|
5755
5940
|
readonly data: DataService;
|
|
5756
5941
|
readonly chat: ChatService;
|
|
5942
|
+
readonly conference: ConferenceService;
|
|
5757
5943
|
readonly social: SocialService;
|
|
5758
5944
|
readonly referrals: ReferralsService;
|
|
5759
5945
|
readonly billing: BillingService;
|
|
@@ -5854,4 +6040,4 @@ declare class ScaleMule {
|
|
|
5854
6040
|
getClient(): ScaleMuleClient;
|
|
5855
6041
|
}
|
|
5856
6042
|
|
|
5857
|
-
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 };
|
|
6043
|
+
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 CallParticipant, type CallSession, type CatalogEntry, CatalogService, type ChatMessage, type ChatReaction, ChatService, type ClaimResult, type Client, type ClientContext, type Collection, type Comment, CommunicationService, type CompletedPart, ComplianceService, type CompressionConfig, ConferenceService, type ConferenceSettings, 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 DirectoryUser, type DirectoryUserDetail, type DirectoryUsersListResponse, 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 JoinCallResponse, 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 SearchUsersParams, 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 WebrtcStats, 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.js
CHANGED
|
@@ -308,6 +308,7 @@ __export(index_exports, {
|
|
|
308
308
|
ChatService: () => ChatService,
|
|
309
309
|
CommunicationService: () => CommunicationService,
|
|
310
310
|
ComplianceService: () => ComplianceService,
|
|
311
|
+
ConferenceService: () => ConferenceService,
|
|
311
312
|
CreatorMakerService: () => CreatorMakerService,
|
|
312
313
|
DataService: () => DataService,
|
|
313
314
|
ErrorCodes: () => ErrorCodes,
|
|
@@ -1789,6 +1790,52 @@ var AuthService = class extends ServiceModule {
|
|
|
1789
1790
|
async me(options) {
|
|
1790
1791
|
return this._get("/me", options);
|
|
1791
1792
|
}
|
|
1793
|
+
// --------------------------------------------------------------------------
|
|
1794
|
+
// User directory (customer-scoped)
|
|
1795
|
+
// --------------------------------------------------------------------------
|
|
1796
|
+
//
|
|
1797
|
+
// Search / fetch users within the caller's application. These endpoints are
|
|
1798
|
+
// scoped by the gateway-injected x-app-id header, so when invoked with a
|
|
1799
|
+
// customer API key + user session they will only return users belonging to
|
|
1800
|
+
// the caller's application. They replace the prior pattern of customer apps
|
|
1801
|
+
// reaching for platform admin credentials to hit admin-only user routes.
|
|
1802
|
+
//
|
|
1803
|
+
// DO NOT call these with platform admin credentials from customer-facing
|
|
1804
|
+
// applications. Use the standard customer auth path (API key + user session)
|
|
1805
|
+
// and let the gateway inject x-app-id on your behalf.
|
|
1806
|
+
/**
|
|
1807
|
+
* Search users within the caller's application.
|
|
1808
|
+
*
|
|
1809
|
+
* Results are automatically scoped to the caller's application via the
|
|
1810
|
+
* x-app-id header injected by the gateway. Server-side page size is fixed
|
|
1811
|
+
* at 50 (the `per_page` query param is not honored upstream).
|
|
1812
|
+
*
|
|
1813
|
+
* @example
|
|
1814
|
+
* const res = await sm.auth.searchUsers({ search: 'alice' });
|
|
1815
|
+
* res.data?.users.forEach(u => console.log(u.email));
|
|
1816
|
+
*/
|
|
1817
|
+
async searchUsers(params, options) {
|
|
1818
|
+
const query = {};
|
|
1819
|
+
if (params?.search !== void 0) query.search = params.search;
|
|
1820
|
+
if (params?.status !== void 0) query.status = params.status;
|
|
1821
|
+
if (params?.email_verified !== void 0) {
|
|
1822
|
+
query.email_verified = params.email_verified ? "true" : "false";
|
|
1823
|
+
}
|
|
1824
|
+
if (params?.phone_verified !== void 0) {
|
|
1825
|
+
query.phone_verified = params.phone_verified ? "true" : "false";
|
|
1826
|
+
}
|
|
1827
|
+
if (params?.page !== void 0) query.page = params.page;
|
|
1828
|
+
return this._get(this.withQuery("/users", query), options);
|
|
1829
|
+
}
|
|
1830
|
+
/**
|
|
1831
|
+
* Fetch a single user by ID within the caller's application.
|
|
1832
|
+
*
|
|
1833
|
+
* Returns 404 if the user is not in the caller's application — cross-tenant
|
|
1834
|
+
* reads are blocked at the gateway via the x-app-id header scope.
|
|
1835
|
+
*/
|
|
1836
|
+
async getUser(userId, options) {
|
|
1837
|
+
return this._get(`/users/${encodeURIComponent(userId)}`, options);
|
|
1838
|
+
}
|
|
1792
1839
|
/** Refresh the session. Alias: refreshToken() */
|
|
1793
1840
|
async refreshSession(data, options) {
|
|
1794
1841
|
return this.post("/refresh", data ?? {}, options);
|
|
@@ -2980,7 +3027,10 @@ var StorageService = class extends ServiceModule {
|
|
|
2980
3027
|
const stallTimeout = DEFAULT_STALL_TIMEOUT_MS;
|
|
2981
3028
|
const controller = new AbortController();
|
|
2982
3029
|
let parentSignalCleanup;
|
|
2983
|
-
const combinedSignal = signal ? AbortSignal.any?.([
|
|
3030
|
+
const combinedSignal = signal ? AbortSignal.any?.([
|
|
3031
|
+
signal,
|
|
3032
|
+
controller.signal
|
|
3033
|
+
]) ?? (() => {
|
|
2984
3034
|
const onAbort = () => controller.abort();
|
|
2985
3035
|
signal.addEventListener("abort", onAbort, { once: true });
|
|
2986
3036
|
parentSignalCleanup = () => signal.removeEventListener("abort", onAbort);
|
|
@@ -3161,7 +3211,10 @@ var StorageService = class extends ServiceModule {
|
|
|
3161
3211
|
}
|
|
3162
3212
|
const controller = new AbortController();
|
|
3163
3213
|
let partSignalCleanup;
|
|
3164
|
-
const combinedSignal = signal ? AbortSignal.any?.([
|
|
3214
|
+
const combinedSignal = signal ? AbortSignal.any?.([
|
|
3215
|
+
signal,
|
|
3216
|
+
controller.signal
|
|
3217
|
+
]) ?? (() => {
|
|
3165
3218
|
const onAbort = () => controller.abort();
|
|
3166
3219
|
signal.addEventListener("abort", onAbort, { once: true });
|
|
3167
3220
|
partSignalCleanup = () => signal.removeEventListener("abort", onAbort);
|
|
@@ -4316,6 +4369,68 @@ var ChatService = class extends ServiceModule {
|
|
|
4316
4369
|
}
|
|
4317
4370
|
};
|
|
4318
4371
|
|
|
4372
|
+
// src/services/conference.ts
|
|
4373
|
+
var ConferenceService = class extends ServiceModule {
|
|
4374
|
+
constructor() {
|
|
4375
|
+
super(...arguments);
|
|
4376
|
+
this.basePath = "/v1/conference";
|
|
4377
|
+
}
|
|
4378
|
+
// --------------------------------------------------------------------------
|
|
4379
|
+
// Call Lifecycle
|
|
4380
|
+
// --------------------------------------------------------------------------
|
|
4381
|
+
async createCall(data, options) {
|
|
4382
|
+
return this.post("/calls", data, options);
|
|
4383
|
+
}
|
|
4384
|
+
async getCall(callId, options) {
|
|
4385
|
+
return this._get(`/calls/${callId}`, options);
|
|
4386
|
+
}
|
|
4387
|
+
async listCalls(params, options) {
|
|
4388
|
+
return this._get(this.withQuery("/calls", params), options);
|
|
4389
|
+
}
|
|
4390
|
+
async endCall(callId, options) {
|
|
4391
|
+
return this.post(`/calls/${callId}/end`, void 0, options);
|
|
4392
|
+
}
|
|
4393
|
+
// --------------------------------------------------------------------------
|
|
4394
|
+
// Participants
|
|
4395
|
+
// --------------------------------------------------------------------------
|
|
4396
|
+
async joinCall(callId, options) {
|
|
4397
|
+
return this.post(`/calls/${callId}/join`, void 0, options);
|
|
4398
|
+
}
|
|
4399
|
+
async leaveCall(callId, options) {
|
|
4400
|
+
return this.post(`/calls/${callId}/leave`, void 0, options);
|
|
4401
|
+
}
|
|
4402
|
+
async listParticipants(callId, options) {
|
|
4403
|
+
return this._get(`/calls/${callId}/participants`, options);
|
|
4404
|
+
}
|
|
4405
|
+
// --------------------------------------------------------------------------
|
|
4406
|
+
// Recording
|
|
4407
|
+
// --------------------------------------------------------------------------
|
|
4408
|
+
async startRecording(callId, options) {
|
|
4409
|
+
return this.post(`/calls/${callId}/recording/start`, void 0, options);
|
|
4410
|
+
}
|
|
4411
|
+
async stopRecording(callId, options) {
|
|
4412
|
+
return this.post(`/calls/${callId}/recording/stop`, void 0, options);
|
|
4413
|
+
}
|
|
4414
|
+
async consentToRecording(callId, options) {
|
|
4415
|
+
return this.post(`/calls/${callId}/recording/consent`, void 0, options);
|
|
4416
|
+
}
|
|
4417
|
+
// --------------------------------------------------------------------------
|
|
4418
|
+
// Settings
|
|
4419
|
+
// --------------------------------------------------------------------------
|
|
4420
|
+
async getSettings(options) {
|
|
4421
|
+
return this._get("/settings", options);
|
|
4422
|
+
}
|
|
4423
|
+
async updateSettings(data, options) {
|
|
4424
|
+
return this.put("/settings", data, options);
|
|
4425
|
+
}
|
|
4426
|
+
// --------------------------------------------------------------------------
|
|
4427
|
+
// Stats
|
|
4428
|
+
// --------------------------------------------------------------------------
|
|
4429
|
+
async submitStats(callId, stats, options) {
|
|
4430
|
+
return this.post(`/calls/${callId}/stats`, stats, options);
|
|
4431
|
+
}
|
|
4432
|
+
};
|
|
4433
|
+
|
|
4319
4434
|
// src/services/social.ts
|
|
4320
4435
|
var SocialService = class extends ServiceModule {
|
|
4321
4436
|
constructor() {
|
|
@@ -6772,6 +6887,7 @@ var ScaleMule = class {
|
|
|
6772
6887
|
this.video = new VideoService(this._client);
|
|
6773
6888
|
this.data = new DataService(this._client);
|
|
6774
6889
|
this.chat = new ChatService(this._client);
|
|
6890
|
+
this.conference = new ConferenceService(this._client);
|
|
6775
6891
|
this.social = new SocialService(this._client);
|
|
6776
6892
|
this.referrals = new ReferralsService(this._client);
|
|
6777
6893
|
this.billing = new BillingService(this._client);
|
|
@@ -6946,6 +7062,7 @@ var index_default = ScaleMule;
|
|
|
6946
7062
|
ChatService,
|
|
6947
7063
|
CommunicationService,
|
|
6948
7064
|
ComplianceService,
|
|
7065
|
+
ConferenceService,
|
|
6949
7066
|
CreatorMakerService,
|
|
6950
7067
|
DataService,
|
|
6951
7068
|
ErrorCodes,
|
package/dist/index.mjs
CHANGED
|
@@ -1421,6 +1421,52 @@ var AuthService = class extends ServiceModule {
|
|
|
1421
1421
|
async me(options) {
|
|
1422
1422
|
return this._get("/me", options);
|
|
1423
1423
|
}
|
|
1424
|
+
// --------------------------------------------------------------------------
|
|
1425
|
+
// User directory (customer-scoped)
|
|
1426
|
+
// --------------------------------------------------------------------------
|
|
1427
|
+
//
|
|
1428
|
+
// Search / fetch users within the caller's application. These endpoints are
|
|
1429
|
+
// scoped by the gateway-injected x-app-id header, so when invoked with a
|
|
1430
|
+
// customer API key + user session they will only return users belonging to
|
|
1431
|
+
// the caller's application. They replace the prior pattern of customer apps
|
|
1432
|
+
// reaching for platform admin credentials to hit admin-only user routes.
|
|
1433
|
+
//
|
|
1434
|
+
// DO NOT call these with platform admin credentials from customer-facing
|
|
1435
|
+
// applications. Use the standard customer auth path (API key + user session)
|
|
1436
|
+
// and let the gateway inject x-app-id on your behalf.
|
|
1437
|
+
/**
|
|
1438
|
+
* Search users within the caller's application.
|
|
1439
|
+
*
|
|
1440
|
+
* Results are automatically scoped to the caller's application via the
|
|
1441
|
+
* x-app-id header injected by the gateway. Server-side page size is fixed
|
|
1442
|
+
* at 50 (the `per_page` query param is not honored upstream).
|
|
1443
|
+
*
|
|
1444
|
+
* @example
|
|
1445
|
+
* const res = await sm.auth.searchUsers({ search: 'alice' });
|
|
1446
|
+
* res.data?.users.forEach(u => console.log(u.email));
|
|
1447
|
+
*/
|
|
1448
|
+
async searchUsers(params, options) {
|
|
1449
|
+
const query = {};
|
|
1450
|
+
if (params?.search !== void 0) query.search = params.search;
|
|
1451
|
+
if (params?.status !== void 0) query.status = params.status;
|
|
1452
|
+
if (params?.email_verified !== void 0) {
|
|
1453
|
+
query.email_verified = params.email_verified ? "true" : "false";
|
|
1454
|
+
}
|
|
1455
|
+
if (params?.phone_verified !== void 0) {
|
|
1456
|
+
query.phone_verified = params.phone_verified ? "true" : "false";
|
|
1457
|
+
}
|
|
1458
|
+
if (params?.page !== void 0) query.page = params.page;
|
|
1459
|
+
return this._get(this.withQuery("/users", query), options);
|
|
1460
|
+
}
|
|
1461
|
+
/**
|
|
1462
|
+
* Fetch a single user by ID within the caller's application.
|
|
1463
|
+
*
|
|
1464
|
+
* Returns 404 if the user is not in the caller's application — cross-tenant
|
|
1465
|
+
* reads are blocked at the gateway via the x-app-id header scope.
|
|
1466
|
+
*/
|
|
1467
|
+
async getUser(userId, options) {
|
|
1468
|
+
return this._get(`/users/${encodeURIComponent(userId)}`, options);
|
|
1469
|
+
}
|
|
1424
1470
|
/** Refresh the session. Alias: refreshToken() */
|
|
1425
1471
|
async refreshSession(data, options) {
|
|
1426
1472
|
return this.post("/refresh", data ?? {}, options);
|
|
@@ -2612,7 +2658,10 @@ var StorageService = class extends ServiceModule {
|
|
|
2612
2658
|
const stallTimeout = DEFAULT_STALL_TIMEOUT_MS;
|
|
2613
2659
|
const controller = new AbortController();
|
|
2614
2660
|
let parentSignalCleanup;
|
|
2615
|
-
const combinedSignal = signal ? AbortSignal.any?.([
|
|
2661
|
+
const combinedSignal = signal ? AbortSignal.any?.([
|
|
2662
|
+
signal,
|
|
2663
|
+
controller.signal
|
|
2664
|
+
]) ?? (() => {
|
|
2616
2665
|
const onAbort = () => controller.abort();
|
|
2617
2666
|
signal.addEventListener("abort", onAbort, { once: true });
|
|
2618
2667
|
parentSignalCleanup = () => signal.removeEventListener("abort", onAbort);
|
|
@@ -2793,7 +2842,10 @@ var StorageService = class extends ServiceModule {
|
|
|
2793
2842
|
}
|
|
2794
2843
|
const controller = new AbortController();
|
|
2795
2844
|
let partSignalCleanup;
|
|
2796
|
-
const combinedSignal = signal ? AbortSignal.any?.([
|
|
2845
|
+
const combinedSignal = signal ? AbortSignal.any?.([
|
|
2846
|
+
signal,
|
|
2847
|
+
controller.signal
|
|
2848
|
+
]) ?? (() => {
|
|
2797
2849
|
const onAbort = () => controller.abort();
|
|
2798
2850
|
signal.addEventListener("abort", onAbort, { once: true });
|
|
2799
2851
|
partSignalCleanup = () => signal.removeEventListener("abort", onAbort);
|
|
@@ -3945,6 +3997,68 @@ var ChatService = class extends ServiceModule {
|
|
|
3945
3997
|
}
|
|
3946
3998
|
};
|
|
3947
3999
|
|
|
4000
|
+
// src/services/conference.ts
|
|
4001
|
+
var ConferenceService = class extends ServiceModule {
|
|
4002
|
+
constructor() {
|
|
4003
|
+
super(...arguments);
|
|
4004
|
+
this.basePath = "/v1/conference";
|
|
4005
|
+
}
|
|
4006
|
+
// --------------------------------------------------------------------------
|
|
4007
|
+
// Call Lifecycle
|
|
4008
|
+
// --------------------------------------------------------------------------
|
|
4009
|
+
async createCall(data, options) {
|
|
4010
|
+
return this.post("/calls", data, options);
|
|
4011
|
+
}
|
|
4012
|
+
async getCall(callId, options) {
|
|
4013
|
+
return this._get(`/calls/${callId}`, options);
|
|
4014
|
+
}
|
|
4015
|
+
async listCalls(params, options) {
|
|
4016
|
+
return this._get(this.withQuery("/calls", params), options);
|
|
4017
|
+
}
|
|
4018
|
+
async endCall(callId, options) {
|
|
4019
|
+
return this.post(`/calls/${callId}/end`, void 0, options);
|
|
4020
|
+
}
|
|
4021
|
+
// --------------------------------------------------------------------------
|
|
4022
|
+
// Participants
|
|
4023
|
+
// --------------------------------------------------------------------------
|
|
4024
|
+
async joinCall(callId, options) {
|
|
4025
|
+
return this.post(`/calls/${callId}/join`, void 0, options);
|
|
4026
|
+
}
|
|
4027
|
+
async leaveCall(callId, options) {
|
|
4028
|
+
return this.post(`/calls/${callId}/leave`, void 0, options);
|
|
4029
|
+
}
|
|
4030
|
+
async listParticipants(callId, options) {
|
|
4031
|
+
return this._get(`/calls/${callId}/participants`, options);
|
|
4032
|
+
}
|
|
4033
|
+
// --------------------------------------------------------------------------
|
|
4034
|
+
// Recording
|
|
4035
|
+
// --------------------------------------------------------------------------
|
|
4036
|
+
async startRecording(callId, options) {
|
|
4037
|
+
return this.post(`/calls/${callId}/recording/start`, void 0, options);
|
|
4038
|
+
}
|
|
4039
|
+
async stopRecording(callId, options) {
|
|
4040
|
+
return this.post(`/calls/${callId}/recording/stop`, void 0, options);
|
|
4041
|
+
}
|
|
4042
|
+
async consentToRecording(callId, options) {
|
|
4043
|
+
return this.post(`/calls/${callId}/recording/consent`, void 0, options);
|
|
4044
|
+
}
|
|
4045
|
+
// --------------------------------------------------------------------------
|
|
4046
|
+
// Settings
|
|
4047
|
+
// --------------------------------------------------------------------------
|
|
4048
|
+
async getSettings(options) {
|
|
4049
|
+
return this._get("/settings", options);
|
|
4050
|
+
}
|
|
4051
|
+
async updateSettings(data, options) {
|
|
4052
|
+
return this.put("/settings", data, options);
|
|
4053
|
+
}
|
|
4054
|
+
// --------------------------------------------------------------------------
|
|
4055
|
+
// Stats
|
|
4056
|
+
// --------------------------------------------------------------------------
|
|
4057
|
+
async submitStats(callId, stats, options) {
|
|
4058
|
+
return this.post(`/calls/${callId}/stats`, stats, options);
|
|
4059
|
+
}
|
|
4060
|
+
};
|
|
4061
|
+
|
|
3948
4062
|
// src/services/social.ts
|
|
3949
4063
|
var SocialService = class extends ServiceModule {
|
|
3950
4064
|
constructor() {
|
|
@@ -6401,6 +6515,7 @@ var ScaleMule = class {
|
|
|
6401
6515
|
this.video = new VideoService(this._client);
|
|
6402
6516
|
this.data = new DataService(this._client);
|
|
6403
6517
|
this.chat = new ChatService(this._client);
|
|
6518
|
+
this.conference = new ConferenceService(this._client);
|
|
6404
6519
|
this.social = new SocialService(this._client);
|
|
6405
6520
|
this.referrals = new ReferralsService(this._client);
|
|
6406
6521
|
this.billing = new BillingService(this._client);
|
|
@@ -6574,6 +6689,7 @@ export {
|
|
|
6574
6689
|
ChatService,
|
|
6575
6690
|
CommunicationService,
|
|
6576
6691
|
ComplianceService,
|
|
6692
|
+
ConferenceService,
|
|
6577
6693
|
CreatorMakerService,
|
|
6578
6694
|
DataService,
|
|
6579
6695
|
ErrorCodes,
|