@sparkvault/sdk-js 15.6.0 → 15.7.1
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/errors.d.ts +12 -1
- package/dist/index.cjs +4063 -4041
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +36 -7
- package/dist/index.mjs +4062 -4042
- package/dist/index.mjs.map +1 -1
- package/dist/products/help-desk/desk-id.d.ts +1 -1
- package/dist/products/help-desk/support-analytics-types.d.ts +2 -1
- package/dist/products/help-desk/support-analytics.d.ts +0 -1
- package/dist/products/help-desk/support-view.d.ts +0 -3
- package/dist/products/notify/project-types.d.ts +23 -5
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -624,9 +624,15 @@ declare class IdentityModule {
|
|
|
624
624
|
/** Named Notify projects owned and billed by one company account. */
|
|
625
625
|
type NotifyProjectStatus = 'draft' | 'active' | 'read_only' | 'archived';
|
|
626
626
|
interface NotifyProjectBilling {
|
|
627
|
+
/** Present on the flat subscription backed by the company's shared wallet. */
|
|
628
|
+
billing_model?: 'usage_credits';
|
|
629
|
+
enabled?: boolean;
|
|
630
|
+
included_monthly_credits?: number;
|
|
631
|
+
renewal_included_monthly_credits?: number;
|
|
627
632
|
subscription_item_id?: string | null;
|
|
628
633
|
subscription_id?: string | null;
|
|
629
634
|
status: 'draft' | 'active' | 'past_due' | 'read_only';
|
|
635
|
+
/** Historical tier allowance. The credit model's compatibility value is not a usage ceiling. */
|
|
630
636
|
notifications_cap: number;
|
|
631
637
|
/** Allowance selected for the next period when a downgrade is scheduled. */
|
|
632
638
|
renewal_notifications_cap?: number;
|
|
@@ -674,12 +680,24 @@ interface UpdateNotifyProjectOptions {
|
|
|
674
680
|
description?: string;
|
|
675
681
|
sender_name?: string | null;
|
|
676
682
|
}
|
|
677
|
-
|
|
678
|
-
|
|
683
|
+
type PreviewNotifyProjectSubscriptionOptions =
|
|
684
|
+
/** New project: one flat monthly plan with credits shared across the company. */
|
|
685
|
+
{
|
|
686
|
+
billingModel: 'usage_credits';
|
|
687
|
+
notificationsPerMonth?: never;
|
|
679
688
|
}
|
|
689
|
+
/** Existing legacy project: retain its published notification tier. */
|
|
690
|
+
| {
|
|
691
|
+
billingModel?: undefined;
|
|
692
|
+
notificationsPerMonth: number;
|
|
693
|
+
};
|
|
680
694
|
interface NotifyProjectSubscriptionPreview {
|
|
681
695
|
project_id: string;
|
|
682
|
-
|
|
696
|
+
/** Present for the flat shared-credit plan; absent for historical tier plans. */
|
|
697
|
+
billing_model?: 'usage_credits';
|
|
698
|
+
included_monthly_credits?: number;
|
|
699
|
+
/** Present only when reviewing a historical tier plan. */
|
|
700
|
+
notifications_per_month?: number;
|
|
683
701
|
/** Exact decimal USD amounts, as strings; repeat the quote without float conversion. */
|
|
684
702
|
monthly_usd: string;
|
|
685
703
|
amount_due_now_usd: string;
|
|
@@ -688,11 +706,11 @@ interface NotifyProjectSubscriptionPreview {
|
|
|
688
706
|
effective_at: number | null;
|
|
689
707
|
checkout_required: boolean;
|
|
690
708
|
}
|
|
691
|
-
|
|
709
|
+
type SubscribeNotifyProjectOptions = PreviewNotifyProjectSubscriptionOptions & {
|
|
692
710
|
/** Repeat the reviewed quote; a changed price is refused rather than charged. */
|
|
693
711
|
quotedAmountDueNowUsd: string;
|
|
694
712
|
prorationDate: number;
|
|
695
|
-
}
|
|
713
|
+
};
|
|
696
714
|
interface NotifyProjectSubscriptionResponse {
|
|
697
715
|
project: NotifyProject;
|
|
698
716
|
/** Present when the company's first subscription needs hosted payment setup. */
|
|
@@ -4317,7 +4335,7 @@ declare class SparkVaultError extends Error {
|
|
|
4317
4335
|
* answer named none (a gateway's HTML). A typed refusal's `code` names its
|
|
4318
4336
|
* class of failure: one per 400 (`validation_error`), two per 401
|
|
4319
4337
|
* (`authentication_error`, `UNAUTHORIZED`), 402 (`PLAN_REQUIRED`,
|
|
4320
|
-
* `QUOTA_EXCEEDED`) and 403 (`authorization_error`, `NOTIFY_SUBSCRIPTION_REQUIRED`;
|
|
4338
|
+
* `QUOTA_EXCEEDED`, `USAGE_CREDITS_EXHAUSTED`) and 403 (`authorization_error`, `NOTIFY_SUBSCRIPTION_REQUIRED`;
|
|
4321
4339
|
* http.ts createErrorFromResponse), so this is what tells apart two
|
|
4322
4340
|
* refusals that share a code.
|
|
4323
4341
|
* Undefined on an error the SDK raised itself, on the Identity product's
|
|
@@ -4362,6 +4380,17 @@ type QuotaResource = 'storage' | 'bandwidth';
|
|
|
4362
4380
|
declare class PlanRequiredError extends SparkVaultError {
|
|
4363
4381
|
constructor(message: string, details?: Record<string, unknown>, retryAfterMs?: number | null, serviceCode?: string);
|
|
4364
4382
|
}
|
|
4383
|
+
/**
|
|
4384
|
+
* Prepaid usage is exhausted (402 USAGE_CREDITS_EXHAUSTED). The subscription
|
|
4385
|
+
* can still be active: an admin replenishes the shared usage-credit wallet.
|
|
4386
|
+
*/
|
|
4387
|
+
declare class UsageCreditsExhaustedError extends SparkVaultError {
|
|
4388
|
+
constructor(message: string, details?: Record<string, unknown>, retryAfterMs?: number | null, serviceCode?: string);
|
|
4389
|
+
}
|
|
4390
|
+
/** A payment reversal requires billing review; buying more credits cannot clear it. */
|
|
4391
|
+
declare class UsageCreditFundingReviewError extends SparkVaultError {
|
|
4392
|
+
constructor(message: string, details?: Record<string, unknown>, retryAfterMs?: number | null, serviceCode?: string);
|
|
4393
|
+
}
|
|
4365
4394
|
/**
|
|
4366
4395
|
* Quota exceeded gate (402 QUOTA_EXCEEDED) — a pooled-capacity limit is
|
|
4367
4396
|
* exhausted. `resource` identifies which pool so callers can point the CTA at
|
|
@@ -5553,5 +5582,5 @@ declare global {
|
|
|
5553
5582
|
}
|
|
5554
5583
|
}
|
|
5555
5584
|
|
|
5556
|
-
export { AuthenticationError, AuthorizationError, EntropyModule, FoldersModule, HelpDeskClient, HelpDeskModule, IdentityModule, IdentityProviderError, IngotsModule, NAME_CONFLICT_POLICIES, NOTIFY_PRESETS, NetworkError, NotifyModule, NotifyProductModule, NotifyProjectsModule, NotifySubscriptionRequiredError, PlanRequiredError, PopupBlockedError, ProductsModule, QuotaExceededError, SparkVault, SparkVaultError, SparksModule, TimeoutError, UnauthorizedError, UserCancelledError, ValidationError, VaultsModule, buildNotifyPresetSend, SparkVault as default, fetchDownload, isReceivedUploadFailure, logger, setDebugMode };
|
|
5585
|
+
export { AuthenticationError, AuthorizationError, EntropyModule, FoldersModule, HelpDeskClient, HelpDeskModule, IdentityModule, IdentityProviderError, IngotsModule, NAME_CONFLICT_POLICIES, NOTIFY_PRESETS, NetworkError, NotifyModule, NotifyProductModule, NotifyProjectsModule, NotifySubscriptionRequiredError, PlanRequiredError, PopupBlockedError, ProductsModule, QuotaExceededError, SparkVault, SparkVaultError, SparksModule, TimeoutError, UnauthorizedError, UsageCreditFundingReviewError, UsageCreditsExhaustedError, UserCancelledError, ValidationError, VaultsModule, buildNotifyPresetSend, SparkVault as default, fetchDownload, isReceivedUploadFailure, logger, setDebugMode };
|
|
5557
5586
|
export type { AccessLogRetention, AccessLogsOptions, CreateFolderOptions, CreateNotifyProjectOptions, CreateNotifySendOptions, CreateSparkOptions, CreateUploadOptions, CreateVaultOptions, CreatedIngot, CreatedSpark, DownloadIngotOptions, EntropyFormat, EntropyResult, FetchDownloadOptions, FetchedDownload, Folder, FolderBreadcrumbItem, FolderContents, FolderPage, GenerateEntropyOptions, HealthCheckOptions, HealthCheckResult, HelpDeskAttachmentDownload, HelpDeskAttachmentInput, HelpDeskAttachmentUpload, HelpDeskConnectOptions, HelpDeskCreateTicketOptions, HelpDeskCustomer, HelpDeskCustomerPatch, HelpDeskDesk, HelpDeskDraft, HelpDeskEvent, HelpDeskExternalChallenge, HelpDeskExternalIdentity, HelpDeskFormHandle, HelpDeskFormOptions, HelpDeskFormState, HelpDeskIdentityRequest, HelpDeskListTicketsOptions, HelpDeskMountFormOptions, HelpDeskOpenFormOptions, HelpDeskPinChallenge, HelpDeskReplyCreated, HelpDeskReplyOptions, HelpDeskRequestContext, HelpDeskSession, HelpDeskSessionChange, HelpDeskSupportHandle, HelpDeskSupportLauncherOptions, HelpDeskSupportOpenOptions, HelpDeskSupportOptions, HelpDeskSupportStage, HelpDeskSupportState, HelpDeskTicket, HelpDeskTicketCreated, HelpDeskTicketDetail, HelpDeskTicketList, HelpDeskTimeline, HelpDeskVerifyPinOptions, HelpDeskWidgetFormIdentity, HelpDeskWidgetIdentityChallenge, HelpDeskWidgetIdentityOptions, HelpDeskWidgetIdentitySession, AttachOptions as IdentityAttachOptions, Ingot, IngotAccessLog, IngotAccessLogPage, IngotDownloadLink, IngotInvitation, IngotInvite, IngotPage, IngotSharingConfig, IngotUpload, ListContentsOptions, ListFoldersOptions, ListIngotsOptions, ListNotificationsOptions, ListNotificationsResponse, ListNotifyInboxOptions, ListNotifyInboxResponse, ListNotifyProjectsResponse, ListNotifyReceiptsOptions, ListNotifyReceiptsResponse, ListNotifySendsOptions, ListNotifySendsResponse, ListSparksOptions, MarkAllNotificationsStateOptions, MarkAllNotificationsStateResponse, MarkAllReadResult, MarkNotificationStateOptions, MarkNotificationStateResponse, MarkNotifyInboxAllOptions, MarkNotifyInboxAllResponse, MarkNotifyInboxStateOptions, MarkNotifyInboxStateResponse, NameConflictPolicy, NotificationBulkMarkState, NotificationInboxState, NotificationMarkState, NotificationRow, NotificationSender, NotifyCategory, NotifyChannel, NotifyConfig, NotifyConfigCategory, NotifyConfigDelivery, NotifyConfigDeliveryPatch, NotifyConfigDestinations, NotifyConfigDestinationsPatch, NotifyConfigEvents, NotifyConfigEventsRead, NotifyConfigHistory, NotifyConfigOverrides, NotifyConfigPatch, NotifyConfigRealtimeFallbackDelay, NotifyConfigReliability, NotifyConfigResponse, NotifyConfigSecurity, NotifyDeliveryMode, NotifyDestinationFailureReason, NotifyDestinationKind, NotifyDestinationReason, NotifyDestinationSkipReason, NotifyDestinationState, NotifyDestinationTestReason, NotifyDestinationTestResult, NotifyDestinationTransportReason, NotifyEscalation, NotifyInboxBulkMarkState, NotifyInboxMarkState, NotifyInboxRow, NotifyInboxView, NotifyIngotRef, NotifyInteraction, NotifyPreset, NotifyPresetCategory, NotifyPresetName, NotifyPresetSendOptions, NotifyProject, NotifyProjectBilling, NotifyProjectStatus, NotifyProjectSubscriptionPreview, NotifyProjectSubscriptionResponse, NotifyProjectUsage, NotifyRecallMode, NotifyReceipt, NotifyReceiptEventType, NotifyRecipient, NotifyRecipientRef, NotifyRecipientState, NotifyReportableVerificationLevel, NotifySendContent, NotifySendPolicy, NotifySendReceipt, NotifySendReceiptsResponse, NotifySendResult, NotifySendState, NotifySendStatus, NotifySendStatusCounts, NotifySendStatusDestination, NotifySendStatusRecipient, NotifySendSummary, NotifySendSummaryDestination, NotifySlackDestination, NotifySuppressionReason, NotifyTeamsDestination, NotifyTeamsDestinationRead, NotifyVerificationLevel, NotifyWebhookDestination, NotifyWebhookDestinationRead, PreviewNotifyProjectSubscriptionOptions, QuotaResource, RecallNotifySendOptions, RecallNotifySendResponse, RegisterWebPushResponse, ReplaceIngotOptions, ResumeUploadOptions, ScheduledVaultDeletion, SearchIngotsOptions, SendUploadOptions, ShareSparkOptions, SignInOptions, SignInResult, Spark, SparkInviteResend, SparkLinkActionOptions, SparkPage, SparkShare, SparkSummary, SparkVaultConfig, SparkVisibility, StartedVaultDeletion, SubscribeNotifyProjectOptions, SubscribeWebPushOptions, SubscribeWebPushResult, SubscribeWebPushStatus, TokenClaims, UnreachedAdmin, UnreadCountResponse, UnsealVaultOptions, UnsealedVault, UnsubscribeWebPushResponse, UpdateFolderOptions, UpdateIngotSharingOptions, UpdateNotifyProjectOptions, UpdateVaultUploadOptions, UpdatedVault, UploadAttachOptions, UploadBranding, UploadEnd, UploadIngotOptions, UploadOptions, UploadProgress, UploadResult, UploadSession, Vault, VaultDetail, VaultLifecycle, VaultResealDefaults, VaultResealSettings, VaultResealSettingsResult, VaultSessionExtension, VaultSessionTiming, VaultSharingConfig, VaultSharingOptions, VaultSummary, VaultUploadConfig, VaultUploadSettings, VerifyOptions, VerifyResult, WebPushKeyResponse, WebPushStatus, WebPushStatusOptions, WebPushStatusResult, WebPushSubscriptionInput };
|