@sparkvault/sdk-js 15.14.3 → 15.15.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/index.cjs +47 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +56 -10
- package/dist/index.mjs +47 -26
- package/dist/index.mjs.map +1 -1
- package/dist/products/identity/views/sms-consent.d.ts +2 -1
- package/dist/products/index.d.ts +1 -1
- package/dist/products/notify/index.d.ts +8 -4
- package/dist/products/notify/types.d.ts +48 -6
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
* the field or the methods above it, so a screen reader reads it with them.
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
|
-
* The consent line, its "Terms"
|
|
11
|
+
* The consent line, its "Terms" and "Privacy Policy" opening those documents
|
|
12
|
+
* in a new tab.
|
|
12
13
|
*
|
|
13
14
|
* @param id - The line's id, which the field or each method names in its `aria-describedby`
|
|
14
15
|
*/
|
package/dist/products/index.d.ts
CHANGED
|
@@ -47,5 +47,5 @@ export type * from './help-desk/support-types';
|
|
|
47
47
|
export type { HelpDeskWidgetIdentityOptions, HelpDeskWidgetIdentityChallenge, HelpDeskWidgetIdentitySession } from './help-desk/widget-identity';
|
|
48
48
|
export type { HelpDeskMountFormOptions, HelpDeskOpenFormOptions } from './help-desk';
|
|
49
49
|
export type { SignInOptions, SignInResult, VerifyOptions, AttachOptions, VerifyResult, TokenClaims, } from './identity';
|
|
50
|
-
export type { NotifyChannel, NotifyDeliveryMode, NotifyVerificationLevel, NotifyInteraction, NotifyPresetCategory, NotifyCategory, NotifyPresetName, NotifyPresetSendOptions, NotifyPreset, NotifyRecipient, NotifyRecipientRef, NotifySendContent, NotifyIngotRef, NotifySendPolicy, NotifyEscalation, CreateNotifySendOptions, NotifySendResult, NotifyInboxView, NotifyInboxMarkState, NotifyInboxBulkMarkState, NotifyInboxRow, ListNotifyInboxOptions, ListNotifyInboxResponse, MarkNotifyInboxStateOptions, MarkNotifyInboxStateResponse, MarkNotifyInboxAllOptions, MarkNotifyInboxAllResponse, NotifySendStatus, NotifySendStatusRecipient, NotifyRecipientState, NotifySuppressionReason, NotifySendStatusCounts, NotifySendState, NotifySendSummary, ListNotifySendsOptions, ListNotifySendsResponse, NotifyRecallMode, RecallNotifySendOptions, RecallNotifySendResponse, NotifyReceipt, NotifyReportableVerificationLevel, NotifyReceiptEventType, NotifySendReceipt, ListNotifyReceiptsOptions, ListNotifyReceiptsResponse, NotifySendReceiptsResponse, NotifyConfig, NotifyConfigCategory, NotifyConfigDelivery, NotifyConfigDeliveryPatch, NotifyConfigRealtimeFallbackDelay, NotifyConfigReliability, NotifyConfigHistory, NotifyConfigSecurity, NotifyConfigEvents, NotifyConfigEventsRead, NotifyConfigPatch, NotifyConfigOverrides, NotifyConfigResponse, NotifyDestinationKind, NotifyDestinationState, NotifyDestinationSkipReason, NotifyDestinationFailureReason, NotifyDestinationReason, NotifyDestinationTransportReason, NotifyDestinationTestReason, NotifyDestinationTestResult, NotifySendStatusDestination, NotifySendSummaryDestination, NotifyWebhookDestination, NotifyWebhookDestinationRead, NotifySlackDestination, NotifyTeamsDestination, NotifyTeamsDestinationRead, NotifyConfigDestinations, NotifyConfigDestinationsPatch, } from './notify';
|
|
50
|
+
export type { NotifyChannel, NotifyDeliveryMode, NotifyVerificationLevel, NotifyInteraction, NotifyPresetCategory, NotifyCategory, NotifyPresetName, NotifyPresetSendOptions, NotifyPreset, NotifyRecipient, NotifyRecipientRef, NotifySendContent, NotifyIngotRef, NotifySendPolicy, NotifyEscalation, CreateNotifySendOptions, NotifySendResult, NotifyInboxView, NotifyInboxMarkState, NotifyInboxBulkMarkState, NotifyInboxRow, ListNotifyInboxOptions, ListNotifyInboxResponse, MarkNotifyInboxStateOptions, MarkNotifyInboxStateResponse, MarkNotifyInboxAllOptions, MarkNotifyInboxAllResponse, NotifySendStatus, NotifySendStatusRecipient, NotifyRecipientState, NotifySuppressionReason, NotifySendStatusCounts, NotifySendState, NotifySendSummary, ListNotifySendsOptions, ListNotifySendsResponse, NotifyRecallMode, RecallNotifySendOptions, RecallNotifySendResponse, NotifyReceipt, NotifyReportableVerificationLevel, NotifyReceiptEventType, NotifySendReceipt, ListNotifyReceiptsOptions, ListNotifyReceiptsResponse, NotifySendReceiptsResponse, NotifyConfig, NotifyConfigCategory, NotifyConfigDelivery, NotifyConfigDeliveryPatch, NotifyConfigRealtimeFallbackDelay, NotifyConfigReliability, NotifyConfigHistory, NotifyConfigSecurity, NotifyConfigEvents, NotifyConfigEventsRead, NotifyConfigPatch, NotifyConfigOverrides, NotifyConfigResponse, NotifyDestinationKind, NotifyDestinationState, NotifyDestinationSkipReason, NotifyDestinationFailureReason, NotifyDestinationReason, NotifyDestinationTransportReason, NotifyConfigRefusalReason, NotifyDestinationTestReason, NotifyDestinationTestResult, NotifySendStatusDestination, NotifySendSummaryDestination, NotifyWebhookDestination, NotifyWebhookDestinationRead, NotifySlackDestination, NotifySlackDestinationRead, NotifyTeamsDestination, NotifyTeamsDestinationRead, NotifyConfigDestinations, NotifyConfigDestinationsPatch, } from './notify';
|
|
51
51
|
export type * from './notify/project-types';
|
|
@@ -311,10 +311,13 @@ export declare class NotifyProductModule {
|
|
|
311
311
|
/**
|
|
312
312
|
* The account's effective Notify config (secure defaults deep-merged with its
|
|
313
313
|
* overrides) plus the raw override delta, so an editor can show what is
|
|
314
|
-
* customized versus default
|
|
314
|
+
* customized versus default, and the `version` of the stored config they
|
|
315
|
+
* show (0 before anything is saved, one higher with each save). Answers can
|
|
316
|
+
* arrive out of order, as two overlapping `updateConfig` calls' can: the one
|
|
317
|
+
* with the higher `version` is the newer config, so keep that one.
|
|
315
318
|
*
|
|
316
319
|
* @example
|
|
317
|
-
* const { effective, overrides } = await sv.products.notify.getConfig();
|
|
320
|
+
* const { effective, overrides, version } = await sv.products.notify.getConfig();
|
|
318
321
|
*/
|
|
319
322
|
getConfig(): Promise<NotifyConfigResponse>;
|
|
320
323
|
/**
|
|
@@ -345,7 +348,8 @@ export declare class NotifyProductModule {
|
|
|
345
348
|
* (`details: { sections, required_role: 'admin' }`). A ladder naming a channel
|
|
346
349
|
* other than `in_app` and `email` is refused 403 `NOTIFY_CHANNEL_NOT_AVAILABLE`
|
|
347
350
|
* (`details: { field, channels }`); a save that overlapping saves kept
|
|
348
|
-
* outracing is refused 409 `CONFLICT`: reload and patch again.
|
|
351
|
+
* outracing is refused 409 `CONFLICT`: reload and patch again. A save answers
|
|
352
|
+
* as `getConfig` does, its `version` the one this save wrote.
|
|
349
353
|
*
|
|
350
354
|
* @example
|
|
351
355
|
* await sv.products.notify.updateConfig({
|
|
@@ -424,6 +428,6 @@ export declare class NotifyProductModule {
|
|
|
424
428
|
} | null;
|
|
425
429
|
}>;
|
|
426
430
|
}
|
|
427
|
-
export type { NotifyChannel, NotifyDeliveryMode, NotifyVerificationLevel, NotifyInteraction, NotifyPresetCategory, NotifyCategory, NotifyPresetName, NotifyPresetSendOptions, NotifyPreset, NotifyRecipient, NotifyRecipientRef, NotifySendContent, NotifyIngotRef, NotifySendPolicy, NotifyEscalation, CreateNotifySendOptions, NotifySendResult, NotifyInboxView, NotifyInboxMarkState, NotifyInboxBulkMarkState, NotifyInboxRow, ListNotifyInboxOptions, ListNotifyInboxResponse, MarkNotifyInboxStateOptions, MarkNotifyInboxStateResponse, MarkNotifyInboxAllOptions, MarkNotifyInboxAllResponse, NotifySendStatus, NotifySendStatusRecipient, NotifyRecipientState, NotifySuppressionReason, NotifySendStatusCounts, NotifySendState, NotifySendSummary, ListNotifySendsOptions, ListNotifySendsResponse, NotifyRecallMode, RecallNotifySendOptions, RecallNotifySendResponse, NotifyReceipt, NotifyReportableVerificationLevel, NotifyReceiptEventType, NotifySendReceipt, ListNotifyReceiptsOptions, ListNotifyReceiptsResponse, NotifySendReceiptsResponse, NotifyConfig, NotifyConfigCategory, NotifyConfigDelivery, NotifyConfigDeliveryPatch, NotifyConfigRealtimeFallbackDelay, NotifyConfigReliability, NotifyConfigHistory, NotifyConfigSecurity, NotifyConfigEvents, NotifyConfigEventsRead, NotifyConfigPatch, NotifyConfigOverrides, NotifyConfigResponse, NotifyDestinationKind, NotifyDestinationState, NotifyDestinationSkipReason, NotifyDestinationFailureReason, NotifyDestinationReason, NotifyDestinationTransportReason, NotifyDestinationTestReason, NotifyDestinationTestResult, NotifySendStatusDestination, NotifySendSummaryDestination, NotifyWebhookDestination, NotifyWebhookDestinationRead, NotifySlackDestination, NotifyTeamsDestination, NotifyTeamsDestinationRead, NotifyConfigDestinations, NotifyConfigDestinationsPatch, } from './types';
|
|
431
|
+
export type { NotifyChannel, NotifyDeliveryMode, NotifyVerificationLevel, NotifyInteraction, NotifyPresetCategory, NotifyCategory, NotifyPresetName, NotifyPresetSendOptions, NotifyPreset, NotifyRecipient, NotifyRecipientRef, NotifySendContent, NotifyIngotRef, NotifySendPolicy, NotifyEscalation, CreateNotifySendOptions, NotifySendResult, NotifyInboxView, NotifyInboxMarkState, NotifyInboxBulkMarkState, NotifyInboxRow, ListNotifyInboxOptions, ListNotifyInboxResponse, MarkNotifyInboxStateOptions, MarkNotifyInboxStateResponse, MarkNotifyInboxAllOptions, MarkNotifyInboxAllResponse, NotifySendStatus, NotifySendStatusRecipient, NotifyRecipientState, NotifySuppressionReason, NotifySendStatusCounts, NotifySendState, NotifySendSummary, ListNotifySendsOptions, ListNotifySendsResponse, NotifyRecallMode, RecallNotifySendOptions, RecallNotifySendResponse, NotifyReceipt, NotifyReportableVerificationLevel, NotifyReceiptEventType, NotifySendReceipt, ListNotifyReceiptsOptions, ListNotifyReceiptsResponse, NotifySendReceiptsResponse, NotifyConfig, NotifyConfigCategory, NotifyConfigDelivery, NotifyConfigDeliveryPatch, NotifyConfigRealtimeFallbackDelay, NotifyConfigReliability, NotifyConfigHistory, NotifyConfigSecurity, NotifyConfigEvents, NotifyConfigEventsRead, NotifyConfigPatch, NotifyConfigOverrides, NotifyConfigResponse, NotifyDestinationKind, NotifyDestinationState, NotifyDestinationSkipReason, NotifyDestinationFailureReason, NotifyDestinationReason, NotifyDestinationTransportReason, NotifyConfigRefusalReason, NotifyDestinationTestReason, NotifyDestinationTestResult, NotifySendStatusDestination, NotifySendSummaryDestination, NotifyWebhookDestination, NotifyWebhookDestinationRead, NotifySlackDestination, NotifySlackDestinationRead, NotifyTeamsDestination, NotifyTeamsDestinationRead, NotifyConfigDestinations, NotifyConfigDestinationsPatch, } from './types';
|
|
428
432
|
export { NotifyProjectsModule } from './projects';
|
|
429
433
|
export type * from './project-types';
|
|
@@ -92,6 +92,20 @@ export type NotifyDestinationReason = NotifyDestinationSkipReason | NotifyDestin
|
|
|
92
92
|
* start it (`deadline_reached`).
|
|
93
93
|
*/
|
|
94
94
|
export type NotifyDestinationTransportReason = 'network' | 'timeout' | 'unsent' | 'deadline_reached';
|
|
95
|
+
/**
|
|
96
|
+
* Why `updateConfig` refused a patch that lacks a field: the `details.reason`
|
|
97
|
+
* of its 400 `VALIDATION_ERROR`, beside `details.missing`.
|
|
98
|
+
*
|
|
99
|
+
* - `secret_required_on_new_host`: a webhook destination's `url`, or
|
|
100
|
+
* `events.webhook_url`, moved to another host or port without a new
|
|
101
|
+
* `secret` beside it (`details.missing: ['secret']`). Saving again with a
|
|
102
|
+
* new secret lands.
|
|
103
|
+
* - `destination_incomplete`: the patch names a destination the account does
|
|
104
|
+
* not hold, which is created with every field of its kind, and it lacks the
|
|
105
|
+
* ones `details.missing` names. A partial patch of a destination removed
|
|
106
|
+
* since it was read meets this too: read the config again.
|
|
107
|
+
*/
|
|
108
|
+
export type NotifyConfigRefusalReason = 'secret_required_on_new_host' | 'destination_incomplete';
|
|
95
109
|
/**
|
|
96
110
|
* The `reason` beside a test post's `skipped` or `failed`
|
|
97
111
|
* (`testDestination`): a skip reason a send status reports, or, beside
|
|
@@ -746,6 +760,13 @@ export interface NotifySendStatusDestination {
|
|
|
746
760
|
* Teams workflow's host. Null when no attempt recorded one.
|
|
747
761
|
*/
|
|
748
762
|
target: string | null;
|
|
763
|
+
/**
|
|
764
|
+
* The Slack channel's name beside its id in `target`, as the Slack
|
|
765
|
+
* destination's `channel_name` read when the post was decided. Null for a
|
|
766
|
+
* webhook or Teams post, whose host names itself, and for a Slack post whose
|
|
767
|
+
* destination held no name.
|
|
768
|
+
*/
|
|
769
|
+
target_name: string | null;
|
|
749
770
|
}
|
|
750
771
|
/**
|
|
751
772
|
* A send's delivery state, DERIVED from its counters — the send row itself is
|
|
@@ -1044,8 +1065,9 @@ export interface NotifyConfigSecurity {
|
|
|
1044
1065
|
* link-local, and CGNAT addresses are rejected server-side). A patch names only
|
|
1045
1066
|
* what it changes, but a `webhook_url` on another host or port than the
|
|
1046
1067
|
* stored one needs a new `secret` in the same patch (400 `VALIDATION_ERROR`
|
|
1047
|
-
* naming `events.secret`, `details.missing: ['secret']`
|
|
1048
|
-
* follows its URL to a
|
|
1068
|
+
* naming `events.secret`, `details.missing: ['secret']`, `details.reason:
|
|
1069
|
+
* 'secret_required_on_new_host'`): a secret never follows its URL to a
|
|
1070
|
+
* different host. A patch of `events: null` removes the
|
|
1049
1071
|
* webhook, URL and secret together, and no event is sent from then on; a
|
|
1050
1072
|
* `null` for either field alone is refused 400.
|
|
1051
1073
|
*
|
|
@@ -1128,6 +1150,16 @@ export interface NotifySlackDestination {
|
|
|
1128
1150
|
/** As `NotifyWebhookDestination['categories']`. */
|
|
1129
1151
|
categories: string[];
|
|
1130
1152
|
}
|
|
1153
|
+
/** The Slack destination as a read returns it: its channel by id and by name. */
|
|
1154
|
+
export interface NotifySlackDestinationRead extends NotifySlackDestination {
|
|
1155
|
+
/**
|
|
1156
|
+
* The channel's name, without its `#`, as Slack named it when the last save
|
|
1157
|
+
* naming `channel_id` prepared it, so every such save refreshes it. Set by
|
|
1158
|
+
* the save, never by a patch (one naming it is refused 400). Null until a
|
|
1159
|
+
* save naming `channel_id` captures it.
|
|
1160
|
+
*/
|
|
1161
|
+
channel_name: string | null;
|
|
1162
|
+
}
|
|
1131
1163
|
/** A Microsoft Teams workflow as a destination, posted to through its webhook URL. */
|
|
1132
1164
|
export interface NotifyTeamsDestination {
|
|
1133
1165
|
/**
|
|
@@ -1150,17 +1182,20 @@ export interface NotifyTeamsDestinationRead {
|
|
|
1150
1182
|
/** The destinations a config read returns, each present only once configured. */
|
|
1151
1183
|
export interface NotifyConfigDestinations {
|
|
1152
1184
|
webhook?: NotifyWebhookDestinationRead;
|
|
1153
|
-
slack?:
|
|
1185
|
+
slack?: NotifySlackDestinationRead;
|
|
1154
1186
|
teams?: NotifyTeamsDestinationRead;
|
|
1155
1187
|
}
|
|
1156
1188
|
/**
|
|
1157
1189
|
* A patch of the destinations: null removes the destination of its kind; an
|
|
1158
1190
|
* object creates it, naming every field, or patches the one stored, naming
|
|
1159
|
-
* only what it changes (a credential it leaves out stays as stored)
|
|
1191
|
+
* only what it changes (a credential it leaves out stays as stored); one
|
|
1192
|
+
* created without every field is refused 400 `VALIDATION_ERROR` with
|
|
1193
|
+
* `details.missing` and `details.reason: 'destination_incomplete'`. A webhook
|
|
1160
1194
|
* `url` on another host or port than the stored one needs a new `secret` in
|
|
1161
1195
|
* the same patch (400 `VALIDATION_ERROR` naming
|
|
1162
|
-
* `destinations.webhook.secret`, `details.missing: ['secret']
|
|
1163
|
-
*
|
|
1196
|
+
* `destinations.webhook.secret`, `details.missing: ['secret']`,
|
|
1197
|
+
* `details.reason: 'secret_required_on_new_host'`): a secret never follows its
|
|
1198
|
+
* URL to a different host. (`NotifyConfigRefusalReason`)
|
|
1164
1199
|
*/
|
|
1165
1200
|
export interface NotifyConfigDestinationsPatch {
|
|
1166
1201
|
webhook?: Partial<NotifyWebhookDestination> | null;
|
|
@@ -1243,4 +1278,11 @@ export type NotifyConfigOverrides = Omit<NotifyConfigPatch, 'events' | 'destinat
|
|
|
1243
1278
|
export interface NotifyConfigResponse {
|
|
1244
1279
|
effective: NotifyConfig;
|
|
1245
1280
|
overrides: NotifyConfigOverrides;
|
|
1281
|
+
/**
|
|
1282
|
+
* The version of the stored configuration this answer shows: 0 before
|
|
1283
|
+
* anything is saved, one higher with each save that lands. Of two answers
|
|
1284
|
+
* to overlapping saves, which can arrive in either order, the one with the
|
|
1285
|
+
* higher version is the newer configuration.
|
|
1286
|
+
*/
|
|
1287
|
+
version: number;
|
|
1246
1288
|
}
|