@veltdev/sdk 5.0.2-beta.34 → 5.0.2-beta.35
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.
|
@@ -274,8 +274,6 @@ export interface CrossOrganizationConfig {
|
|
|
274
274
|
organizationIds?: string[];
|
|
275
275
|
/** Organization IDs to exclude. The current organization is always excluded. */
|
|
276
276
|
excludeOrganizationIds?: string[];
|
|
277
|
-
/** Upper bound on the number of organizations fetched. Defaults to 20. */
|
|
278
|
-
maxOrganizations?: number;
|
|
279
277
|
/** Feeds the merge applies to. Only `'forYou'` is supported; `'all'` is ignored with a warning. */
|
|
280
278
|
feeds?: ('forYou' | 'all')[];
|
|
281
279
|
}
|
|
@@ -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",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltdev/sdk",
|
|
3
|
-
"version": "5.0.2-beta.
|
|
3
|
+
"version": "5.0.2-beta.35",
|
|
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": [
|