@veltdev/sdk-staging 5.0.2-beta.81 → 5.0.2-beta.83
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.
|
@@ -257,3 +257,25 @@ export interface NotificationsDocConfig {
|
|
|
257
257
|
export interface GetNotificationsDataQuery {
|
|
258
258
|
type?: 'all' | 'forYou' | 'documents';
|
|
259
259
|
}
|
|
260
|
+
/**
|
|
261
|
+
* Configuration for the opt-in cross-organization "For You" notifications feature.
|
|
262
|
+
*
|
|
263
|
+
* When enabled, the SDK merges notifications from other organizations the user
|
|
264
|
+
* belongs to (resolved from the global `userNotificationIndex`) into the existing
|
|
265
|
+
* "For You" feed. All fields are optional; sensible defaults are applied by
|
|
266
|
+
* `NotificationService.setCrossOrganizationConfig`.
|
|
267
|
+
*
|
|
268
|
+
* @see specs/notification-api-scope/spec.md
|
|
269
|
+
*/
|
|
270
|
+
export interface CrossOrganizationConfig {
|
|
271
|
+
/** Whether cross-organization notifications are active. Defaults to `true` on enable. */
|
|
272
|
+
enabled?: boolean;
|
|
273
|
+
/** Allowlist of organization IDs to include. When omitted, all indexed orgs are eligible. */
|
|
274
|
+
organizationIds?: string[];
|
|
275
|
+
/** Organization IDs to exclude. The current organization is always excluded. */
|
|
276
|
+
excludeOrganizationIds?: string[];
|
|
277
|
+
/** Upper bound on the number of organizations fetched. Defaults to 20. */
|
|
278
|
+
maxOrganizations?: number;
|
|
279
|
+
/** Feeds the merge applies to. Only `'forYou'` is supported; `'all'` is ignored with a warning. */
|
|
280
|
+
feeds?: ('forYou' | 'all')[];
|
|
281
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SetDocumentsContext } from "./document.data.model";
|
|
2
|
+
import { ResolverEndpointConfig, ResolverResponse } from "./resolver.data.model";
|
|
2
3
|
import { UserContact } from "./user-contact.data.model";
|
|
3
4
|
import { UserPermissionAccessRole } from "./user-resolver.data.model";
|
|
4
5
|
export declare class User {
|
|
@@ -145,6 +146,51 @@ export interface VeltPermissionProvider {
|
|
|
145
146
|
isContextEnabled?: boolean;
|
|
146
147
|
revokeAccessOn?: RevokeAccessOn[];
|
|
147
148
|
forceRefresh?: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* LOCAL-DEV ONLY. When `true`, the SDK resolves permissions in the browser
|
|
151
|
+
* (via {@link endpointConfig} or {@link resolvePermissions}) and relays the
|
|
152
|
+
* results to the backend, instead of relying on the server-to-server
|
|
153
|
+
* Real-Time Permission Provider. This lets a `localhost` permission endpoint
|
|
154
|
+
* be reached without an ngrok/Cloudflare tunnel during development.
|
|
155
|
+
*
|
|
156
|
+
* This flag is an ergonomic switch only — it is NOT a security boundary.
|
|
157
|
+
* The backend independently gates browser-resolved results to dev/test API
|
|
158
|
+
* keys; production keys always ignore them and fall back to the server-side
|
|
159
|
+
* provider. MUST NOT be relied on in production.
|
|
160
|
+
*/
|
|
161
|
+
dev?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* URL-based client-side resolver. When set (and {@link dev} is `true`), the
|
|
164
|
+
* browser POSTs `{ data: { requests } }` to `url` — byte-for-byte identical
|
|
165
|
+
* to what the server-side permission provider sends — and expects the same
|
|
166
|
+
* `{ data: PermissionResult[], success, statusCode }` response. Takes
|
|
167
|
+
* precedence over {@link resolvePermissions} when both are provided.
|
|
168
|
+
*/
|
|
169
|
+
endpointConfig?: ResolverEndpointConfig;
|
|
170
|
+
/**
|
|
171
|
+
* Callback-based client-side resolver. When set (and {@link dev} is `true`,
|
|
172
|
+
* and no {@link endpointConfig} URL is provided), it is invoked with the
|
|
173
|
+
* same `{ data: { requests } }` envelope and may return either a bare
|
|
174
|
+
* `PermissionResult[]` or a `ResolverResponse<PermissionResult[]>`.
|
|
175
|
+
*/
|
|
176
|
+
resolvePermissions?: (request: PermissionResolverRequest) => Promise<PermissionResult[] | ResolverResponse<PermissionResult[]>>;
|
|
177
|
+
/**
|
|
178
|
+
* Optional per-call timeout (ms) for the client-side resolver. When the
|
|
179
|
+
* resolver does not settle within this window the check fails closed (deny).
|
|
180
|
+
*/
|
|
181
|
+
resolveTimeout?: number;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* The request envelope handed to a client-side permission resolver
|
|
185
|
+
* ({@link VeltPermissionProvider.endpointConfig} URL body or
|
|
186
|
+
* {@link VeltPermissionProvider.resolvePermissions} callback argument). The
|
|
187
|
+
* shape mirrors the server-side permission provider request byte-for-byte so a
|
|
188
|
+
* customer's existing handler works unchanged.
|
|
189
|
+
*/
|
|
190
|
+
export interface PermissionResolverRequest {
|
|
191
|
+
data: {
|
|
192
|
+
requests: PermissionQuery[];
|
|
193
|
+
};
|
|
148
194
|
}
|
|
149
195
|
export declare enum PermissionResourceType {
|
|
150
196
|
FOLDER = "folder",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
|
|
3
|
-
import { GetNotificationsDataQuery, Notification, NotificationInitialSettingsConfig, NotificationSettingsConfig, NotificationTabConfig } from "../data/notification.model";
|
|
4
|
-
import { CrossOrganizationConfig } from "./cross-organization-config.model";
|
|
3
|
+
import { CrossOrganizationConfig, GetNotificationsDataQuery, Notification, NotificationInitialSettingsConfig, NotificationSettingsConfig, NotificationTabConfig } from "../data/notification.model";
|
|
5
4
|
|
|
6
5
|
export declare class NotificationElement {
|
|
7
6
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltdev/sdk-staging",
|
|
3
|
-
"version": "5.0.2-beta.
|
|
3
|
+
"version": "5.0.2-beta.83",
|
|
4
4
|
"description": "Velt is an SDK to add collaborative features to your product within minutes. Example: Comments like Figma, Frame.io, Google docs or sheets, Recording like Loom, Huddles like Slack and much more.",
|
|
5
5
|
"homepage": "https://velt.dev",
|
|
6
6
|
"keywords": [
|