@scalemule/sdk 0.0.32 → 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 +70 -1
- package/dist/index.d.ts +70 -1
- package/dist/index.js +54 -2
- package/dist/index.mjs +54 -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;
|
|
@@ -5971,4 +6040,4 @@ declare class ScaleMule {
|
|
|
5971
6040
|
getClient(): ScaleMuleClient;
|
|
5972
6041
|
}
|
|
5973
6042
|
|
|
5974
|
-
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 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 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 };
|
|
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;
|
|
@@ -5971,4 +6040,4 @@ declare class ScaleMule {
|
|
|
5971
6040
|
getClient(): ScaleMuleClient;
|
|
5972
6041
|
}
|
|
5973
6042
|
|
|
5974
|
-
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 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 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 };
|
|
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
|
@@ -1790,6 +1790,52 @@ var AuthService = class extends ServiceModule {
|
|
|
1790
1790
|
async me(options) {
|
|
1791
1791
|
return this._get("/me", options);
|
|
1792
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
|
+
}
|
|
1793
1839
|
/** Refresh the session. Alias: refreshToken() */
|
|
1794
1840
|
async refreshSession(data, options) {
|
|
1795
1841
|
return this.post("/refresh", data ?? {}, options);
|
|
@@ -2981,7 +3027,10 @@ var StorageService = class extends ServiceModule {
|
|
|
2981
3027
|
const stallTimeout = DEFAULT_STALL_TIMEOUT_MS;
|
|
2982
3028
|
const controller = new AbortController();
|
|
2983
3029
|
let parentSignalCleanup;
|
|
2984
|
-
const combinedSignal = signal ? AbortSignal.any?.([
|
|
3030
|
+
const combinedSignal = signal ? AbortSignal.any?.([
|
|
3031
|
+
signal,
|
|
3032
|
+
controller.signal
|
|
3033
|
+
]) ?? (() => {
|
|
2985
3034
|
const onAbort = () => controller.abort();
|
|
2986
3035
|
signal.addEventListener("abort", onAbort, { once: true });
|
|
2987
3036
|
parentSignalCleanup = () => signal.removeEventListener("abort", onAbort);
|
|
@@ -3162,7 +3211,10 @@ var StorageService = class extends ServiceModule {
|
|
|
3162
3211
|
}
|
|
3163
3212
|
const controller = new AbortController();
|
|
3164
3213
|
let partSignalCleanup;
|
|
3165
|
-
const combinedSignal = signal ? AbortSignal.any?.([
|
|
3214
|
+
const combinedSignal = signal ? AbortSignal.any?.([
|
|
3215
|
+
signal,
|
|
3216
|
+
controller.signal
|
|
3217
|
+
]) ?? (() => {
|
|
3166
3218
|
const onAbort = () => controller.abort();
|
|
3167
3219
|
signal.addEventListener("abort", onAbort, { once: true });
|
|
3168
3220
|
partSignalCleanup = () => signal.removeEventListener("abort", onAbort);
|
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);
|