@scalemule/sdk 0.0.79 → 0.0.81
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 +186 -5
- package/dist/index.d.ts +186 -5
- package/dist/index.js +62 -1
- package/dist/index.mjs +60 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -5236,6 +5236,37 @@ interface CommunityMapMedia {
|
|
|
5236
5236
|
caption: string;
|
|
5237
5237
|
attribution: string;
|
|
5238
5238
|
}
|
|
5239
|
+
/**
|
|
5240
|
+
* Where the contributor's device was when a photo was taken (`camera`, read as the
|
|
5241
|
+
* reader form took it) or when they confirmed they were standing at the display
|
|
5242
|
+
* (`at-display`). Sent privately with each attachment; editors see it beside the
|
|
5243
|
+
* photo's own metadata capture and the public guide never shows it.
|
|
5244
|
+
*/
|
|
5245
|
+
type CommunityMapDevicePositionMethod = 'camera' | 'at-display';
|
|
5246
|
+
interface CommunityMapDevicePosition {
|
|
5247
|
+
latitude: number;
|
|
5248
|
+
longitude: number;
|
|
5249
|
+
/** Radius the device reported, in metres. */
|
|
5250
|
+
accuracy_m: number;
|
|
5251
|
+
/** When the device read the position (RFC 3339). */
|
|
5252
|
+
read_at: string;
|
|
5253
|
+
method: CommunityMapDevicePositionMethod;
|
|
5254
|
+
}
|
|
5255
|
+
/** Where/when a photo was taken according to its own metadata; coordinates are null when the file had no usable GPS. Editorial-only. */
|
|
5256
|
+
interface CommunityMapPhotoCapture {
|
|
5257
|
+
source: string;
|
|
5258
|
+
latitude: number | null;
|
|
5259
|
+
longitude: number | null;
|
|
5260
|
+
taken_at?: string | null;
|
|
5261
|
+
camera?: string | null;
|
|
5262
|
+
}
|
|
5263
|
+
interface CommunityMapMediaReceipt {
|
|
5264
|
+
id: string;
|
|
5265
|
+
status: string;
|
|
5266
|
+
/** Whether the uploaded file itself carried a position (never the coordinates). Absent on replayed receipts. */
|
|
5267
|
+
position_captured?: boolean;
|
|
5268
|
+
device_position_recorded?: boolean;
|
|
5269
|
+
}
|
|
5239
5270
|
interface CommunityMapFeature {
|
|
5240
5271
|
id: string;
|
|
5241
5272
|
slug: string;
|
|
@@ -5444,12 +5475,20 @@ interface CommunityMapEditorialMedia extends CommunityMapMedia {
|
|
|
5444
5475
|
feature_id: string | null;
|
|
5445
5476
|
status: string;
|
|
5446
5477
|
revision: number;
|
|
5478
|
+
/** From the photo's own metadata. Editorial-only. */
|
|
5479
|
+
capture?: CommunityMapPhotoCapture | null;
|
|
5480
|
+
/** From the contributor's device. Editorial-only. */
|
|
5481
|
+
device_position?: (CommunityMapDevicePosition & {
|
|
5482
|
+
source: string;
|
|
5483
|
+
}) | null;
|
|
5447
5484
|
}
|
|
5448
5485
|
interface CommunityMapQueueQuery {
|
|
5449
5486
|
after?: string;
|
|
5450
5487
|
limit?: number;
|
|
5451
5488
|
status?: string;
|
|
5452
5489
|
}
|
|
5490
|
+
/** Only the documented fields travel; the service rejects unknown keys. */
|
|
5491
|
+
declare function devicePositionPayload(p: CommunityMapDevicePosition): CommunityMapDevicePosition;
|
|
5453
5492
|
/** Reusable collection APIs; use your application's normal SDK credential/context. */
|
|
5454
5493
|
declare class CommunityMapsService extends ServiceModule {
|
|
5455
5494
|
protected basePath: string;
|
|
@@ -5469,10 +5508,8 @@ declare class CommunityMapsService extends ServiceModule {
|
|
|
5469
5508
|
rights_confirmed: boolean;
|
|
5470
5509
|
idempotency_key?: string;
|
|
5471
5510
|
consent_version: string;
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
status: string;
|
|
5475
|
-
}>>;
|
|
5511
|
+
device_position?: CommunityMapDevicePosition | null;
|
|
5512
|
+
}, options?: RequestOptions): Promise<ApiResponse<CommunityMapMediaReceipt>>;
|
|
5476
5513
|
/** @deprecated Use uploadMedia for photos, video and audio. Explicit publication permission is required. */
|
|
5477
5514
|
uploadPhoto(slug: string, submission: string, file: File | Blob, fields: {
|
|
5478
5515
|
caption: string;
|
|
@@ -6171,6 +6208,149 @@ declare class WebhooksService extends ServiceModule {
|
|
|
6171
6208
|
}>>;
|
|
6172
6209
|
}
|
|
6173
6210
|
|
|
6211
|
+
/**
|
|
6212
|
+
* Newsletters Service Module
|
|
6213
|
+
*
|
|
6214
|
+
* Reader-side newsletter subscriptions with compliance-grade consent
|
|
6215
|
+
* evidence. The gateway records the reader's IP, browser, device fingerprint
|
|
6216
|
+
* and location on every call, so sign-ups made from the reader's browser
|
|
6217
|
+
* carry their own proof. Server-side apps forwarding a reader request must
|
|
6218
|
+
* use the server helper in `@scalemule/nextjs` so the reader's evidence (not
|
|
6219
|
+
* the server's) is recorded.
|
|
6220
|
+
*
|
|
6221
|
+
* Routes (all under /v1/newsletters):
|
|
6222
|
+
* GET /lists → active lists + consent text to show
|
|
6223
|
+
* POST /lists/{slug}/subscriptions → sign up (double opt-in email)
|
|
6224
|
+
* POST /subscriptions/confirm → confirm from the email link token
|
|
6225
|
+
* POST /unsubscribe → opt out with an unsubscribe token
|
|
6226
|
+
* GET /preferences?token= → preference centre (email-only readers)
|
|
6227
|
+
* PUT /preferences?token= → change cadence / pause / resume
|
|
6228
|
+
* GET /me/subscriptions → signed-in reader's subscriptions
|
|
6229
|
+
* PUT /me/subscriptions → signed-in reader changes
|
|
6230
|
+
*/
|
|
6231
|
+
|
|
6232
|
+
/** `edition` = one email per published edition. Lists choose which they offer. */
|
|
6233
|
+
type NewsletterCadence = 'daily' | 'weekly' | 'edition' | (string & NonNullable<unknown>);
|
|
6234
|
+
/** A list a form can offer, with the consent text the form must display. */
|
|
6235
|
+
interface NewsletterList {
|
|
6236
|
+
id: string;
|
|
6237
|
+
slug: string;
|
|
6238
|
+
name: string;
|
|
6239
|
+
description: string | null;
|
|
6240
|
+
kind: 'digest' | 'campaign' | 'announcement';
|
|
6241
|
+
channels: string[];
|
|
6242
|
+
cadence_options: NewsletterCadence[];
|
|
6243
|
+
default_cadence: NewsletterCadence;
|
|
6244
|
+
default_timezone: string;
|
|
6245
|
+
double_opt_in_required: boolean;
|
|
6246
|
+
/** Show `consent_text` next to an unticked checkbox; null when no policy is published. */
|
|
6247
|
+
policy: {
|
|
6248
|
+
version: string;
|
|
6249
|
+
consent_text: string;
|
|
6250
|
+
privacy_policy_url: string | null;
|
|
6251
|
+
} | null;
|
|
6252
|
+
}
|
|
6253
|
+
interface NewsletterSubscribeInput {
|
|
6254
|
+
email?: string;
|
|
6255
|
+
/** Must be true: the reader ticked an unticked consent box. */
|
|
6256
|
+
consent: true;
|
|
6257
|
+
channel?: 'email';
|
|
6258
|
+
cadence?: NewsletterCadence;
|
|
6259
|
+
/** IANA timezone, e.g. `America/Los_Angeles`. */
|
|
6260
|
+
timezone?: string;
|
|
6261
|
+
/** Where the form lives, e.g. `footer`, `article_inline`. */
|
|
6262
|
+
collection_point?: string;
|
|
6263
|
+
collection_url?: string;
|
|
6264
|
+
placement?: string;
|
|
6265
|
+
/** What the reader was looking at, e.g. an article path. */
|
|
6266
|
+
origin_ref?: string;
|
|
6267
|
+
locale?: string;
|
|
6268
|
+
}
|
|
6269
|
+
/**
|
|
6270
|
+
* Sign-up result. `check_email` is returned whether or not the address was
|
|
6271
|
+
* new (no account enumeration); `active` only when the list skips double
|
|
6272
|
+
* opt-in.
|
|
6273
|
+
*/
|
|
6274
|
+
type NewsletterSubscribeResult = {
|
|
6275
|
+
status: 'check_email';
|
|
6276
|
+
} | {
|
|
6277
|
+
status: 'active';
|
|
6278
|
+
/** The signed-in reader's verified address was already subscribed. */
|
|
6279
|
+
already_subscribed?: boolean;
|
|
6280
|
+
list?: {
|
|
6281
|
+
slug: string;
|
|
6282
|
+
name: string;
|
|
6283
|
+
};
|
|
6284
|
+
cadence: NewsletterCadence;
|
|
6285
|
+
next_delivery_at?: string | null;
|
|
6286
|
+
};
|
|
6287
|
+
interface NewsletterConfirmResult {
|
|
6288
|
+
status: 'active';
|
|
6289
|
+
already_confirmed: boolean;
|
|
6290
|
+
list: {
|
|
6291
|
+
slug: string;
|
|
6292
|
+
name: string;
|
|
6293
|
+
};
|
|
6294
|
+
cadence: NewsletterCadence;
|
|
6295
|
+
next_delivery_at?: string | null;
|
|
6296
|
+
/** Preference-centre link for this reader (bearer token inside: do not log). */
|
|
6297
|
+
manage_url?: string;
|
|
6298
|
+
placement: string | null;
|
|
6299
|
+
origin_ref: string | null;
|
|
6300
|
+
}
|
|
6301
|
+
interface NewsletterSubscription {
|
|
6302
|
+
subscription_id: string;
|
|
6303
|
+
list_id: string;
|
|
6304
|
+
slug: string;
|
|
6305
|
+
name: string;
|
|
6306
|
+
cadence_options: NewsletterCadence[];
|
|
6307
|
+
channel: string;
|
|
6308
|
+
cadence: NewsletterCadence;
|
|
6309
|
+
timezone: string;
|
|
6310
|
+
status: 'active' | 'unconfirmed' | 'paused' | 'unsubscribed' | 'suppressed';
|
|
6311
|
+
confirmed_at: string | null;
|
|
6312
|
+
next_delivery_at: string | null;
|
|
6313
|
+
/** Send back as `expected_revision`; a stale value is rejected with 409. */
|
|
6314
|
+
revision: number;
|
|
6315
|
+
}
|
|
6316
|
+
interface NewsletterPreferenceChange {
|
|
6317
|
+
subscription_id: string;
|
|
6318
|
+
expected_revision: number;
|
|
6319
|
+
cadence?: NewsletterCadence;
|
|
6320
|
+
timezone?: string;
|
|
6321
|
+
/** false pauses or unsubscribes, true resumes. */
|
|
6322
|
+
active?: boolean;
|
|
6323
|
+
}
|
|
6324
|
+
declare class NewslettersService extends ServiceModule {
|
|
6325
|
+
protected basePath: string;
|
|
6326
|
+
/** Active lists of this application, with the consent text each form must show. */
|
|
6327
|
+
lists(options?: RequestOptions): Promise<ApiResponse<{
|
|
6328
|
+
lists: NewsletterList[];
|
|
6329
|
+
}>>;
|
|
6330
|
+
/** Signs a reader up. Call from the reader's browser so their own evidence is recorded. */
|
|
6331
|
+
subscribe(slug: string, input: NewsletterSubscribeInput, options?: RequestOptions): Promise<ApiResponse<NewsletterSubscribeResult>>;
|
|
6332
|
+
/** Confirms a sign-up with the token from the confirmation email link. */
|
|
6333
|
+
confirm(token: string, options?: RequestOptions): Promise<ApiResponse<NewsletterConfirmResult>>;
|
|
6334
|
+
/** Opts out with the token from an unsubscribe link. Always succeeds for a well-formed token. */
|
|
6335
|
+
unsubscribe(token: string, reason?: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
6336
|
+
unsubscribed: boolean;
|
|
6337
|
+
}>>;
|
|
6338
|
+
/** Preference centre for readers without an account (token from the manage link). */
|
|
6339
|
+
preferences(token: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
6340
|
+
subscriptions: NewsletterSubscription[];
|
|
6341
|
+
}>>;
|
|
6342
|
+
updatePreferences(token: string, changes: NewsletterPreferenceChange[], options?: RequestOptions): Promise<ApiResponse<{
|
|
6343
|
+
subscriptions: NewsletterSubscription[];
|
|
6344
|
+
}>>;
|
|
6345
|
+
/** The signed-in reader's subscriptions (verified account email only). */
|
|
6346
|
+
mySubscriptions(options?: RequestOptions): Promise<ApiResponse<{
|
|
6347
|
+
subscriptions: NewsletterSubscription[];
|
|
6348
|
+
}>>;
|
|
6349
|
+
updateMySubscriptions(changes: NewsletterPreferenceChange[], options?: RequestOptions): Promise<ApiResponse<{
|
|
6350
|
+
subscriptions: NewsletterSubscription[];
|
|
6351
|
+
}>>;
|
|
6352
|
+
}
|
|
6353
|
+
|
|
6174
6354
|
/**
|
|
6175
6355
|
* Search Service Module
|
|
6176
6356
|
*
|
|
@@ -8495,6 +8675,7 @@ declare class ScaleMule {
|
|
|
8495
8675
|
readonly search: SearchService;
|
|
8496
8676
|
readonly logger: LoggerService;
|
|
8497
8677
|
readonly webhooks: WebhooksService;
|
|
8678
|
+
readonly newsletters: NewslettersService;
|
|
8498
8679
|
readonly leaderboard: LeaderboardService;
|
|
8499
8680
|
readonly listings: ListingsService;
|
|
8500
8681
|
readonly communityMaps: CommunityMapsService;
|
|
@@ -8581,4 +8762,4 @@ declare class ScaleMule {
|
|
|
8581
8762
|
getClient(): ScaleMuleClient;
|
|
8582
8763
|
}
|
|
8583
8764
|
|
|
8584
|
-
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 CommunityValueOutcome, 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, ExperimentAssignment, 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 IntelligenceAction, type IntelligenceCache, type IntelligenceChangePage, type IntelligenceClaim, type IntelligenceEvent, type IntelligenceKind, type IntelligenceRecordPage, type IntelligenceRelease, type IntelligenceReleaseReceipt, type IntelligenceSection, type IntelligenceSource, type IntelligenceStatus, type IntelligenceVerification, 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 LocalBriefing, type LocalIntelligencePreferences, type LocalIntelligenceRecord, LocalIntelligenceService, 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, applyIntelligenceChanges, buildClientContextHeaders, calculateTotalParts, canPerform, createUploadPlan, ScaleMule as default, detectNetworkClass, ensureAnonymousId, extractClientContext, generateAnonymousId, generateUploadSessionId, getMeasuredBandwidthMbps, getPartRange, hasMinRoleLevel, pollSharePercent, pollVoterKey, prepareCommunityMapAttachment, readAnonymousId, resolveStrategy, startMediaCapture, uploadMultipartToS3, uploadSingleToS3, validateIP };
|
|
8765
|
+
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 CommunityMapDevicePosition, type CommunityMapDevicePositionMethod, type CommunityMapEditorialCollection, type CommunityMapEditorialComment, type CommunityMapEditorialFeature, type CommunityMapEditorialMedia, type CommunityMapFeature, type CommunityMapFeatureDraft, type CommunityMapFeatureQuery, type CommunityMapFeatureStatus, type CommunityMapGeometry, type CommunityMapMedia, type CommunityMapMediaReceipt, type CommunityMapOwnSubmission, type CommunityMapOwnSubmissionPage, type CommunityMapPage, type CommunityMapPhotoCapture, 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 CommunityValueOutcome, 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, ExperimentAssignment, 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 IntelligenceAction, type IntelligenceCache, type IntelligenceChangePage, type IntelligenceClaim, type IntelligenceEvent, type IntelligenceKind, type IntelligenceRecordPage, type IntelligenceRelease, type IntelligenceReleaseReceipt, type IntelligenceSection, type IntelligenceSource, type IntelligenceStatus, type IntelligenceVerification, 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 LocalBriefing, type LocalIntelligencePreferences, type LocalIntelligenceRecord, LocalIntelligenceService, 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 NewsletterCadence, type NewsletterConfirmResult, type NewsletterList, type NewsletterPreferenceChange, type NewsletterSubscribeInput, type NewsletterSubscribeResult, type NewsletterSubscription, NewslettersService, 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, applyIntelligenceChanges, buildClientContextHeaders, calculateTotalParts, canPerform, createUploadPlan, ScaleMule as default, detectNetworkClass, devicePositionPayload, ensureAnonymousId, extractClientContext, generateAnonymousId, generateUploadSessionId, getMeasuredBandwidthMbps, getPartRange, hasMinRoleLevel, pollSharePercent, pollVoterKey, prepareCommunityMapAttachment, readAnonymousId, resolveStrategy, startMediaCapture, uploadMultipartToS3, uploadSingleToS3, validateIP };
|
package/dist/index.d.ts
CHANGED
|
@@ -5236,6 +5236,37 @@ interface CommunityMapMedia {
|
|
|
5236
5236
|
caption: string;
|
|
5237
5237
|
attribution: string;
|
|
5238
5238
|
}
|
|
5239
|
+
/**
|
|
5240
|
+
* Where the contributor's device was when a photo was taken (`camera`, read as the
|
|
5241
|
+
* reader form took it) or when they confirmed they were standing at the display
|
|
5242
|
+
* (`at-display`). Sent privately with each attachment; editors see it beside the
|
|
5243
|
+
* photo's own metadata capture and the public guide never shows it.
|
|
5244
|
+
*/
|
|
5245
|
+
type CommunityMapDevicePositionMethod = 'camera' | 'at-display';
|
|
5246
|
+
interface CommunityMapDevicePosition {
|
|
5247
|
+
latitude: number;
|
|
5248
|
+
longitude: number;
|
|
5249
|
+
/** Radius the device reported, in metres. */
|
|
5250
|
+
accuracy_m: number;
|
|
5251
|
+
/** When the device read the position (RFC 3339). */
|
|
5252
|
+
read_at: string;
|
|
5253
|
+
method: CommunityMapDevicePositionMethod;
|
|
5254
|
+
}
|
|
5255
|
+
/** Where/when a photo was taken according to its own metadata; coordinates are null when the file had no usable GPS. Editorial-only. */
|
|
5256
|
+
interface CommunityMapPhotoCapture {
|
|
5257
|
+
source: string;
|
|
5258
|
+
latitude: number | null;
|
|
5259
|
+
longitude: number | null;
|
|
5260
|
+
taken_at?: string | null;
|
|
5261
|
+
camera?: string | null;
|
|
5262
|
+
}
|
|
5263
|
+
interface CommunityMapMediaReceipt {
|
|
5264
|
+
id: string;
|
|
5265
|
+
status: string;
|
|
5266
|
+
/** Whether the uploaded file itself carried a position (never the coordinates). Absent on replayed receipts. */
|
|
5267
|
+
position_captured?: boolean;
|
|
5268
|
+
device_position_recorded?: boolean;
|
|
5269
|
+
}
|
|
5239
5270
|
interface CommunityMapFeature {
|
|
5240
5271
|
id: string;
|
|
5241
5272
|
slug: string;
|
|
@@ -5444,12 +5475,20 @@ interface CommunityMapEditorialMedia extends CommunityMapMedia {
|
|
|
5444
5475
|
feature_id: string | null;
|
|
5445
5476
|
status: string;
|
|
5446
5477
|
revision: number;
|
|
5478
|
+
/** From the photo's own metadata. Editorial-only. */
|
|
5479
|
+
capture?: CommunityMapPhotoCapture | null;
|
|
5480
|
+
/** From the contributor's device. Editorial-only. */
|
|
5481
|
+
device_position?: (CommunityMapDevicePosition & {
|
|
5482
|
+
source: string;
|
|
5483
|
+
}) | null;
|
|
5447
5484
|
}
|
|
5448
5485
|
interface CommunityMapQueueQuery {
|
|
5449
5486
|
after?: string;
|
|
5450
5487
|
limit?: number;
|
|
5451
5488
|
status?: string;
|
|
5452
5489
|
}
|
|
5490
|
+
/** Only the documented fields travel; the service rejects unknown keys. */
|
|
5491
|
+
declare function devicePositionPayload(p: CommunityMapDevicePosition): CommunityMapDevicePosition;
|
|
5453
5492
|
/** Reusable collection APIs; use your application's normal SDK credential/context. */
|
|
5454
5493
|
declare class CommunityMapsService extends ServiceModule {
|
|
5455
5494
|
protected basePath: string;
|
|
@@ -5469,10 +5508,8 @@ declare class CommunityMapsService extends ServiceModule {
|
|
|
5469
5508
|
rights_confirmed: boolean;
|
|
5470
5509
|
idempotency_key?: string;
|
|
5471
5510
|
consent_version: string;
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
status: string;
|
|
5475
|
-
}>>;
|
|
5511
|
+
device_position?: CommunityMapDevicePosition | null;
|
|
5512
|
+
}, options?: RequestOptions): Promise<ApiResponse<CommunityMapMediaReceipt>>;
|
|
5476
5513
|
/** @deprecated Use uploadMedia for photos, video and audio. Explicit publication permission is required. */
|
|
5477
5514
|
uploadPhoto(slug: string, submission: string, file: File | Blob, fields: {
|
|
5478
5515
|
caption: string;
|
|
@@ -6171,6 +6208,149 @@ declare class WebhooksService extends ServiceModule {
|
|
|
6171
6208
|
}>>;
|
|
6172
6209
|
}
|
|
6173
6210
|
|
|
6211
|
+
/**
|
|
6212
|
+
* Newsletters Service Module
|
|
6213
|
+
*
|
|
6214
|
+
* Reader-side newsletter subscriptions with compliance-grade consent
|
|
6215
|
+
* evidence. The gateway records the reader's IP, browser, device fingerprint
|
|
6216
|
+
* and location on every call, so sign-ups made from the reader's browser
|
|
6217
|
+
* carry their own proof. Server-side apps forwarding a reader request must
|
|
6218
|
+
* use the server helper in `@scalemule/nextjs` so the reader's evidence (not
|
|
6219
|
+
* the server's) is recorded.
|
|
6220
|
+
*
|
|
6221
|
+
* Routes (all under /v1/newsletters):
|
|
6222
|
+
* GET /lists → active lists + consent text to show
|
|
6223
|
+
* POST /lists/{slug}/subscriptions → sign up (double opt-in email)
|
|
6224
|
+
* POST /subscriptions/confirm → confirm from the email link token
|
|
6225
|
+
* POST /unsubscribe → opt out with an unsubscribe token
|
|
6226
|
+
* GET /preferences?token= → preference centre (email-only readers)
|
|
6227
|
+
* PUT /preferences?token= → change cadence / pause / resume
|
|
6228
|
+
* GET /me/subscriptions → signed-in reader's subscriptions
|
|
6229
|
+
* PUT /me/subscriptions → signed-in reader changes
|
|
6230
|
+
*/
|
|
6231
|
+
|
|
6232
|
+
/** `edition` = one email per published edition. Lists choose which they offer. */
|
|
6233
|
+
type NewsletterCadence = 'daily' | 'weekly' | 'edition' | (string & NonNullable<unknown>);
|
|
6234
|
+
/** A list a form can offer, with the consent text the form must display. */
|
|
6235
|
+
interface NewsletterList {
|
|
6236
|
+
id: string;
|
|
6237
|
+
slug: string;
|
|
6238
|
+
name: string;
|
|
6239
|
+
description: string | null;
|
|
6240
|
+
kind: 'digest' | 'campaign' | 'announcement';
|
|
6241
|
+
channels: string[];
|
|
6242
|
+
cadence_options: NewsletterCadence[];
|
|
6243
|
+
default_cadence: NewsletterCadence;
|
|
6244
|
+
default_timezone: string;
|
|
6245
|
+
double_opt_in_required: boolean;
|
|
6246
|
+
/** Show `consent_text` next to an unticked checkbox; null when no policy is published. */
|
|
6247
|
+
policy: {
|
|
6248
|
+
version: string;
|
|
6249
|
+
consent_text: string;
|
|
6250
|
+
privacy_policy_url: string | null;
|
|
6251
|
+
} | null;
|
|
6252
|
+
}
|
|
6253
|
+
interface NewsletterSubscribeInput {
|
|
6254
|
+
email?: string;
|
|
6255
|
+
/** Must be true: the reader ticked an unticked consent box. */
|
|
6256
|
+
consent: true;
|
|
6257
|
+
channel?: 'email';
|
|
6258
|
+
cadence?: NewsletterCadence;
|
|
6259
|
+
/** IANA timezone, e.g. `America/Los_Angeles`. */
|
|
6260
|
+
timezone?: string;
|
|
6261
|
+
/** Where the form lives, e.g. `footer`, `article_inline`. */
|
|
6262
|
+
collection_point?: string;
|
|
6263
|
+
collection_url?: string;
|
|
6264
|
+
placement?: string;
|
|
6265
|
+
/** What the reader was looking at, e.g. an article path. */
|
|
6266
|
+
origin_ref?: string;
|
|
6267
|
+
locale?: string;
|
|
6268
|
+
}
|
|
6269
|
+
/**
|
|
6270
|
+
* Sign-up result. `check_email` is returned whether or not the address was
|
|
6271
|
+
* new (no account enumeration); `active` only when the list skips double
|
|
6272
|
+
* opt-in.
|
|
6273
|
+
*/
|
|
6274
|
+
type NewsletterSubscribeResult = {
|
|
6275
|
+
status: 'check_email';
|
|
6276
|
+
} | {
|
|
6277
|
+
status: 'active';
|
|
6278
|
+
/** The signed-in reader's verified address was already subscribed. */
|
|
6279
|
+
already_subscribed?: boolean;
|
|
6280
|
+
list?: {
|
|
6281
|
+
slug: string;
|
|
6282
|
+
name: string;
|
|
6283
|
+
};
|
|
6284
|
+
cadence: NewsletterCadence;
|
|
6285
|
+
next_delivery_at?: string | null;
|
|
6286
|
+
};
|
|
6287
|
+
interface NewsletterConfirmResult {
|
|
6288
|
+
status: 'active';
|
|
6289
|
+
already_confirmed: boolean;
|
|
6290
|
+
list: {
|
|
6291
|
+
slug: string;
|
|
6292
|
+
name: string;
|
|
6293
|
+
};
|
|
6294
|
+
cadence: NewsletterCadence;
|
|
6295
|
+
next_delivery_at?: string | null;
|
|
6296
|
+
/** Preference-centre link for this reader (bearer token inside: do not log). */
|
|
6297
|
+
manage_url?: string;
|
|
6298
|
+
placement: string | null;
|
|
6299
|
+
origin_ref: string | null;
|
|
6300
|
+
}
|
|
6301
|
+
interface NewsletterSubscription {
|
|
6302
|
+
subscription_id: string;
|
|
6303
|
+
list_id: string;
|
|
6304
|
+
slug: string;
|
|
6305
|
+
name: string;
|
|
6306
|
+
cadence_options: NewsletterCadence[];
|
|
6307
|
+
channel: string;
|
|
6308
|
+
cadence: NewsletterCadence;
|
|
6309
|
+
timezone: string;
|
|
6310
|
+
status: 'active' | 'unconfirmed' | 'paused' | 'unsubscribed' | 'suppressed';
|
|
6311
|
+
confirmed_at: string | null;
|
|
6312
|
+
next_delivery_at: string | null;
|
|
6313
|
+
/** Send back as `expected_revision`; a stale value is rejected with 409. */
|
|
6314
|
+
revision: number;
|
|
6315
|
+
}
|
|
6316
|
+
interface NewsletterPreferenceChange {
|
|
6317
|
+
subscription_id: string;
|
|
6318
|
+
expected_revision: number;
|
|
6319
|
+
cadence?: NewsletterCadence;
|
|
6320
|
+
timezone?: string;
|
|
6321
|
+
/** false pauses or unsubscribes, true resumes. */
|
|
6322
|
+
active?: boolean;
|
|
6323
|
+
}
|
|
6324
|
+
declare class NewslettersService extends ServiceModule {
|
|
6325
|
+
protected basePath: string;
|
|
6326
|
+
/** Active lists of this application, with the consent text each form must show. */
|
|
6327
|
+
lists(options?: RequestOptions): Promise<ApiResponse<{
|
|
6328
|
+
lists: NewsletterList[];
|
|
6329
|
+
}>>;
|
|
6330
|
+
/** Signs a reader up. Call from the reader's browser so their own evidence is recorded. */
|
|
6331
|
+
subscribe(slug: string, input: NewsletterSubscribeInput, options?: RequestOptions): Promise<ApiResponse<NewsletterSubscribeResult>>;
|
|
6332
|
+
/** Confirms a sign-up with the token from the confirmation email link. */
|
|
6333
|
+
confirm(token: string, options?: RequestOptions): Promise<ApiResponse<NewsletterConfirmResult>>;
|
|
6334
|
+
/** Opts out with the token from an unsubscribe link. Always succeeds for a well-formed token. */
|
|
6335
|
+
unsubscribe(token: string, reason?: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
6336
|
+
unsubscribed: boolean;
|
|
6337
|
+
}>>;
|
|
6338
|
+
/** Preference centre for readers without an account (token from the manage link). */
|
|
6339
|
+
preferences(token: string, options?: RequestOptions): Promise<ApiResponse<{
|
|
6340
|
+
subscriptions: NewsletterSubscription[];
|
|
6341
|
+
}>>;
|
|
6342
|
+
updatePreferences(token: string, changes: NewsletterPreferenceChange[], options?: RequestOptions): Promise<ApiResponse<{
|
|
6343
|
+
subscriptions: NewsletterSubscription[];
|
|
6344
|
+
}>>;
|
|
6345
|
+
/** The signed-in reader's subscriptions (verified account email only). */
|
|
6346
|
+
mySubscriptions(options?: RequestOptions): Promise<ApiResponse<{
|
|
6347
|
+
subscriptions: NewsletterSubscription[];
|
|
6348
|
+
}>>;
|
|
6349
|
+
updateMySubscriptions(changes: NewsletterPreferenceChange[], options?: RequestOptions): Promise<ApiResponse<{
|
|
6350
|
+
subscriptions: NewsletterSubscription[];
|
|
6351
|
+
}>>;
|
|
6352
|
+
}
|
|
6353
|
+
|
|
6174
6354
|
/**
|
|
6175
6355
|
* Search Service Module
|
|
6176
6356
|
*
|
|
@@ -8495,6 +8675,7 @@ declare class ScaleMule {
|
|
|
8495
8675
|
readonly search: SearchService;
|
|
8496
8676
|
readonly logger: LoggerService;
|
|
8497
8677
|
readonly webhooks: WebhooksService;
|
|
8678
|
+
readonly newsletters: NewslettersService;
|
|
8498
8679
|
readonly leaderboard: LeaderboardService;
|
|
8499
8680
|
readonly listings: ListingsService;
|
|
8500
8681
|
readonly communityMaps: CommunityMapsService;
|
|
@@ -8581,4 +8762,4 @@ declare class ScaleMule {
|
|
|
8581
8762
|
getClient(): ScaleMuleClient;
|
|
8582
8763
|
}
|
|
8583
8764
|
|
|
8584
|
-
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 CommunityValueOutcome, 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, ExperimentAssignment, 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 IntelligenceAction, type IntelligenceCache, type IntelligenceChangePage, type IntelligenceClaim, type IntelligenceEvent, type IntelligenceKind, type IntelligenceRecordPage, type IntelligenceRelease, type IntelligenceReleaseReceipt, type IntelligenceSection, type IntelligenceSource, type IntelligenceStatus, type IntelligenceVerification, 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 LocalBriefing, type LocalIntelligencePreferences, type LocalIntelligenceRecord, LocalIntelligenceService, 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, applyIntelligenceChanges, buildClientContextHeaders, calculateTotalParts, canPerform, createUploadPlan, ScaleMule as default, detectNetworkClass, ensureAnonymousId, extractClientContext, generateAnonymousId, generateUploadSessionId, getMeasuredBandwidthMbps, getPartRange, hasMinRoleLevel, pollSharePercent, pollVoterKey, prepareCommunityMapAttachment, readAnonymousId, resolveStrategy, startMediaCapture, uploadMultipartToS3, uploadSingleToS3, validateIP };
|
|
8765
|
+
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 CommunityMapDevicePosition, type CommunityMapDevicePositionMethod, type CommunityMapEditorialCollection, type CommunityMapEditorialComment, type CommunityMapEditorialFeature, type CommunityMapEditorialMedia, type CommunityMapFeature, type CommunityMapFeatureDraft, type CommunityMapFeatureQuery, type CommunityMapFeatureStatus, type CommunityMapGeometry, type CommunityMapMedia, type CommunityMapMediaReceipt, type CommunityMapOwnSubmission, type CommunityMapOwnSubmissionPage, type CommunityMapPage, type CommunityMapPhotoCapture, 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 CommunityValueOutcome, 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, ExperimentAssignment, 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 IntelligenceAction, type IntelligenceCache, type IntelligenceChangePage, type IntelligenceClaim, type IntelligenceEvent, type IntelligenceKind, type IntelligenceRecordPage, type IntelligenceRelease, type IntelligenceReleaseReceipt, type IntelligenceSection, type IntelligenceSource, type IntelligenceStatus, type IntelligenceVerification, 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 LocalBriefing, type LocalIntelligencePreferences, type LocalIntelligenceRecord, LocalIntelligenceService, 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 NewsletterCadence, type NewsletterConfirmResult, type NewsletterList, type NewsletterPreferenceChange, type NewsletterSubscribeInput, type NewsletterSubscribeResult, type NewsletterSubscription, NewslettersService, 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, applyIntelligenceChanges, buildClientContextHeaders, calculateTotalParts, canPerform, createUploadPlan, ScaleMule as default, detectNetworkClass, devicePositionPayload, ensureAnonymousId, extractClientContext, generateAnonymousId, generateUploadSessionId, getMeasuredBandwidthMbps, getPartRange, hasMinRoleLevel, pollSharePercent, pollVoterKey, prepareCommunityMapAttachment, readAnonymousId, resolveStrategy, startMediaCapture, uploadMultipartToS3, uploadSingleToS3, validateIP };
|
package/dist/index.js
CHANGED
|
@@ -346,6 +346,7 @@ __export(index_exports, {
|
|
|
346
346
|
MAX_EXPERIMENTS_PER_EVENT: () => MAX_EXPERIMENTS_PER_EVENT,
|
|
347
347
|
MEDIA_PRESETS: () => MEDIA_PRESETS,
|
|
348
348
|
MediaService: () => MediaService,
|
|
349
|
+
NewslettersService: () => NewslettersService,
|
|
349
350
|
NotificationsService: () => NotificationsService,
|
|
350
351
|
OrchestratorService: () => OrchestratorService,
|
|
351
352
|
PHONE_COUNTRIES: () => PHONE_COUNTRIES,
|
|
@@ -384,6 +385,7 @@ __export(index_exports, {
|
|
|
384
385
|
default: () => index_default,
|
|
385
386
|
detectCountryFromE164: () => detectCountryFromE164,
|
|
386
387
|
detectNetworkClass: () => detectNetworkClass,
|
|
388
|
+
devicePositionPayload: () => devicePositionPayload,
|
|
387
389
|
ensureAnonymousId: () => ensureAnonymousId,
|
|
388
390
|
experimentVariant: () => experimentVariant,
|
|
389
391
|
exposureEvent: () => exposureEvent,
|
|
@@ -7033,6 +7035,15 @@ var ListingsService = class extends ServiceModule {
|
|
|
7033
7035
|
|
|
7034
7036
|
// src/services/community-maps.ts
|
|
7035
7037
|
var segment = (value) => encodeURIComponent(value);
|
|
7038
|
+
function devicePositionPayload(p) {
|
|
7039
|
+
return {
|
|
7040
|
+
latitude: p.latitude,
|
|
7041
|
+
longitude: p.longitude,
|
|
7042
|
+
accuracy_m: p.accuracy_m,
|
|
7043
|
+
read_at: p.read_at,
|
|
7044
|
+
method: p.method
|
|
7045
|
+
};
|
|
7046
|
+
}
|
|
7036
7047
|
var CommunityMapsService = class extends ServiceModule {
|
|
7037
7048
|
constructor(client) {
|
|
7038
7049
|
super(client);
|
|
@@ -7073,7 +7084,8 @@ var CommunityMapsService = class extends ServiceModule {
|
|
|
7073
7084
|
attribution: fields.attribution,
|
|
7074
7085
|
rights_confirmed: String(fields.rights_confirmed),
|
|
7075
7086
|
consent_version: fields.consent_version,
|
|
7076
|
-
...fields.idempotency_key ? { idempotency_key: fields.idempotency_key } : {}
|
|
7087
|
+
...fields.idempotency_key ? { idempotency_key: fields.idempotency_key } : {},
|
|
7088
|
+
...fields.device_position ? { device_position: JSON.stringify(devicePositionPayload(fields.device_position)) } : {}
|
|
7077
7089
|
},
|
|
7078
7090
|
options
|
|
7079
7091
|
);
|
|
@@ -7509,6 +7521,52 @@ var WebhooksService = class extends ServiceModule {
|
|
|
7509
7521
|
}
|
|
7510
7522
|
};
|
|
7511
7523
|
|
|
7524
|
+
// src/services/newsletters.ts
|
|
7525
|
+
var NewslettersService = class extends ServiceModule {
|
|
7526
|
+
constructor() {
|
|
7527
|
+
super(...arguments);
|
|
7528
|
+
this.basePath = "/v1/newsletters";
|
|
7529
|
+
}
|
|
7530
|
+
/** Active lists of this application, with the consent text each form must show. */
|
|
7531
|
+
async lists(options) {
|
|
7532
|
+
return this._get("/lists", options);
|
|
7533
|
+
}
|
|
7534
|
+
/** Signs a reader up. Call from the reader's browser so their own evidence is recorded. */
|
|
7535
|
+
async subscribe(slug, input, options) {
|
|
7536
|
+
return this.post(
|
|
7537
|
+
`/lists/${encodeURIComponent(slug)}/subscriptions`,
|
|
7538
|
+
{ channel: "email", ...input },
|
|
7539
|
+
{ skipRetry: true, ...options }
|
|
7540
|
+
);
|
|
7541
|
+
}
|
|
7542
|
+
/** Confirms a sign-up with the token from the confirmation email link. */
|
|
7543
|
+
async confirm(token, options) {
|
|
7544
|
+
return this.post("/subscriptions/confirm", { token }, options);
|
|
7545
|
+
}
|
|
7546
|
+
/** Opts out with the token from an unsubscribe link. Always succeeds for a well-formed token. */
|
|
7547
|
+
async unsubscribe(token, reason, options) {
|
|
7548
|
+
return this.post("/unsubscribe", reason ? { token, reason } : { token }, options);
|
|
7549
|
+
}
|
|
7550
|
+
/** Preference centre for readers without an account (token from the manage link). */
|
|
7551
|
+
async preferences(token, options) {
|
|
7552
|
+
return this._get(this.withQuery("/preferences", { token }), options);
|
|
7553
|
+
}
|
|
7554
|
+
async updatePreferences(token, changes, options) {
|
|
7555
|
+
return this.put(
|
|
7556
|
+
this.withQuery("/preferences", { token }),
|
|
7557
|
+
{ changes },
|
|
7558
|
+
options
|
|
7559
|
+
);
|
|
7560
|
+
}
|
|
7561
|
+
/** The signed-in reader's subscriptions (verified account email only). */
|
|
7562
|
+
async mySubscriptions(options) {
|
|
7563
|
+
return this._get("/me/subscriptions", options);
|
|
7564
|
+
}
|
|
7565
|
+
async updateMySubscriptions(changes, options) {
|
|
7566
|
+
return this.put("/me/subscriptions", { changes }, options);
|
|
7567
|
+
}
|
|
7568
|
+
};
|
|
7569
|
+
|
|
7512
7570
|
// src/services/search.ts
|
|
7513
7571
|
var SearchService = class extends ServiceModule {
|
|
7514
7572
|
constructor() {
|
|
@@ -9462,6 +9520,7 @@ var ScaleMule = class {
|
|
|
9462
9520
|
this.search = new SearchService(this._client);
|
|
9463
9521
|
this.logger = new LoggerService(this._client);
|
|
9464
9522
|
this.webhooks = new WebhooksService(this._client);
|
|
9523
|
+
this.newsletters = new NewslettersService(this._client);
|
|
9465
9524
|
this.leaderboard = new LeaderboardService(this._client);
|
|
9466
9525
|
this.listings = new ListingsService(this._client);
|
|
9467
9526
|
this.communityMaps = new CommunityMapsService(this._client);
|
|
@@ -9651,6 +9710,7 @@ var index_default = ScaleMule;
|
|
|
9651
9710
|
MAX_EXPERIMENTS_PER_EVENT,
|
|
9652
9711
|
MEDIA_PRESETS,
|
|
9653
9712
|
MediaService,
|
|
9713
|
+
NewslettersService,
|
|
9654
9714
|
NotificationsService,
|
|
9655
9715
|
OrchestratorService,
|
|
9656
9716
|
PHONE_COUNTRIES,
|
|
@@ -9688,6 +9748,7 @@ var index_default = ScaleMule;
|
|
|
9688
9748
|
createUploadPlan,
|
|
9689
9749
|
detectCountryFromE164,
|
|
9690
9750
|
detectNetworkClass,
|
|
9751
|
+
devicePositionPayload,
|
|
9691
9752
|
ensureAnonymousId,
|
|
9692
9753
|
experimentVariant,
|
|
9693
9754
|
exposureEvent,
|
package/dist/index.mjs
CHANGED
|
@@ -6897,6 +6897,15 @@ var ListingsService = class extends ServiceModule {
|
|
|
6897
6897
|
|
|
6898
6898
|
// src/services/community-maps.ts
|
|
6899
6899
|
var segment = (value) => encodeURIComponent(value);
|
|
6900
|
+
function devicePositionPayload(p) {
|
|
6901
|
+
return {
|
|
6902
|
+
latitude: p.latitude,
|
|
6903
|
+
longitude: p.longitude,
|
|
6904
|
+
accuracy_m: p.accuracy_m,
|
|
6905
|
+
read_at: p.read_at,
|
|
6906
|
+
method: p.method
|
|
6907
|
+
};
|
|
6908
|
+
}
|
|
6900
6909
|
var CommunityMapsService = class extends ServiceModule {
|
|
6901
6910
|
constructor(client) {
|
|
6902
6911
|
super(client);
|
|
@@ -6937,7 +6946,8 @@ var CommunityMapsService = class extends ServiceModule {
|
|
|
6937
6946
|
attribution: fields.attribution,
|
|
6938
6947
|
rights_confirmed: String(fields.rights_confirmed),
|
|
6939
6948
|
consent_version: fields.consent_version,
|
|
6940
|
-
...fields.idempotency_key ? { idempotency_key: fields.idempotency_key } : {}
|
|
6949
|
+
...fields.idempotency_key ? { idempotency_key: fields.idempotency_key } : {},
|
|
6950
|
+
...fields.device_position ? { device_position: JSON.stringify(devicePositionPayload(fields.device_position)) } : {}
|
|
6941
6951
|
},
|
|
6942
6952
|
options
|
|
6943
6953
|
);
|
|
@@ -7373,6 +7383,52 @@ var WebhooksService = class extends ServiceModule {
|
|
|
7373
7383
|
}
|
|
7374
7384
|
};
|
|
7375
7385
|
|
|
7386
|
+
// src/services/newsletters.ts
|
|
7387
|
+
var NewslettersService = class extends ServiceModule {
|
|
7388
|
+
constructor() {
|
|
7389
|
+
super(...arguments);
|
|
7390
|
+
this.basePath = "/v1/newsletters";
|
|
7391
|
+
}
|
|
7392
|
+
/** Active lists of this application, with the consent text each form must show. */
|
|
7393
|
+
async lists(options) {
|
|
7394
|
+
return this._get("/lists", options);
|
|
7395
|
+
}
|
|
7396
|
+
/** Signs a reader up. Call from the reader's browser so their own evidence is recorded. */
|
|
7397
|
+
async subscribe(slug, input, options) {
|
|
7398
|
+
return this.post(
|
|
7399
|
+
`/lists/${encodeURIComponent(slug)}/subscriptions`,
|
|
7400
|
+
{ channel: "email", ...input },
|
|
7401
|
+
{ skipRetry: true, ...options }
|
|
7402
|
+
);
|
|
7403
|
+
}
|
|
7404
|
+
/** Confirms a sign-up with the token from the confirmation email link. */
|
|
7405
|
+
async confirm(token, options) {
|
|
7406
|
+
return this.post("/subscriptions/confirm", { token }, options);
|
|
7407
|
+
}
|
|
7408
|
+
/** Opts out with the token from an unsubscribe link. Always succeeds for a well-formed token. */
|
|
7409
|
+
async unsubscribe(token, reason, options) {
|
|
7410
|
+
return this.post("/unsubscribe", reason ? { token, reason } : { token }, options);
|
|
7411
|
+
}
|
|
7412
|
+
/** Preference centre for readers without an account (token from the manage link). */
|
|
7413
|
+
async preferences(token, options) {
|
|
7414
|
+
return this._get(this.withQuery("/preferences", { token }), options);
|
|
7415
|
+
}
|
|
7416
|
+
async updatePreferences(token, changes, options) {
|
|
7417
|
+
return this.put(
|
|
7418
|
+
this.withQuery("/preferences", { token }),
|
|
7419
|
+
{ changes },
|
|
7420
|
+
options
|
|
7421
|
+
);
|
|
7422
|
+
}
|
|
7423
|
+
/** The signed-in reader's subscriptions (verified account email only). */
|
|
7424
|
+
async mySubscriptions(options) {
|
|
7425
|
+
return this._get("/me/subscriptions", options);
|
|
7426
|
+
}
|
|
7427
|
+
async updateMySubscriptions(changes, options) {
|
|
7428
|
+
return this.put("/me/subscriptions", { changes }, options);
|
|
7429
|
+
}
|
|
7430
|
+
};
|
|
7431
|
+
|
|
7376
7432
|
// src/services/search.ts
|
|
7377
7433
|
var SearchService = class extends ServiceModule {
|
|
7378
7434
|
constructor() {
|
|
@@ -9326,6 +9382,7 @@ var ScaleMule = class {
|
|
|
9326
9382
|
this.search = new SearchService(this._client);
|
|
9327
9383
|
this.logger = new LoggerService(this._client);
|
|
9328
9384
|
this.webhooks = new WebhooksService(this._client);
|
|
9385
|
+
this.newsletters = new NewslettersService(this._client);
|
|
9329
9386
|
this.leaderboard = new LeaderboardService(this._client);
|
|
9330
9387
|
this.listings = new ListingsService(this._client);
|
|
9331
9388
|
this.communityMaps = new CommunityMapsService(this._client);
|
|
@@ -9514,6 +9571,7 @@ export {
|
|
|
9514
9571
|
MAX_EXPERIMENTS_PER_EVENT,
|
|
9515
9572
|
MEDIA_PRESETS,
|
|
9516
9573
|
MediaService,
|
|
9574
|
+
NewslettersService,
|
|
9517
9575
|
NotificationsService,
|
|
9518
9576
|
OrchestratorService,
|
|
9519
9577
|
PHONE_COUNTRIES,
|
|
@@ -9552,6 +9610,7 @@ export {
|
|
|
9552
9610
|
index_default as default,
|
|
9553
9611
|
detectCountryFromE164,
|
|
9554
9612
|
detectNetworkClass,
|
|
9613
|
+
devicePositionPayload,
|
|
9555
9614
|
ensureAnonymousId,
|
|
9556
9615
|
experimentVariant,
|
|
9557
9616
|
exposureEvent,
|