@scalemule/sdk 0.0.71 → 0.0.73

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 CHANGED
@@ -565,6 +565,8 @@ declare class ScaleMuleClient {
565
565
  upload<T>(path: string, file: File | Blob, additionalFields?: Record<string, string>, options?: RequestOptions & {
566
566
  onProgress?: (progress: number) => void;
567
567
  }): Promise<ApiResponse<T>>;
568
+ /** Preserve forwarded reader/auth context for both multipart transports. */
569
+ private uploadHeaders;
568
570
  /**
569
571
  * Single upload with XMLHttpRequest for progress tracking.
570
572
  * Supports abort via AbortSignal.
@@ -5170,7 +5172,17 @@ interface CommunityMapCollectionConfig {
5170
5172
  map_style_url?: string | null;
5171
5173
  };
5172
5174
  }
5175
+ interface CommunityMapSubmissionPolicy {
5176
+ version: string;
5177
+ text: string;
5178
+ guidelines: string;
5179
+ }
5180
+ interface CommunityMapConsent extends CommunityMapSubmissionPolicy {
5181
+ accepted: true;
5182
+ accepted_at: string;
5183
+ }
5173
5184
  interface CommunityMapCollection {
5185
+ submission_policy?: CommunityMapSubmissionPolicy;
5174
5186
  id: string;
5175
5187
  slug: string;
5176
5188
  revision: number;
@@ -5195,6 +5207,7 @@ interface CommunityMapPublicContent {
5195
5207
  metadata: Record<string, string | number | boolean | null>;
5196
5208
  }
5197
5209
  interface CommunityMapMedia {
5210
+ content_type?: string;
5198
5211
  id: string;
5199
5212
  caption: string;
5200
5213
  attribution: string;
@@ -5243,6 +5256,10 @@ interface CommunityMapProposal {
5243
5256
  correction_for?: string | null;
5244
5257
  }
5245
5258
  interface CommunityMapSubmissionInput {
5259
+ consent: {
5260
+ version: string;
5261
+ accepted: boolean;
5262
+ };
5246
5263
  area_id: string;
5247
5264
  idempotency_key: string;
5248
5265
  proposal: CommunityMapProposal;
@@ -5282,6 +5299,7 @@ interface CommunityMapEditorialFeature extends Omit<CommunityMapFeature, 'media'
5282
5299
  }
5283
5300
  /** Returned only by editorial endpoints after server-side authorization. */
5284
5301
  interface CommunityMapPrivateSubmission {
5302
+ consent?: CommunityMapConsent | null;
5285
5303
  id: string;
5286
5304
  area_id: string;
5287
5305
  feature_id: string | null;
@@ -5327,6 +5345,7 @@ interface CommunityMapPrivateReport {
5327
5345
  created_at: string;
5328
5346
  }
5329
5347
  interface CommunityMapEditorialMedia extends CommunityMapMedia {
5348
+ consent?: CommunityMapConsent | null;
5330
5349
  submission_id: string | null;
5331
5350
  feature_id: string | null;
5332
5351
  status: string;
@@ -5348,10 +5367,21 @@ declare class CommunityMapsService extends ServiceModule {
5348
5367
  listFeatures(slug: string, query?: CommunityMapFeatureQuery, options?: RequestOptions): Promise<ApiResponse<CommunityMapPage<CommunityMapFeature>>>;
5349
5368
  getFeature(slug: string, id: string, options?: RequestOptions): Promise<ApiResponse<CommunityMapFeature>>;
5350
5369
  createSubmission(slug: string, data: CommunityMapSubmissionInput, options?: RequestOptions): Promise<ApiResponse<CommunityMapReceipt>>;
5370
+ uploadMedia(slug: string, submission: string, file: File | Blob, fields: {
5371
+ caption: string;
5372
+ attribution: string;
5373
+ rights_confirmed: boolean;
5374
+ consent_version: string;
5375
+ }, options?: RequestOptions): Promise<ApiResponse<{
5376
+ id: string;
5377
+ status: string;
5378
+ }>>;
5379
+ /** @deprecated Use uploadMedia for photos, video and audio. Explicit publication permission is required. */
5351
5380
  uploadPhoto(slug: string, submission: string, file: File | Blob, fields: {
5352
5381
  caption: string;
5353
5382
  attribution: string;
5354
5383
  rights_confirmed: boolean;
5384
+ consent_version?: string;
5355
5385
  }, options?: RequestOptions): Promise<ApiResponse<{
5356
5386
  id: string;
5357
5387
  status: string;
@@ -5422,6 +5452,7 @@ declare class CommunityMapsEditorialService extends ServiceModule {
5422
5452
  reviewMedia(collection: string, id: string, data: {
5423
5453
  expected_revision: number;
5424
5454
  status: 'APPROVED' | 'PUBLISHED' | 'REJECTED' | 'REMOVED';
5455
+ guidelines_reviewed?: boolean;
5425
5456
  feature_id?: string | null;
5426
5457
  caption: string;
5427
5458
  attribution: string;
@@ -8182,4 +8213,4 @@ declare class ScaleMule {
8182
8213
  getClient(): ScaleMuleClient;
8183
8214
  }
8184
8215
 
8185
- 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 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 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 };
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 };
package/dist/index.d.ts CHANGED
@@ -565,6 +565,8 @@ declare class ScaleMuleClient {
565
565
  upload<T>(path: string, file: File | Blob, additionalFields?: Record<string, string>, options?: RequestOptions & {
566
566
  onProgress?: (progress: number) => void;
567
567
  }): Promise<ApiResponse<T>>;
568
+ /** Preserve forwarded reader/auth context for both multipart transports. */
569
+ private uploadHeaders;
568
570
  /**
569
571
  * Single upload with XMLHttpRequest for progress tracking.
570
572
  * Supports abort via AbortSignal.
@@ -5170,7 +5172,17 @@ interface CommunityMapCollectionConfig {
5170
5172
  map_style_url?: string | null;
5171
5173
  };
5172
5174
  }
5175
+ interface CommunityMapSubmissionPolicy {
5176
+ version: string;
5177
+ text: string;
5178
+ guidelines: string;
5179
+ }
5180
+ interface CommunityMapConsent extends CommunityMapSubmissionPolicy {
5181
+ accepted: true;
5182
+ accepted_at: string;
5183
+ }
5173
5184
  interface CommunityMapCollection {
5185
+ submission_policy?: CommunityMapSubmissionPolicy;
5174
5186
  id: string;
5175
5187
  slug: string;
5176
5188
  revision: number;
@@ -5195,6 +5207,7 @@ interface CommunityMapPublicContent {
5195
5207
  metadata: Record<string, string | number | boolean | null>;
5196
5208
  }
5197
5209
  interface CommunityMapMedia {
5210
+ content_type?: string;
5198
5211
  id: string;
5199
5212
  caption: string;
5200
5213
  attribution: string;
@@ -5243,6 +5256,10 @@ interface CommunityMapProposal {
5243
5256
  correction_for?: string | null;
5244
5257
  }
5245
5258
  interface CommunityMapSubmissionInput {
5259
+ consent: {
5260
+ version: string;
5261
+ accepted: boolean;
5262
+ };
5246
5263
  area_id: string;
5247
5264
  idempotency_key: string;
5248
5265
  proposal: CommunityMapProposal;
@@ -5282,6 +5299,7 @@ interface CommunityMapEditorialFeature extends Omit<CommunityMapFeature, 'media'
5282
5299
  }
5283
5300
  /** Returned only by editorial endpoints after server-side authorization. */
5284
5301
  interface CommunityMapPrivateSubmission {
5302
+ consent?: CommunityMapConsent | null;
5285
5303
  id: string;
5286
5304
  area_id: string;
5287
5305
  feature_id: string | null;
@@ -5327,6 +5345,7 @@ interface CommunityMapPrivateReport {
5327
5345
  created_at: string;
5328
5346
  }
5329
5347
  interface CommunityMapEditorialMedia extends CommunityMapMedia {
5348
+ consent?: CommunityMapConsent | null;
5330
5349
  submission_id: string | null;
5331
5350
  feature_id: string | null;
5332
5351
  status: string;
@@ -5348,10 +5367,21 @@ declare class CommunityMapsService extends ServiceModule {
5348
5367
  listFeatures(slug: string, query?: CommunityMapFeatureQuery, options?: RequestOptions): Promise<ApiResponse<CommunityMapPage<CommunityMapFeature>>>;
5349
5368
  getFeature(slug: string, id: string, options?: RequestOptions): Promise<ApiResponse<CommunityMapFeature>>;
5350
5369
  createSubmission(slug: string, data: CommunityMapSubmissionInput, options?: RequestOptions): Promise<ApiResponse<CommunityMapReceipt>>;
5370
+ uploadMedia(slug: string, submission: string, file: File | Blob, fields: {
5371
+ caption: string;
5372
+ attribution: string;
5373
+ rights_confirmed: boolean;
5374
+ consent_version: string;
5375
+ }, options?: RequestOptions): Promise<ApiResponse<{
5376
+ id: string;
5377
+ status: string;
5378
+ }>>;
5379
+ /** @deprecated Use uploadMedia for photos, video and audio. Explicit publication permission is required. */
5351
5380
  uploadPhoto(slug: string, submission: string, file: File | Blob, fields: {
5352
5381
  caption: string;
5353
5382
  attribution: string;
5354
5383
  rights_confirmed: boolean;
5384
+ consent_version?: string;
5355
5385
  }, options?: RequestOptions): Promise<ApiResponse<{
5356
5386
  id: string;
5357
5387
  status: string;
@@ -5422,6 +5452,7 @@ declare class CommunityMapsEditorialService extends ServiceModule {
5422
5452
  reviewMedia(collection: string, id: string, data: {
5423
5453
  expected_revision: number;
5424
5454
  status: 'APPROVED' | 'PUBLISHED' | 'REJECTED' | 'REMOVED';
5455
+ guidelines_reviewed?: boolean;
5425
5456
  feature_id?: string | null;
5426
5457
  caption: string;
5427
5458
  attribution: string;
@@ -8182,4 +8213,4 @@ declare class ScaleMule {
8182
8213
  getClient(): ScaleMuleClient;
8183
8214
  }
8184
8215
 
8185
- 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 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 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 };
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 };
package/dist/index.js CHANGED
@@ -1185,7 +1185,7 @@ var ScaleMuleClient = class {
1185
1185
  if (this.workspaceId) {
1186
1186
  headers["x-sm-workspace-id"] = this.workspaceId;
1187
1187
  }
1188
- if (!init.skipAuth && !this.sessionToken) {
1188
+ if (!init.skipAuth && !this.sessionToken && !Object.keys(headers).some((key) => key.toLowerCase() === "x-anonymous-id")) {
1189
1189
  if (!this.anonymousId) {
1190
1190
  try {
1191
1191
  await this.ensureAnonymousId();
@@ -1382,14 +1382,12 @@ var ScaleMuleClient = class {
1382
1382
  return { data: null, error: { code: "aborted", message: "Upload aborted", status: 0 } };
1383
1383
  }
1384
1384
  if (options?.onProgress && typeof XMLHttpRequest !== "undefined") {
1385
- return this.uploadWithXHR(url, buildFormData, options.onProgress, options?.signal);
1385
+ return this.uploadWithXHR(url, buildFormData, options.onProgress, options);
1386
1386
  }
1387
1387
  const maxRetries = options?.retries ?? this.maxRetries;
1388
1388
  let lastError = null;
1389
1389
  for (let attempt = 0; attempt <= maxRetries; attempt++) {
1390
- const headers = { "x-api-key": this.apiKey };
1391
- if (this.sessionToken) headers["Authorization"] = `Bearer ${this.sessionToken}`;
1392
- if (this.workspaceId) headers["x-sm-workspace-id"] = this.workspaceId;
1390
+ const headers = await this.uploadHeaders(options);
1393
1391
  try {
1394
1392
  const response = await fetch(url, {
1395
1393
  method: "POST",
@@ -1431,13 +1429,29 @@ var ScaleMuleClient = class {
1431
1429
  }
1432
1430
  return { data: null, error: lastError || { code: "upload_error", message: "Upload failed", status: 0 } };
1433
1431
  }
1432
+ /** Preserve forwarded reader/auth context for both multipart transports. */
1433
+ async uploadHeaders(options) {
1434
+ const headers = { "x-api-key": this.apiKey, ...options?.headers };
1435
+ for (const name of Object.keys(headers)) {
1436
+ if (name.toLowerCase() === "content-type") delete headers[name];
1437
+ }
1438
+ if (this.sessionToken) headers["Authorization"] = `Bearer ${this.sessionToken}`;
1439
+ if (this.workspaceId) headers["x-sm-workspace-id"] = this.workspaceId;
1440
+ if (!this.sessionToken && !Object.keys(headers).some((key) => key.toLowerCase() === "x-anonymous-id")) {
1441
+ headers["x-anonymous-id"] = await this.ensureAnonymousId();
1442
+ }
1443
+ return headers;
1444
+ }
1434
1445
  /**
1435
1446
  * Single upload with XMLHttpRequest for progress tracking.
1436
1447
  * Supports abort via AbortSignal.
1437
1448
  */
1438
- async uploadWithXHR(url, buildFormData, onProgress, signal, maxRetries = this.maxRetries) {
1449
+ async uploadWithXHR(url, buildFormData, onProgress, options) {
1450
+ const signal = options?.signal;
1451
+ const maxRetries = options?.retries ?? this.maxRetries;
1439
1452
  let lastError = null;
1440
1453
  for (let attempt = 0; attempt <= maxRetries; attempt++) {
1454
+ const headers = await this.uploadHeaders(options);
1441
1455
  const result = await new Promise((res) => {
1442
1456
  const xhr = new XMLHttpRequest();
1443
1457
  if (signal) {
@@ -1480,12 +1494,8 @@ var ScaleMuleClient = class {
1480
1494
  res({ data: null, error: { code: "aborted", message: "Upload aborted", status: 0 } });
1481
1495
  });
1482
1496
  xhr.open("POST", url);
1483
- xhr.setRequestHeader("x-api-key", this.apiKey);
1484
- if (this.sessionToken) {
1485
- xhr.setRequestHeader("Authorization", `Bearer ${this.sessionToken}`);
1486
- }
1487
- if (this.workspaceId) {
1488
- xhr.setRequestHeader("x-sm-workspace-id", this.workspaceId);
1497
+ for (const [name, value] of Object.entries(headers)) {
1498
+ xhr.setRequestHeader(name, value);
1489
1499
  }
1490
1500
  xhr.send(buildFormData());
1491
1501
  });
@@ -6941,11 +6951,26 @@ var CommunityMapsService = class extends ServiceModule {
6941
6951
  createSubmission(slug, data, options) {
6942
6952
  return this.post("/collections/" + segment(slug) + "/submissions", data, options);
6943
6953
  }
6944
- uploadPhoto(slug, submission, file, fields, options) {
6954
+ uploadMedia(slug, submission, file, fields, options) {
6945
6955
  return this._upload(
6946
6956
  "/collections/" + segment(slug) + "/submissions/" + segment(submission) + "/media",
6947
6957
  file,
6948
- { caption: fields.caption, attribution: fields.attribution, rights_confirmed: String(fields.rights_confirmed) },
6958
+ {
6959
+ caption: fields.caption,
6960
+ attribution: fields.attribution,
6961
+ rights_confirmed: String(fields.rights_confirmed),
6962
+ consent_version: fields.consent_version
6963
+ },
6964
+ options
6965
+ );
6966
+ }
6967
+ /** @deprecated Use uploadMedia for photos, video and audio. Explicit publication permission is required. */
6968
+ uploadPhoto(slug, submission, file, fields, options) {
6969
+ return this.uploadMedia(
6970
+ slug,
6971
+ submission,
6972
+ file,
6973
+ { ...fields, consent_version: fields.consent_version || "" },
6949
6974
  options
6950
6975
  );
6951
6976
  }
package/dist/index.mjs CHANGED
@@ -1073,7 +1073,7 @@ var ScaleMuleClient = class {
1073
1073
  if (this.workspaceId) {
1074
1074
  headers["x-sm-workspace-id"] = this.workspaceId;
1075
1075
  }
1076
- if (!init.skipAuth && !this.sessionToken) {
1076
+ if (!init.skipAuth && !this.sessionToken && !Object.keys(headers).some((key) => key.toLowerCase() === "x-anonymous-id")) {
1077
1077
  if (!this.anonymousId) {
1078
1078
  try {
1079
1079
  await this.ensureAnonymousId();
@@ -1270,14 +1270,12 @@ var ScaleMuleClient = class {
1270
1270
  return { data: null, error: { code: "aborted", message: "Upload aborted", status: 0 } };
1271
1271
  }
1272
1272
  if (options?.onProgress && typeof XMLHttpRequest !== "undefined") {
1273
- return this.uploadWithXHR(url, buildFormData, options.onProgress, options?.signal);
1273
+ return this.uploadWithXHR(url, buildFormData, options.onProgress, options);
1274
1274
  }
1275
1275
  const maxRetries = options?.retries ?? this.maxRetries;
1276
1276
  let lastError = null;
1277
1277
  for (let attempt = 0; attempt <= maxRetries; attempt++) {
1278
- const headers = { "x-api-key": this.apiKey };
1279
- if (this.sessionToken) headers["Authorization"] = `Bearer ${this.sessionToken}`;
1280
- if (this.workspaceId) headers["x-sm-workspace-id"] = this.workspaceId;
1278
+ const headers = await this.uploadHeaders(options);
1281
1279
  try {
1282
1280
  const response = await fetch(url, {
1283
1281
  method: "POST",
@@ -1319,13 +1317,29 @@ var ScaleMuleClient = class {
1319
1317
  }
1320
1318
  return { data: null, error: lastError || { code: "upload_error", message: "Upload failed", status: 0 } };
1321
1319
  }
1320
+ /** Preserve forwarded reader/auth context for both multipart transports. */
1321
+ async uploadHeaders(options) {
1322
+ const headers = { "x-api-key": this.apiKey, ...options?.headers };
1323
+ for (const name of Object.keys(headers)) {
1324
+ if (name.toLowerCase() === "content-type") delete headers[name];
1325
+ }
1326
+ if (this.sessionToken) headers["Authorization"] = `Bearer ${this.sessionToken}`;
1327
+ if (this.workspaceId) headers["x-sm-workspace-id"] = this.workspaceId;
1328
+ if (!this.sessionToken && !Object.keys(headers).some((key) => key.toLowerCase() === "x-anonymous-id")) {
1329
+ headers["x-anonymous-id"] = await this.ensureAnonymousId();
1330
+ }
1331
+ return headers;
1332
+ }
1322
1333
  /**
1323
1334
  * Single upload with XMLHttpRequest for progress tracking.
1324
1335
  * Supports abort via AbortSignal.
1325
1336
  */
1326
- async uploadWithXHR(url, buildFormData, onProgress, signal, maxRetries = this.maxRetries) {
1337
+ async uploadWithXHR(url, buildFormData, onProgress, options) {
1338
+ const signal = options?.signal;
1339
+ const maxRetries = options?.retries ?? this.maxRetries;
1327
1340
  let lastError = null;
1328
1341
  for (let attempt = 0; attempt <= maxRetries; attempt++) {
1342
+ const headers = await this.uploadHeaders(options);
1329
1343
  const result = await new Promise((res) => {
1330
1344
  const xhr = new XMLHttpRequest();
1331
1345
  if (signal) {
@@ -1368,12 +1382,8 @@ var ScaleMuleClient = class {
1368
1382
  res({ data: null, error: { code: "aborted", message: "Upload aborted", status: 0 } });
1369
1383
  });
1370
1384
  xhr.open("POST", url);
1371
- xhr.setRequestHeader("x-api-key", this.apiKey);
1372
- if (this.sessionToken) {
1373
- xhr.setRequestHeader("Authorization", `Bearer ${this.sessionToken}`);
1374
- }
1375
- if (this.workspaceId) {
1376
- xhr.setRequestHeader("x-sm-workspace-id", this.workspaceId);
1385
+ for (const [name, value] of Object.entries(headers)) {
1386
+ xhr.setRequestHeader(name, value);
1377
1387
  }
1378
1388
  xhr.send(buildFormData());
1379
1389
  });
@@ -6829,11 +6839,26 @@ var CommunityMapsService = class extends ServiceModule {
6829
6839
  createSubmission(slug, data, options) {
6830
6840
  return this.post("/collections/" + segment(slug) + "/submissions", data, options);
6831
6841
  }
6832
- uploadPhoto(slug, submission, file, fields, options) {
6842
+ uploadMedia(slug, submission, file, fields, options) {
6833
6843
  return this._upload(
6834
6844
  "/collections/" + segment(slug) + "/submissions/" + segment(submission) + "/media",
6835
6845
  file,
6836
- { caption: fields.caption, attribution: fields.attribution, rights_confirmed: String(fields.rights_confirmed) },
6846
+ {
6847
+ caption: fields.caption,
6848
+ attribution: fields.attribution,
6849
+ rights_confirmed: String(fields.rights_confirmed),
6850
+ consent_version: fields.consent_version
6851
+ },
6852
+ options
6853
+ );
6854
+ }
6855
+ /** @deprecated Use uploadMedia for photos, video and audio. Explicit publication permission is required. */
6856
+ uploadPhoto(slug, submission, file, fields, options) {
6857
+ return this.uploadMedia(
6858
+ slug,
6859
+ submission,
6860
+ file,
6861
+ { ...fields, consent_version: fields.consent_version || "" },
6837
6862
  options
6838
6863
  );
6839
6864
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalemule/sdk",
3
- "version": "0.0.71",
3
+ "version": "0.0.73",
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",