@vertz/server 0.2.17 → 0.2.19
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.ts +254 -133
- package/dist/index.js +874 -293
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,46 @@ import { ModelEntry } from "@vertz/db";
|
|
|
4
4
|
import { AuthError, Result } from "@vertz/errors";
|
|
5
5
|
import { Infer, ObjectSchema, StringSchema } from "@vertz/schema";
|
|
6
6
|
/**
|
|
7
|
+
* InMemoryClosureStore — closure table for resource hierarchy.
|
|
8
|
+
*
|
|
9
|
+
* Stores ancestor/descendant relationships with depth tracking.
|
|
10
|
+
* Self-reference rows (depth 0) are created for every resource.
|
|
11
|
+
* Hierarchy depth is capped at 4 levels.
|
|
12
|
+
*/
|
|
13
|
+
interface ClosureRow {
|
|
14
|
+
ancestorType: string;
|
|
15
|
+
ancestorId: string;
|
|
16
|
+
descendantType: string;
|
|
17
|
+
descendantId: string;
|
|
18
|
+
depth: number;
|
|
19
|
+
}
|
|
20
|
+
interface ClosureEntry {
|
|
21
|
+
type: string;
|
|
22
|
+
id: string;
|
|
23
|
+
depth: number;
|
|
24
|
+
}
|
|
25
|
+
interface ParentRef {
|
|
26
|
+
parentType: string;
|
|
27
|
+
parentId: string;
|
|
28
|
+
}
|
|
29
|
+
interface ClosureStore {
|
|
30
|
+
addResource(type: string, id: string, parent?: ParentRef): Promise<void>;
|
|
31
|
+
removeResource(type: string, id: string): Promise<void>;
|
|
32
|
+
getAncestors(type: string, id: string): Promise<ClosureEntry[]>;
|
|
33
|
+
getDescendants(type: string, id: string): Promise<ClosureEntry[]>;
|
|
34
|
+
hasPath(ancestorType: string, ancestorId: string, descendantType: string, descendantId: string): Promise<boolean>;
|
|
35
|
+
dispose(): void;
|
|
36
|
+
}
|
|
37
|
+
declare class InMemoryClosureStore implements ClosureStore {
|
|
38
|
+
private rows;
|
|
39
|
+
addResource(type: string, id: string, parent?: ParentRef): Promise<void>;
|
|
40
|
+
removeResource(type: string, id: string): Promise<void>;
|
|
41
|
+
getAncestors(type: string, id: string): Promise<ClosureEntry[]>;
|
|
42
|
+
getDescendants(type: string, id: string): Promise<ClosureEntry[]>;
|
|
43
|
+
hasPath(ancestorType: string, ancestorId: string, descendantType: string, descendantId: string): Promise<boolean>;
|
|
44
|
+
dispose(): void;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
7
47
|
* rules.* builders — declarative access rule data structures.
|
|
8
48
|
*
|
|
9
49
|
* These are pure data structures with no evaluation logic.
|
|
@@ -207,43 +247,102 @@ interface AccessDefinition {
|
|
|
207
247
|
}
|
|
208
248
|
declare function defineAccess(input: DefineAccessInput): AccessDefinition;
|
|
209
249
|
/**
|
|
210
|
-
*
|
|
250
|
+
* Feature Flag Store — per-tenant boolean feature flags.
|
|
211
251
|
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
* Hierarchy depth is capped at 4 levels.
|
|
252
|
+
* Pluggable interface with in-memory default.
|
|
253
|
+
* Used by Layer 1 of access context to gate entitlements on feature flags.
|
|
215
254
|
*/
|
|
216
|
-
interface
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
descendantId: string;
|
|
221
|
-
depth: number;
|
|
255
|
+
interface FlagStore {
|
|
256
|
+
setFlag(tenantId: string, flag: string, enabled: boolean): void;
|
|
257
|
+
getFlag(tenantId: string, flag: string): boolean;
|
|
258
|
+
getFlags(tenantId: string): Record<string, boolean>;
|
|
222
259
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
260
|
+
declare class InMemoryFlagStore implements FlagStore {
|
|
261
|
+
private flags;
|
|
262
|
+
setFlag(tenantId: string, flag: string, enabled: boolean): void;
|
|
263
|
+
getFlag(tenantId: string, flag: string): boolean;
|
|
264
|
+
getFlags(tenantId: string): Record<string, boolean>;
|
|
227
265
|
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
266
|
+
/** Limit override: add (additive) or max (hard cap) */
|
|
267
|
+
interface LimitOverrideDef {
|
|
268
|
+
add?: number;
|
|
269
|
+
max?: number;
|
|
231
270
|
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
271
|
+
/** Per-tenant overrides */
|
|
272
|
+
interface TenantOverrides {
|
|
273
|
+
features?: string[];
|
|
274
|
+
limits?: Record<string, LimitOverrideDef>;
|
|
275
|
+
}
|
|
276
|
+
interface OverrideStore {
|
|
277
|
+
set(tenantId: string, overrides: TenantOverrides): Promise<void>;
|
|
278
|
+
remove(tenantId: string, keys: {
|
|
279
|
+
features?: string[];
|
|
280
|
+
limits?: string[];
|
|
281
|
+
}): Promise<void>;
|
|
282
|
+
get(tenantId: string): Promise<TenantOverrides | null>;
|
|
238
283
|
dispose(): void;
|
|
239
284
|
}
|
|
240
|
-
declare class
|
|
241
|
-
private
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
285
|
+
declare class InMemoryOverrideStore implements OverrideStore {
|
|
286
|
+
private overrides;
|
|
287
|
+
set(tenantId: string, overrides: TenantOverrides): Promise<void>;
|
|
288
|
+
remove(tenantId: string, keys: {
|
|
289
|
+
features?: string[];
|
|
290
|
+
limits?: string[];
|
|
291
|
+
}): Promise<void>;
|
|
292
|
+
get(tenantId: string): Promise<TenantOverrides | null>;
|
|
293
|
+
dispose(): void;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Validate tenant overrides against the access definition.
|
|
297
|
+
* Throws on invalid limit keys, invalid feature names, or invalid max values.
|
|
298
|
+
*/
|
|
299
|
+
declare function validateOverrides(accessDef: AccessDefinition, overrides: TenantOverrides): void;
|
|
300
|
+
/**
|
|
301
|
+
* Plan Version Store — tracks versioned snapshots of plan configurations.
|
|
302
|
+
*
|
|
303
|
+
* When a plan's config changes (hash differs), a new version is created
|
|
304
|
+
* with a snapshot of the plan's features, limits, and price at that point.
|
|
305
|
+
*/
|
|
306
|
+
interface PlanSnapshot {
|
|
307
|
+
features: readonly string[] | string[];
|
|
308
|
+
limits: Record<string, unknown>;
|
|
309
|
+
price: {
|
|
310
|
+
amount: number;
|
|
311
|
+
interval: string;
|
|
312
|
+
} | null;
|
|
313
|
+
}
|
|
314
|
+
interface PlanVersionInfo {
|
|
315
|
+
planId: string;
|
|
316
|
+
version: number;
|
|
317
|
+
hash: string;
|
|
318
|
+
snapshot: PlanSnapshot;
|
|
319
|
+
createdAt: Date;
|
|
320
|
+
}
|
|
321
|
+
interface PlanVersionStore {
|
|
322
|
+
/** Create a new version for a plan. Returns the version number. */
|
|
323
|
+
createVersion(planId: string, hash: string, snapshot: PlanSnapshot): Promise<number>;
|
|
324
|
+
/** Get the current (latest) version number for a plan. Returns null if no versions exist. */
|
|
325
|
+
getCurrentVersion(planId: string): Promise<number | null>;
|
|
326
|
+
/** Get a specific version's info. Returns null if not found. */
|
|
327
|
+
getVersion(planId: string, version: number): Promise<PlanVersionInfo | null>;
|
|
328
|
+
/** Get the version number a tenant is on for a given plan. Returns null if not set. */
|
|
329
|
+
getTenantVersion(tenantId: string, planId: string): Promise<number | null>;
|
|
330
|
+
/** Set the version number a tenant is on for a given plan. */
|
|
331
|
+
setTenantVersion(tenantId: string, planId: string, version: number): Promise<void>;
|
|
332
|
+
/** Get the hash of the current (latest) version for a plan. Returns null if no versions. */
|
|
333
|
+
getCurrentHash(planId: string): Promise<string | null>;
|
|
334
|
+
/** Clean up resources. */
|
|
335
|
+
dispose(): void;
|
|
336
|
+
}
|
|
337
|
+
declare class InMemoryPlanVersionStore implements PlanVersionStore {
|
|
338
|
+
private versions;
|
|
339
|
+
private tenantVersions;
|
|
340
|
+
createVersion(planId: string, hash: string, snapshot: PlanSnapshot): Promise<number>;
|
|
341
|
+
getCurrentVersion(planId: string): Promise<number | null>;
|
|
342
|
+
getVersion(planId: string, version: number): Promise<PlanVersionInfo | null>;
|
|
343
|
+
getTenantVersion(tenantId: string, planId: string): Promise<number | null>;
|
|
344
|
+
setTenantVersion(tenantId: string, planId: string, version: number): Promise<void>;
|
|
345
|
+
getCurrentHash(planId: string): Promise<string | null>;
|
|
247
346
|
dispose(): void;
|
|
248
347
|
}
|
|
249
348
|
interface RoleAssignment {
|
|
@@ -274,23 +373,6 @@ declare class InMemoryRoleAssignmentStore implements RoleAssignmentStore {
|
|
|
274
373
|
getEffectiveRole(userId: string, resourceType: string, resourceId: string, accessDef: AccessDefinition, closureStore: ClosureStore): Promise<string | null>;
|
|
275
374
|
dispose(): void;
|
|
276
375
|
}
|
|
277
|
-
/**
|
|
278
|
-
* Feature Flag Store — per-tenant boolean feature flags.
|
|
279
|
-
*
|
|
280
|
-
* Pluggable interface with in-memory default.
|
|
281
|
-
* Used by Layer 1 of access context to gate entitlements on feature flags.
|
|
282
|
-
*/
|
|
283
|
-
interface FlagStore {
|
|
284
|
-
setFlag(tenantId: string, flag: string, enabled: boolean): void;
|
|
285
|
-
getFlag(tenantId: string, flag: string): boolean;
|
|
286
|
-
getFlags(tenantId: string): Record<string, boolean>;
|
|
287
|
-
}
|
|
288
|
-
declare class InMemoryFlagStore implements FlagStore {
|
|
289
|
-
private flags;
|
|
290
|
-
setFlag(tenantId: string, flag: string, enabled: boolean): void;
|
|
291
|
-
getFlag(tenantId: string, flag: string): boolean;
|
|
292
|
-
getFlags(tenantId: string): Record<string, boolean>;
|
|
293
|
-
}
|
|
294
376
|
/** Per-tenant limit override. Only affects the cap, not the billing period. */
|
|
295
377
|
interface LimitOverride {
|
|
296
378
|
max: number;
|
|
@@ -377,88 +459,6 @@ declare class InMemoryWalletStore implements WalletStore {
|
|
|
377
459
|
getConsumption(tenantId: string, entitlement: string, periodStart: Date, _periodEnd: Date): Promise<number>;
|
|
378
460
|
dispose(): void;
|
|
379
461
|
}
|
|
380
|
-
/** Limit override: add (additive) or max (hard cap) */
|
|
381
|
-
interface LimitOverrideDef {
|
|
382
|
-
add?: number;
|
|
383
|
-
max?: number;
|
|
384
|
-
}
|
|
385
|
-
/** Per-tenant overrides */
|
|
386
|
-
interface TenantOverrides {
|
|
387
|
-
features?: string[];
|
|
388
|
-
limits?: Record<string, LimitOverrideDef>;
|
|
389
|
-
}
|
|
390
|
-
interface OverrideStore {
|
|
391
|
-
set(tenantId: string, overrides: TenantOverrides): Promise<void>;
|
|
392
|
-
remove(tenantId: string, keys: {
|
|
393
|
-
features?: string[];
|
|
394
|
-
limits?: string[];
|
|
395
|
-
}): Promise<void>;
|
|
396
|
-
get(tenantId: string): Promise<TenantOverrides | null>;
|
|
397
|
-
dispose(): void;
|
|
398
|
-
}
|
|
399
|
-
declare class InMemoryOverrideStore implements OverrideStore {
|
|
400
|
-
private overrides;
|
|
401
|
-
set(tenantId: string, overrides: TenantOverrides): Promise<void>;
|
|
402
|
-
remove(tenantId: string, keys: {
|
|
403
|
-
features?: string[];
|
|
404
|
-
limits?: string[];
|
|
405
|
-
}): Promise<void>;
|
|
406
|
-
get(tenantId: string): Promise<TenantOverrides | null>;
|
|
407
|
-
dispose(): void;
|
|
408
|
-
}
|
|
409
|
-
/**
|
|
410
|
-
* Validate tenant overrides against the access definition.
|
|
411
|
-
* Throws on invalid limit keys, invalid feature names, or invalid max values.
|
|
412
|
-
*/
|
|
413
|
-
declare function validateOverrides(accessDef: AccessDefinition, overrides: TenantOverrides): void;
|
|
414
|
-
/**
|
|
415
|
-
* Plan Version Store — tracks versioned snapshots of plan configurations.
|
|
416
|
-
*
|
|
417
|
-
* When a plan's config changes (hash differs), a new version is created
|
|
418
|
-
* with a snapshot of the plan's features, limits, and price at that point.
|
|
419
|
-
*/
|
|
420
|
-
interface PlanSnapshot {
|
|
421
|
-
features: readonly string[] | string[];
|
|
422
|
-
limits: Record<string, unknown>;
|
|
423
|
-
price: {
|
|
424
|
-
amount: number;
|
|
425
|
-
interval: string;
|
|
426
|
-
} | null;
|
|
427
|
-
}
|
|
428
|
-
interface PlanVersionInfo {
|
|
429
|
-
planId: string;
|
|
430
|
-
version: number;
|
|
431
|
-
hash: string;
|
|
432
|
-
snapshot: PlanSnapshot;
|
|
433
|
-
createdAt: Date;
|
|
434
|
-
}
|
|
435
|
-
interface PlanVersionStore {
|
|
436
|
-
/** Create a new version for a plan. Returns the version number. */
|
|
437
|
-
createVersion(planId: string, hash: string, snapshot: PlanSnapshot): Promise<number>;
|
|
438
|
-
/** Get the current (latest) version number for a plan. Returns null if no versions exist. */
|
|
439
|
-
getCurrentVersion(planId: string): Promise<number | null>;
|
|
440
|
-
/** Get a specific version's info. Returns null if not found. */
|
|
441
|
-
getVersion(planId: string, version: number): Promise<PlanVersionInfo | null>;
|
|
442
|
-
/** Get the version number a tenant is on for a given plan. Returns null if not set. */
|
|
443
|
-
getTenantVersion(tenantId: string, planId: string): Promise<number | null>;
|
|
444
|
-
/** Set the version number a tenant is on for a given plan. */
|
|
445
|
-
setTenantVersion(tenantId: string, planId: string, version: number): Promise<void>;
|
|
446
|
-
/** Get the hash of the current (latest) version for a plan. Returns null if no versions. */
|
|
447
|
-
getCurrentHash(planId: string): Promise<string | null>;
|
|
448
|
-
/** Clean up resources. */
|
|
449
|
-
dispose(): void;
|
|
450
|
-
}
|
|
451
|
-
declare class InMemoryPlanVersionStore implements PlanVersionStore {
|
|
452
|
-
private versions;
|
|
453
|
-
private tenantVersions;
|
|
454
|
-
createVersion(planId: string, hash: string, snapshot: PlanSnapshot): Promise<number>;
|
|
455
|
-
getCurrentVersion(planId: string): Promise<number | null>;
|
|
456
|
-
getVersion(planId: string, version: number): Promise<PlanVersionInfo | null>;
|
|
457
|
-
getTenantVersion(tenantId: string, planId: string): Promise<number | null>;
|
|
458
|
-
setTenantVersion(tenantId: string, planId: string, version: number): Promise<void>;
|
|
459
|
-
getCurrentHash(planId: string): Promise<string | null>;
|
|
460
|
-
dispose(): void;
|
|
461
|
-
}
|
|
462
462
|
interface ResourceRef {
|
|
463
463
|
type: string;
|
|
464
464
|
id: string;
|
|
@@ -963,11 +963,15 @@ interface AuthInstance {
|
|
|
963
963
|
*/
|
|
964
964
|
resolveSessionForSSR: (request: Request) => Promise<{
|
|
965
965
|
session: {
|
|
966
|
-
user:
|
|
966
|
+
user: {
|
|
967
|
+
id: string;
|
|
968
|
+
email: string;
|
|
969
|
+
role: string;
|
|
970
|
+
[key: string]: unknown;
|
|
971
|
+
};
|
|
967
972
|
expiresAt: number;
|
|
968
973
|
};
|
|
969
|
-
|
|
970
|
-
accessSet?: unknown;
|
|
974
|
+
accessSet?: AccessSet | null;
|
|
971
975
|
} | null>;
|
|
972
976
|
}
|
|
973
977
|
interface AuthContext {
|
|
@@ -2059,6 +2063,123 @@ declare function stripHiddenFields(table: TableDef2, data: Record<string, unknow
|
|
|
2059
2063
|
* Used before DB writes to prevent setting immutable fields.
|
|
2060
2064
|
*/
|
|
2061
2065
|
declare function stripReadOnlyFields(table: TableDef2, data: Record<string, unknown>): Record<string, unknown>;
|
|
2066
|
+
import { ColumnBuilder, ColumnMetadata } from "@vertz/db";
|
|
2067
|
+
interface JSONSchemaObject {
|
|
2068
|
+
type?: string | string[];
|
|
2069
|
+
format?: string;
|
|
2070
|
+
enum?: readonly (string | number | boolean | null)[];
|
|
2071
|
+
items?: JSONSchemaObject;
|
|
2072
|
+
maxLength?: number;
|
|
2073
|
+
description?: string;
|
|
2074
|
+
$ref?: string;
|
|
2075
|
+
[key: string]: unknown;
|
|
2076
|
+
}
|
|
2077
|
+
/**
|
|
2078
|
+
* Maps a single database column to its JSON Schema representation.
|
|
2079
|
+
*/
|
|
2080
|
+
declare function columnToJsonSchema(column: ColumnBuilder<unknown, ColumnMetadata>): JSONSchemaObject;
|
|
2081
|
+
interface EntitySchemaObject {
|
|
2082
|
+
type: "object";
|
|
2083
|
+
required?: string[];
|
|
2084
|
+
properties?: Record<string, JSONSchemaObject>;
|
|
2085
|
+
}
|
|
2086
|
+
/**
|
|
2087
|
+
* Generates a JSON Schema for an entity's response shape.
|
|
2088
|
+
*
|
|
2089
|
+
* When `expose.select` is present, only listed fields appear.
|
|
2090
|
+
* Otherwise, all public (non-hidden) columns appear.
|
|
2091
|
+
* Descriptor-guarded fields (AccessRule values) become nullable with a description.
|
|
2092
|
+
*
|
|
2093
|
+
* If `relationSchemas` is provided, relation schemas are collected into it
|
|
2094
|
+
* with keys like `TasksAssigneeResponse`, and $ref properties are added
|
|
2095
|
+
* to the parent schema for each relation.
|
|
2096
|
+
*/
|
|
2097
|
+
declare function entityResponseSchema(def: EntityDefinition, relationSchemas?: Record<string, EntitySchemaObject>): EntitySchemaObject;
|
|
2098
|
+
/**
|
|
2099
|
+
* Generates a JSON Schema for an entity's create input.
|
|
2100
|
+
* Excludes PK, readOnly, autoUpdate, and hidden columns.
|
|
2101
|
+
* Fields with defaults or nullable are optional.
|
|
2102
|
+
*/
|
|
2103
|
+
declare function entityCreateInputSchema(def: EntityDefinition): EntitySchemaObject;
|
|
2104
|
+
/**
|
|
2105
|
+
* Generates a JSON Schema for an entity's update input (PATCH).
|
|
2106
|
+
* Same exclusions as create, but all fields are optional.
|
|
2107
|
+
*/
|
|
2108
|
+
declare function entityUpdateInputSchema(def: EntityDefinition): EntitySchemaObject;
|
|
2109
|
+
interface OpenAPISpecOptions {
|
|
2110
|
+
info: {
|
|
2111
|
+
title: string;
|
|
2112
|
+
version: string;
|
|
2113
|
+
description?: string;
|
|
2114
|
+
};
|
|
2115
|
+
servers?: {
|
|
2116
|
+
url: string;
|
|
2117
|
+
description?: string;
|
|
2118
|
+
}[];
|
|
2119
|
+
/** API path prefix. Defaults to '/api'. */
|
|
2120
|
+
apiPrefix?: string;
|
|
2121
|
+
}
|
|
2122
|
+
interface OpenAPIOperation {
|
|
2123
|
+
operationId: string;
|
|
2124
|
+
tags: string[];
|
|
2125
|
+
summary: string;
|
|
2126
|
+
parameters?: OpenAPIParameter[];
|
|
2127
|
+
requestBody?: {
|
|
2128
|
+
required: boolean;
|
|
2129
|
+
content: {
|
|
2130
|
+
"application/json": {
|
|
2131
|
+
schema: JSONSchemaObject;
|
|
2132
|
+
};
|
|
2133
|
+
};
|
|
2134
|
+
};
|
|
2135
|
+
responses: Record<string, OpenAPIResponse>;
|
|
2136
|
+
}
|
|
2137
|
+
interface OpenAPIParameter {
|
|
2138
|
+
name: string;
|
|
2139
|
+
in: "path" | "query";
|
|
2140
|
+
required: boolean;
|
|
2141
|
+
schema: JSONSchemaObject;
|
|
2142
|
+
description?: string;
|
|
2143
|
+
}
|
|
2144
|
+
interface OpenAPIResponse {
|
|
2145
|
+
description: string;
|
|
2146
|
+
content?: {
|
|
2147
|
+
"application/json": {
|
|
2148
|
+
schema: JSONSchemaObject | EntitySchemaObject;
|
|
2149
|
+
};
|
|
2150
|
+
};
|
|
2151
|
+
$ref?: string;
|
|
2152
|
+
}
|
|
2153
|
+
interface OpenAPIPathItem {
|
|
2154
|
+
get?: OpenAPIOperation;
|
|
2155
|
+
post?: OpenAPIOperation;
|
|
2156
|
+
patch?: OpenAPIOperation;
|
|
2157
|
+
delete?: OpenAPIOperation;
|
|
2158
|
+
}
|
|
2159
|
+
interface OpenAPISpec {
|
|
2160
|
+
openapi: "3.1.0";
|
|
2161
|
+
info: {
|
|
2162
|
+
title: string;
|
|
2163
|
+
version: string;
|
|
2164
|
+
description?: string;
|
|
2165
|
+
};
|
|
2166
|
+
servers?: {
|
|
2167
|
+
url: string;
|
|
2168
|
+
description?: string;
|
|
2169
|
+
}[];
|
|
2170
|
+
paths: Record<string, OpenAPIPathItem>;
|
|
2171
|
+
components?: {
|
|
2172
|
+
schemas?: Record<string, EntitySchemaObject>;
|
|
2173
|
+
responses?: Record<string, OpenAPIResponse>;
|
|
2174
|
+
};
|
|
2175
|
+
tags?: {
|
|
2176
|
+
name: string;
|
|
2177
|
+
}[];
|
|
2178
|
+
}
|
|
2179
|
+
/**
|
|
2180
|
+
* Generates a full OpenAPI 3.1 specification from entity definitions.
|
|
2181
|
+
*/
|
|
2182
|
+
declare function generateOpenAPISpec(entities: EntityDefinition[], options: OpenAPISpecOptions): OpenAPISpec;
|
|
2062
2183
|
import { EntityRouteEntry } from "@vertz/core";
|
|
2063
2184
|
interface EntityRouteOptions {
|
|
2064
2185
|
apiPrefix?: string;
|
|
@@ -2079,4 +2200,4 @@ declare function service<
|
|
|
2079
2200
|
TInject extends Record<string, EntityDefinition> = {},
|
|
2080
2201
|
TActions extends Record<string, ServiceActionDef<any, any, any>> = Record<string, ServiceActionDef<any, any, any>>
|
|
2081
2202
|
>(name: string, config: ServiceConfig<TActions, TInject>): ServiceDefinition;
|
|
2082
|
-
export { vertz, verifyPassword, validatePassword, validateOverrides, validateAuthModels, stripReadOnlyFields, stripHiddenFields, service, rules, resolveTenantChain, makeImmutable, isContentDescriptor, initializeAuthTables, hashPassword, google, github, getIncompatibleAddOns, generateEntityRoutes, entityErrorHandler, entity, enforceAccess, encodeAccessSet, discord, defineAccess, defaultAccess, deepFreeze, decodeAccessSet, createWebhookHandler, createStripeBillingAdapter, createServer, createPlanManager, createMiddleware, createImmutableProxy, createEnv, createEntityContext, createCrudHandlers, createBillingEventEmitter, createAuth, createAccessEventBroadcaster, createAccessContext, createAccess, content, computePlanHash, computeOverage, computeEntityAccess, computeAccessSet, checkFva, checkAddOnCompatibility, calculateBillingPeriod, authModels, WebhookHandlerConfig, WalletStore, WalletEntry, VertzException, ValidationException, UserTableEntry, UserStore, UnauthorizedException, TenantOverrides, TenantChainHop, TenantChain, SubscriptionStore, Subscription, StripeProduct, StripePrice, StripeClient, StripeBillingAdapterConfig, StoredSession, StoredPasswordReset, StoredEmailVerification, SignUpInput, SignInInput, SessionStrategy, SessionStore, SessionPayload, SessionInfo, SessionConfig, Session, ServiceUnavailableException, ServiceRequestInfo, ServiceDefinition, ServiceContext, ServiceConfig, ServiceActionDef, ServerInstance, ServerHandle, ServerConfig, ServerAdapter, RuleContext, RoleAssignmentTableEntry, RoleAssignmentStore, RoleAssignment, ResourceRef, Resource, RequestInfo, RelationExposeConfig, RawRequest, RateLimitStore, RateLimitResult, RateLimitConfig, PriceInterval, PlanVersionStore, PlanVersionInfo, PlanSnapshot, PlanPrice, PlanHashInput, PlanDef, Period, PasswordResetStore, PasswordResetConfig, PasswordRequirements, ParentRef, OverrideStore, OverageInput, OverageConfig, OnUserCreatedPayload, OAuthUserInfo, OAuthTokens, OAuthProviderConfig, OAuthProvider, OAuthAccountStore, NotFoundException, NamedMiddlewareDef, MiddlewareDef, MfaSetupData, MfaConfig, MfaChallengeData, MFAStore, ListenOptions, ListResult, ListOptions2 as ListOptions, LimitOverrideDef, LimitOverride, LimitDef, InternalServerErrorException, InferSchema, Infer2 as Infer, InMemoryWalletStore, InMemoryUserStore, InMemorySubscriptionStore, InMemorySessionStore, InMemoryRoleAssignmentStore, InMemoryRateLimitStore, InMemoryPlanVersionStore, InMemoryPasswordResetStore, InMemoryOverrideStore, InMemoryOAuthAccountStore, InMemoryMFAStore, InMemoryGrandfatheringStore, InMemoryFlagStore, InMemoryEmailVerificationStore, InMemoryClosureStore, HttpStatusCode, HttpMethod, HandlerCtx, GrandfatheringStore, GrandfatheringState, ForbiddenException, FlagStore, ExposeConfig, EnvConfig, EntityRouteOptions, EntityRelationsConfig, EntityRegistry, EntityOperations, EntityErrorResult, EntityDefinition, EntityDef, EntityDbAdapter2 as EntityDbAdapter, EntityContext, EntityConfig, EntityActionDef, EntitlementValue, EntitlementRegistry, EntitlementDefinition, EntitlementDef, Entitlement, EncodedAccessSet, EmailVerificationStore, EmailVerificationConfig, EmailPasswordConfig, Deps, DenialReason, DenialMeta, DefineAccessInput, DeepReadonly, DbUserStore, DbSubscriptionStore, DbSessionStore, DbRoleAssignmentStore, DbOAuthAccountStore, DbFlagStore, DbDialectName, DbClosureStore, Ctx, CrudResult, CrudHandlers, CorsConfig, CookieConfig, ContentDescriptor, ConsumeResult, ConflictException, ComputeAccessSetConfig, ClosureStore, ClosureRow, ClosureEntry, BillingPeriod, BillingEventType, BillingEventHandler, BillingEventEmitter, BillingEvent, BillingAdapter, BaseContext, BadRequestException, AuthorizationError, AuthUser, AuthTokens, AuthInstance, AuthEntityProxy, AuthDbClient, AuthContext, AuthConfig, AuthCallbackContext, AuthApi, AppConfig2 as AppConfig, AppBuilder2 as AppBuilder, AddOnRequires, AclClaim, AccumulateProvides, AccessWsData, AccessSet, AccessRule2 as AccessRule, AccessInstance, AccessEventBroadcasterConfig, AccessEventBroadcaster, AccessEvent, AccessDefinition, AccessContextConfig, AccessContext, AccessConfig, AccessCheckResult, AccessCheckData, AUTH_TABLE_NAMES };
|
|
2203
|
+
export { vertz, verifyPassword, validatePassword, validateOverrides, validateAuthModels, stripReadOnlyFields, stripHiddenFields, service, rules, resolveTenantChain, makeImmutable, isContentDescriptor, initializeAuthTables, hashPassword, google, github, getIncompatibleAddOns, generateOpenAPISpec, generateEntityRoutes, entityUpdateInputSchema, entityResponseSchema, entityErrorHandler, entityCreateInputSchema, entity, enforceAccess, encodeAccessSet, discord, defineAccess, defaultAccess, deepFreeze, decodeAccessSet, createWebhookHandler, createStripeBillingAdapter, createServer, createPlanManager, createMiddleware, createImmutableProxy, createEnv, createEntityContext, createCrudHandlers, createBillingEventEmitter, createAuth, createAccessEventBroadcaster, createAccessContext, createAccess, content, computePlanHash, computeOverage, computeEntityAccess, computeAccessSet, columnToJsonSchema, checkFva, checkAddOnCompatibility, calculateBillingPeriod, authModels, WebhookHandlerConfig, WalletStore, WalletEntry, VertzException, ValidationException, UserTableEntry, UserStore, UnauthorizedException, TenantOverrides, TenantChainHop, TenantChain, SubscriptionStore, Subscription, StripeProduct, StripePrice, StripeClient, StripeBillingAdapterConfig, StoredSession, StoredPasswordReset, StoredEmailVerification, SignUpInput, SignInInput, SessionStrategy, SessionStore, SessionPayload, SessionInfo, SessionConfig, Session, ServiceUnavailableException, ServiceRequestInfo, ServiceDefinition, ServiceContext, ServiceConfig, ServiceActionDef, ServerInstance, ServerHandle, ServerConfig, ServerAdapter, RuleContext, RoleAssignmentTableEntry, RoleAssignmentStore, RoleAssignment, ResourceRef, Resource, RequestInfo, RelationExposeConfig, RawRequest, RateLimitStore, RateLimitResult, RateLimitConfig, PriceInterval, PlanVersionStore, PlanVersionInfo, PlanSnapshot, PlanPrice, PlanHashInput, PlanDef, Period, PasswordResetStore, PasswordResetConfig, PasswordRequirements, ParentRef, OverrideStore, OverageInput, OverageConfig, OpenAPISpecOptions, OnUserCreatedPayload, OAuthUserInfo, OAuthTokens, OAuthProviderConfig, OAuthProvider, OAuthAccountStore, NotFoundException, NamedMiddlewareDef, MiddlewareDef, MfaSetupData, MfaConfig, MfaChallengeData, MFAStore, ListenOptions, ListResult, ListOptions2 as ListOptions, LimitOverrideDef, LimitOverride, LimitDef, JSONSchemaObject, InternalServerErrorException, InferSchema, Infer2 as Infer, InMemoryWalletStore, InMemoryUserStore, InMemorySubscriptionStore, InMemorySessionStore, InMemoryRoleAssignmentStore, InMemoryRateLimitStore, InMemoryPlanVersionStore, InMemoryPasswordResetStore, InMemoryOverrideStore, InMemoryOAuthAccountStore, InMemoryMFAStore, InMemoryGrandfatheringStore, InMemoryFlagStore, InMemoryEmailVerificationStore, InMemoryClosureStore, HttpStatusCode, HttpMethod, HandlerCtx, GrandfatheringStore, GrandfatheringState, ForbiddenException, FlagStore, ExposeConfig, EnvConfig, EntitySchemaObject, EntityRouteOptions, EntityRelationsConfig, EntityRegistry, EntityOperations, EntityErrorResult, EntityDefinition, EntityDef, EntityDbAdapter2 as EntityDbAdapter, EntityContext, EntityConfig, EntityActionDef, EntitlementValue, EntitlementRegistry, EntitlementDefinition, EntitlementDef, Entitlement, EncodedAccessSet, EmailVerificationStore, EmailVerificationConfig, EmailPasswordConfig, Deps, DenialReason, DenialMeta, DefineAccessInput, DeepReadonly, DbUserStore, DbSubscriptionStore, DbSessionStore, DbRoleAssignmentStore, DbOAuthAccountStore, DbFlagStore, DbDialectName, DbClosureStore, Ctx, CrudResult, CrudHandlers, CorsConfig, CookieConfig, ContentDescriptor, ConsumeResult, ConflictException, ComputeAccessSetConfig, ClosureStore, ClosureRow, ClosureEntry, BillingPeriod, BillingEventType, BillingEventHandler, BillingEventEmitter, BillingEvent, BillingAdapter, BaseContext, BadRequestException, AuthorizationError, AuthUser, AuthTokens, AuthInstance, AuthEntityProxy, AuthDbClient, AuthContext, AuthConfig, AuthCallbackContext, AuthApi, AppConfig2 as AppConfig, AppBuilder2 as AppBuilder, AddOnRequires, AclClaim, AccumulateProvides, AccessWsData, AccessSet, AccessRule2 as AccessRule, AccessInstance, AccessEventBroadcasterConfig, AccessEventBroadcaster, AccessEvent, AccessDefinition, AccessContextConfig, AccessContext, AccessConfig, AccessCheckResult, AccessCheckData, AUTH_TABLE_NAMES };
|