@scalemule/sdk 0.0.73 → 0.0.75
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 +109 -1
- package/dist/index.d.ts +109 -1
- package/dist/index.js +172 -2
- package/dist/index.mjs +160 -2
- package/package.json +3 -10
package/dist/index.d.mts
CHANGED
|
@@ -5154,6 +5154,8 @@ interface CommunityMapReactionDefinition {
|
|
|
5154
5154
|
icon: string;
|
|
5155
5155
|
}
|
|
5156
5156
|
interface CommunityMapCollectionConfig {
|
|
5157
|
+
voting_enabled?: boolean;
|
|
5158
|
+
comments_enabled?: boolean;
|
|
5157
5159
|
title: string;
|
|
5158
5160
|
description: string;
|
|
5159
5161
|
kind: string;
|
|
@@ -5230,6 +5232,48 @@ interface CommunityMapPage<T> {
|
|
|
5230
5232
|
items: T[];
|
|
5231
5233
|
next_cursor: string | null;
|
|
5232
5234
|
}
|
|
5235
|
+
interface CommunityMapVote {
|
|
5236
|
+
value: -1 | 0 | 1;
|
|
5237
|
+
up_count: number;
|
|
5238
|
+
down_count: number;
|
|
5239
|
+
score: number;
|
|
5240
|
+
can_vote: boolean;
|
|
5241
|
+
}
|
|
5242
|
+
interface CommunityMapComment {
|
|
5243
|
+
id: string;
|
|
5244
|
+
body: string;
|
|
5245
|
+
author_name: string | null;
|
|
5246
|
+
parent_comment_id: string | null;
|
|
5247
|
+
depth: number;
|
|
5248
|
+
status: 'approved';
|
|
5249
|
+
created_at: string;
|
|
5250
|
+
updated_at: string;
|
|
5251
|
+
}
|
|
5252
|
+
interface CommunityMapCommentInput {
|
|
5253
|
+
body: string;
|
|
5254
|
+
author_name: string;
|
|
5255
|
+
parent_comment_id?: string | null;
|
|
5256
|
+
consent: {
|
|
5257
|
+
version: string;
|
|
5258
|
+
accepted: boolean;
|
|
5259
|
+
};
|
|
5260
|
+
}
|
|
5261
|
+
interface CommunityMapCommentPage<T = CommunityMapComment> {
|
|
5262
|
+
items: T[];
|
|
5263
|
+
next_page: number | null;
|
|
5264
|
+
}
|
|
5265
|
+
interface CommunityMapEditorialComment extends Omit<CommunityMapComment, 'status'> {
|
|
5266
|
+
status: 'pending' | 'approved' | 'spam' | 'deleted';
|
|
5267
|
+
revision: number;
|
|
5268
|
+
thread_id: string;
|
|
5269
|
+
target_type: 'community_map_collection' | 'community_map_feature';
|
|
5270
|
+
target_id: string;
|
|
5271
|
+
scope_type: 'community_map_collection';
|
|
5272
|
+
scope_id: string;
|
|
5273
|
+
author_user_id: string | null;
|
|
5274
|
+
author_email: string | null;
|
|
5275
|
+
consent?: CommunityMapConsent | null;
|
|
5276
|
+
}
|
|
5233
5277
|
interface CommunityMapFeatureQuery {
|
|
5234
5278
|
after?: string;
|
|
5235
5279
|
limit?: number;
|
|
@@ -5264,6 +5308,34 @@ interface CommunityMapSubmissionInput {
|
|
|
5264
5308
|
idempotency_key: string;
|
|
5265
5309
|
proposal: CommunityMapProposal;
|
|
5266
5310
|
}
|
|
5311
|
+
interface CommunityMapOwnSubmission {
|
|
5312
|
+
id: string;
|
|
5313
|
+
area_id: string;
|
|
5314
|
+
status: CommunityMapSubmissionStatus;
|
|
5315
|
+
revision: number;
|
|
5316
|
+
editable: boolean;
|
|
5317
|
+
proposal: CommunityMapProposal;
|
|
5318
|
+
feature_id: string | null;
|
|
5319
|
+
created_at: string;
|
|
5320
|
+
media: {
|
|
5321
|
+
id: string;
|
|
5322
|
+
caption: string;
|
|
5323
|
+
attribution: string;
|
|
5324
|
+
content_type: string;
|
|
5325
|
+
status: string;
|
|
5326
|
+
}[];
|
|
5327
|
+
}
|
|
5328
|
+
interface CommunityMapOwnSubmissionPage extends CommunityMapPage<CommunityMapOwnSubmission> {
|
|
5329
|
+
reader_key: string;
|
|
5330
|
+
}
|
|
5331
|
+
interface CommunityMapSubmissionUpdate {
|
|
5332
|
+
expected_revision: number;
|
|
5333
|
+
proposal: CommunityMapProposal;
|
|
5334
|
+
consent: {
|
|
5335
|
+
version: string;
|
|
5336
|
+
accepted: boolean;
|
|
5337
|
+
};
|
|
5338
|
+
}
|
|
5267
5339
|
type CommunityMapReportReason = 'no-longer-exists' | 'incorrect-location' | 'incorrect-information' | 'inappropriate-media' | 'duplicate' | 'safety' | 'privacy-removal' | 'other';
|
|
5268
5340
|
interface CommunityMapReportInput {
|
|
5269
5341
|
reason: CommunityMapReportReason;
|
|
@@ -5367,10 +5439,13 @@ declare class CommunityMapsService extends ServiceModule {
|
|
|
5367
5439
|
listFeatures(slug: string, query?: CommunityMapFeatureQuery, options?: RequestOptions): Promise<ApiResponse<CommunityMapPage<CommunityMapFeature>>>;
|
|
5368
5440
|
getFeature(slug: string, id: string, options?: RequestOptions): Promise<ApiResponse<CommunityMapFeature>>;
|
|
5369
5441
|
createSubmission(slug: string, data: CommunityMapSubmissionInput, options?: RequestOptions): Promise<ApiResponse<CommunityMapReceipt>>;
|
|
5442
|
+
listOwnSubmissions(slug: string, after?: string, options?: RequestOptions): Promise<ApiResponse<CommunityMapOwnSubmissionPage>>;
|
|
5443
|
+
updateOwnSubmission(slug: string, id: string, data: CommunityMapSubmissionUpdate, options?: RequestOptions): Promise<ApiResponse<CommunityMapRevision>>;
|
|
5370
5444
|
uploadMedia(slug: string, submission: string, file: File | Blob, fields: {
|
|
5371
5445
|
caption: string;
|
|
5372
5446
|
attribution: string;
|
|
5373
5447
|
rights_confirmed: boolean;
|
|
5448
|
+
idempotency_key?: string;
|
|
5374
5449
|
consent_version: string;
|
|
5375
5450
|
}, options?: RequestOptions): Promise<ApiResponse<{
|
|
5376
5451
|
id: string;
|
|
@@ -5386,6 +5461,19 @@ declare class CommunityMapsService extends ServiceModule {
|
|
|
5386
5461
|
id: string;
|
|
5387
5462
|
status: string;
|
|
5388
5463
|
}>>;
|
|
5464
|
+
/** Read public totals and the signed-in reader's current vote. */
|
|
5465
|
+
getVote(slug: string, feature: string, options?: RequestOptions): Promise<ApiResponse<CommunityMapVote>>;
|
|
5466
|
+
/** One vote per signed-in reader: 1 up, -1 down, 0 clear. */
|
|
5467
|
+
vote(slug: string, feature: string, value: -1 | 0 | 1, options?: RequestOptions): Promise<ApiResponse<CommunityMapVote>>;
|
|
5468
|
+
listComments(slug: string, query?: {
|
|
5469
|
+
feature_id?: string;
|
|
5470
|
+
page?: number;
|
|
5471
|
+
}, options?: RequestOptions): Promise<ApiResponse<CommunityMapCommentPage>>;
|
|
5472
|
+
/** All Community Maps comments require editorial review, including authenticated replies. */
|
|
5473
|
+
createComment(slug: string, data: CommunityMapCommentInput, featureId?: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
5474
|
+
id: string;
|
|
5475
|
+
status: 'pending';
|
|
5476
|
+
}>>;
|
|
5389
5477
|
react(slug: string, feature: string, reaction: string, active?: boolean, options?: RequestOptions): Promise<ApiResponse<{
|
|
5390
5478
|
reaction: string;
|
|
5391
5479
|
active: boolean;
|
|
@@ -5402,6 +5490,16 @@ declare class CommunityMapsEditorialService extends ServiceModule {
|
|
|
5402
5490
|
constructor(client: ScaleMuleClient, applicationId?: string | undefined);
|
|
5403
5491
|
forApplication(id: string): CommunityMapsEditorialService;
|
|
5404
5492
|
private path;
|
|
5493
|
+
listComments(collection: string, query?: {
|
|
5494
|
+
feature_id?: string;
|
|
5495
|
+
page?: number;
|
|
5496
|
+
status?: CommunityMapEditorialComment['status'];
|
|
5497
|
+
}, options?: RequestOptions): Promise<ApiResponse<CommunityMapCommentPage<CommunityMapEditorialComment>>>;
|
|
5498
|
+
reviewComment(collection: string, comment: string, data: {
|
|
5499
|
+
status: CommunityMapEditorialComment['status'];
|
|
5500
|
+
expected_revision: number;
|
|
5501
|
+
guidelines_reviewed?: boolean;
|
|
5502
|
+
}, options?: RequestOptions): Promise<ApiResponse<CommunityMapEditorialComment>>;
|
|
5405
5503
|
listCollections(query?: CommunityMapQueueQuery, options?: RequestOptions): Promise<ApiResponse<CommunityMapPage<CommunityMapEditorialCollection>>>;
|
|
5406
5504
|
getCollection(id: string, options?: RequestOptions): Promise<ApiResponse<CommunityMapEditorialCollection>>;
|
|
5407
5505
|
createCollection(data: {
|
|
@@ -8065,6 +8163,16 @@ declare class AgentSessionsService extends ServiceModule {
|
|
|
8065
8163
|
listArtifacts(sessionId: string, options?: RequestOptions): Promise<ApiResponse<SessionArtifact[]>>;
|
|
8066
8164
|
}
|
|
8067
8165
|
|
|
8166
|
+
declare function prepareCommunityMapAttachment(file: File): Promise<File>;
|
|
8167
|
+
interface MediaCaptureSession {
|
|
8168
|
+
stream: MediaStream;
|
|
8169
|
+
result: Promise<File | null>;
|
|
8170
|
+
stop(): void;
|
|
8171
|
+
cancel(): void;
|
|
8172
|
+
}
|
|
8173
|
+
/** CoralMeet capture limits: 15s video / 60s voice, bounded bytes, tracks always released. */
|
|
8174
|
+
declare function startMediaCapture(kind: 'video' | 'audio', signal?: AbortSignal): Promise<MediaCaptureSession>;
|
|
8175
|
+
|
|
8068
8176
|
/**
|
|
8069
8177
|
* Main entry point for the ScaleMule SDK.
|
|
8070
8178
|
*
|
|
@@ -8213,4 +8321,4 @@ declare class ScaleMule {
|
|
|
8213
8321
|
getClient(): ScaleMuleClient;
|
|
8214
8322
|
}
|
|
8215
8323
|
|
|
8216
|
-
export { type AcceptQuoteInput, 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 AppointmentDepositValue, type Attachment, type Attendee, type AudioRegisterResult, AudioService, type AudioUploadViaStorageResult, type AuditLog, type AuthRegisterAgentRequest, type AuthRegisterAgentResponse, AuthService, type AuthSession, type AuthUser, type BackupCodes, BillingService, type BookingCompletionResult, BookingsService, 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 CommunityMapArea, type CommunityMapCanonicalArea, type CommunityMapCollection, type CommunityMapCollectionConfig, type CommunityMapConsent, type CommunityMapEditorialCollection, type CommunityMapEditorialFeature, type CommunityMapEditorialMedia, type CommunityMapFeature, type CommunityMapFeatureDraft, type CommunityMapFeatureQuery, type CommunityMapFeatureStatus, type CommunityMapGeometry, type CommunityMapMedia, type CommunityMapPage, type CommunityMapPosition, type CommunityMapPrecision, type CommunityMapPrivateReport, type CommunityMapPrivateSubmission, type CommunityMapProposal, type CommunityMapPublicContent, type CommunityMapQueueQuery, type CommunityMapReactionDefinition, type CommunityMapReceipt, type CommunityMapReportInput, type CommunityMapReportReason, type CommunityMapRevision, type CommunityMapSource, type CommunityMapSubmissionInput, type CommunityMapSubmissionPolicy, type CommunityMapSubmissionStatus, type CommunityMapView, CommunityMapsEditorialService, CommunityMapsGeographyService, CommunityMapsService, type CompletedPart, ComplianceService, type CompressionConfig, ConferenceService, type ConferenceSettings, type ConnectedAccount, type ConnectedAccountSubscription, type ConnectedSetupIntentResponse, type ConnectedSubscriptionListParams, type ConnectionStatus, type ContentFlag, type ContentPolicy, type Conversation, type CostReportDay, type CreateProjectInput as CreateCreatorProjectInput, type CreateFlagRequest, type CreateLeadInput, type CreatePollInput, type CreateQuoteInput, 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 CustomerStats, type DataAccessPolicy, type DataExport, DataService, type DataSource, type DeadLetterJob, type DecisionBatchItem, type DecisionBatchResult, type DecisionEvaluateOptions, type DecisionOutcome, type DecisionProposedAction, type DecisionReceipt, type DecisionResult, type DecisionTraceLevel, type DecisionVersions, DecisionsService, type DeviceInfo, type DirectoryUser, type DirectoryUserDetail, type DirectoryUsersListResponse, type Document, type ErrorCode, ErrorCodes, type EventAggregation, EventsService, type FileInfo, type FileStatus, 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, LEGACY_ANONYMOUS_ID_KEYS, type Lead, type Leaderboard, type LeaderboardEntry, LeaderboardService, LeadsService, 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, MEDIA_PRESETS, type MediaAsset, type MediaKind, type MediaManifest, type MediaManifestOptions, type MediaPolicy, type MediaPreset, type MediaPresetSpec, MediaService, type MediaUploadEvent, type MediaUploadOptions, type MediaUploadPhase, type MediaUploadResult, type MessageCallback, type MessagePin, 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 PinnedMessagesResponse, type Pipeline, type PipelineVersion, type Policy, type Poll, type PollBallot, type PollChoice, type PollChoiceInput, type PollListOptions, type PollMedia, type PollMediaKind, type PollStatus, PollsService, 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 Quote, type QuoteDeposit, type QuoteState, type ReadStatus, RealtimeService, type ReceiptVerification, 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, STORAGE_KEYS, 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 SocialContentProjection, type SocialContentProjectionInput, type SocialDiscoveryCreatorInput, type SocialPolicyAction, type SocialPolicyBatchDecisionItem, type SocialPolicyBatchDecisionRequest, type SocialPolicyBatchDecisionResponse, type SocialPolicyBatchDecisionTarget, type SocialPolicyBlockRequest, type SocialPolicyContactRequest, type SocialPolicyContactRequestListItem, type SocialPolicyContactRequestQuery, type SocialPolicyContactRequestRequest, type SocialPolicyContext, type SocialPolicyDecision, type SocialPolicyDecisionLimits, type SocialPolicyDecisionRequest, type SocialPolicyDecisionResponse, type SocialPolicyIdentity, type SocialPolicyIdentityType, type SocialPolicyMuteRequest, type SocialPolicyPolicyPack, type SocialPolicyRelationship, type SocialPolicyRelationshipQuery, type SocialPolicyRelationshipRequest, type SocialPolicyReportRequest, SocialPolicyService, type SocialPolicySettings, type SocialPolicyUnblockRequest, type SocialPolicyUpdateSettingsRequest, type SocialPost, SocialService, type SocialUser, type SsoConfig, type StatusCallback, type StorageAdapter, StorageService, type StorageSettings, 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 TtsAccessMode, type TtsAudioInfo, type TtsJobStatus, type TtsListVoicesParams, TtsService, type TtsSpeechMetadata, type TtsSpeechProfile, type TtsSynthesizeParams, type TtsSynthesizeQueuedResult, type TtsSynthesizeReadyResult, type TtsSynthesizeResult, type TtsVoice, type TtsVoicesResponse, type UnreadCountResponse, type UpdateFlagRequest, type UpdatePollInput, 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, type VoteState, 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, ensureAnonymousId, extractClientContext, generateAnonymousId, generateUploadSessionId, getMeasuredBandwidthMbps, getPartRange, hasMinRoleLevel, pollSharePercent, pollVoterKey, readAnonymousId, resolveStrategy, uploadMultipartToS3, uploadSingleToS3, validateIP };
|
|
8324
|
+
export { type AcceptQuoteInput, 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 AppointmentDepositValue, type Attachment, type Attendee, type AudioRegisterResult, AudioService, type AudioUploadViaStorageResult, type AuditLog, type AuthRegisterAgentRequest, type AuthRegisterAgentResponse, AuthService, type AuthSession, type AuthUser, type BackupCodes, BillingService, type BookingCompletionResult, BookingsService, 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 CommunityMapArea, type CommunityMapCanonicalArea, type CommunityMapCollection, type CommunityMapCollectionConfig, type CommunityMapComment, type CommunityMapCommentInput, type CommunityMapCommentPage, type CommunityMapConsent, type CommunityMapEditorialCollection, type CommunityMapEditorialComment, type CommunityMapEditorialFeature, type CommunityMapEditorialMedia, type CommunityMapFeature, type CommunityMapFeatureDraft, type CommunityMapFeatureQuery, type CommunityMapFeatureStatus, type CommunityMapGeometry, type CommunityMapMedia, type CommunityMapOwnSubmission, type CommunityMapOwnSubmissionPage, type CommunityMapPage, type CommunityMapPosition, type CommunityMapPrecision, type CommunityMapPrivateReport, type CommunityMapPrivateSubmission, type CommunityMapProposal, type CommunityMapPublicContent, type CommunityMapQueueQuery, type CommunityMapReactionDefinition, type CommunityMapReceipt, type CommunityMapReportInput, type CommunityMapReportReason, type CommunityMapRevision, type CommunityMapSource, type CommunityMapSubmissionInput, type CommunityMapSubmissionPolicy, type CommunityMapSubmissionStatus, type CommunityMapSubmissionUpdate, type CommunityMapView, type CommunityMapVote, CommunityMapsEditorialService, CommunityMapsGeographyService, CommunityMapsService, type CompletedPart, ComplianceService, type CompressionConfig, ConferenceService, type ConferenceSettings, type ConnectedAccount, type ConnectedAccountSubscription, type ConnectedSetupIntentResponse, type ConnectedSubscriptionListParams, type ConnectionStatus, type ContentFlag, type ContentPolicy, type Conversation, type CostReportDay, type CreateProjectInput as CreateCreatorProjectInput, type CreateFlagRequest, type CreateLeadInput, type CreatePollInput, type CreateQuoteInput, 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 CustomerStats, type DataAccessPolicy, type DataExport, DataService, type DataSource, type DeadLetterJob, type DecisionBatchItem, type DecisionBatchResult, type DecisionEvaluateOptions, type DecisionOutcome, type DecisionProposedAction, type DecisionReceipt, type DecisionResult, type DecisionTraceLevel, type DecisionVersions, DecisionsService, type DeviceInfo, type DirectoryUser, type DirectoryUserDetail, type DirectoryUsersListResponse, type Document, type ErrorCode, ErrorCodes, type EventAggregation, EventsService, type FileInfo, type FileStatus, 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, LEGACY_ANONYMOUS_ID_KEYS, type Lead, type Leaderboard, type LeaderboardEntry, LeaderboardService, LeadsService, 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, MEDIA_PRESETS, type MediaAsset, type MediaCaptureSession, type MediaKind, type MediaManifest, type MediaManifestOptions, type MediaPolicy, type MediaPreset, type MediaPresetSpec, MediaService, type MediaUploadEvent, type MediaUploadOptions, type MediaUploadPhase, type MediaUploadResult, type MessageCallback, type MessagePin, 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 PinnedMessagesResponse, type Pipeline, type PipelineVersion, type Policy, type Poll, type PollBallot, type PollChoice, type PollChoiceInput, type PollListOptions, type PollMedia, type PollMediaKind, type PollStatus, PollsService, 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 Quote, type QuoteDeposit, type QuoteState, type ReadStatus, RealtimeService, type ReceiptVerification, 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, STORAGE_KEYS, 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 SocialContentProjection, type SocialContentProjectionInput, type SocialDiscoveryCreatorInput, type SocialPolicyAction, type SocialPolicyBatchDecisionItem, type SocialPolicyBatchDecisionRequest, type SocialPolicyBatchDecisionResponse, type SocialPolicyBatchDecisionTarget, type SocialPolicyBlockRequest, type SocialPolicyContactRequest, type SocialPolicyContactRequestListItem, type SocialPolicyContactRequestQuery, type SocialPolicyContactRequestRequest, type SocialPolicyContext, type SocialPolicyDecision, type SocialPolicyDecisionLimits, type SocialPolicyDecisionRequest, type SocialPolicyDecisionResponse, type SocialPolicyIdentity, type SocialPolicyIdentityType, type SocialPolicyMuteRequest, type SocialPolicyPolicyPack, type SocialPolicyRelationship, type SocialPolicyRelationshipQuery, type SocialPolicyRelationshipRequest, type SocialPolicyReportRequest, SocialPolicyService, type SocialPolicySettings, type SocialPolicyUnblockRequest, type SocialPolicyUpdateSettingsRequest, type SocialPost, SocialService, type SocialUser, type SsoConfig, type StatusCallback, type StorageAdapter, StorageService, type StorageSettings, 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 TtsAccessMode, type TtsAudioInfo, type TtsJobStatus, type TtsListVoicesParams, TtsService, type TtsSpeechMetadata, type TtsSpeechProfile, type TtsSynthesizeParams, type TtsSynthesizeQueuedResult, type TtsSynthesizeReadyResult, type TtsSynthesizeResult, type TtsVoice, type TtsVoicesResponse, type UnreadCountResponse, type UpdateFlagRequest, type UpdatePollInput, 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, type VoteState, 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, ensureAnonymousId, extractClientContext, generateAnonymousId, generateUploadSessionId, getMeasuredBandwidthMbps, getPartRange, hasMinRoleLevel, pollSharePercent, pollVoterKey, prepareCommunityMapAttachment, readAnonymousId, resolveStrategy, startMediaCapture, uploadMultipartToS3, uploadSingleToS3, validateIP };
|
package/dist/index.d.ts
CHANGED
|
@@ -5154,6 +5154,8 @@ interface CommunityMapReactionDefinition {
|
|
|
5154
5154
|
icon: string;
|
|
5155
5155
|
}
|
|
5156
5156
|
interface CommunityMapCollectionConfig {
|
|
5157
|
+
voting_enabled?: boolean;
|
|
5158
|
+
comments_enabled?: boolean;
|
|
5157
5159
|
title: string;
|
|
5158
5160
|
description: string;
|
|
5159
5161
|
kind: string;
|
|
@@ -5230,6 +5232,48 @@ interface CommunityMapPage<T> {
|
|
|
5230
5232
|
items: T[];
|
|
5231
5233
|
next_cursor: string | null;
|
|
5232
5234
|
}
|
|
5235
|
+
interface CommunityMapVote {
|
|
5236
|
+
value: -1 | 0 | 1;
|
|
5237
|
+
up_count: number;
|
|
5238
|
+
down_count: number;
|
|
5239
|
+
score: number;
|
|
5240
|
+
can_vote: boolean;
|
|
5241
|
+
}
|
|
5242
|
+
interface CommunityMapComment {
|
|
5243
|
+
id: string;
|
|
5244
|
+
body: string;
|
|
5245
|
+
author_name: string | null;
|
|
5246
|
+
parent_comment_id: string | null;
|
|
5247
|
+
depth: number;
|
|
5248
|
+
status: 'approved';
|
|
5249
|
+
created_at: string;
|
|
5250
|
+
updated_at: string;
|
|
5251
|
+
}
|
|
5252
|
+
interface CommunityMapCommentInput {
|
|
5253
|
+
body: string;
|
|
5254
|
+
author_name: string;
|
|
5255
|
+
parent_comment_id?: string | null;
|
|
5256
|
+
consent: {
|
|
5257
|
+
version: string;
|
|
5258
|
+
accepted: boolean;
|
|
5259
|
+
};
|
|
5260
|
+
}
|
|
5261
|
+
interface CommunityMapCommentPage<T = CommunityMapComment> {
|
|
5262
|
+
items: T[];
|
|
5263
|
+
next_page: number | null;
|
|
5264
|
+
}
|
|
5265
|
+
interface CommunityMapEditorialComment extends Omit<CommunityMapComment, 'status'> {
|
|
5266
|
+
status: 'pending' | 'approved' | 'spam' | 'deleted';
|
|
5267
|
+
revision: number;
|
|
5268
|
+
thread_id: string;
|
|
5269
|
+
target_type: 'community_map_collection' | 'community_map_feature';
|
|
5270
|
+
target_id: string;
|
|
5271
|
+
scope_type: 'community_map_collection';
|
|
5272
|
+
scope_id: string;
|
|
5273
|
+
author_user_id: string | null;
|
|
5274
|
+
author_email: string | null;
|
|
5275
|
+
consent?: CommunityMapConsent | null;
|
|
5276
|
+
}
|
|
5233
5277
|
interface CommunityMapFeatureQuery {
|
|
5234
5278
|
after?: string;
|
|
5235
5279
|
limit?: number;
|
|
@@ -5264,6 +5308,34 @@ interface CommunityMapSubmissionInput {
|
|
|
5264
5308
|
idempotency_key: string;
|
|
5265
5309
|
proposal: CommunityMapProposal;
|
|
5266
5310
|
}
|
|
5311
|
+
interface CommunityMapOwnSubmission {
|
|
5312
|
+
id: string;
|
|
5313
|
+
area_id: string;
|
|
5314
|
+
status: CommunityMapSubmissionStatus;
|
|
5315
|
+
revision: number;
|
|
5316
|
+
editable: boolean;
|
|
5317
|
+
proposal: CommunityMapProposal;
|
|
5318
|
+
feature_id: string | null;
|
|
5319
|
+
created_at: string;
|
|
5320
|
+
media: {
|
|
5321
|
+
id: string;
|
|
5322
|
+
caption: string;
|
|
5323
|
+
attribution: string;
|
|
5324
|
+
content_type: string;
|
|
5325
|
+
status: string;
|
|
5326
|
+
}[];
|
|
5327
|
+
}
|
|
5328
|
+
interface CommunityMapOwnSubmissionPage extends CommunityMapPage<CommunityMapOwnSubmission> {
|
|
5329
|
+
reader_key: string;
|
|
5330
|
+
}
|
|
5331
|
+
interface CommunityMapSubmissionUpdate {
|
|
5332
|
+
expected_revision: number;
|
|
5333
|
+
proposal: CommunityMapProposal;
|
|
5334
|
+
consent: {
|
|
5335
|
+
version: string;
|
|
5336
|
+
accepted: boolean;
|
|
5337
|
+
};
|
|
5338
|
+
}
|
|
5267
5339
|
type CommunityMapReportReason = 'no-longer-exists' | 'incorrect-location' | 'incorrect-information' | 'inappropriate-media' | 'duplicate' | 'safety' | 'privacy-removal' | 'other';
|
|
5268
5340
|
interface CommunityMapReportInput {
|
|
5269
5341
|
reason: CommunityMapReportReason;
|
|
@@ -5367,10 +5439,13 @@ declare class CommunityMapsService extends ServiceModule {
|
|
|
5367
5439
|
listFeatures(slug: string, query?: CommunityMapFeatureQuery, options?: RequestOptions): Promise<ApiResponse<CommunityMapPage<CommunityMapFeature>>>;
|
|
5368
5440
|
getFeature(slug: string, id: string, options?: RequestOptions): Promise<ApiResponse<CommunityMapFeature>>;
|
|
5369
5441
|
createSubmission(slug: string, data: CommunityMapSubmissionInput, options?: RequestOptions): Promise<ApiResponse<CommunityMapReceipt>>;
|
|
5442
|
+
listOwnSubmissions(slug: string, after?: string, options?: RequestOptions): Promise<ApiResponse<CommunityMapOwnSubmissionPage>>;
|
|
5443
|
+
updateOwnSubmission(slug: string, id: string, data: CommunityMapSubmissionUpdate, options?: RequestOptions): Promise<ApiResponse<CommunityMapRevision>>;
|
|
5370
5444
|
uploadMedia(slug: string, submission: string, file: File | Blob, fields: {
|
|
5371
5445
|
caption: string;
|
|
5372
5446
|
attribution: string;
|
|
5373
5447
|
rights_confirmed: boolean;
|
|
5448
|
+
idempotency_key?: string;
|
|
5374
5449
|
consent_version: string;
|
|
5375
5450
|
}, options?: RequestOptions): Promise<ApiResponse<{
|
|
5376
5451
|
id: string;
|
|
@@ -5386,6 +5461,19 @@ declare class CommunityMapsService extends ServiceModule {
|
|
|
5386
5461
|
id: string;
|
|
5387
5462
|
status: string;
|
|
5388
5463
|
}>>;
|
|
5464
|
+
/** Read public totals and the signed-in reader's current vote. */
|
|
5465
|
+
getVote(slug: string, feature: string, options?: RequestOptions): Promise<ApiResponse<CommunityMapVote>>;
|
|
5466
|
+
/** One vote per signed-in reader: 1 up, -1 down, 0 clear. */
|
|
5467
|
+
vote(slug: string, feature: string, value: -1 | 0 | 1, options?: RequestOptions): Promise<ApiResponse<CommunityMapVote>>;
|
|
5468
|
+
listComments(slug: string, query?: {
|
|
5469
|
+
feature_id?: string;
|
|
5470
|
+
page?: number;
|
|
5471
|
+
}, options?: RequestOptions): Promise<ApiResponse<CommunityMapCommentPage>>;
|
|
5472
|
+
/** All Community Maps comments require editorial review, including authenticated replies. */
|
|
5473
|
+
createComment(slug: string, data: CommunityMapCommentInput, featureId?: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
5474
|
+
id: string;
|
|
5475
|
+
status: 'pending';
|
|
5476
|
+
}>>;
|
|
5389
5477
|
react(slug: string, feature: string, reaction: string, active?: boolean, options?: RequestOptions): Promise<ApiResponse<{
|
|
5390
5478
|
reaction: string;
|
|
5391
5479
|
active: boolean;
|
|
@@ -5402,6 +5490,16 @@ declare class CommunityMapsEditorialService extends ServiceModule {
|
|
|
5402
5490
|
constructor(client: ScaleMuleClient, applicationId?: string | undefined);
|
|
5403
5491
|
forApplication(id: string): CommunityMapsEditorialService;
|
|
5404
5492
|
private path;
|
|
5493
|
+
listComments(collection: string, query?: {
|
|
5494
|
+
feature_id?: string;
|
|
5495
|
+
page?: number;
|
|
5496
|
+
status?: CommunityMapEditorialComment['status'];
|
|
5497
|
+
}, options?: RequestOptions): Promise<ApiResponse<CommunityMapCommentPage<CommunityMapEditorialComment>>>;
|
|
5498
|
+
reviewComment(collection: string, comment: string, data: {
|
|
5499
|
+
status: CommunityMapEditorialComment['status'];
|
|
5500
|
+
expected_revision: number;
|
|
5501
|
+
guidelines_reviewed?: boolean;
|
|
5502
|
+
}, options?: RequestOptions): Promise<ApiResponse<CommunityMapEditorialComment>>;
|
|
5405
5503
|
listCollections(query?: CommunityMapQueueQuery, options?: RequestOptions): Promise<ApiResponse<CommunityMapPage<CommunityMapEditorialCollection>>>;
|
|
5406
5504
|
getCollection(id: string, options?: RequestOptions): Promise<ApiResponse<CommunityMapEditorialCollection>>;
|
|
5407
5505
|
createCollection(data: {
|
|
@@ -8065,6 +8163,16 @@ declare class AgentSessionsService extends ServiceModule {
|
|
|
8065
8163
|
listArtifacts(sessionId: string, options?: RequestOptions): Promise<ApiResponse<SessionArtifact[]>>;
|
|
8066
8164
|
}
|
|
8067
8165
|
|
|
8166
|
+
declare function prepareCommunityMapAttachment(file: File): Promise<File>;
|
|
8167
|
+
interface MediaCaptureSession {
|
|
8168
|
+
stream: MediaStream;
|
|
8169
|
+
result: Promise<File | null>;
|
|
8170
|
+
stop(): void;
|
|
8171
|
+
cancel(): void;
|
|
8172
|
+
}
|
|
8173
|
+
/** CoralMeet capture limits: 15s video / 60s voice, bounded bytes, tracks always released. */
|
|
8174
|
+
declare function startMediaCapture(kind: 'video' | 'audio', signal?: AbortSignal): Promise<MediaCaptureSession>;
|
|
8175
|
+
|
|
8068
8176
|
/**
|
|
8069
8177
|
* Main entry point for the ScaleMule SDK.
|
|
8070
8178
|
*
|
|
@@ -8213,4 +8321,4 @@ declare class ScaleMule {
|
|
|
8213
8321
|
getClient(): ScaleMuleClient;
|
|
8214
8322
|
}
|
|
8215
8323
|
|
|
8216
|
-
export { type AcceptQuoteInput, 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 AppointmentDepositValue, type Attachment, type Attendee, type AudioRegisterResult, AudioService, type AudioUploadViaStorageResult, type AuditLog, type AuthRegisterAgentRequest, type AuthRegisterAgentResponse, AuthService, type AuthSession, type AuthUser, type BackupCodes, BillingService, type BookingCompletionResult, BookingsService, 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 CommunityMapArea, type CommunityMapCanonicalArea, type CommunityMapCollection, type CommunityMapCollectionConfig, type CommunityMapConsent, type CommunityMapEditorialCollection, type CommunityMapEditorialFeature, type CommunityMapEditorialMedia, type CommunityMapFeature, type CommunityMapFeatureDraft, type CommunityMapFeatureQuery, type CommunityMapFeatureStatus, type CommunityMapGeometry, type CommunityMapMedia, type CommunityMapPage, type CommunityMapPosition, type CommunityMapPrecision, type CommunityMapPrivateReport, type CommunityMapPrivateSubmission, type CommunityMapProposal, type CommunityMapPublicContent, type CommunityMapQueueQuery, type CommunityMapReactionDefinition, type CommunityMapReceipt, type CommunityMapReportInput, type CommunityMapReportReason, type CommunityMapRevision, type CommunityMapSource, type CommunityMapSubmissionInput, type CommunityMapSubmissionPolicy, type CommunityMapSubmissionStatus, type CommunityMapView, CommunityMapsEditorialService, CommunityMapsGeographyService, CommunityMapsService, type CompletedPart, ComplianceService, type CompressionConfig, ConferenceService, type ConferenceSettings, type ConnectedAccount, type ConnectedAccountSubscription, type ConnectedSetupIntentResponse, type ConnectedSubscriptionListParams, type ConnectionStatus, type ContentFlag, type ContentPolicy, type Conversation, type CostReportDay, type CreateProjectInput as CreateCreatorProjectInput, type CreateFlagRequest, type CreateLeadInput, type CreatePollInput, type CreateQuoteInput, 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 CustomerStats, type DataAccessPolicy, type DataExport, DataService, type DataSource, type DeadLetterJob, type DecisionBatchItem, type DecisionBatchResult, type DecisionEvaluateOptions, type DecisionOutcome, type DecisionProposedAction, type DecisionReceipt, type DecisionResult, type DecisionTraceLevel, type DecisionVersions, DecisionsService, type DeviceInfo, type DirectoryUser, type DirectoryUserDetail, type DirectoryUsersListResponse, type Document, type ErrorCode, ErrorCodes, type EventAggregation, EventsService, type FileInfo, type FileStatus, 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, LEGACY_ANONYMOUS_ID_KEYS, type Lead, type Leaderboard, type LeaderboardEntry, LeaderboardService, LeadsService, 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, MEDIA_PRESETS, type MediaAsset, type MediaKind, type MediaManifest, type MediaManifestOptions, type MediaPolicy, type MediaPreset, type MediaPresetSpec, MediaService, type MediaUploadEvent, type MediaUploadOptions, type MediaUploadPhase, type MediaUploadResult, type MessageCallback, type MessagePin, 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 PinnedMessagesResponse, type Pipeline, type PipelineVersion, type Policy, type Poll, type PollBallot, type PollChoice, type PollChoiceInput, type PollListOptions, type PollMedia, type PollMediaKind, type PollStatus, PollsService, 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 Quote, type QuoteDeposit, type QuoteState, type ReadStatus, RealtimeService, type ReceiptVerification, 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, STORAGE_KEYS, 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 SocialContentProjection, type SocialContentProjectionInput, type SocialDiscoveryCreatorInput, type SocialPolicyAction, type SocialPolicyBatchDecisionItem, type SocialPolicyBatchDecisionRequest, type SocialPolicyBatchDecisionResponse, type SocialPolicyBatchDecisionTarget, type SocialPolicyBlockRequest, type SocialPolicyContactRequest, type SocialPolicyContactRequestListItem, type SocialPolicyContactRequestQuery, type SocialPolicyContactRequestRequest, type SocialPolicyContext, type SocialPolicyDecision, type SocialPolicyDecisionLimits, type SocialPolicyDecisionRequest, type SocialPolicyDecisionResponse, type SocialPolicyIdentity, type SocialPolicyIdentityType, type SocialPolicyMuteRequest, type SocialPolicyPolicyPack, type SocialPolicyRelationship, type SocialPolicyRelationshipQuery, type SocialPolicyRelationshipRequest, type SocialPolicyReportRequest, SocialPolicyService, type SocialPolicySettings, type SocialPolicyUnblockRequest, type SocialPolicyUpdateSettingsRequest, type SocialPost, SocialService, type SocialUser, type SsoConfig, type StatusCallback, type StorageAdapter, StorageService, type StorageSettings, 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 TtsAccessMode, type TtsAudioInfo, type TtsJobStatus, type TtsListVoicesParams, TtsService, type TtsSpeechMetadata, type TtsSpeechProfile, type TtsSynthesizeParams, type TtsSynthesizeQueuedResult, type TtsSynthesizeReadyResult, type TtsSynthesizeResult, type TtsVoice, type TtsVoicesResponse, type UnreadCountResponse, type UpdateFlagRequest, type UpdatePollInput, 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, type VoteState, 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, ensureAnonymousId, extractClientContext, generateAnonymousId, generateUploadSessionId, getMeasuredBandwidthMbps, getPartRange, hasMinRoleLevel, pollSharePercent, pollVoterKey, readAnonymousId, resolveStrategy, uploadMultipartToS3, uploadSingleToS3, validateIP };
|
|
8324
|
+
export { type AcceptQuoteInput, 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 AppointmentDepositValue, type Attachment, type Attendee, type AudioRegisterResult, AudioService, type AudioUploadViaStorageResult, type AuditLog, type AuthRegisterAgentRequest, type AuthRegisterAgentResponse, AuthService, type AuthSession, type AuthUser, type BackupCodes, BillingService, type BookingCompletionResult, BookingsService, 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 CommunityMapArea, type CommunityMapCanonicalArea, type CommunityMapCollection, type CommunityMapCollectionConfig, type CommunityMapComment, type CommunityMapCommentInput, type CommunityMapCommentPage, type CommunityMapConsent, type CommunityMapEditorialCollection, type CommunityMapEditorialComment, type CommunityMapEditorialFeature, type CommunityMapEditorialMedia, type CommunityMapFeature, type CommunityMapFeatureDraft, type CommunityMapFeatureQuery, type CommunityMapFeatureStatus, type CommunityMapGeometry, type CommunityMapMedia, type CommunityMapOwnSubmission, type CommunityMapOwnSubmissionPage, type CommunityMapPage, type CommunityMapPosition, type CommunityMapPrecision, type CommunityMapPrivateReport, type CommunityMapPrivateSubmission, type CommunityMapProposal, type CommunityMapPublicContent, type CommunityMapQueueQuery, type CommunityMapReactionDefinition, type CommunityMapReceipt, type CommunityMapReportInput, type CommunityMapReportReason, type CommunityMapRevision, type CommunityMapSource, type CommunityMapSubmissionInput, type CommunityMapSubmissionPolicy, type CommunityMapSubmissionStatus, type CommunityMapSubmissionUpdate, type CommunityMapView, type CommunityMapVote, CommunityMapsEditorialService, CommunityMapsGeographyService, CommunityMapsService, type CompletedPart, ComplianceService, type CompressionConfig, ConferenceService, type ConferenceSettings, type ConnectedAccount, type ConnectedAccountSubscription, type ConnectedSetupIntentResponse, type ConnectedSubscriptionListParams, type ConnectionStatus, type ContentFlag, type ContentPolicy, type Conversation, type CostReportDay, type CreateProjectInput as CreateCreatorProjectInput, type CreateFlagRequest, type CreateLeadInput, type CreatePollInput, type CreateQuoteInput, 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 CustomerStats, type DataAccessPolicy, type DataExport, DataService, type DataSource, type DeadLetterJob, type DecisionBatchItem, type DecisionBatchResult, type DecisionEvaluateOptions, type DecisionOutcome, type DecisionProposedAction, type DecisionReceipt, type DecisionResult, type DecisionTraceLevel, type DecisionVersions, DecisionsService, type DeviceInfo, type DirectoryUser, type DirectoryUserDetail, type DirectoryUsersListResponse, type Document, type ErrorCode, ErrorCodes, type EventAggregation, EventsService, type FileInfo, type FileStatus, 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, LEGACY_ANONYMOUS_ID_KEYS, type Lead, type Leaderboard, type LeaderboardEntry, LeaderboardService, LeadsService, 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, MEDIA_PRESETS, type MediaAsset, type MediaCaptureSession, type MediaKind, type MediaManifest, type MediaManifestOptions, type MediaPolicy, type MediaPreset, type MediaPresetSpec, MediaService, type MediaUploadEvent, type MediaUploadOptions, type MediaUploadPhase, type MediaUploadResult, type MessageCallback, type MessagePin, 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 PinnedMessagesResponse, type Pipeline, type PipelineVersion, type Policy, type Poll, type PollBallot, type PollChoice, type PollChoiceInput, type PollListOptions, type PollMedia, type PollMediaKind, type PollStatus, PollsService, 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 Quote, type QuoteDeposit, type QuoteState, type ReadStatus, RealtimeService, type ReceiptVerification, 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, STORAGE_KEYS, 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 SocialContentProjection, type SocialContentProjectionInput, type SocialDiscoveryCreatorInput, type SocialPolicyAction, type SocialPolicyBatchDecisionItem, type SocialPolicyBatchDecisionRequest, type SocialPolicyBatchDecisionResponse, type SocialPolicyBatchDecisionTarget, type SocialPolicyBlockRequest, type SocialPolicyContactRequest, type SocialPolicyContactRequestListItem, type SocialPolicyContactRequestQuery, type SocialPolicyContactRequestRequest, type SocialPolicyContext, type SocialPolicyDecision, type SocialPolicyDecisionLimits, type SocialPolicyDecisionRequest, type SocialPolicyDecisionResponse, type SocialPolicyIdentity, type SocialPolicyIdentityType, type SocialPolicyMuteRequest, type SocialPolicyPolicyPack, type SocialPolicyRelationship, type SocialPolicyRelationshipQuery, type SocialPolicyRelationshipRequest, type SocialPolicyReportRequest, SocialPolicyService, type SocialPolicySettings, type SocialPolicyUnblockRequest, type SocialPolicyUpdateSettingsRequest, type SocialPost, SocialService, type SocialUser, type SsoConfig, type StatusCallback, type StorageAdapter, StorageService, type StorageSettings, 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 TtsAccessMode, type TtsAudioInfo, type TtsJobStatus, type TtsListVoicesParams, TtsService, type TtsSpeechMetadata, type TtsSpeechProfile, type TtsSynthesizeParams, type TtsSynthesizeQueuedResult, type TtsSynthesizeReadyResult, type TtsSynthesizeResult, type TtsVoice, type TtsVoicesResponse, type UnreadCountResponse, type UpdateFlagRequest, type UpdatePollInput, 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, type VoteState, 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, ensureAnonymousId, extractClientContext, generateAnonymousId, generateUploadSessionId, getMeasuredBandwidthMbps, getPartRange, hasMinRoleLevel, pollSharePercent, pollVoterKey, prepareCommunityMapAttachment, readAnonymousId, resolveStrategy, startMediaCapture, uploadMultipartToS3, uploadSingleToS3, validateIP };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __esm = (fn, res) => function __init() {
|
|
7
9
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
@@ -18,6 +20,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
20
|
}
|
|
19
21
|
return to;
|
|
20
22
|
};
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
24
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
25
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
26
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
27
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
28
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
29
|
+
mod
|
|
30
|
+
));
|
|
21
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
32
|
|
|
23
33
|
// src/services/upload-resume.ts
|
|
@@ -258,7 +268,7 @@ async function loadImageCompression() {
|
|
|
258
268
|
if (cachedImport === false) return null;
|
|
259
269
|
if (cachedImport) return cachedImport;
|
|
260
270
|
try {
|
|
261
|
-
const mod = await
|
|
271
|
+
const mod = await import("browser-image-compression");
|
|
262
272
|
cachedImport = mod.default || mod;
|
|
263
273
|
return cachedImport;
|
|
264
274
|
} catch {
|
|
@@ -382,8 +392,10 @@ __export(index_exports, {
|
|
|
382
392
|
normalizePhoneNumber: () => normalizePhoneNumber,
|
|
383
393
|
pollSharePercent: () => pollSharePercent,
|
|
384
394
|
pollVoterKey: () => pollVoterKey,
|
|
395
|
+
prepareCommunityMapAttachment: () => prepareCommunityMapAttachment,
|
|
385
396
|
readAnonymousId: () => readAnonymousId,
|
|
386
397
|
resolveStrategy: () => resolveStrategy,
|
|
398
|
+
startMediaCapture: () => startMediaCapture,
|
|
387
399
|
uploadMultipartToS3: () => uploadMultipartToS3,
|
|
388
400
|
uploadSingleToS3: () => uploadSingleToS3,
|
|
389
401
|
validateIP: () => validateIP
|
|
@@ -6951,6 +6963,15 @@ var CommunityMapsService = class extends ServiceModule {
|
|
|
6951
6963
|
createSubmission(slug, data, options) {
|
|
6952
6964
|
return this.post("/collections/" + segment(slug) + "/submissions", data, options);
|
|
6953
6965
|
}
|
|
6966
|
+
listOwnSubmissions(slug, after, options) {
|
|
6967
|
+
return this._get(
|
|
6968
|
+
"/collections/" + segment(slug) + "/submissions" + (after ? "?after=" + segment(after) : ""),
|
|
6969
|
+
options
|
|
6970
|
+
);
|
|
6971
|
+
}
|
|
6972
|
+
updateOwnSubmission(slug, id, data, options) {
|
|
6973
|
+
return this.post("/collections/" + segment(slug) + "/submissions/" + segment(id), data, options);
|
|
6974
|
+
}
|
|
6954
6975
|
uploadMedia(slug, submission, file, fields, options) {
|
|
6955
6976
|
return this._upload(
|
|
6956
6977
|
"/collections/" + segment(slug) + "/submissions/" + segment(submission) + "/media",
|
|
@@ -6959,7 +6980,8 @@ var CommunityMapsService = class extends ServiceModule {
|
|
|
6959
6980
|
caption: fields.caption,
|
|
6960
6981
|
attribution: fields.attribution,
|
|
6961
6982
|
rights_confirmed: String(fields.rights_confirmed),
|
|
6962
|
-
consent_version: fields.consent_version
|
|
6983
|
+
consent_version: fields.consent_version,
|
|
6984
|
+
...fields.idempotency_key ? { idempotency_key: fields.idempotency_key } : {}
|
|
6963
6985
|
},
|
|
6964
6986
|
options
|
|
6965
6987
|
);
|
|
@@ -6974,6 +6996,25 @@ var CommunityMapsService = class extends ServiceModule {
|
|
|
6974
6996
|
options
|
|
6975
6997
|
);
|
|
6976
6998
|
}
|
|
6999
|
+
/** Read public totals and the signed-in reader's current vote. */
|
|
7000
|
+
getVote(slug, feature, options) {
|
|
7001
|
+
return this._get("/collections/" + segment(slug) + "/features/" + segment(feature) + "/vote", options);
|
|
7002
|
+
}
|
|
7003
|
+
/** One vote per signed-in reader: 1 up, -1 down, 0 clear. */
|
|
7004
|
+
vote(slug, feature, value, options) {
|
|
7005
|
+
return this.post("/collections/" + segment(slug) + "/features/" + segment(feature) + "/vote", { value }, options);
|
|
7006
|
+
}
|
|
7007
|
+
listComments(slug, query = {}, options) {
|
|
7008
|
+
return this._get(this.withQuery("/collections/" + segment(slug) + "/comments", query), options);
|
|
7009
|
+
}
|
|
7010
|
+
/** All Community Maps comments require editorial review, including authenticated replies. */
|
|
7011
|
+
createComment(slug, data, featureId, options) {
|
|
7012
|
+
return this.post(
|
|
7013
|
+
this.withQuery("/collections/" + segment(slug) + "/comments", { feature_id: featureId }),
|
|
7014
|
+
data,
|
|
7015
|
+
options
|
|
7016
|
+
);
|
|
7017
|
+
}
|
|
6977
7018
|
react(slug, feature, reaction, active = true, options) {
|
|
6978
7019
|
return this.post(
|
|
6979
7020
|
"/collections/" + segment(slug) + "/features/" + segment(feature) + "/reactions",
|
|
@@ -7001,6 +7042,12 @@ var CommunityMapsEditorialService = class _CommunityMapsEditorialService extends
|
|
|
7001
7042
|
path(path, query = {}) {
|
|
7002
7043
|
return this.withQuery(path, { ...query, ...this.applicationId ? { application_id: this.applicationId } : {} });
|
|
7003
7044
|
}
|
|
7045
|
+
listComments(collection, query = {}, options) {
|
|
7046
|
+
return this._get(this.path("/collections/" + segment(collection) + "/comments", query), options);
|
|
7047
|
+
}
|
|
7048
|
+
reviewComment(collection, comment, data, options) {
|
|
7049
|
+
return this.put(this.path("/collections/" + segment(collection) + "/comments/" + segment(comment)), data, options);
|
|
7050
|
+
}
|
|
7004
7051
|
listCollections(query = {}, options) {
|
|
7005
7052
|
return this._get(this.path("/collections", { ...query }), options);
|
|
7006
7053
|
}
|
|
@@ -9089,6 +9136,127 @@ var AgentSessionsService = class extends ServiceModule {
|
|
|
9089
9136
|
}
|
|
9090
9137
|
};
|
|
9091
9138
|
|
|
9139
|
+
// src/browser-capture.ts
|
|
9140
|
+
init_upload_compression();
|
|
9141
|
+
async function prepareCommunityMapAttachment(file) {
|
|
9142
|
+
const types = [
|
|
9143
|
+
"image/jpeg",
|
|
9144
|
+
"image/png",
|
|
9145
|
+
"image/webp",
|
|
9146
|
+
"video/mp4",
|
|
9147
|
+
"video/quicktime",
|
|
9148
|
+
"video/webm",
|
|
9149
|
+
"audio/mpeg",
|
|
9150
|
+
"audio/mp4",
|
|
9151
|
+
"audio/wav",
|
|
9152
|
+
"audio/x-wav",
|
|
9153
|
+
"audio/ogg",
|
|
9154
|
+
"audio/webm"
|
|
9155
|
+
];
|
|
9156
|
+
if (!types.includes(file.type))
|
|
9157
|
+
throw new Error(
|
|
9158
|
+
"Choose JPEG, PNG or WebP photos, MP4/MOV/WebM video, or MP3/M4A/WAV/Ogg audio. For HEIC, export as JPEG first."
|
|
9159
|
+
);
|
|
9160
|
+
if (!file.size || file.size > 25 * 1024 * 1024)
|
|
9161
|
+
throw new Error("Choose a file up to 25 MiB. Record a shorter clip if needed.");
|
|
9162
|
+
if (!file.type.startsWith("image/")) return file;
|
|
9163
|
+
const compressed = await maybeCompressImage(
|
|
9164
|
+
file,
|
|
9165
|
+
{ maxWidth: 2400, maxHeight: 2400, maxSizeMB: 2, quality: 0.82 },
|
|
9166
|
+
"community-capture",
|
|
9167
|
+
null
|
|
9168
|
+
);
|
|
9169
|
+
const result = compressed ? new File(
|
|
9170
|
+
[compressed],
|
|
9171
|
+
file.name.replace(/\.[^.]+$/, "") + (compressed.type === "image/webp" ? ".webp" : ".jpg"),
|
|
9172
|
+
{ type: compressed.type, lastModified: file.lastModified }
|
|
9173
|
+
) : file;
|
|
9174
|
+
if (result.size > 8 * 1024 * 1024)
|
|
9175
|
+
throw new Error("This photo is too large. Choose a photo up to 8 MiB or use a smaller camera setting.");
|
|
9176
|
+
return result;
|
|
9177
|
+
}
|
|
9178
|
+
async function startMediaCapture(kind, signal) {
|
|
9179
|
+
const candidates = kind === "video" ? ["video/mp4;codecs=h264,aac", "video/mp4", "video/webm;codecs=vp8,opus", "video/webm"] : ["audio/mp4", "audio/webm;codecs=opus", "audio/ogg;codecs=opus", "audio/webm"];
|
|
9180
|
+
const mimeType = typeof MediaRecorder === "undefined" ? void 0 : candidates.find((t) => MediaRecorder.isTypeSupported(t));
|
|
9181
|
+
if (!mimeType || !navigator.mediaDevices?.getUserMedia)
|
|
9182
|
+
throw new Error("Recording is unavailable in this browser. Use the camera or choose a file instead.");
|
|
9183
|
+
signal?.throwIfAborted();
|
|
9184
|
+
const stream = await navigator.mediaDevices.getUserMedia(
|
|
9185
|
+
kind === "video" ? {
|
|
9186
|
+
audio: true,
|
|
9187
|
+
video: {
|
|
9188
|
+
facingMode: { ideal: "environment" },
|
|
9189
|
+
width: { ideal: 1280, max: 1280 },
|
|
9190
|
+
height: { ideal: 720, max: 720 },
|
|
9191
|
+
frameRate: { ideal: 24, max: 30 }
|
|
9192
|
+
}
|
|
9193
|
+
} : { audio: { channelCount: { ideal: 1 }, echoCancellation: true, noiseSuppression: true }, video: false }
|
|
9194
|
+
);
|
|
9195
|
+
const release = () => stream.getTracks().forEach((t) => t.stop());
|
|
9196
|
+
if (signal?.aborted) {
|
|
9197
|
+
release();
|
|
9198
|
+
signal.throwIfAborted();
|
|
9199
|
+
}
|
|
9200
|
+
let recorder;
|
|
9201
|
+
try {
|
|
9202
|
+
recorder = new MediaRecorder(stream, { mimeType, videoBitsPerSecond: 2e6, audioBitsPerSecond: 96e3 });
|
|
9203
|
+
} catch (e) {
|
|
9204
|
+
release();
|
|
9205
|
+
throw e;
|
|
9206
|
+
}
|
|
9207
|
+
let cancelled = false;
|
|
9208
|
+
let failure;
|
|
9209
|
+
let bytes = 0;
|
|
9210
|
+
const chunks = [];
|
|
9211
|
+
let timer;
|
|
9212
|
+
const stop = () => {
|
|
9213
|
+
if (recorder.state !== "inactive") recorder.stop();
|
|
9214
|
+
};
|
|
9215
|
+
const cancel = () => {
|
|
9216
|
+
cancelled = true;
|
|
9217
|
+
stop();
|
|
9218
|
+
release();
|
|
9219
|
+
};
|
|
9220
|
+
const result = new Promise((resolve, reject) => {
|
|
9221
|
+
const clean = () => {
|
|
9222
|
+
clearTimeout(timer);
|
|
9223
|
+
signal?.removeEventListener("abort", cancel);
|
|
9224
|
+
release();
|
|
9225
|
+
};
|
|
9226
|
+
recorder.ondataavailable = (event) => {
|
|
9227
|
+
bytes += event.data.size;
|
|
9228
|
+
if (bytes > 25 * 1024 * 1024) {
|
|
9229
|
+
failure = new Error("The recording is too large. Try a shorter clip.");
|
|
9230
|
+
stop();
|
|
9231
|
+
} else if (event.data.size) chunks.push(event.data);
|
|
9232
|
+
};
|
|
9233
|
+
recorder.onerror = () => {
|
|
9234
|
+
failure = new Error("Recording was interrupted. Try again or choose a file.");
|
|
9235
|
+
stop();
|
|
9236
|
+
};
|
|
9237
|
+
recorder.onstop = () => {
|
|
9238
|
+
clean();
|
|
9239
|
+
if (failure) reject(failure);
|
|
9240
|
+
else if (cancelled || !chunks.length) resolve(null);
|
|
9241
|
+
else {
|
|
9242
|
+
const type = recorder.mimeType.split(";")[0] || (kind === "audio" ? "audio/webm" : "video/webm");
|
|
9243
|
+
const extension = type.includes("mp4") ? kind === "audio" ? "m4a" : "mp4" : type.includes("ogg") ? "ogg" : "webm";
|
|
9244
|
+
resolve(new File(chunks, `community-${kind}-${Date.now()}.${extension}`, { type }));
|
|
9245
|
+
}
|
|
9246
|
+
chunks.length = 0;
|
|
9247
|
+
};
|
|
9248
|
+
signal?.addEventListener("abort", cancel, { once: true });
|
|
9249
|
+
try {
|
|
9250
|
+
recorder.start(250);
|
|
9251
|
+
timer = setTimeout(stop, kind === "video" ? 15e3 : 6e4);
|
|
9252
|
+
} catch (error) {
|
|
9253
|
+
clean();
|
|
9254
|
+
reject(error);
|
|
9255
|
+
}
|
|
9256
|
+
});
|
|
9257
|
+
return { stream, result, stop, cancel };
|
|
9258
|
+
}
|
|
9259
|
+
|
|
9092
9260
|
// src/index.ts
|
|
9093
9261
|
var ScaleMule = class {
|
|
9094
9262
|
/** @deprecated Use `workspaces` instead */
|
|
@@ -9360,8 +9528,10 @@ var index_default = ScaleMule;
|
|
|
9360
9528
|
normalizePhoneNumber,
|
|
9361
9529
|
pollSharePercent,
|
|
9362
9530
|
pollVoterKey,
|
|
9531
|
+
prepareCommunityMapAttachment,
|
|
9363
9532
|
readAnonymousId,
|
|
9364
9533
|
resolveStrategy,
|
|
9534
|
+
startMediaCapture,
|
|
9365
9535
|
uploadMultipartToS3,
|
|
9366
9536
|
uploadSingleToS3,
|
|
9367
9537
|
validateIP
|
package/dist/index.mjs
CHANGED
|
@@ -246,7 +246,7 @@ async function loadImageCompression() {
|
|
|
246
246
|
if (cachedImport === false) return null;
|
|
247
247
|
if (cachedImport) return cachedImport;
|
|
248
248
|
try {
|
|
249
|
-
const mod = await
|
|
249
|
+
const mod = await import("browser-image-compression");
|
|
250
250
|
cachedImport = mod.default || mod;
|
|
251
251
|
return cachedImport;
|
|
252
252
|
} catch {
|
|
@@ -6839,6 +6839,15 @@ var CommunityMapsService = class extends ServiceModule {
|
|
|
6839
6839
|
createSubmission(slug, data, options) {
|
|
6840
6840
|
return this.post("/collections/" + segment(slug) + "/submissions", data, options);
|
|
6841
6841
|
}
|
|
6842
|
+
listOwnSubmissions(slug, after, options) {
|
|
6843
|
+
return this._get(
|
|
6844
|
+
"/collections/" + segment(slug) + "/submissions" + (after ? "?after=" + segment(after) : ""),
|
|
6845
|
+
options
|
|
6846
|
+
);
|
|
6847
|
+
}
|
|
6848
|
+
updateOwnSubmission(slug, id, data, options) {
|
|
6849
|
+
return this.post("/collections/" + segment(slug) + "/submissions/" + segment(id), data, options);
|
|
6850
|
+
}
|
|
6842
6851
|
uploadMedia(slug, submission, file, fields, options) {
|
|
6843
6852
|
return this._upload(
|
|
6844
6853
|
"/collections/" + segment(slug) + "/submissions/" + segment(submission) + "/media",
|
|
@@ -6847,7 +6856,8 @@ var CommunityMapsService = class extends ServiceModule {
|
|
|
6847
6856
|
caption: fields.caption,
|
|
6848
6857
|
attribution: fields.attribution,
|
|
6849
6858
|
rights_confirmed: String(fields.rights_confirmed),
|
|
6850
|
-
consent_version: fields.consent_version
|
|
6859
|
+
consent_version: fields.consent_version,
|
|
6860
|
+
...fields.idempotency_key ? { idempotency_key: fields.idempotency_key } : {}
|
|
6851
6861
|
},
|
|
6852
6862
|
options
|
|
6853
6863
|
);
|
|
@@ -6862,6 +6872,25 @@ var CommunityMapsService = class extends ServiceModule {
|
|
|
6862
6872
|
options
|
|
6863
6873
|
);
|
|
6864
6874
|
}
|
|
6875
|
+
/** Read public totals and the signed-in reader's current vote. */
|
|
6876
|
+
getVote(slug, feature, options) {
|
|
6877
|
+
return this._get("/collections/" + segment(slug) + "/features/" + segment(feature) + "/vote", options);
|
|
6878
|
+
}
|
|
6879
|
+
/** One vote per signed-in reader: 1 up, -1 down, 0 clear. */
|
|
6880
|
+
vote(slug, feature, value, options) {
|
|
6881
|
+
return this.post("/collections/" + segment(slug) + "/features/" + segment(feature) + "/vote", { value }, options);
|
|
6882
|
+
}
|
|
6883
|
+
listComments(slug, query = {}, options) {
|
|
6884
|
+
return this._get(this.withQuery("/collections/" + segment(slug) + "/comments", query), options);
|
|
6885
|
+
}
|
|
6886
|
+
/** All Community Maps comments require editorial review, including authenticated replies. */
|
|
6887
|
+
createComment(slug, data, featureId, options) {
|
|
6888
|
+
return this.post(
|
|
6889
|
+
this.withQuery("/collections/" + segment(slug) + "/comments", { feature_id: featureId }),
|
|
6890
|
+
data,
|
|
6891
|
+
options
|
|
6892
|
+
);
|
|
6893
|
+
}
|
|
6865
6894
|
react(slug, feature, reaction, active = true, options) {
|
|
6866
6895
|
return this.post(
|
|
6867
6896
|
"/collections/" + segment(slug) + "/features/" + segment(feature) + "/reactions",
|
|
@@ -6889,6 +6918,12 @@ var CommunityMapsEditorialService = class _CommunityMapsEditorialService extends
|
|
|
6889
6918
|
path(path, query = {}) {
|
|
6890
6919
|
return this.withQuery(path, { ...query, ...this.applicationId ? { application_id: this.applicationId } : {} });
|
|
6891
6920
|
}
|
|
6921
|
+
listComments(collection, query = {}, options) {
|
|
6922
|
+
return this._get(this.path("/collections/" + segment(collection) + "/comments", query), options);
|
|
6923
|
+
}
|
|
6924
|
+
reviewComment(collection, comment, data, options) {
|
|
6925
|
+
return this.put(this.path("/collections/" + segment(collection) + "/comments/" + segment(comment)), data, options);
|
|
6926
|
+
}
|
|
6892
6927
|
listCollections(query = {}, options) {
|
|
6893
6928
|
return this._get(this.path("/collections", { ...query }), options);
|
|
6894
6929
|
}
|
|
@@ -8977,6 +9012,127 @@ var AgentSessionsService = class extends ServiceModule {
|
|
|
8977
9012
|
}
|
|
8978
9013
|
};
|
|
8979
9014
|
|
|
9015
|
+
// src/browser-capture.ts
|
|
9016
|
+
init_upload_compression();
|
|
9017
|
+
async function prepareCommunityMapAttachment(file) {
|
|
9018
|
+
const types = [
|
|
9019
|
+
"image/jpeg",
|
|
9020
|
+
"image/png",
|
|
9021
|
+
"image/webp",
|
|
9022
|
+
"video/mp4",
|
|
9023
|
+
"video/quicktime",
|
|
9024
|
+
"video/webm",
|
|
9025
|
+
"audio/mpeg",
|
|
9026
|
+
"audio/mp4",
|
|
9027
|
+
"audio/wav",
|
|
9028
|
+
"audio/x-wav",
|
|
9029
|
+
"audio/ogg",
|
|
9030
|
+
"audio/webm"
|
|
9031
|
+
];
|
|
9032
|
+
if (!types.includes(file.type))
|
|
9033
|
+
throw new Error(
|
|
9034
|
+
"Choose JPEG, PNG or WebP photos, MP4/MOV/WebM video, or MP3/M4A/WAV/Ogg audio. For HEIC, export as JPEG first."
|
|
9035
|
+
);
|
|
9036
|
+
if (!file.size || file.size > 25 * 1024 * 1024)
|
|
9037
|
+
throw new Error("Choose a file up to 25 MiB. Record a shorter clip if needed.");
|
|
9038
|
+
if (!file.type.startsWith("image/")) return file;
|
|
9039
|
+
const compressed = await maybeCompressImage(
|
|
9040
|
+
file,
|
|
9041
|
+
{ maxWidth: 2400, maxHeight: 2400, maxSizeMB: 2, quality: 0.82 },
|
|
9042
|
+
"community-capture",
|
|
9043
|
+
null
|
|
9044
|
+
);
|
|
9045
|
+
const result = compressed ? new File(
|
|
9046
|
+
[compressed],
|
|
9047
|
+
file.name.replace(/\.[^.]+$/, "") + (compressed.type === "image/webp" ? ".webp" : ".jpg"),
|
|
9048
|
+
{ type: compressed.type, lastModified: file.lastModified }
|
|
9049
|
+
) : file;
|
|
9050
|
+
if (result.size > 8 * 1024 * 1024)
|
|
9051
|
+
throw new Error("This photo is too large. Choose a photo up to 8 MiB or use a smaller camera setting.");
|
|
9052
|
+
return result;
|
|
9053
|
+
}
|
|
9054
|
+
async function startMediaCapture(kind, signal) {
|
|
9055
|
+
const candidates = kind === "video" ? ["video/mp4;codecs=h264,aac", "video/mp4", "video/webm;codecs=vp8,opus", "video/webm"] : ["audio/mp4", "audio/webm;codecs=opus", "audio/ogg;codecs=opus", "audio/webm"];
|
|
9056
|
+
const mimeType = typeof MediaRecorder === "undefined" ? void 0 : candidates.find((t) => MediaRecorder.isTypeSupported(t));
|
|
9057
|
+
if (!mimeType || !navigator.mediaDevices?.getUserMedia)
|
|
9058
|
+
throw new Error("Recording is unavailable in this browser. Use the camera or choose a file instead.");
|
|
9059
|
+
signal?.throwIfAborted();
|
|
9060
|
+
const stream = await navigator.mediaDevices.getUserMedia(
|
|
9061
|
+
kind === "video" ? {
|
|
9062
|
+
audio: true,
|
|
9063
|
+
video: {
|
|
9064
|
+
facingMode: { ideal: "environment" },
|
|
9065
|
+
width: { ideal: 1280, max: 1280 },
|
|
9066
|
+
height: { ideal: 720, max: 720 },
|
|
9067
|
+
frameRate: { ideal: 24, max: 30 }
|
|
9068
|
+
}
|
|
9069
|
+
} : { audio: { channelCount: { ideal: 1 }, echoCancellation: true, noiseSuppression: true }, video: false }
|
|
9070
|
+
);
|
|
9071
|
+
const release = () => stream.getTracks().forEach((t) => t.stop());
|
|
9072
|
+
if (signal?.aborted) {
|
|
9073
|
+
release();
|
|
9074
|
+
signal.throwIfAborted();
|
|
9075
|
+
}
|
|
9076
|
+
let recorder;
|
|
9077
|
+
try {
|
|
9078
|
+
recorder = new MediaRecorder(stream, { mimeType, videoBitsPerSecond: 2e6, audioBitsPerSecond: 96e3 });
|
|
9079
|
+
} catch (e) {
|
|
9080
|
+
release();
|
|
9081
|
+
throw e;
|
|
9082
|
+
}
|
|
9083
|
+
let cancelled = false;
|
|
9084
|
+
let failure;
|
|
9085
|
+
let bytes = 0;
|
|
9086
|
+
const chunks = [];
|
|
9087
|
+
let timer;
|
|
9088
|
+
const stop = () => {
|
|
9089
|
+
if (recorder.state !== "inactive") recorder.stop();
|
|
9090
|
+
};
|
|
9091
|
+
const cancel = () => {
|
|
9092
|
+
cancelled = true;
|
|
9093
|
+
stop();
|
|
9094
|
+
release();
|
|
9095
|
+
};
|
|
9096
|
+
const result = new Promise((resolve, reject) => {
|
|
9097
|
+
const clean = () => {
|
|
9098
|
+
clearTimeout(timer);
|
|
9099
|
+
signal?.removeEventListener("abort", cancel);
|
|
9100
|
+
release();
|
|
9101
|
+
};
|
|
9102
|
+
recorder.ondataavailable = (event) => {
|
|
9103
|
+
bytes += event.data.size;
|
|
9104
|
+
if (bytes > 25 * 1024 * 1024) {
|
|
9105
|
+
failure = new Error("The recording is too large. Try a shorter clip.");
|
|
9106
|
+
stop();
|
|
9107
|
+
} else if (event.data.size) chunks.push(event.data);
|
|
9108
|
+
};
|
|
9109
|
+
recorder.onerror = () => {
|
|
9110
|
+
failure = new Error("Recording was interrupted. Try again or choose a file.");
|
|
9111
|
+
stop();
|
|
9112
|
+
};
|
|
9113
|
+
recorder.onstop = () => {
|
|
9114
|
+
clean();
|
|
9115
|
+
if (failure) reject(failure);
|
|
9116
|
+
else if (cancelled || !chunks.length) resolve(null);
|
|
9117
|
+
else {
|
|
9118
|
+
const type = recorder.mimeType.split(";")[0] || (kind === "audio" ? "audio/webm" : "video/webm");
|
|
9119
|
+
const extension = type.includes("mp4") ? kind === "audio" ? "m4a" : "mp4" : type.includes("ogg") ? "ogg" : "webm";
|
|
9120
|
+
resolve(new File(chunks, `community-${kind}-${Date.now()}.${extension}`, { type }));
|
|
9121
|
+
}
|
|
9122
|
+
chunks.length = 0;
|
|
9123
|
+
};
|
|
9124
|
+
signal?.addEventListener("abort", cancel, { once: true });
|
|
9125
|
+
try {
|
|
9126
|
+
recorder.start(250);
|
|
9127
|
+
timer = setTimeout(stop, kind === "video" ? 15e3 : 6e4);
|
|
9128
|
+
} catch (error) {
|
|
9129
|
+
clean();
|
|
9130
|
+
reject(error);
|
|
9131
|
+
}
|
|
9132
|
+
});
|
|
9133
|
+
return { stream, result, stop, cancel };
|
|
9134
|
+
}
|
|
9135
|
+
|
|
8980
9136
|
// src/index.ts
|
|
8981
9137
|
var ScaleMule = class {
|
|
8982
9138
|
/** @deprecated Use `workspaces` instead */
|
|
@@ -9248,8 +9404,10 @@ export {
|
|
|
9248
9404
|
normalizePhoneNumber,
|
|
9249
9405
|
pollSharePercent,
|
|
9250
9406
|
pollVoterKey,
|
|
9407
|
+
prepareCommunityMapAttachment,
|
|
9251
9408
|
readAnonymousId,
|
|
9252
9409
|
resolveStrategy,
|
|
9410
|
+
startMediaCapture,
|
|
9253
9411
|
uploadMultipartToS3,
|
|
9254
9412
|
uploadSingleToS3,
|
|
9255
9413
|
validateIP
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scalemule/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.75",
|
|
4
4
|
"description": "Official TypeScript/JavaScript SDK for ScaleMule Backend-as-a-Service",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -63,15 +63,8 @@
|
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@scalemule/ui": ">=0.0.1",
|
|
66
|
-
"semver": "^7.7.4"
|
|
67
|
-
|
|
68
|
-
"peerDependencies": {
|
|
69
|
-
"browser-image-compression": ">=2.0.0"
|
|
70
|
-
},
|
|
71
|
-
"peerDependenciesMeta": {
|
|
72
|
-
"browser-image-compression": {
|
|
73
|
-
"optional": true
|
|
74
|
-
}
|
|
66
|
+
"semver": "^7.7.4",
|
|
67
|
+
"browser-image-compression": "^2.0.2"
|
|
75
68
|
},
|
|
76
69
|
"devDependencies": {
|
|
77
70
|
"@scalemule/ui": ">=0.0.1",
|