@scalemule/sdk 0.0.32 → 0.0.34
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 +90 -17
- package/dist/index.d.ts +90 -17
- package/dist/index.js +133 -33
- package/dist/index.mjs +133 -33
- 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;
|
|
@@ -1801,6 +1870,11 @@ interface ChatMessage {
|
|
|
1801
1870
|
attachments?: Attachment[];
|
|
1802
1871
|
is_edited: boolean;
|
|
1803
1872
|
created_at: string;
|
|
1873
|
+
thread_id?: string;
|
|
1874
|
+
reply_count?: number;
|
|
1875
|
+
latest_reply_at?: string;
|
|
1876
|
+
reply_user_ids?: string[];
|
|
1877
|
+
is_thread_broadcast?: boolean;
|
|
1804
1878
|
}
|
|
1805
1879
|
interface ReadStatus {
|
|
1806
1880
|
user_id: string;
|
|
@@ -1829,7 +1903,14 @@ declare class ChatService extends ServiceModule {
|
|
|
1829
1903
|
sendMessage(conversationId: string, data: {
|
|
1830
1904
|
content: string;
|
|
1831
1905
|
type?: string;
|
|
1906
|
+
thread_id?: string;
|
|
1907
|
+
is_thread_broadcast?: boolean;
|
|
1832
1908
|
}, options?: RequestOptions): Promise<ApiResponse<ChatMessage>>;
|
|
1909
|
+
getThreadReplies(messageId: string, params?: {
|
|
1910
|
+
limit?: number;
|
|
1911
|
+
before?: string;
|
|
1912
|
+
after?: string;
|
|
1913
|
+
}, requestOptions?: RequestOptions): Promise<ApiResponse<ChatMessage[]>>;
|
|
1833
1914
|
getMessages(conversationId: string, options?: {
|
|
1834
1915
|
limit?: number;
|
|
1835
1916
|
before?: string;
|
|
@@ -2165,18 +2246,11 @@ declare class ReferralsService extends ServiceModule {
|
|
|
2165
2246
|
/**
|
|
2166
2247
|
* Billing Service Module
|
|
2167
2248
|
*
|
|
2168
|
-
*
|
|
2249
|
+
* Compatibility wrapper for the remaining `/v1/money/billing/*` endpoints.
|
|
2169
2250
|
*
|
|
2170
2251
|
* Routes:
|
|
2171
2252
|
* POST /customers → create customer
|
|
2172
2253
|
* POST /payment-methods → add payment method
|
|
2173
|
-
* POST /subscriptions → create subscription
|
|
2174
|
-
* GET /subscriptions → list subscriptions
|
|
2175
|
-
* POST /subscriptions/{id}/cancel → cancel subscription
|
|
2176
|
-
* POST /subscriptions/{id}/resume → resume subscription
|
|
2177
|
-
* PATCH /subscriptions/{id}/upgrade → upgrade plan
|
|
2178
|
-
* POST /usage → report usage
|
|
2179
|
-
* GET /usage/summary → usage summary
|
|
2180
2254
|
* GET /invoices → list invoices
|
|
2181
2255
|
* GET /invoices/{id} → get invoice
|
|
2182
2256
|
* POST /invoices/{id}/pay → pay invoice
|
|
@@ -2185,18 +2259,14 @@ declare class ReferralsService extends ServiceModule {
|
|
|
2185
2259
|
* GET /connected-accounts/me → get own connected account
|
|
2186
2260
|
* GET /connected-accounts/{id} → get connected account
|
|
2187
2261
|
* POST /connected-accounts/{id}/onboarding-link → create onboarding link
|
|
2188
|
-
* GET /connected-accounts/{id}/balance → get account balance
|
|
2189
2262
|
* POST /connected-accounts/{id}/account-session → create account session (embedded onboarding)
|
|
2190
|
-
* POST /payments → create payment
|
|
2191
|
-
* GET /payments → list payments
|
|
2192
|
-
* GET /payments/{id} → get payment
|
|
2193
|
-
* POST /payments/{id}/refund → refund payment
|
|
2194
|
-
* GET /connected-accounts/{id}/payouts → payout history
|
|
2195
2263
|
* GET /connected-accounts/{id}/payout-schedule → get payout schedule
|
|
2196
2264
|
* PUT /connected-accounts/{id}/payout-schedule → set payout schedule
|
|
2197
|
-
* GET /transactions → ledger transactions
|
|
2198
|
-
* GET /transactions/summary → transaction summary
|
|
2199
2265
|
* POST /setup-sessions → create setup session
|
|
2266
|
+
*
|
|
2267
|
+
* Subscription lifecycle, usage, ledger, payment creation, and marketplace
|
|
2268
|
+
* settlement moved out of `money-billing` during the April 10, 2026 cutover.
|
|
2269
|
+
* Use `@scalemule/money` for the full money-service family.
|
|
2200
2270
|
*/
|
|
2201
2271
|
|
|
2202
2272
|
interface Customer {
|
|
@@ -2395,6 +2465,7 @@ interface ConnectedSubscriptionListParams extends PaginationParams {
|
|
|
2395
2465
|
}
|
|
2396
2466
|
declare class BillingService extends ServiceModule {
|
|
2397
2467
|
protected basePath: string;
|
|
2468
|
+
private retiredSurface;
|
|
2398
2469
|
createCustomer(data: {
|
|
2399
2470
|
email: string;
|
|
2400
2471
|
name?: string;
|
|
@@ -4612,6 +4683,7 @@ interface Application {
|
|
|
4612
4683
|
name: string;
|
|
4613
4684
|
description?: string;
|
|
4614
4685
|
api_key?: string;
|
|
4686
|
+
features?: string[];
|
|
4615
4687
|
created_at: string;
|
|
4616
4688
|
}
|
|
4617
4689
|
declare class AccountsService extends ServiceModule {
|
|
@@ -4624,6 +4696,7 @@ declare class AccountsService extends ServiceModule {
|
|
|
4624
4696
|
createApplication(data: {
|
|
4625
4697
|
name: string;
|
|
4626
4698
|
description?: string;
|
|
4699
|
+
features?: string[];
|
|
4627
4700
|
}, options?: RequestOptions): Promise<ApiResponse<Application>>;
|
|
4628
4701
|
getApplications(options?: RequestOptions): Promise<ApiResponse<Application[]>>;
|
|
4629
4702
|
}
|
|
@@ -5971,4 +6044,4 @@ declare class ScaleMule {
|
|
|
5971
6044
|
getClient(): ScaleMuleClient;
|
|
5972
6045
|
}
|
|
5973
6046
|
|
|
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 };
|
|
6047
|
+
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;
|
|
@@ -1801,6 +1870,11 @@ interface ChatMessage {
|
|
|
1801
1870
|
attachments?: Attachment[];
|
|
1802
1871
|
is_edited: boolean;
|
|
1803
1872
|
created_at: string;
|
|
1873
|
+
thread_id?: string;
|
|
1874
|
+
reply_count?: number;
|
|
1875
|
+
latest_reply_at?: string;
|
|
1876
|
+
reply_user_ids?: string[];
|
|
1877
|
+
is_thread_broadcast?: boolean;
|
|
1804
1878
|
}
|
|
1805
1879
|
interface ReadStatus {
|
|
1806
1880
|
user_id: string;
|
|
@@ -1829,7 +1903,14 @@ declare class ChatService extends ServiceModule {
|
|
|
1829
1903
|
sendMessage(conversationId: string, data: {
|
|
1830
1904
|
content: string;
|
|
1831
1905
|
type?: string;
|
|
1906
|
+
thread_id?: string;
|
|
1907
|
+
is_thread_broadcast?: boolean;
|
|
1832
1908
|
}, options?: RequestOptions): Promise<ApiResponse<ChatMessage>>;
|
|
1909
|
+
getThreadReplies(messageId: string, params?: {
|
|
1910
|
+
limit?: number;
|
|
1911
|
+
before?: string;
|
|
1912
|
+
after?: string;
|
|
1913
|
+
}, requestOptions?: RequestOptions): Promise<ApiResponse<ChatMessage[]>>;
|
|
1833
1914
|
getMessages(conversationId: string, options?: {
|
|
1834
1915
|
limit?: number;
|
|
1835
1916
|
before?: string;
|
|
@@ -2165,18 +2246,11 @@ declare class ReferralsService extends ServiceModule {
|
|
|
2165
2246
|
/**
|
|
2166
2247
|
* Billing Service Module
|
|
2167
2248
|
*
|
|
2168
|
-
*
|
|
2249
|
+
* Compatibility wrapper for the remaining `/v1/money/billing/*` endpoints.
|
|
2169
2250
|
*
|
|
2170
2251
|
* Routes:
|
|
2171
2252
|
* POST /customers → create customer
|
|
2172
2253
|
* POST /payment-methods → add payment method
|
|
2173
|
-
* POST /subscriptions → create subscription
|
|
2174
|
-
* GET /subscriptions → list subscriptions
|
|
2175
|
-
* POST /subscriptions/{id}/cancel → cancel subscription
|
|
2176
|
-
* POST /subscriptions/{id}/resume → resume subscription
|
|
2177
|
-
* PATCH /subscriptions/{id}/upgrade → upgrade plan
|
|
2178
|
-
* POST /usage → report usage
|
|
2179
|
-
* GET /usage/summary → usage summary
|
|
2180
2254
|
* GET /invoices → list invoices
|
|
2181
2255
|
* GET /invoices/{id} → get invoice
|
|
2182
2256
|
* POST /invoices/{id}/pay → pay invoice
|
|
@@ -2185,18 +2259,14 @@ declare class ReferralsService extends ServiceModule {
|
|
|
2185
2259
|
* GET /connected-accounts/me → get own connected account
|
|
2186
2260
|
* GET /connected-accounts/{id} → get connected account
|
|
2187
2261
|
* POST /connected-accounts/{id}/onboarding-link → create onboarding link
|
|
2188
|
-
* GET /connected-accounts/{id}/balance → get account balance
|
|
2189
2262
|
* POST /connected-accounts/{id}/account-session → create account session (embedded onboarding)
|
|
2190
|
-
* POST /payments → create payment
|
|
2191
|
-
* GET /payments → list payments
|
|
2192
|
-
* GET /payments/{id} → get payment
|
|
2193
|
-
* POST /payments/{id}/refund → refund payment
|
|
2194
|
-
* GET /connected-accounts/{id}/payouts → payout history
|
|
2195
2263
|
* GET /connected-accounts/{id}/payout-schedule → get payout schedule
|
|
2196
2264
|
* PUT /connected-accounts/{id}/payout-schedule → set payout schedule
|
|
2197
|
-
* GET /transactions → ledger transactions
|
|
2198
|
-
* GET /transactions/summary → transaction summary
|
|
2199
2265
|
* POST /setup-sessions → create setup session
|
|
2266
|
+
*
|
|
2267
|
+
* Subscription lifecycle, usage, ledger, payment creation, and marketplace
|
|
2268
|
+
* settlement moved out of `money-billing` during the April 10, 2026 cutover.
|
|
2269
|
+
* Use `@scalemule/money` for the full money-service family.
|
|
2200
2270
|
*/
|
|
2201
2271
|
|
|
2202
2272
|
interface Customer {
|
|
@@ -2395,6 +2465,7 @@ interface ConnectedSubscriptionListParams extends PaginationParams {
|
|
|
2395
2465
|
}
|
|
2396
2466
|
declare class BillingService extends ServiceModule {
|
|
2397
2467
|
protected basePath: string;
|
|
2468
|
+
private retiredSurface;
|
|
2398
2469
|
createCustomer(data: {
|
|
2399
2470
|
email: string;
|
|
2400
2471
|
name?: string;
|
|
@@ -4612,6 +4683,7 @@ interface Application {
|
|
|
4612
4683
|
name: string;
|
|
4613
4684
|
description?: string;
|
|
4614
4685
|
api_key?: string;
|
|
4686
|
+
features?: string[];
|
|
4615
4687
|
created_at: string;
|
|
4616
4688
|
}
|
|
4617
4689
|
declare class AccountsService extends ServiceModule {
|
|
@@ -4624,6 +4696,7 @@ declare class AccountsService extends ServiceModule {
|
|
|
4624
4696
|
createApplication(data: {
|
|
4625
4697
|
name: string;
|
|
4626
4698
|
description?: string;
|
|
4699
|
+
features?: string[];
|
|
4627
4700
|
}, options?: RequestOptions): Promise<ApiResponse<Application>>;
|
|
4628
4701
|
getApplications(options?: RequestOptions): Promise<ApiResponse<Application[]>>;
|
|
4629
4702
|
}
|
|
@@ -5971,4 +6044,4 @@ declare class ScaleMule {
|
|
|
5971
6044
|
getClient(): ScaleMuleClient;
|
|
5972
6045
|
}
|
|
5973
6046
|
|
|
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 };
|
|
6047
|
+
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);
|
|
@@ -4281,6 +4333,9 @@ var ChatService = class extends ServiceModule {
|
|
|
4281
4333
|
async sendMessage(conversationId, data, options) {
|
|
4282
4334
|
return this.post(`/conversations/${conversationId}/messages`, data, options);
|
|
4283
4335
|
}
|
|
4336
|
+
async getThreadReplies(messageId, params, requestOptions) {
|
|
4337
|
+
return this._get(this.withQuery(`/messages/${messageId}/replies`, params), requestOptions);
|
|
4338
|
+
}
|
|
4284
4339
|
async getMessages(conversationId, options, requestOptions) {
|
|
4285
4340
|
return this._get(
|
|
4286
4341
|
this.withQuery(`/conversations/${conversationId}/messages`, options),
|
|
@@ -4505,7 +4560,14 @@ var ReferralsService = class extends ServiceModule {
|
|
|
4505
4560
|
var BillingService = class extends ServiceModule {
|
|
4506
4561
|
constructor() {
|
|
4507
4562
|
super(...arguments);
|
|
4508
|
-
this.basePath = "/v1/billing";
|
|
4563
|
+
this.basePath = "/v1/money/billing";
|
|
4564
|
+
}
|
|
4565
|
+
retiredSurface(route) {
|
|
4566
|
+
return Promise.reject(
|
|
4567
|
+
new Error(
|
|
4568
|
+
`${route} was retired after the money-services cutover. Use the dedicated money services instead of BillingService for this operation.`
|
|
4569
|
+
)
|
|
4570
|
+
);
|
|
4509
4571
|
}
|
|
4510
4572
|
// --------------------------------------------------------------------------
|
|
4511
4573
|
// Customers
|
|
@@ -4520,28 +4582,39 @@ var BillingService = class extends ServiceModule {
|
|
|
4520
4582
|
// Subscriptions
|
|
4521
4583
|
// --------------------------------------------------------------------------
|
|
4522
4584
|
async subscribe(data, options) {
|
|
4523
|
-
|
|
4585
|
+
void data;
|
|
4586
|
+
void options;
|
|
4587
|
+
return this.retiredSurface("/v1/money/billing/subscriptions");
|
|
4524
4588
|
}
|
|
4525
4589
|
async listSubscriptions(params, options) {
|
|
4526
|
-
|
|
4590
|
+
void params;
|
|
4591
|
+
void options;
|
|
4592
|
+
return this.retiredSurface("/v1/money/billing/subscriptions");
|
|
4527
4593
|
}
|
|
4528
4594
|
async cancelSubscription(id, options) {
|
|
4529
|
-
|
|
4595
|
+
void options;
|
|
4596
|
+
return this.retiredSurface(`/v1/money/billing/subscriptions/${id}/cancel`);
|
|
4530
4597
|
}
|
|
4531
4598
|
async resumeSubscription(id, options) {
|
|
4532
|
-
|
|
4599
|
+
void options;
|
|
4600
|
+
return this.retiredSurface(`/v1/money/billing/subscriptions/${id}/resume`);
|
|
4533
4601
|
}
|
|
4534
4602
|
async upgradeSubscription(id, data, options) {
|
|
4535
|
-
|
|
4603
|
+
void data;
|
|
4604
|
+
void options;
|
|
4605
|
+
return this.retiredSurface(`/v1/money/billing/subscriptions/${id}/upgrade`);
|
|
4536
4606
|
}
|
|
4537
4607
|
// --------------------------------------------------------------------------
|
|
4538
4608
|
// Usage
|
|
4539
4609
|
// --------------------------------------------------------------------------
|
|
4540
4610
|
async reportUsage(data, options) {
|
|
4541
|
-
|
|
4611
|
+
void data;
|
|
4612
|
+
void options;
|
|
4613
|
+
return this.retiredSurface("/v1/money/billing/usage");
|
|
4542
4614
|
}
|
|
4543
4615
|
async getUsageSummary(options) {
|
|
4544
|
-
|
|
4616
|
+
void options;
|
|
4617
|
+
return this.retiredSurface("/v1/money/billing/usage/summary");
|
|
4545
4618
|
}
|
|
4546
4619
|
// --------------------------------------------------------------------------
|
|
4547
4620
|
// Invoices
|
|
@@ -4574,7 +4647,8 @@ var BillingService = class extends ServiceModule {
|
|
|
4574
4647
|
return this.post(`/connected-accounts/${id}/onboarding-link`, data, options);
|
|
4575
4648
|
}
|
|
4576
4649
|
async getAccountBalance(id, options) {
|
|
4577
|
-
|
|
4650
|
+
void options;
|
|
4651
|
+
return this.retiredSurface(`/v1/money/billing/connected-accounts/${id}/balance`);
|
|
4578
4652
|
}
|
|
4579
4653
|
async createAccountSession(id, options) {
|
|
4580
4654
|
return this.post(`/connected-accounts/${id}/account-session`, void 0, options);
|
|
@@ -4589,25 +4663,34 @@ var BillingService = class extends ServiceModule {
|
|
|
4589
4663
|
// Payments (Marketplace)
|
|
4590
4664
|
// --------------------------------------------------------------------------
|
|
4591
4665
|
async createPayment(data, options) {
|
|
4592
|
-
|
|
4666
|
+
void data;
|
|
4667
|
+
void options;
|
|
4668
|
+
return this.retiredSurface("/v1/money/billing/payments");
|
|
4593
4669
|
}
|
|
4594
4670
|
async getPayment(id, options) {
|
|
4595
|
-
|
|
4671
|
+
void options;
|
|
4672
|
+
return this.retiredSurface(`/v1/money/billing/payments/${id}`);
|
|
4596
4673
|
}
|
|
4597
4674
|
async listPayments(params, options) {
|
|
4598
|
-
|
|
4675
|
+
void params;
|
|
4676
|
+
void options;
|
|
4677
|
+
return this.retiredSurface("/v1/money/billing/payments");
|
|
4599
4678
|
}
|
|
4600
4679
|
// --------------------------------------------------------------------------
|
|
4601
4680
|
// Refunds
|
|
4602
4681
|
// --------------------------------------------------------------------------
|
|
4603
4682
|
async refundPayment(id, data, options) {
|
|
4604
|
-
|
|
4683
|
+
void data;
|
|
4684
|
+
void options;
|
|
4685
|
+
return this.retiredSurface(`/v1/money/billing/payments/${id}/refund`);
|
|
4605
4686
|
}
|
|
4606
4687
|
// --------------------------------------------------------------------------
|
|
4607
4688
|
// Payouts
|
|
4608
4689
|
// --------------------------------------------------------------------------
|
|
4609
4690
|
async getPayoutHistory(accountId, params, options) {
|
|
4610
|
-
|
|
4691
|
+
void params;
|
|
4692
|
+
void options;
|
|
4693
|
+
return this.retiredSurface(`/v1/money/billing/connected-accounts/${accountId}/payouts`);
|
|
4611
4694
|
}
|
|
4612
4695
|
async getPayoutSchedule(accountId, options) {
|
|
4613
4696
|
return this._get(`/connected-accounts/${accountId}/payout-schedule`, options);
|
|
@@ -4619,13 +4702,14 @@ var BillingService = class extends ServiceModule {
|
|
|
4619
4702
|
// Ledger
|
|
4620
4703
|
// --------------------------------------------------------------------------
|
|
4621
4704
|
async getTransactions(params, options) {
|
|
4622
|
-
|
|
4705
|
+
void params;
|
|
4706
|
+
void options;
|
|
4707
|
+
return this.retiredSurface("/v1/money/billing/transactions");
|
|
4623
4708
|
}
|
|
4624
4709
|
async getTransactionSummary(params, options) {
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
);
|
|
4710
|
+
void params;
|
|
4711
|
+
void options;
|
|
4712
|
+
return this.retiredSurface("/v1/money/billing/transactions/summary");
|
|
4629
4713
|
}
|
|
4630
4714
|
// --------------------------------------------------------------------------
|
|
4631
4715
|
// Setup Sessions
|
|
@@ -4637,35 +4721,51 @@ var BillingService = class extends ServiceModule {
|
|
|
4637
4721
|
// Connected Account Operations: Products, Prices, Subscriptions, Transfers
|
|
4638
4722
|
// --------------------------------------------------------------------------
|
|
4639
4723
|
async createProduct(data, options) {
|
|
4640
|
-
|
|
4724
|
+
void data;
|
|
4725
|
+
void options;
|
|
4726
|
+
return this.retiredSurface("/v1/money/billing/products");
|
|
4641
4727
|
}
|
|
4642
4728
|
async createPrice(data, options) {
|
|
4643
|
-
|
|
4729
|
+
void data;
|
|
4730
|
+
void options;
|
|
4731
|
+
return this.retiredSurface("/v1/money/billing/prices");
|
|
4644
4732
|
}
|
|
4645
4733
|
async deactivatePrice(id, options) {
|
|
4646
|
-
|
|
4734
|
+
void options;
|
|
4735
|
+
return this.retiredSurface(`/v1/money/billing/prices/${id}/deactivate`);
|
|
4647
4736
|
}
|
|
4648
4737
|
async createConnectedSubscription(data, options) {
|
|
4649
|
-
|
|
4738
|
+
void data;
|
|
4739
|
+
void options;
|
|
4740
|
+
return this.retiredSurface("/v1/money/billing/connected-subscriptions");
|
|
4650
4741
|
}
|
|
4651
4742
|
async cancelConnectedSubscription(id, data, options) {
|
|
4652
|
-
|
|
4743
|
+
void data;
|
|
4744
|
+
void options;
|
|
4745
|
+
return this.retiredSurface(
|
|
4746
|
+
`/v1/money/billing/connected-subscriptions/${id}/cancel`
|
|
4747
|
+
);
|
|
4653
4748
|
}
|
|
4654
4749
|
async listConnectedSubscriptions(params, options) {
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4750
|
+
void params;
|
|
4751
|
+
void options;
|
|
4752
|
+
return this.retiredSurface(
|
|
4753
|
+
"/v1/money/billing/connected-subscriptions"
|
|
4659
4754
|
);
|
|
4660
4755
|
}
|
|
4661
4756
|
async createConnectedSetupIntent(data, options) {
|
|
4662
|
-
|
|
4757
|
+
void data;
|
|
4758
|
+
void options;
|
|
4759
|
+
return this.retiredSurface("/v1/money/billing/connected-setup-intents");
|
|
4663
4760
|
}
|
|
4664
4761
|
async createTransfer(data, options) {
|
|
4665
|
-
|
|
4762
|
+
void data;
|
|
4763
|
+
void options;
|
|
4764
|
+
return this.retiredSurface("/v1/money/billing/transfers");
|
|
4666
4765
|
}
|
|
4667
4766
|
async syncPaymentStatus(id, options) {
|
|
4668
|
-
|
|
4767
|
+
void options;
|
|
4768
|
+
return this.retiredSurface(`/v1/money/billing/payments/${id}/sync`);
|
|
4669
4769
|
}
|
|
4670
4770
|
// --------------------------------------------------------------------------
|
|
4671
4771
|
// Legacy methods (backward compat)
|
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);
|
|
@@ -3909,6 +3961,9 @@ var ChatService = class extends ServiceModule {
|
|
|
3909
3961
|
async sendMessage(conversationId, data, options) {
|
|
3910
3962
|
return this.post(`/conversations/${conversationId}/messages`, data, options);
|
|
3911
3963
|
}
|
|
3964
|
+
async getThreadReplies(messageId, params, requestOptions) {
|
|
3965
|
+
return this._get(this.withQuery(`/messages/${messageId}/replies`, params), requestOptions);
|
|
3966
|
+
}
|
|
3912
3967
|
async getMessages(conversationId, options, requestOptions) {
|
|
3913
3968
|
return this._get(
|
|
3914
3969
|
this.withQuery(`/conversations/${conversationId}/messages`, options),
|
|
@@ -4133,7 +4188,14 @@ var ReferralsService = class extends ServiceModule {
|
|
|
4133
4188
|
var BillingService = class extends ServiceModule {
|
|
4134
4189
|
constructor() {
|
|
4135
4190
|
super(...arguments);
|
|
4136
|
-
this.basePath = "/v1/billing";
|
|
4191
|
+
this.basePath = "/v1/money/billing";
|
|
4192
|
+
}
|
|
4193
|
+
retiredSurface(route) {
|
|
4194
|
+
return Promise.reject(
|
|
4195
|
+
new Error(
|
|
4196
|
+
`${route} was retired after the money-services cutover. Use the dedicated money services instead of BillingService for this operation.`
|
|
4197
|
+
)
|
|
4198
|
+
);
|
|
4137
4199
|
}
|
|
4138
4200
|
// --------------------------------------------------------------------------
|
|
4139
4201
|
// Customers
|
|
@@ -4148,28 +4210,39 @@ var BillingService = class extends ServiceModule {
|
|
|
4148
4210
|
// Subscriptions
|
|
4149
4211
|
// --------------------------------------------------------------------------
|
|
4150
4212
|
async subscribe(data, options) {
|
|
4151
|
-
|
|
4213
|
+
void data;
|
|
4214
|
+
void options;
|
|
4215
|
+
return this.retiredSurface("/v1/money/billing/subscriptions");
|
|
4152
4216
|
}
|
|
4153
4217
|
async listSubscriptions(params, options) {
|
|
4154
|
-
|
|
4218
|
+
void params;
|
|
4219
|
+
void options;
|
|
4220
|
+
return this.retiredSurface("/v1/money/billing/subscriptions");
|
|
4155
4221
|
}
|
|
4156
4222
|
async cancelSubscription(id, options) {
|
|
4157
|
-
|
|
4223
|
+
void options;
|
|
4224
|
+
return this.retiredSurface(`/v1/money/billing/subscriptions/${id}/cancel`);
|
|
4158
4225
|
}
|
|
4159
4226
|
async resumeSubscription(id, options) {
|
|
4160
|
-
|
|
4227
|
+
void options;
|
|
4228
|
+
return this.retiredSurface(`/v1/money/billing/subscriptions/${id}/resume`);
|
|
4161
4229
|
}
|
|
4162
4230
|
async upgradeSubscription(id, data, options) {
|
|
4163
|
-
|
|
4231
|
+
void data;
|
|
4232
|
+
void options;
|
|
4233
|
+
return this.retiredSurface(`/v1/money/billing/subscriptions/${id}/upgrade`);
|
|
4164
4234
|
}
|
|
4165
4235
|
// --------------------------------------------------------------------------
|
|
4166
4236
|
// Usage
|
|
4167
4237
|
// --------------------------------------------------------------------------
|
|
4168
4238
|
async reportUsage(data, options) {
|
|
4169
|
-
|
|
4239
|
+
void data;
|
|
4240
|
+
void options;
|
|
4241
|
+
return this.retiredSurface("/v1/money/billing/usage");
|
|
4170
4242
|
}
|
|
4171
4243
|
async getUsageSummary(options) {
|
|
4172
|
-
|
|
4244
|
+
void options;
|
|
4245
|
+
return this.retiredSurface("/v1/money/billing/usage/summary");
|
|
4173
4246
|
}
|
|
4174
4247
|
// --------------------------------------------------------------------------
|
|
4175
4248
|
// Invoices
|
|
@@ -4202,7 +4275,8 @@ var BillingService = class extends ServiceModule {
|
|
|
4202
4275
|
return this.post(`/connected-accounts/${id}/onboarding-link`, data, options);
|
|
4203
4276
|
}
|
|
4204
4277
|
async getAccountBalance(id, options) {
|
|
4205
|
-
|
|
4278
|
+
void options;
|
|
4279
|
+
return this.retiredSurface(`/v1/money/billing/connected-accounts/${id}/balance`);
|
|
4206
4280
|
}
|
|
4207
4281
|
async createAccountSession(id, options) {
|
|
4208
4282
|
return this.post(`/connected-accounts/${id}/account-session`, void 0, options);
|
|
@@ -4217,25 +4291,34 @@ var BillingService = class extends ServiceModule {
|
|
|
4217
4291
|
// Payments (Marketplace)
|
|
4218
4292
|
// --------------------------------------------------------------------------
|
|
4219
4293
|
async createPayment(data, options) {
|
|
4220
|
-
|
|
4294
|
+
void data;
|
|
4295
|
+
void options;
|
|
4296
|
+
return this.retiredSurface("/v1/money/billing/payments");
|
|
4221
4297
|
}
|
|
4222
4298
|
async getPayment(id, options) {
|
|
4223
|
-
|
|
4299
|
+
void options;
|
|
4300
|
+
return this.retiredSurface(`/v1/money/billing/payments/${id}`);
|
|
4224
4301
|
}
|
|
4225
4302
|
async listPayments(params, options) {
|
|
4226
|
-
|
|
4303
|
+
void params;
|
|
4304
|
+
void options;
|
|
4305
|
+
return this.retiredSurface("/v1/money/billing/payments");
|
|
4227
4306
|
}
|
|
4228
4307
|
// --------------------------------------------------------------------------
|
|
4229
4308
|
// Refunds
|
|
4230
4309
|
// --------------------------------------------------------------------------
|
|
4231
4310
|
async refundPayment(id, data, options) {
|
|
4232
|
-
|
|
4311
|
+
void data;
|
|
4312
|
+
void options;
|
|
4313
|
+
return this.retiredSurface(`/v1/money/billing/payments/${id}/refund`);
|
|
4233
4314
|
}
|
|
4234
4315
|
// --------------------------------------------------------------------------
|
|
4235
4316
|
// Payouts
|
|
4236
4317
|
// --------------------------------------------------------------------------
|
|
4237
4318
|
async getPayoutHistory(accountId, params, options) {
|
|
4238
|
-
|
|
4319
|
+
void params;
|
|
4320
|
+
void options;
|
|
4321
|
+
return this.retiredSurface(`/v1/money/billing/connected-accounts/${accountId}/payouts`);
|
|
4239
4322
|
}
|
|
4240
4323
|
async getPayoutSchedule(accountId, options) {
|
|
4241
4324
|
return this._get(`/connected-accounts/${accountId}/payout-schedule`, options);
|
|
@@ -4247,13 +4330,14 @@ var BillingService = class extends ServiceModule {
|
|
|
4247
4330
|
// Ledger
|
|
4248
4331
|
// --------------------------------------------------------------------------
|
|
4249
4332
|
async getTransactions(params, options) {
|
|
4250
|
-
|
|
4333
|
+
void params;
|
|
4334
|
+
void options;
|
|
4335
|
+
return this.retiredSurface("/v1/money/billing/transactions");
|
|
4251
4336
|
}
|
|
4252
4337
|
async getTransactionSummary(params, options) {
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
);
|
|
4338
|
+
void params;
|
|
4339
|
+
void options;
|
|
4340
|
+
return this.retiredSurface("/v1/money/billing/transactions/summary");
|
|
4257
4341
|
}
|
|
4258
4342
|
// --------------------------------------------------------------------------
|
|
4259
4343
|
// Setup Sessions
|
|
@@ -4265,35 +4349,51 @@ var BillingService = class extends ServiceModule {
|
|
|
4265
4349
|
// Connected Account Operations: Products, Prices, Subscriptions, Transfers
|
|
4266
4350
|
// --------------------------------------------------------------------------
|
|
4267
4351
|
async createProduct(data, options) {
|
|
4268
|
-
|
|
4352
|
+
void data;
|
|
4353
|
+
void options;
|
|
4354
|
+
return this.retiredSurface("/v1/money/billing/products");
|
|
4269
4355
|
}
|
|
4270
4356
|
async createPrice(data, options) {
|
|
4271
|
-
|
|
4357
|
+
void data;
|
|
4358
|
+
void options;
|
|
4359
|
+
return this.retiredSurface("/v1/money/billing/prices");
|
|
4272
4360
|
}
|
|
4273
4361
|
async deactivatePrice(id, options) {
|
|
4274
|
-
|
|
4362
|
+
void options;
|
|
4363
|
+
return this.retiredSurface(`/v1/money/billing/prices/${id}/deactivate`);
|
|
4275
4364
|
}
|
|
4276
4365
|
async createConnectedSubscription(data, options) {
|
|
4277
|
-
|
|
4366
|
+
void data;
|
|
4367
|
+
void options;
|
|
4368
|
+
return this.retiredSurface("/v1/money/billing/connected-subscriptions");
|
|
4278
4369
|
}
|
|
4279
4370
|
async cancelConnectedSubscription(id, data, options) {
|
|
4280
|
-
|
|
4371
|
+
void data;
|
|
4372
|
+
void options;
|
|
4373
|
+
return this.retiredSurface(
|
|
4374
|
+
`/v1/money/billing/connected-subscriptions/${id}/cancel`
|
|
4375
|
+
);
|
|
4281
4376
|
}
|
|
4282
4377
|
async listConnectedSubscriptions(params, options) {
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4378
|
+
void params;
|
|
4379
|
+
void options;
|
|
4380
|
+
return this.retiredSurface(
|
|
4381
|
+
"/v1/money/billing/connected-subscriptions"
|
|
4287
4382
|
);
|
|
4288
4383
|
}
|
|
4289
4384
|
async createConnectedSetupIntent(data, options) {
|
|
4290
|
-
|
|
4385
|
+
void data;
|
|
4386
|
+
void options;
|
|
4387
|
+
return this.retiredSurface("/v1/money/billing/connected-setup-intents");
|
|
4291
4388
|
}
|
|
4292
4389
|
async createTransfer(data, options) {
|
|
4293
|
-
|
|
4390
|
+
void data;
|
|
4391
|
+
void options;
|
|
4392
|
+
return this.retiredSurface("/v1/money/billing/transfers");
|
|
4294
4393
|
}
|
|
4295
4394
|
async syncPaymentStatus(id, options) {
|
|
4296
|
-
|
|
4395
|
+
void options;
|
|
4396
|
+
return this.retiredSurface(`/v1/money/billing/payments/${id}/sync`);
|
|
4297
4397
|
}
|
|
4298
4398
|
// --------------------------------------------------------------------------
|
|
4299
4399
|
// Legacy methods (backward compat)
|