@antelopejs/interface-dms 0.13.3 → 0.14.0
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/CHANGELOG.md +196 -2
- package/README.md +9 -9
- package/dist/auth/db/models/sessions.model.d.ts +3 -3
- package/dist/auth/db/models/userExternalIdentities.model.d.ts +3 -3
- package/dist/auth/db/models/users.model.d.ts +3 -3
- package/dist/auth/db/tables/users.table.d.ts +3 -3
- package/dist/base/activity-feed.d.ts +2 -2
- package/dist/base/block-registry/types.d.ts +1 -1
- package/dist/base/chart-schemas.d.ts +70 -70
- package/dist/base/chart.d.ts +1 -1
- package/dist/base/data-types/default/choices.d.ts +1 -1
- package/dist/base/data-types/default/choices.js +3 -6
- package/dist/base/data-types/default/choices.js.map +1 -1
- package/dist/base/data-types/default/inputs.d.ts +1 -1
- package/dist/base/data-types/default/numbers.d.ts +2 -1
- package/dist/base/data-types/default/numbers.js +4 -3
- package/dist/base/data-types/default/numbers.js.map +1 -1
- package/dist/base/data-types/default/relations.d.ts +0 -6
- package/dist/base/data-types/default/relations.js +0 -1
- package/dist/base/data-types/default/relations.js.map +1 -1
- package/dist/base/data-types/default-types.d.ts +0 -1
- package/dist/base/data-types/default-types.js +0 -2
- package/dist/base/data-types/default-types.js.map +1 -1
- package/dist/base/data-types/index.js +0 -1
- package/dist/base/data-types/index.js.map +1 -1
- package/dist/base/data-types/internal/relation-endpoints.js +5 -3
- package/dist/base/data-types/internal/relation-endpoints.js.map +1 -1
- package/dist/base/data-types/internal/table-view-meta-slot.d.ts +17 -0
- package/dist/base/data-types/internal/table-view-meta-slot.js +25 -0
- package/dist/base/data-types/internal/table-view-meta-slot.js.map +1 -0
- package/dist/base/empty-state.d.ts +1 -1
- package/dist/base/export-jobs.d.ts +47 -19
- package/dist/base/export-jobs.js +39 -4
- package/dist/base/export-jobs.js.map +1 -1
- package/dist/base/form-schema.d.ts +0 -1
- package/dist/base/form-schema.js +12 -12
- package/dist/base/form-schema.js.map +1 -1
- package/dist/base/grid.js +1 -1
- package/dist/base/grid.js.map +1 -1
- package/dist/base/guard.d.ts +4 -4
- package/dist/base/guard.js +1 -1
- package/dist/base/guard.js.map +1 -1
- package/dist/base/helpers/file-refs.js +4 -6
- package/dist/base/helpers/file-refs.js.map +1 -1
- package/dist/base/internal/chart.d.ts +1 -1
- package/dist/base/internal/chart.js +1 -1
- package/dist/base/internal/chart.js.map +1 -1
- package/dist/base/internal/export-jobs.d.ts +11 -0
- package/dist/base/internal/export-jobs.js +11 -0
- package/dist/base/internal/export-jobs.js.map +1 -1
- package/dist/base/internal/form-block-schema.d.ts +1 -1
- package/dist/base/internal/form-block-schema.js +1 -1
- package/dist/base/internal/form-block-schema.js.map +1 -1
- package/dist/base/key-value-list.d.ts +6 -6
- package/dist/base/meter.d.ts +1 -1
- package/dist/base/placeholder.js +1 -1
- package/dist/base/placeholder.js.map +1 -1
- package/dist/base/searchable.d.ts +3 -3
- package/dist/base/searchable.js.map +1 -1
- package/dist/base/stack.js +1 -1
- package/dist/base/stack.js.map +1 -1
- package/dist/base/tab.js +1 -1
- package/dist/base/tab.js.map +1 -1
- package/dist/base/table-view/data-functions.d.ts +10 -11
- package/dist/base/table-view/data-functions.js.map +1 -1
- package/dist/base/table-view/factory.js +2 -0
- package/dist/base/table-view/factory.js.map +1 -1
- package/dist/base/table-view/internal/archive-filter.d.ts +21 -0
- package/dist/base/table-view/internal/archive-filter.js +48 -0
- package/dist/base/table-view/internal/archive-filter.js.map +1 -0
- package/dist/base/table-view/internal/auth.d.ts +2 -2
- package/dist/base/table-view/internal/auth.js +1 -3
- package/dist/base/table-view/internal/auth.js.map +1 -1
- package/dist/base/table-view/internal/column-conditions.js.map +1 -1
- package/dist/base/table-view/internal/data-functions.d.ts +2 -2
- package/dist/base/table-view/internal/factory-lifecycle-created.js +3 -2
- package/dist/base/table-view/internal/factory-lifecycle-created.js.map +1 -1
- package/dist/base/table-view/internal/footer.js +21 -13
- package/dist/base/table-view/internal/footer.js.map +1 -1
- package/dist/base/table-view/internal/guards.d.ts +1 -1
- package/dist/base/table-view/internal/guards.js +11 -8
- package/dist/base/table-view/internal/guards.js.map +1 -1
- package/dist/base/table-view/internal/meta-helpers.js +3 -2
- package/dist/base/table-view/internal/meta-helpers.js.map +1 -1
- package/dist/base/table-view/internal/nav-badges.js +1 -3
- package/dist/base/table-view/internal/nav-badges.js.map +1 -1
- package/dist/base/table-view/internal/option-views.d.ts +7 -4
- package/dist/base/table-view/internal/row-actions-schema.d.ts +6 -6
- package/dist/base/table-view/meta.d.ts +5 -5
- package/dist/base/table-view/meta.js +6 -2
- package/dist/base/table-view/meta.js.map +1 -1
- package/dist/base/table-view/routes.d.ts +39 -12
- package/dist/base/table-view/routes.js +0 -1
- package/dist/base/table-view/routes.js.map +1 -1
- package/dist/base/table-view/schema.d.ts +127 -127
- package/dist/base/top-list-card.d.ts +4 -4
- package/dist/component-options/data-type.d.ts +2 -1
- package/dist/component-options/data-type.js +1 -1
- package/dist/component-options/data-type.js.map +1 -1
- package/dist/component-slots.js +1 -1
- package/dist/component-slots.js.map +1 -1
- package/dist/connection-access.d.ts +46 -0
- package/dist/connection-access.js +73 -0
- package/dist/connection-access.js.map +1 -0
- package/dist/data-controllers/members.d.ts +15 -2
- package/dist/data-controllers/roles.d.ts +15 -2
- package/dist/db/internal/exportJobs.model.d.ts +3 -3
- package/dist/db/internal/inviteResolutions.model.d.ts +3 -3
- package/dist/db/internal/tenantLifecycle.model.d.ts +4 -4
- package/dist/db/internal/tenantLifecycle.model.js +2 -3
- package/dist/db/internal/tenantLifecycle.model.js.map +1 -1
- package/dist/db/models/roles.model.d.ts +3 -3
- package/dist/db/models/tenantMembers.model.d.ts +3 -3
- package/dist/db/models/tenants.model.d.ts +3 -3
- package/dist/db/models/user_invites.model.d.ts +18 -3
- package/dist/db/models/user_invites.model.js +28 -0
- package/dist/db/models/user_invites.model.js.map +1 -1
- package/dist/db/tables/user_invites.table.d.ts +6 -1
- package/dist/db/tables/user_invites.table.js +3 -0
- package/dist/db/tables/user_invites.table.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/internal/component-slots.js +1 -1
- package/dist/internal/component-slots.js.map +1 -1
- package/dist/internal/invite-content.d.ts +8 -0
- package/dist/internal/invite-content.js +36 -0
- package/dist/internal/invite-content.js.map +1 -0
- package/dist/internal/tenant-ownership.d.ts +5 -4
- package/dist/internal/tenant-ownership.js +5 -4
- package/dist/internal/tenant-ownership.js.map +1 -1
- package/dist/invite-extensions/internal/delivery.d.ts +3 -2
- package/dist/invite-extensions/internal/delivery.js +3 -2
- package/dist/invite-extensions/internal/delivery.js.map +1 -1
- package/dist/invite-resolution.d.ts +5 -1
- package/dist/invite-resolution.js +10 -26
- package/dist/invite-resolution.js.map +1 -1
- package/dist/invites.d.ts +5 -0
- package/dist/invites.js +27 -1
- package/dist/invites.js.map +1 -1
- package/dist/notifications/internal.d.ts +0 -1
- package/dist/notifications/internal.js +0 -1
- package/dist/notifications/internal.js.map +1 -1
- package/dist/notifications/sendable.d.ts +1 -2
- package/dist/notifications/sendable.js +1 -12
- package/dist/notifications/sendable.js.map +1 -1
- package/dist/notifications/types.d.ts +1 -4
- package/dist/page/categories.d.ts +6 -0
- package/dist/page/categories.js +10 -3
- package/dist/page/categories.js.map +1 -1
- package/dist/page/controllers.d.ts +6 -9
- package/dist/page/controllers.js +5 -6
- package/dist/page/controllers.js.map +1 -1
- package/dist/page/internal/categories.js +43 -32
- package/dist/page/internal/categories.js.map +1 -1
- package/dist/page/internal/category-resolution.d.ts +31 -0
- package/dist/page/internal/category-resolution.js +63 -0
- package/dist/page/internal/category-resolution.js.map +1 -0
- package/dist/page/internal/metadata-extension-contributions.js +1 -2
- package/dist/page/internal/metadata-extension-contributions.js.map +1 -1
- package/dist/page/internal/metadata-info.js +19 -7
- package/dist/page/internal/metadata-info.js.map +1 -1
- package/dist/page/internal/metadata-layout.d.ts +3 -2
- package/dist/page/internal/metadata-layout.js.map +1 -1
- package/dist/page/internal/metadata-lifecycle.js +1 -4
- package/dist/page/internal/metadata-lifecycle.js.map +1 -1
- package/dist/page/internal/metadata-publish.js +7 -6
- package/dist/page/internal/metadata-publish.js.map +1 -1
- package/dist/page/internal/metadata-registration.js +8 -6
- package/dist/page/internal/metadata-registration.js.map +1 -1
- package/dist/page/internal/page-controller.d.ts +18 -0
- package/dist/page/internal/page-controller.js +36 -0
- package/dist/page/internal/page-controller.js.map +1 -0
- package/dist/page/metadata.d.ts +3 -3
- package/dist/page/metadata.js +4 -2
- package/dist/page/metadata.js.map +1 -1
- package/dist/page/types.d.ts +8 -2
- package/dist/page.d.ts +1 -1
- package/dist/page.js +2 -1
- package/dist/page.js.map +1 -1
- package/dist/permissions.d.ts +2 -1
- package/dist/permissions.js +5 -2
- package/dist/permissions.js.map +1 -1
- package/dist/tenant-provisioning.js +1 -1
- package/dist/tenant-provisioning.js.map +1 -1
- package/dist/types.d.ts +7 -3
- package/docs/1.core/11.modules-and-dynamic-menus.md +3 -3
- package/docs/1.core/2.pages-and-modules.md +2 -1
- package/docs/1.core/4.permissions.md +2 -2
- package/docs/1.core/5.tenancy.md +1 -1
- package/docs/1.core/6.invites.md +3 -1
- package/docs/2.auth/2.authentication.md +1 -1
- package/docs/2.auth/3.tokens-and-sessions.md +1 -1
- package/docs/3.base/1.introduction.md +1 -1
- package/docs/3.base/14.table-events-and-helpers.md +1 -1
- package/docs/3.base/15.table-sources-and-gates.md +14 -2
- package/docs/3.base/3.forms.md +1 -1
- package/docs/3.base/4.tables.md +1 -1
- package/docs/3.base/5.charts-and-widgets.md +3 -3
- package/docs/3.base/8.data-types.md +1 -1
- package/docs/3.base/9.helpers.md +16 -5
- package/docs/4.notifications/3.sending.md +0 -11
- package/docs/index.md +1 -1
- package/package.json +11 -11
|
@@ -153,9 +153,9 @@ export declare const TopListCardSchema: z.ZodObject<{
|
|
|
153
153
|
} | undefined;
|
|
154
154
|
description?: BlockText | undefined;
|
|
155
155
|
icon?: string | undefined;
|
|
156
|
-
sparkline?: number[] | undefined;
|
|
157
156
|
valueLabel?: BlockText | undefined;
|
|
158
157
|
to?: string | undefined;
|
|
158
|
+
sparkline?: number[] | undefined;
|
|
159
159
|
delta?: number | null | undefined;
|
|
160
160
|
}, {
|
|
161
161
|
id: string | number;
|
|
@@ -167,9 +167,9 @@ export declare const TopListCardSchema: z.ZodObject<{
|
|
|
167
167
|
} | undefined;
|
|
168
168
|
description?: BlockText | undefined;
|
|
169
169
|
icon?: string | undefined;
|
|
170
|
-
sparkline?: number[] | undefined;
|
|
171
170
|
valueLabel?: BlockText | undefined;
|
|
172
171
|
to?: string | undefined;
|
|
172
|
+
sparkline?: number[] | undefined;
|
|
173
173
|
delta?: number | null | undefined;
|
|
174
174
|
}>, "many">>;
|
|
175
175
|
emptyLabel: z.ZodOptional<z.ZodString>;
|
|
@@ -231,9 +231,9 @@ export declare const TopListCardSchema: z.ZodObject<{
|
|
|
231
231
|
} | undefined;
|
|
232
232
|
description?: BlockText | undefined;
|
|
233
233
|
icon?: string | undefined;
|
|
234
|
-
sparkline?: number[] | undefined;
|
|
235
234
|
valueLabel?: BlockText | undefined;
|
|
236
235
|
to?: string | undefined;
|
|
236
|
+
sparkline?: number[] | undefined;
|
|
237
237
|
delta?: number | null | undefined;
|
|
238
238
|
}[] | undefined;
|
|
239
239
|
emptyLabel?: string | undefined;
|
|
@@ -275,9 +275,9 @@ export declare const TopListCardSchema: z.ZodObject<{
|
|
|
275
275
|
} | undefined;
|
|
276
276
|
description?: BlockText | undefined;
|
|
277
277
|
icon?: string | undefined;
|
|
278
|
-
sparkline?: number[] | undefined;
|
|
279
278
|
valueLabel?: BlockText | undefined;
|
|
280
279
|
to?: string | undefined;
|
|
280
|
+
sparkline?: number[] | undefined;
|
|
281
281
|
delta?: number | null | undefined;
|
|
282
282
|
}[] | undefined;
|
|
283
283
|
emptyLabel?: string | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { RequestContext } from "@antelopejs/interface-api";
|
|
2
|
+
import type { FilterValue } from "@antelopejs/interface-data-api/metadata";
|
|
2
3
|
import { type Class, type DecoratorTarget, type ClassDecorator } from "@antelopejs/interface-core/decorators";
|
|
3
4
|
import type { ValueProxy, ValueProxyOrValue } from "@antelopejs/interface-database";
|
|
4
5
|
import type { ComponentInfoSerialized } from "../component";
|
|
@@ -12,7 +13,7 @@ export declare abstract class DataType {
|
|
|
12
13
|
readonly defaultCompareMode?: Class<DataCompareMode> | undefined;
|
|
13
14
|
readonly options?: Record<string, unknown> | undefined;
|
|
14
15
|
constructor(compareModes?: Class<DataCompareMode>[], defaultCompareMode?: Class<DataCompareMode> | undefined, options?: Record<string, unknown> | undefined);
|
|
15
|
-
filter(context: RequestContext, proxy: ValueProxy<unknown>, key: string, value:
|
|
16
|
+
filter(context: RequestContext, proxy: ValueProxy<unknown>, key: string, value: FilterValue[0], mode: string, row: ValueProxy<Record<string, unknown>>): ValueProxyOrValue<boolean>;
|
|
16
17
|
/**
|
|
17
18
|
* Returns the default input component for this data type.
|
|
18
19
|
* Override this method in subclasses to provide a custom input component.
|
|
@@ -35,7 +35,7 @@ class DataType {
|
|
|
35
35
|
const compareMode = dataCompareModes.get(mode);
|
|
36
36
|
if (!compareMode || !listsCompareMode(this, mode))
|
|
37
37
|
return false;
|
|
38
|
-
return compareMode.filter(context, proxy, key, value, row);
|
|
38
|
+
return compareMode.filter(context, proxy, key, String(value), row);
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* Returns filters components for this data type.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-type.js","sourceRoot":"","sources":["../../src/component-options/data-type.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"data-type.js","sourceRoot":"","sources":["../../src/component-options/data-type.ts"],"names":[],"mappings":";;;;;;AAyLA,wCAIC;AAKD,sCAEC;AAUD,sCAmCC;AAjPD,8DAAiC;AAGjC,sEA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,MAAM,EAAE,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;QACnC,IAAI,EAAE,EAAE,CAAC;YACP,MAAM,YAAY,GAAG,QAAQ,CAAC,YAAY;iBACvC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,wBAAwB,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC;iBAC/D,MAAM,CAAC,CAAC,MAAM,EAAoB,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;YAEzD,MAAM,kBAAkB,GAAG,QAAQ,CAAC,kBAAkB;gBACpD,CAAC,CAAC,wBAAwB,CAAC,GAAG,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,EAAE;gBAC/D,CAAC,CAAC,SAAS,CAAC;YAEd,MAAM,eAAe,GAAG,QAAQ,CAAC,gBAAgB,EAAE,CAAC;YACpD,MAAM,uBAAuB,GAA2C;gBACtE,GAAG,eAAe;aACnB,CAAC;YAEF,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;gBAC1C,MAAM,QAAQ,GAAG,wBAAwB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;gBACzD,IAAI,QAAQ,EAAE,OAAO,EAAE,CAAC;oBACtB,uBAAuB,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC;gBACnD,CAAC;YACH,CAAC,CAAC,CAAC;YAEH,OAAO;gBACL,EAAE;gBACF,YAAY;gBACZ,kBAAkB;gBAClB,gBAAgB,EAAE,uBAAuB;gBACzC,cAAc,EAAE,QAAQ,CAAC,uBAAuB,EAAE;aACnD,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/dist/component-slots.js
CHANGED
|
@@ -21,7 +21,7 @@ function RegisterComponentSlot(slotId, resolver) {
|
|
|
21
21
|
if (existing && existing !== resolver) {
|
|
22
22
|
logging_1.Logging.Warn(`[dms] component slot "${slotId}" already had a resolver; the latest one now owns it.`);
|
|
23
23
|
}
|
|
24
|
-
// SAFETY: Holds when every node named dms-form in a layout the page metadata passes to ResolveComponentSlots was serialized by Form, whose options are FormPropsSerialized with its builder's watch actions; the walker hands this resolver only such a node's options, after checking their fields array and this slotId.
|
|
24
|
+
// SAFETY: Holds when every node named dms-form-block in a layout the page metadata passes to ResolveComponentSlots was serialized by Form, whose options are FormPropsSerialized with its builder's watch actions; the walker hands this resolver only such a node's options, after checking their fields array and this slotId.
|
|
25
25
|
component_slots_1.slotResolvers.set(slotId, resolver);
|
|
26
26
|
return () => {
|
|
27
27
|
if (component_slots_1.slotResolvers.get(slotId) === resolver) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-slots.js","sourceRoot":"","sources":["../src/component-slots.ts"],"names":[],"mappings":";;AAuCA,sDAiBC;AAxDD,gEAA6D;AAI7D,gEAGoC;AAmBpC;;;;;;;;;;;;GAYG;AACH,SAAgB,qBAAqB,CACnC,MAAc,EACd,QAA+B;IAE/B,MAAM,QAAQ,GAAG,+BAAa,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3C,IAAI,QAAQ,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACtC,iBAAO,CAAC,IAAI,CACV,yBAAyB,MAAM,uDAAuD,CACvF,CAAC;IACJ,CAAC;IACD,
|
|
1
|
+
{"version":3,"file":"component-slots.js","sourceRoot":"","sources":["../src/component-slots.ts"],"names":[],"mappings":";;AAuCA,sDAiBC;AAxDD,gEAA6D;AAI7D,gEAGoC;AAmBpC;;;;;;;;;;;;GAYG;AACH,SAAgB,qBAAqB,CACnC,MAAc,EACd,QAA+B;IAE/B,MAAM,QAAQ,GAAG,+BAAa,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3C,IAAI,QAAQ,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACtC,iBAAO,CAAC,IAAI,CACV,yBAAyB,MAAM,uDAAuD,CACvF,CAAC;IACJ,CAAC;IACD,iUAAiU;IACjU,+BAAa,CAAC,GAAG,CAAC,MAAM,EAAE,QAA4B,CAAC,CAAC;IACxD,OAAO,GAAG,EAAE;QACV,IAAI,+BAAa,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,QAAQ,EAAE,CAAC;YAC3C,+BAAa,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { RegisteringProxy } from "@antelopejs/interface-core";
|
|
2
|
+
import { type DecoratorTarget } from "@antelopejs/interface-core/decorators";
|
|
3
|
+
/** What a project lets the DMS do on an external connection: read its rows, or write them too. */
|
|
4
|
+
export type ConnectionAccess = "read" | "read-write";
|
|
5
|
+
/**
|
|
6
|
+
* Answers the access of an external connection, or nothing for a connection the registering
|
|
7
|
+
* module does not own.
|
|
8
|
+
*/
|
|
9
|
+
export type ConnectionAccessSource = (connection: string) => ConnectionAccess | undefined | Promise<ConnectionAccess | undefined>;
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace internal {
|
|
14
|
+
const RegisterConnectionAccessSource: RegisteringProxy<(id: string, source: ConnectionAccessSource) => void>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Registers the module that answers the access of external connections, as dms-database does
|
|
18
|
+
* from `config.externalConnections`. Call it during `construct()`, so the source answers before
|
|
19
|
+
* the API serves a write. The registration is removed when the registering module is unloaded.
|
|
20
|
+
*
|
|
21
|
+
* @param id The source's id; a second registration under it replaces the first
|
|
22
|
+
* @param source Answers each connection the module owns
|
|
23
|
+
*/
|
|
24
|
+
export declare function RegisterConnectionAccessSource(id: string, source: ConnectionAccessSource): void;
|
|
25
|
+
/**
|
|
26
|
+
* The access of an external connection: `"read-write"` when a registered source answers it and
|
|
27
|
+
* none answers `"read"`, and `"read"` otherwise, with no source registered for it too. A source
|
|
28
|
+
* that throws rejects the call.
|
|
29
|
+
*/
|
|
30
|
+
export declare const GetConnectionAccess: (connection: string) => Promise<ConnectionAccess>;
|
|
31
|
+
/**
|
|
32
|
+
* Marks a data controller as one that writes to the tables of an external connection, as the
|
|
33
|
+
* builder does on each resource it maps. Its TableView write routes (`new`, `edit`, `delete`,
|
|
34
|
+
* `archive`, `restore`) answer 403 while the connection's access is `"read"`, whichever page or
|
|
35
|
+
* form posts to them.
|
|
36
|
+
*
|
|
37
|
+
* @param connection The connection id, as `config.externalConnections` of dms-database names it
|
|
38
|
+
*/
|
|
39
|
+
export declare const ExternalConnection: (connection: string) => import("@antelopejs/interface-core/decorators").ClassDecorator<import("@antelopejs/interface-core/decorators").Class<object, any[]>>;
|
|
40
|
+
/**
|
|
41
|
+
* Throws a 403 when the data controller writes to an external connection whose access is
|
|
42
|
+
* `"read"`; a controller not marked with {@link ExternalConnection} passes.
|
|
43
|
+
*
|
|
44
|
+
* @param controller The data controller's class
|
|
45
|
+
*/
|
|
46
|
+
export declare function AssertConnectionWritable(controller: DecoratorTarget): Promise<void>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExternalConnection = exports.GetConnectionAccess = exports.internal = void 0;
|
|
4
|
+
exports.RegisterConnectionAccessSource = RegisterConnectionAccessSource;
|
|
5
|
+
exports.AssertConnectionWritable = AssertConnectionWritable;
|
|
6
|
+
const interface_api_1 = require("@antelopejs/interface-api");
|
|
7
|
+
const interface_core_1 = require("@antelopejs/interface-core");
|
|
8
|
+
const decorators_1 = require("@antelopejs/interface-core/decorators");
|
|
9
|
+
const HTTP_FORBIDDEN_STATUS = 403;
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
var internal;
|
|
14
|
+
(function (internal) {
|
|
15
|
+
internal.RegisterConnectionAccessSource = new interface_core_1.RegisteringProxy();
|
|
16
|
+
})(internal || (exports.internal = internal = {}));
|
|
17
|
+
/**
|
|
18
|
+
* Registers the module that answers the access of external connections, as dms-database does
|
|
19
|
+
* from `config.externalConnections`. Call it during `construct()`, so the source answers before
|
|
20
|
+
* the API serves a write. The registration is removed when the registering module is unloaded.
|
|
21
|
+
*
|
|
22
|
+
* @param id The source's id; a second registration under it replaces the first
|
|
23
|
+
* @param source Answers each connection the module owns
|
|
24
|
+
*/
|
|
25
|
+
function RegisterConnectionAccessSource(id, source) {
|
|
26
|
+
internal.RegisterConnectionAccessSource.register(id, source);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The access of an external connection: `"read-write"` when a registered source answers it and
|
|
30
|
+
* none answers `"read"`, and `"read"` otherwise, with no source registered for it too. A source
|
|
31
|
+
* that throws rejects the call.
|
|
32
|
+
*/
|
|
33
|
+
exports.GetConnectionAccess = (0, interface_core_1.InterfaceFunction)();
|
|
34
|
+
/** The external connection a data controller writes to. */
|
|
35
|
+
class ExternalConnectionMeta {
|
|
36
|
+
target;
|
|
37
|
+
static key = Symbol();
|
|
38
|
+
connection;
|
|
39
|
+
constructor(target) {
|
|
40
|
+
this.target = target;
|
|
41
|
+
}
|
|
42
|
+
/** A controller derived from this one writes to the same connection. */
|
|
43
|
+
inherit(parent) {
|
|
44
|
+
this.connection ??= parent.connection;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Marks a data controller as one that writes to the tables of an external connection, as the
|
|
49
|
+
* builder does on each resource it maps. Its TableView write routes (`new`, `edit`, `delete`,
|
|
50
|
+
* `archive`, `restore`) answer 403 while the connection's access is `"read"`, whichever page or
|
|
51
|
+
* form posts to them.
|
|
52
|
+
*
|
|
53
|
+
* @param connection The connection id, as `config.externalConnections` of dms-database names it
|
|
54
|
+
*/
|
|
55
|
+
exports.ExternalConnection = (0, decorators_1.MakeClassDecorator)((target, connection) => {
|
|
56
|
+
(0, interface_core_1.GetMetadata)(target, ExternalConnectionMeta).connection = connection;
|
|
57
|
+
});
|
|
58
|
+
/**
|
|
59
|
+
* Throws a 403 when the data controller writes to an external connection whose access is
|
|
60
|
+
* `"read"`; a controller not marked with {@link ExternalConnection} passes.
|
|
61
|
+
*
|
|
62
|
+
* @param controller The data controller's class
|
|
63
|
+
*/
|
|
64
|
+
async function AssertConnectionWritable(controller) {
|
|
65
|
+
const { connection } = (0, interface_core_1.GetMetadata)(controller, ExternalConnectionMeta);
|
|
66
|
+
if (connection === undefined) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if ((await (0, exports.GetConnectionAccess)(connection)) !== "read-write") {
|
|
70
|
+
throw new interface_api_1.HTTPResult(HTTP_FORBIDDEN_STATUS, `Connection "${connection}" is read-only: the project allows no changes to its tables.`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=connection-access.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-access.js","sourceRoot":"","sources":["../src/connection-access.ts"],"names":[],"mappings":";;;AAyCA,wEAKC;AA4CD,4DAaC;AAvGD,6DAAuD;AACvD,+DAIoC;AACpC,sEAG+C;AAE/C,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAalC;;GAEG;AACH,IAAiB,QAAQ,CAIxB;AAJD,WAAiB,QAAQ;IACV,uCAA8B,GAAG,IAAI,iCAAgB,EAE/D,CAAC;AACN,CAAC,EAJgB,QAAQ,wBAAR,QAAQ,QAIxB;AAED;;;;;;;GAOG;AACH,SAAgB,8BAA8B,CAC5C,EAAU,EACV,MAA8B;IAE9B,QAAQ,CAAC,8BAA8B,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;AAC/D,CAAC;AAED;;;;GAIG;AACU,QAAA,mBAAmB,GAC9B,IAAA,kCAAiB,GAAqD,CAAC;AAEzE,2DAA2D;AAC3D,MAAM,sBAAsB;IAKE;IAJrB,MAAM,CAAC,GAAG,GAAG,MAAM,EAAE,CAAC;IAEtB,UAAU,CAAqB;IAEtC,YAA4B,MAAuB;QAAvB,WAAM,GAAN,MAAM,CAAiB;IAAG,CAAC;IAEvD,wEAAwE;IACjE,OAAO,CAAC,MAA8B;QAC3C,IAAI,CAAC,UAAU,KAAK,MAAM,CAAC,UAAU,CAAC;IACxC,CAAC;;AAGH;;;;;;;GAOG;AACU,QAAA,kBAAkB,GAAG,IAAA,+BAAkB,EAClD,CAAC,MAAM,EAAE,UAAkB,EAAE,EAAE;IAC7B,IAAA,4BAAW,EAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC,UAAU,GAAG,UAAU,CAAC;AACtE,CAAC,CACF,CAAC;AAEF;;;;;GAKG;AACI,KAAK,UAAU,wBAAwB,CAC5C,UAA2B;IAE3B,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,4BAAW,EAAC,UAAU,EAAE,sBAAsB,CAAC,CAAC;IACvE,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,OAAO;IACT,CAAC;IACD,IAAI,CAAC,MAAM,IAAA,2BAAmB,EAAC,UAAU,CAAC,CAAC,KAAK,YAAY,EAAE,CAAC;QAC7D,MAAM,IAAI,0BAAU,CAClB,qBAAqB,EACrB,eAAe,UAAU,8DAA8D,CACxF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -4,11 +4,24 @@ import { TenantMember, TenantMemberModel } from "../db";
|
|
|
4
4
|
import { User } from "../auth/db";
|
|
5
5
|
import { DefaultDataTypes } from "../base/data-types/default-types";
|
|
6
6
|
declare const memberSettingDataAPI_base: import("@antelopejs/interface-core/decorators").Class<import("@antelopejs/interface-data-api").ExtractDefCallbacks<{
|
|
7
|
-
edit: DataControllerCallback<import("@antelopejs/interface-data-api/components").Parameters.EditParameters, import("@antelopejs/interface-data-api/metadata").
|
|
7
|
+
edit: DataControllerCallback<import("@antelopejs/interface-data-api/components").Parameters.EditParameters, import("@antelopejs/interface-data-api/metadata").StoredRow, [RequestContext, import("@antelopejs/interface-data-api/components").Parameters.EditParameters, import("@antelopejs/interface-data-api/components").Validation.WrittenBody, User, RequestContext, string | undefined, User]>;
|
|
8
8
|
delete: DataControllerCallback<import("@antelopejs/interface-data-api/components").Parameters.DeleteParameters, number | {
|
|
9
9
|
deleted: number;
|
|
10
10
|
}, [RequestContext, import("@antelopejs/interface-data-api/components").Parameters.DeleteParameters, Buffer<ArrayBufferLike>, User, RequestContext, string | undefined, User]>;
|
|
11
|
-
|
|
11
|
+
exportStart: import("@antelopejs/interface-data-api").DataControllerCallbackWithOptions<{
|
|
12
|
+
pluckMode: string;
|
|
13
|
+
}, {
|
|
14
|
+
jobId: string;
|
|
15
|
+
format: string;
|
|
16
|
+
extension: string;
|
|
17
|
+
}, [RequestContext, import("@antelopejs/interface-data-api/components").Parameters.ListParameters, string | undefined, string | undefined, string[], User, User]>;
|
|
18
|
+
exportStatus: import("@antelopejs/interface-data-api").DataControllerCallbackWithOptions<unknown, {
|
|
19
|
+
status: string;
|
|
20
|
+
progress: number;
|
|
21
|
+
error?: string;
|
|
22
|
+
}, [RequestContext, string, User, User]>;
|
|
23
|
+
exportDownload: import("@antelopejs/interface-data-api").DataControllerCallbackWithOptions<unknown, void, [RequestContext, string, User, User]>;
|
|
24
|
+
get: DataControllerCallback<import("@antelopejs/interface-data-api/components").Parameters.GetParameters, import("@antelopejs/interface-data-api/metadata").StoredRow, [RequestContext, import("@antelopejs/interface-data-api/components").Parameters.GetParameters, User, RequestContext, string | undefined, string | undefined, User]>;
|
|
12
25
|
list: DataControllerCallback<import("@antelopejs/interface-data-api/components").Parameters.ListParameters, import("../base").TableViewListPage, [RequestContext, import("@antelopejs/interface-data-api/components").Parameters.ListParameters, User]>;
|
|
13
26
|
select: import("@antelopejs/interface-data-api").DataControllerCallbackWithOptions<import("@antelopejs/interface-data-api/components").Parameters.ListParameters, import("../base").TableViewListPage, [RequestContext, import("@antelopejs/interface-data-api/components").Parameters.ListParameters, User]>;
|
|
14
27
|
count: DataControllerCallback;
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { Role, RoleModel } from "../db";
|
|
2
2
|
declare const roleSettingDataAPI_base: import("@antelopejs/interface-core/decorators").Class<import("@antelopejs/interface-data-api").ExtractDefCallbacks<{
|
|
3
|
-
readonly
|
|
3
|
+
readonly exportStart: import("@antelopejs/interface-data-api").DataControllerCallbackWithOptions<{
|
|
4
|
+
pluckMode: string;
|
|
5
|
+
}, {
|
|
6
|
+
jobId: string;
|
|
7
|
+
format: string;
|
|
8
|
+
extension: string;
|
|
9
|
+
}, [import("@antelopejs/interface-api").RequestContext, import("@antelopejs/interface-data-api/components").Parameters.ListParameters, string | undefined, string | undefined, string[], import("../auth/db").User, import("../auth/db").User]>;
|
|
10
|
+
readonly exportStatus: import("@antelopejs/interface-data-api").DataControllerCallbackWithOptions<unknown, {
|
|
11
|
+
status: string;
|
|
12
|
+
progress: number;
|
|
13
|
+
error?: string;
|
|
14
|
+
}, [import("@antelopejs/interface-api").RequestContext, string, import("../auth/db").User, import("../auth/db").User]>;
|
|
15
|
+
readonly exportDownload: import("@antelopejs/interface-data-api").DataControllerCallbackWithOptions<unknown, void, [import("@antelopejs/interface-api").RequestContext, string, import("../auth/db").User, import("../auth/db").User]>;
|
|
16
|
+
readonly get: import("@antelopejs/interface-data-api").DataControllerCallback<import("@antelopejs/interface-data-api/components").Parameters.GetParameters, import("@antelopejs/interface-data-api/metadata").StoredRow, [import("@antelopejs/interface-api").RequestContext, import("@antelopejs/interface-data-api/components").Parameters.GetParameters, import("../auth/db").User, import("@antelopejs/interface-api").RequestContext, string | undefined, string | undefined, import("../auth/db").User]>;
|
|
4
17
|
readonly list: import("@antelopejs/interface-data-api").DataControllerCallback<import("@antelopejs/interface-data-api/components").Parameters.ListParameters, import("../base").TableViewListPage, [import("@antelopejs/interface-api").RequestContext, import("@antelopejs/interface-data-api/components").Parameters.ListParameters, import("../auth/db").User]>;
|
|
5
18
|
readonly select: import("@antelopejs/interface-data-api").DataControllerCallbackWithOptions<import("@antelopejs/interface-data-api/components").Parameters.ListParameters, import("../base").TableViewListPage, [import("@antelopejs/interface-api").RequestContext, import("@antelopejs/interface-data-api/components").Parameters.ListParameters, import("../auth/db").User]>;
|
|
6
19
|
readonly count: import("@antelopejs/interface-data-api").DataControllerCallback;
|
|
@@ -9,7 +22,7 @@ declare const roleSettingDataAPI_base: import("@antelopejs/interface-core/decora
|
|
|
9
22
|
readonly new: import("@antelopejs/interface-data-api").DataControllerCallback<import("@antelopejs/interface-data-api/components").Parameters.NewParameters, {
|
|
10
23
|
_id: string;
|
|
11
24
|
}, [import("@antelopejs/interface-api").RequestContext, import("@antelopejs/interface-data-api/components").Parameters.NewParameters, import("@antelopejs/interface-data-api/components").Validation.WrittenBody, import("../auth/db").User, import("@antelopejs/interface-api").RequestContext, string | undefined, import("../auth/db").User]>;
|
|
12
|
-
readonly edit: import("@antelopejs/interface-data-api").DataControllerCallback<import("@antelopejs/interface-data-api/components").Parameters.EditParameters, import("@antelopejs/interface-data-api/metadata").
|
|
25
|
+
readonly edit: import("@antelopejs/interface-data-api").DataControllerCallback<import("@antelopejs/interface-data-api/components").Parameters.EditParameters, import("@antelopejs/interface-data-api/metadata").StoredRow, [import("@antelopejs/interface-api").RequestContext, import("@antelopejs/interface-data-api/components").Parameters.EditParameters, import("@antelopejs/interface-data-api/components").Validation.WrittenBody, import("../auth/db").User, import("@antelopejs/interface-api").RequestContext, string | undefined, import("../auth/db").User]>;
|
|
13
26
|
readonly delete: import("@antelopejs/interface-data-api").DataControllerCallback<import("@antelopejs/interface-data-api/components").Parameters.DeleteParameters, number | {
|
|
14
27
|
deleted: number;
|
|
15
28
|
}, [import("@antelopejs/interface-api").RequestContext, import("@antelopejs/interface-data-api/components").Parameters.DeleteParameters, Buffer<ArrayBufferLike>, import("../auth/db").User, import("@antelopejs/interface-api").RequestContext, string | undefined, import("../auth/db").User]>;
|
|
@@ -15,9 +15,9 @@ declare const ExportJobModel_base: {
|
|
|
15
15
|
new (database: import("@antelopejs/interface-database").SchemaInstance<any>): {
|
|
16
16
|
readonly table: import("@antelopejs/interface-database").Table<ExportJob>;
|
|
17
17
|
readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
|
|
18
|
-
get(id: string):
|
|
19
|
-
getBy(index: keyof ExportJob, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]):
|
|
20
|
-
getAll():
|
|
18
|
+
get(id: string): Promise<ExportJob | undefined>;
|
|
19
|
+
getBy(index: keyof ExportJob, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): Promise<ExportJob[]>;
|
|
20
|
+
getAll(): Promise<ExportJob[]>;
|
|
21
21
|
insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<ExportJob> | import("@antelopejs/interface-database-decorators").DeepPartial<ExportJob>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
|
|
22
22
|
update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<ExportJob>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
|
|
23
23
|
update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<ExportJob> & {
|
|
@@ -4,9 +4,9 @@ declare const InviteResolutionsModel_base: {
|
|
|
4
4
|
new (database: import("@antelopejs/interface-database").SchemaInstance<any>): {
|
|
5
5
|
readonly table: import("@antelopejs/interface-database").Table<InviteResolution>;
|
|
6
6
|
readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
|
|
7
|
-
get(id: string):
|
|
8
|
-
getBy(index: keyof InviteResolution, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]):
|
|
9
|
-
getAll():
|
|
7
|
+
get(id: string): Promise<InviteResolution | undefined>;
|
|
8
|
+
getBy(index: keyof InviteResolution, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): Promise<InviteResolution[]>;
|
|
9
|
+
getAll(): Promise<InviteResolution[]>;
|
|
10
10
|
insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<InviteResolution> | import("@antelopejs/interface-database-decorators").DeepPartial<InviteResolution>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
|
|
11
11
|
update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<InviteResolution>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
|
|
12
12
|
update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<InviteResolution> & {
|
|
@@ -3,9 +3,9 @@ declare const TenantLifecycleModel_base: {
|
|
|
3
3
|
new (database: import("@antelopejs/interface-database").SchemaInstance<any>): {
|
|
4
4
|
readonly table: import("@antelopejs/interface-database").Table<TenantLifecycle>;
|
|
5
5
|
readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
|
|
6
|
-
get(id: string):
|
|
7
|
-
getBy(index: keyof TenantLifecycle, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]):
|
|
8
|
-
getAll():
|
|
6
|
+
get(id: string): Promise<TenantLifecycle | undefined>;
|
|
7
|
+
getBy(index: keyof TenantLifecycle, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): Promise<TenantLifecycle[]>;
|
|
8
|
+
getAll(): Promise<TenantLifecycle[]>;
|
|
9
9
|
insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<TenantLifecycle> | import("@antelopejs/interface-database-decorators").DeepPartial<TenantLifecycle>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
|
|
10
10
|
update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<TenantLifecycle>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
|
|
11
11
|
update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<TenantLifecycle> & {
|
|
@@ -43,7 +43,7 @@ export declare class TenantLifecycleModel extends TenantLifecycleModel_base {
|
|
|
43
43
|
finish(tenantId: string, attemptId: string): Promise<boolean>;
|
|
44
44
|
/** Closes permanently before testing quiescence; active or uncertain work blocks deletion. */
|
|
45
45
|
close(tenantId: string): Promise<void>;
|
|
46
|
-
/** The tenant's row,
|
|
46
|
+
/** The tenant's row, without initializing one. */
|
|
47
47
|
private existing;
|
|
48
48
|
}
|
|
49
49
|
export {};
|
|
@@ -114,10 +114,9 @@ class TenantLifecycleModel extends (0, interface_database_decorators_1.BasicData
|
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
/** The tenant's row,
|
|
117
|
+
/** The tenant's row, without initializing one. */
|
|
118
118
|
async existing(tenantId) {
|
|
119
|
-
return
|
|
120
|
-
(await this.get(LIFECYCLE_ID)));
|
|
119
|
+
return this.get(`${LIFECYCLE_ID}:${tenantId}`);
|
|
121
120
|
}
|
|
122
121
|
}
|
|
123
122
|
exports.TenantLifecycleModel = TenantLifecycleModel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenantLifecycle.model.js","sourceRoot":"","sources":["../../../src/db/internal/tenantLifecycle.model.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AACzC,uEAAwD;AACxD,6FAA2E;AAC3E,mEAGiC;AAEjC,MAAM,YAAY,GAAG,wBAAwB,CAAC;AAC9C,MAAM,aAAa,GAAG,GAAG,CAAC;AAE1B;;;;GAIG;AACH,MAAa,oBAAqB,SAAQ,IAAA,8CAAc,EACtD,uCAAe,EACf,gDAAwB,CACzB;IACC,8EAA8E;IAC9E,KAAK,CAAC,KAAK,CAAC,QAAgB;QAC1B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC/C,IAAI,QAAQ;YAAE,OAAO,QAAQ,CAAC;QAC9B,MAAM,EAAE,GAAG,GAAG,YAAY,IAAI,QAAQ,EAAE,CAAC;QACzC,IAAI,OAAgB,CAAC;QACrB,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,MAAM,CAAC;gBAChB,GAAG,EAAE,EAAE;gBACP,QAAQ,EAAE,IAAA,wBAAU,GAAE;gBACtB,MAAM,EAAE,KAAK;gBACb,gBAAgB,EAAE,EAAE;aACrB,CAAC,CAAC;QACL,C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AAK,CAAC,QAAQ,CACpB,QAAgB;QAEhB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,YAAY,IAAI,QAAQ,EAAE,CAAC,CAAC;IACjD,CAAC;CACF;AAlID,oDAkIC"}
|
|
@@ -3,9 +3,9 @@ declare const RoleModel_base: {
|
|
|
3
3
|
new (database: import("@antelopejs/interface-database").SchemaInstance<any>): {
|
|
4
4
|
readonly table: import("@antelopejs/interface-database").Table<Role>;
|
|
5
5
|
readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
|
|
6
|
-
get(id: string):
|
|
7
|
-
getBy(index: keyof Role, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]):
|
|
8
|
-
getAll():
|
|
6
|
+
get(id: string): Promise<Role | undefined>;
|
|
7
|
+
getBy(index: keyof Role, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): Promise<Role[]>;
|
|
8
|
+
getAll(): Promise<Role[]>;
|
|
9
9
|
insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<Role> | import("@antelopejs/interface-database-decorators").DeepPartial<Role>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
|
|
10
10
|
update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<Role>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
|
|
11
11
|
update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<Role> & {
|
|
@@ -3,9 +3,9 @@ declare const TenantMemberModel_base: {
|
|
|
3
3
|
new (database: import("@antelopejs/interface-database").SchemaInstance<any>): {
|
|
4
4
|
readonly table: import("@antelopejs/interface-database").Table<TenantMember>;
|
|
5
5
|
readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
|
|
6
|
-
get(id: string):
|
|
7
|
-
getBy(index: keyof TenantMember, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]):
|
|
8
|
-
getAll():
|
|
6
|
+
get(id: string): Promise<TenantMember | undefined>;
|
|
7
|
+
getBy(index: keyof TenantMember, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): Promise<TenantMember[]>;
|
|
8
|
+
getAll(): Promise<TenantMember[]>;
|
|
9
9
|
insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<TenantMember> | import("@antelopejs/interface-database-decorators").DeepPartial<TenantMember>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
|
|
10
10
|
update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<TenantMember>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
|
|
11
11
|
update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<TenantMember> & {
|
|
@@ -3,9 +3,9 @@ declare const TenantModel_base: {
|
|
|
3
3
|
new (database: import("@antelopejs/interface-database").SchemaInstance<any>): {
|
|
4
4
|
readonly table: import("@antelopejs/interface-database").Table<Tenant>;
|
|
5
5
|
readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
|
|
6
|
-
get(id: string):
|
|
7
|
-
getBy(index: keyof Tenant, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]):
|
|
8
|
-
getAll():
|
|
6
|
+
get(id: string): Promise<Tenant | undefined>;
|
|
7
|
+
getBy(index: keyof Tenant, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): Promise<Tenant[]>;
|
|
8
|
+
getAll(): Promise<Tenant[]>;
|
|
9
9
|
insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<Tenant> | import("@antelopejs/interface-database-decorators").DeepPartial<Tenant>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
|
|
10
10
|
update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<Tenant>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
|
|
11
11
|
update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<Tenant> & {
|
|
@@ -7,9 +7,9 @@ declare const UserInviteModel_base: {
|
|
|
7
7
|
new (database: import("@antelopejs/interface-database").SchemaInstance<any>): {
|
|
8
8
|
readonly table: import("@antelopejs/interface-database").Table<UserInvite>;
|
|
9
9
|
readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
|
|
10
|
-
get(id: string):
|
|
11
|
-
getBy(index: keyof UserInvite, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]):
|
|
12
|
-
getAll():
|
|
10
|
+
get(id: string): Promise<UserInvite | undefined>;
|
|
11
|
+
getBy(index: keyof UserInvite, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): Promise<UserInvite[]>;
|
|
12
|
+
getAll(): Promise<UserInvite[]>;
|
|
13
13
|
insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<UserInvite> | import("@antelopejs/interface-database-decorators").DeepPartial<UserInvite>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
|
|
14
14
|
update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<UserInvite>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
|
|
15
15
|
update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<UserInvite> & {
|
|
@@ -32,6 +32,21 @@ export declare class UserInviteModel extends UserInviteModel_base {
|
|
|
32
32
|
* @returns The invite or undefined if not found
|
|
33
33
|
*/
|
|
34
34
|
getByEmail(email: string): Promise<UserInvite | undefined>;
|
|
35
|
+
/**
|
|
36
|
+
* Get an invite sent to the email other than the one with the given id
|
|
37
|
+
*
|
|
38
|
+
* @param email The email the invite was sent to
|
|
39
|
+
* @param exceptId The id of the invite to leave out
|
|
40
|
+
* @returns The invite or undefined if not found
|
|
41
|
+
*/
|
|
42
|
+
getOtherByEmail(email: string, exceptId: string): Promise<UserInvite | undefined>;
|
|
43
|
+
/**
|
|
44
|
+
* Whether the invite is stored and is the only invite sent to its email
|
|
45
|
+
*
|
|
46
|
+
* @param invite The invite to look for
|
|
47
|
+
* @returns True when the email's invites are exactly this one
|
|
48
|
+
*/
|
|
49
|
+
isOnlyInviteOfEmail(invite: UserInvite): Promise<boolean>;
|
|
35
50
|
/**
|
|
36
51
|
* Get an invite by its token
|
|
37
52
|
*
|
|
@@ -20,6 +20,34 @@ class UserInviteModel extends (0, interface_database_decorators_1.BasicDataModel
|
|
|
20
20
|
.run()
|
|
21
21
|
.then((res) => (res ? UserInviteModel.fromDatabase(res) : undefined));
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Get an invite sent to the email other than the one with the given id
|
|
25
|
+
*
|
|
26
|
+
* @param email The email the invite was sent to
|
|
27
|
+
* @param exceptId The id of the invite to leave out
|
|
28
|
+
* @returns The invite or undefined if not found
|
|
29
|
+
*/
|
|
30
|
+
getOtherByEmail(email, exceptId) {
|
|
31
|
+
return this.table
|
|
32
|
+
.getAll((0, users_model_1.normalizeEmail)(email), "email")
|
|
33
|
+
.filter((row) => row.key("_id").ne(exceptId))
|
|
34
|
+
.nth(0)
|
|
35
|
+
.default(undefined)
|
|
36
|
+
.run()
|
|
37
|
+
.then((res) => (res ? UserInviteModel.fromDatabase(res) : undefined));
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Whether the invite is stored and is the only invite sent to its email
|
|
41
|
+
*
|
|
42
|
+
* @param invite The invite to look for
|
|
43
|
+
* @returns True when the email's invites are exactly this one
|
|
44
|
+
*/
|
|
45
|
+
async isOnlyInviteOfEmail(invite) {
|
|
46
|
+
const rows = await this.table
|
|
47
|
+
.getAll((0, users_model_1.normalizeEmail)(invite.email), "email")
|
|
48
|
+
.run();
|
|
49
|
+
return rows.length === 1 && rows[0]?._id === invite._id;
|
|
50
|
+
}
|
|
23
51
|
/**
|
|
24
52
|
* Get an invite by its token
|
|
25
53
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user_invites.model.js","sourceRoot":"","sources":["../../../src/db/models/user_invites.model.ts"],"names":[],"mappings":";;;AAAA,6FAA2E;AAC3E,kEAAkE;AAClE,oEAAmE;AACnE,qEAGsC;AAOtC,MAAa,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AA,6BAAc,EAAC,GAAG,CAAC,EAAE,CAAC;IACnD,CAAC;IAED;;;;OAIG;IACH,aAAa,CAAC,KAAa;QACzB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC;IAC1D,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"user_invites.model.js","sourceRoot":"","sources":["../../../src/db/models/user_invites.model.ts"],"names":[],"mappings":";;;AAAA,6FAA2E;AAC3E,kEAAkE;AAClE,oEAAmE;AACnE,qEAGsC;AAOtC,MAAa,eAAgB,SAAQ,IAAA,8CAAc,EACjD,+BAAU,EACV,4CAAuB,CACxB;IACC;;;;;OAKG;IACH,UAAU,CAAC,KAAa;QACtB,OAAO,IAAI,CAAC,KAAK;aACd,MAAM,CAAC,IAAA,4BAAc,EAAC,KAAK,CAAC,EAAE,OAAO,CAAC;aACtC,GAAG,CAAC,CAAC,CAAC;aACN,OAAO,CAAC,SAAS,CAAC;aAClB,GAAG,EAAE;aACL,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,eAAe,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;OAMG;IACH,eAAe,CACb,KAAa,EACb,QAAgB;QAEhB,OAAO,IAAI,CAAC,KAAK;aACd,MAAM,CAAC,IAAA,4BAAc,EAAC,KAAK,CAAC,EAAE,OAAO,CAAC;aACtC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;aAC5C,GAAG,CAAC,CAAC,CAAC;aACN,OAAO,CAAC,SAAS,CAAC;aAClB,GAAG,EAAE;aACL,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG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AE,IAAA,6BAAc,EAAC,GAAG,CAAC,EAAE,CAAC;IACnD,CAAC;IAED;;;;OAIG;IACH,aAAa,CAAC,KAAa;QACzB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC;IAC1D,CAAC;CACF;AAhGD,0CAgGC"}
|
|
@@ -12,7 +12,12 @@ export declare class UserInvite extends Table {
|
|
|
12
12
|
token: string;
|
|
13
13
|
asTenantOwner: boolean;
|
|
14
14
|
expiresAt: Date;
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Id of the resolution that created this invitation as a replacement, which
|
|
17
|
+
* is actionable only once that resolution completes. Empty for an invitation
|
|
18
|
+
* created without one: unique with `email`, so concurrent invitations of one
|
|
19
|
+
* email keep a single row.
|
|
20
|
+
*/
|
|
16
21
|
creationResolutionId?: string;
|
|
17
22
|
/**
|
|
18
23
|
* Id of the user who sent the invitation, or last resent it. `null` for an
|
|
@@ -14,6 +14,7 @@ const interface_database_decorators_1 = require("@antelopejs/interface-database-
|
|
|
14
14
|
const constants_1 = require("../../constants");
|
|
15
15
|
const roles_table_1 = require("./roles.table");
|
|
16
16
|
exports.USER_INVITES_TABLE_NAME = "user_invites";
|
|
17
|
+
const PENDING_INVITE_INDEX = "email_creationResolutionId";
|
|
17
18
|
let UserInvite = class UserInvite extends interface_database_decorators_1.Table {
|
|
18
19
|
};
|
|
19
20
|
exports.UserInvite = UserInvite;
|
|
@@ -28,6 +29,7 @@ __decorate([
|
|
|
28
29
|
__metadata("design:type", Date)
|
|
29
30
|
], UserInvite.prototype, "createdAt", void 0);
|
|
30
31
|
__decorate([
|
|
32
|
+
(0, interface_database_decorators_1.Index)({ group: PENDING_INVITE_INDEX, unique: true }),
|
|
31
33
|
(0, interface_database_decorators_1.Index)({ crossInstance: true }),
|
|
32
34
|
(0, interface_database_decorators_1.Field)("string"),
|
|
33
35
|
__metadata("design:type", String)
|
|
@@ -64,6 +66,7 @@ __decorate([
|
|
|
64
66
|
__metadata("design:type", Date)
|
|
65
67
|
], UserInvite.prototype, "expiresAt", void 0);
|
|
66
68
|
__decorate([
|
|
69
|
+
(0, interface_database_decorators_1.Index)({ group: PENDING_INVITE_INDEX, unique: true }),
|
|
67
70
|
(0, interface_database_decorators_1.Field)("string"),
|
|
68
71
|
__metadata("design:type", String)
|
|
69
72
|
], UserInvite.prototype, "creationResolutionId", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user_invites.table.js","sourceRoot":"","sources":["../../../src/db/tables/user_invites.table.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6FAOmD;AACnD,+CAAqD;AAErD,+CAAqC;AAExB,QAAA,uBAAuB,GAAG,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"user_invites.table.js","sourceRoot":"","sources":["../../../src/db/tables/user_invites.table.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6FAOmD;AACnD,+CAAqD;AAErD,+CAAqC;AAExB,QAAA,uBAAuB,GAAG,cAAc,CAAC;AACtD,MAAM,oBAAoB,GAAG,4BAA4B,CAAC;AAGnD,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,qCAAK;CA8DpC,CAAA;AA9DY,gCAAU;AAEb;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;uCACI;AAKZ;IAHP,IAAA,qCAAK,EAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,4CAAY,GAAE;IACd,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACK,IAAI;6CAAC;AAKhB;IAHP,IAAA,qCAAK,EAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACpD,IAAA,qCAAK,EAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,qCAAK,EAAC,QAAQ,CAAC;;yCACM;AAGd;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;6CACiB;AAGzB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;4CACgB;AAIxB;IAFP,IAAA,qCAAK,EAAC,CAAC,QAAQ,CAAC,CAAC;IACjB,IAAA,wCAAQ,EAAC,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,kBAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;6CACb;AAGpB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;4CACS;AAIjB;IAFP,IAAA,qCAAK,EAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,qCAAK,EAAC,QAAQ,CAAC;;yCACM;AAGd;IADP,IAAA,qCAAK,EAAC,SAAS,CAAC;;iDACc;AAIvB;IAFP,IAAA,qCAAK,EAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACK,IAAI;6CAAC;AAUhB;IAFP,IAAA,qCAAK,EAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACpD,IAAA,qCAAK,EAAC,QAAQ,CAAC;;wDACsB;AAO9B;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;6CACkB;AAQ1B;IADP,IAAA,qCAAK,EAAC,KAAK,CAAC;;8CACsC;qBA7DxC,UAAU;IADtB,IAAA,6CAAa,EAAC,+BAAuB,EAAE,8BAAkB,CAAC;GAC9C,UAAU,CA8DtB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { InviteAcceptHandler, InviteCleanupContext, InviteCleanupHandler, Invite
|
|
|
8
8
|
export * from "./invite-resolution";
|
|
9
9
|
export { CreateUserInviteTokenOptions, CreateUserInviteTokenResult, INVITE_EXPIRY_DAYS, INVITE_TOKEN_LENGTH, InviteUserToTenantOptions, InviteUserToTenantResult, createUserInviteToken, inviteUserToTenant, inviteeDisplayName, } from "./invites";
|
|
10
10
|
export { LayoutBannerComponentInfo, LayoutBannerContext, LayoutBannerInfo, LayoutBannerScope, LayoutBannerTextInfo, LayoutBannerVariant, LayoutBannerVisibility, RegisterLayoutBanner, } from "./layout-banners";
|
|
11
|
-
export { AddFrontendModule, AddFrontendModuleOptions, Category, CategoryInfo, ClearPageLayoutBySlug, DynamicMenuItem, DynamicMenuProviderInfo, DynamicMenuResolver, FrontendModuleContext, FrontendModuleFunction, FrontendModuleMetadata, FrontendModuleOptions, FrontendModuleRegistration, FrontendModuleValue, FrontendRendererMetadata, GetComponentPermissionIds, GetFrontendModules, GetPageLayoutBySlug, GetPermissionId, GetRegisteredPageIds, MODULE_URL_PREFIX, MaybePromise, MenuItemQuery, MenuItemStatus, MenuItemType, MenuItemVariant, MenuOptions, ModuleCatalogContext, ModuleInfo, ModuleReadoutLine, ModuleReadoutTone, ModuleStatus, NotifyMenuChanged, PAGE_ROUTE_PREFIX, PageController, PageExtensionComponent, PageExtensionInfo, PageInfo, PageLayout, PageLayoutHandler, PageLayoutRequest, PageMetadata, PageSetupCleanup, PageSetupContext, PageSetupFunction, PageValidation, RegisterDynamicMenuProvider, RegisterModule, RegisterPage, RegisterPageExtension, RootCategory, RootPageController, isInsideModule, modulesCategory, pageRoutePath, pagesCategory, settingsCategory, } from "./page";
|
|
11
|
+
export { AddFrontendModule, AddFrontendModuleOptions, Category, CategoryInfo, ClearPageLayoutBySlug, DynamicMenuItem, DynamicMenuProviderInfo, DynamicMenuResolver, FrontendModuleContext, FrontendModuleFunction, FrontendModuleMetadata, FrontendModuleOptions, FrontendModuleRegistration, FrontendModuleValue, FrontendRendererMetadata, GetComponentPermissionIds, GetFrontendModules, GetPageLayoutBySlug, GetPermissionId, GetRegisteredPageIds, MODULE_URL_PREFIX, MaybePromise, MenuItemQuery, MenuItemStatus, MenuItemType, MenuItemVariant, MenuOptions, ModuleCatalogContext, ModuleInfo, ModuleReadoutLine, ModuleReadoutTone, ModuleStatus, NotifyMenuChanged, PAGE_ROUTE_PREFIX, PageController, PageExtensionComponent, PageExtensionInfo, PageInfo, PageLayout, PageLayoutHandler, PageLayoutRequest, PageMetadata, PageSetupCleanup, PageSetupContext, PageSetupFunction, PageValidation, RegisterDynamicMenuProvider, RegisterModule, RegisterPage, RegisterPageExtension, RootCategory, RootPageController, isInsideModule, isOwnerOnly, modulesCategory, pageRoutePath, pagesCategory, settingsCategory, } from "./page";
|
|
12
12
|
export { GetEffectiveUserPermissions, GetPermission, GetPermissions, GetUserPermissions, HasAnyPermission, HasPermission, IsModuleScopedPermission, MarkModuleScopedPermission, Permission, PermissionTree, RegisterPermission, UnmarkModuleScopedPermission, UnregisterPermission, } from "./permissions";
|
|
13
13
|
export { ApplyPermissionsResolvers, PermissionsResolverContext, PermissionsResolverFn, PermissionsResolverInfo, PermissionsResolverPreview, RegisterPermissionsResolver, } from "./permissions-resolver";
|
|
14
14
|
export { QuickAction, QuickActionCategory, QuickActionCategoryInfo, QuickActionInfo, QuickActionPageTarget, QuickActionTarget, } from "./quick-actions";
|