@selvajs/platform 0.21.0-beta.3 → 1.0.0-beta.5
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/README.md +11 -8
- package/dist/access/index.d.ts +0 -1
- package/dist/access/index.js +0 -1
- package/dist/access/rules.d.ts +7 -14
- package/dist/access/rules.js +22 -26
- package/dist/apiTokens/index.d.ts +1 -2
- package/dist/apiTokens/index.js +1 -2
- package/dist/apiTokens/interface.d.ts +0 -1
- package/dist/apiTokens/interface.js +0 -1
- package/dist/apiTokens/scope.d.ts +0 -1
- package/dist/apiTokens/scope.js +0 -1
- package/dist/apiTokens/types.d.ts +0 -1
- package/dist/apiTokens/types.js +0 -1
- package/dist/auth/index.d.ts +0 -1
- package/dist/auth/index.js +0 -1
- package/dist/auth/interface.d.ts +4 -23
- package/dist/auth/interface.js +0 -1
- package/dist/auth/types.d.ts +4 -2
- package/dist/auth/types.js +0 -1
- package/dist/bindings/index.d.ts +0 -1
- package/dist/bindings/index.js +0 -1
- package/dist/bindings/interface.d.ts +0 -1
- package/dist/bindings/interface.js +0 -1
- package/dist/computeServer/index.d.ts +1 -7
- package/dist/computeServer/index.js +2 -8
- package/dist/computeServer/interface.d.ts +9 -6
- package/dist/computeServer/interface.js +0 -1
- package/dist/computeServer/public.d.ts +6 -0
- package/dist/computeServer/public.js +2 -0
- package/dist/computeServer/secrets.d.ts +12 -6
- package/dist/computeServer/secrets.js +35 -15
- package/dist/computeServer/types.d.ts +5 -2
- package/dist/computeServer/types.js +4 -1
- package/dist/computeServer/utils.d.ts +17 -6
- package/dist/computeServer/utils.js +31 -21
- package/dist/config.d.ts +1 -2
- package/dist/config.js +0 -1
- package/dist/context.d.ts +11 -1
- package/dist/context.js +51 -2
- package/dist/data/index.d.ts +0 -1
- package/dist/data/index.js +0 -1
- package/dist/data/interface.d.ts +0 -1
- package/dist/data/interface.js +0 -1
- package/dist/definitions/index.d.ts +2 -3
- package/dist/definitions/index.js +2 -3
- package/dist/definitions/interface.d.ts +0 -1
- package/dist/definitions/interface.js +0 -1
- package/dist/definitions/paths.d.ts +0 -1
- package/dist/definitions/paths.js +1 -12
- package/dist/definitions/schemas.d.ts +0 -21
- package/dist/definitions/schemas.js +6 -19
- package/dist/definitions/types.d.ts +3 -4
- package/dist/definitions/types.js +0 -3
- package/dist/errors/interface.d.ts +1 -2
- package/dist/errors/interface.js +0 -1
- package/dist/errors.d.ts +8 -1
- package/dist/errors.js +11 -1
- package/dist/events/audit.d.ts +1 -2
- package/dist/events/audit.js +0 -1
- package/dist/events/index.d.ts +0 -1
- package/dist/events/index.js +0 -1
- package/dist/events/interface.d.ts +0 -1
- package/dist/events/interface.js +0 -1
- package/dist/index.d.ts +18 -61
- package/dist/index.js +18 -24
- package/dist/invites/index.d.ts +0 -1
- package/dist/invites/index.js +0 -1
- package/dist/invites/interface.d.ts +5 -6
- package/dist/invites/interface.js +0 -1
- package/dist/invites/types.d.ts +0 -1
- package/dist/invites/types.js +0 -1
- package/dist/logging/interface.d.ts +0 -1
- package/dist/logging/interface.js +0 -1
- package/dist/metrics/interface.d.ts +0 -1
- package/dist/metrics/interface.js +0 -1
- package/dist/notifications/index.d.ts +0 -1
- package/dist/notifications/index.js +0 -1
- package/dist/notifications/interface.d.ts +1 -3
- package/dist/notifications/interface.js +1 -3
- package/dist/notifications/types.d.ts +0 -1
- package/dist/notifications/types.js +0 -1
- package/dist/organizations/index.d.ts +2 -3
- package/dist/organizations/index.js +1 -2
- package/dist/organizations/interface.d.ts +3 -5
- package/dist/organizations/interface.js +0 -1
- package/dist/organizations/paths.d.ts +1 -6
- package/dist/organizations/paths.js +2 -20
- package/dist/organizations/schemas.d.ts +5 -7
- package/dist/organizations/schemas.js +20 -13
- package/dist/organizations/types.d.ts +0 -1
- package/dist/organizations/types.js +0 -1
- package/dist/pagination.d.ts +21 -3
- package/dist/pagination.js +34 -1
- package/dist/permissions/index.d.ts +2 -2
- package/dist/permissions/index.js +2 -2
- package/dist/permissions/interface.d.ts +4 -4
- package/dist/permissions/interface.js +0 -1
- package/dist/permissions/types.d.ts +0 -1
- package/dist/permissions/types.js +0 -1
- package/dist/platformProjects/index.d.ts +1 -3
- package/dist/platformProjects/index.js +1 -2
- package/dist/platformProjects/interface.d.ts +0 -1
- package/dist/platformProjects/interface.js +0 -1
- package/dist/platformProjects/schemas.d.ts +0 -1
- package/dist/platformProjects/schemas.js +0 -1
- package/dist/platformProjects/types.d.ts +3 -2
- package/dist/platformProjects/types.js +0 -1
- package/dist/projects/index.d.ts +0 -1
- package/dist/projects/index.js +0 -1
- package/dist/projects/interface.d.ts +0 -1
- package/dist/projects/interface.js +0 -1
- package/dist/projects/schemas.d.ts +0 -1
- package/dist/projects/schemas.js +0 -1
- package/dist/projects/types.d.ts +0 -1
- package/dist/projects/types.js +0 -1
- package/dist/shareLinks/index.d.ts +0 -1
- package/dist/shareLinks/index.js +0 -1
- package/dist/shareLinks/interface.d.ts +6 -3
- package/dist/shareLinks/interface.js +0 -1
- package/dist/shareLinks/schemas.d.ts +0 -1
- package/dist/shareLinks/schemas.js +4 -2
- package/dist/shareLinks/types.d.ts +0 -1
- package/dist/shareLinks/types.js +0 -1
- package/dist/solveCache/interface.d.ts +2 -3
- package/dist/solveCache/interface.js +0 -1
- package/dist/storage/assetClasses.d.ts +4 -8
- package/dist/storage/assetClasses.js +6 -21
- package/dist/storage/cacheBust.d.ts +0 -1
- package/dist/storage/cacheBust.js +5 -3
- package/dist/storage/image.d.ts +8 -5
- package/dist/storage/image.js +74 -12
- package/dist/storage/index.d.ts +2 -4
- package/dist/storage/index.js +2 -3
- package/dist/storage/interface.d.ts +11 -3
- package/dist/storage/interface.js +0 -1
- package/dist/storage/safeKey.d.ts +7 -0
- package/dist/storage/safeKey.js +12 -0
- package/dist/testing/index.d.ts +5 -2
- package/dist/testing/index.js +3 -2
- package/dist/testing/suites/apiTokenStoreSuite.d.ts +0 -1
- package/dist/testing/suites/apiTokenStoreSuite.js +0 -1
- package/dist/testing/suites/auditQuerySuite.d.ts +18 -0
- package/dist/testing/suites/auditQuerySuite.js +73 -0
- package/dist/testing/suites/authProviderSuite.d.ts +14 -3
- package/dist/testing/suites/authProviderSuite.js +57 -32
- package/dist/testing/suites/computeServerStoreSuite.d.ts +1 -2
- package/dist/testing/suites/computeServerStoreSuite.js +68 -4
- package/dist/testing/suites/definitionStoreSuite.d.ts +2 -1
- package/dist/testing/suites/definitionStoreSuite.js +19 -16
- package/dist/testing/suites/emailLinkAuthSuite.d.ts +2 -5
- package/dist/testing/suites/emailLinkAuthSuite.js +1 -9
- package/dist/testing/suites/eventSinkSuite.d.ts +0 -1
- package/dist/testing/suites/eventSinkSuite.js +9 -1
- package/dist/testing/suites/helpers.d.ts +5 -1
- package/dist/testing/suites/helpers.js +7 -1
- package/dist/testing/suites/inviteStoreSuite.d.ts +0 -1
- package/dist/testing/suites/inviteStoreSuite.js +17 -7
- package/dist/testing/suites/oauthAuthSuite.d.ts +18 -0
- package/dist/testing/suites/oauthAuthSuite.js +26 -0
- package/dist/testing/suites/orgStoreSuite.d.ts +5 -1
- package/dist/testing/suites/orgStoreSuite.js +26 -7
- package/dist/testing/suites/platformPermissionStoreSuite.d.ts +0 -5
- package/dist/testing/suites/platformPermissionStoreSuite.js +12 -63
- package/dist/testing/suites/platformProjectGrantStoreSuite.d.ts +0 -1
- package/dist/testing/suites/platformProjectGrantStoreSuite.js +0 -5
- package/dist/testing/suites/projectStoreSuite.d.ts +5 -1
- package/dist/testing/suites/projectStoreSuite.js +6 -6
- package/dist/testing/suites/shareLinkStoreSuite.d.ts +2 -1
- package/dist/testing/suites/shareLinkStoreSuite.js +22 -25
- package/dist/testing/suites/solveMetricSinkSuite.d.ts +0 -1
- package/dist/testing/suites/solveMetricSinkSuite.js +2 -2
- package/dist/testing/suites/storageProviderSuite.d.ts +0 -1
- package/dist/testing/suites/storageProviderSuite.js +15 -10
- package/dist/testing/suites/userProfileStoreSuite.d.ts +1 -2
- package/dist/testing/suites/userProfileStoreSuite.js +42 -7
- package/dist/userProfile/index.d.ts +2 -2
- package/dist/userProfile/index.js +2 -2
- package/dist/userProfile/interface.d.ts +5 -6
- package/dist/userProfile/interface.js +0 -1
- package/dist/userProfile/types.d.ts +2 -1
- package/dist/userProfile/types.js +2 -1
- package/dist/utils/audit.d.ts +0 -1
- package/dist/utils/audit.js +0 -1
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.js +0 -1
- package/package.json +7 -6
- package/dist/access/index.d.ts.map +0 -1
- package/dist/access/index.js.map +0 -1
- package/dist/access/rules.d.ts.map +0 -1
- package/dist/access/rules.js.map +0 -1
- package/dist/apiTokens/index.d.ts.map +0 -1
- package/dist/apiTokens/index.js.map +0 -1
- package/dist/apiTokens/interface.d.ts.map +0 -1
- package/dist/apiTokens/interface.js.map +0 -1
- package/dist/apiTokens/scope.d.ts.map +0 -1
- package/dist/apiTokens/scope.js.map +0 -1
- package/dist/apiTokens/types.d.ts.map +0 -1
- package/dist/apiTokens/types.js.map +0 -1
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/interface.d.ts.map +0 -1
- package/dist/auth/interface.js.map +0 -1
- package/dist/auth/types.d.ts.map +0 -1
- package/dist/auth/types.js.map +0 -1
- package/dist/bindings/index.d.ts.map +0 -1
- package/dist/bindings/index.js.map +0 -1
- package/dist/bindings/interface.d.ts.map +0 -1
- package/dist/bindings/interface.js.map +0 -1
- package/dist/computeServer/index.d.ts.map +0 -1
- package/dist/computeServer/index.js.map +0 -1
- package/dist/computeServer/interface.d.ts.map +0 -1
- package/dist/computeServer/interface.js.map +0 -1
- package/dist/computeServer/secrets.d.ts.map +0 -1
- package/dist/computeServer/secrets.js.map +0 -1
- package/dist/computeServer/types.d.ts.map +0 -1
- package/dist/computeServer/types.js.map +0 -1
- package/dist/computeServer/utils.d.ts.map +0 -1
- package/dist/computeServer/utils.js.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/context.d.ts.map +0 -1
- package/dist/context.js.map +0 -1
- package/dist/data/index.d.ts.map +0 -1
- package/dist/data/index.js.map +0 -1
- package/dist/data/interface.d.ts.map +0 -1
- package/dist/data/interface.js.map +0 -1
- package/dist/definitions/index.d.ts.map +0 -1
- package/dist/definitions/index.js.map +0 -1
- package/dist/definitions/interface.d.ts.map +0 -1
- package/dist/definitions/interface.js.map +0 -1
- package/dist/definitions/paths.d.ts.map +0 -1
- package/dist/definitions/paths.js.map +0 -1
- package/dist/definitions/schemas.d.ts.map +0 -1
- package/dist/definitions/schemas.js.map +0 -1
- package/dist/definitions/types.d.ts.map +0 -1
- package/dist/definitions/types.js.map +0 -1
- package/dist/errors/interface.d.ts.map +0 -1
- package/dist/errors/interface.js.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/events/audit.d.ts.map +0 -1
- package/dist/events/audit.js.map +0 -1
- package/dist/events/index.d.ts.map +0 -1
- package/dist/events/index.js.map +0 -1
- package/dist/events/interface.d.ts.map +0 -1
- package/dist/events/interface.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/invites/index.d.ts.map +0 -1
- package/dist/invites/index.js.map +0 -1
- package/dist/invites/interface.d.ts.map +0 -1
- package/dist/invites/interface.js.map +0 -1
- package/dist/invites/types.d.ts.map +0 -1
- package/dist/invites/types.js.map +0 -1
- package/dist/logging/interface.d.ts.map +0 -1
- package/dist/logging/interface.js.map +0 -1
- package/dist/metrics/interface.d.ts.map +0 -1
- package/dist/metrics/interface.js.map +0 -1
- package/dist/notifications/index.d.ts.map +0 -1
- package/dist/notifications/index.js.map +0 -1
- package/dist/notifications/interface.d.ts.map +0 -1
- package/dist/notifications/interface.js.map +0 -1
- package/dist/notifications/types.d.ts.map +0 -1
- package/dist/notifications/types.js.map +0 -1
- package/dist/organizations/index.d.ts.map +0 -1
- package/dist/organizations/index.js.map +0 -1
- package/dist/organizations/interface.d.ts.map +0 -1
- package/dist/organizations/interface.js.map +0 -1
- package/dist/organizations/paths.d.ts.map +0 -1
- package/dist/organizations/paths.js.map +0 -1
- package/dist/organizations/schemas.d.ts.map +0 -1
- package/dist/organizations/schemas.js.map +0 -1
- package/dist/organizations/types.d.ts.map +0 -1
- package/dist/organizations/types.js.map +0 -1
- package/dist/pagination.d.ts.map +0 -1
- package/dist/pagination.js.map +0 -1
- package/dist/permissions/index.d.ts.map +0 -1
- package/dist/permissions/index.js.map +0 -1
- package/dist/permissions/interface.d.ts.map +0 -1
- package/dist/permissions/interface.js.map +0 -1
- package/dist/permissions/types.d.ts.map +0 -1
- package/dist/permissions/types.js.map +0 -1
- package/dist/platformProjects/index.d.ts.map +0 -1
- package/dist/platformProjects/index.js.map +0 -1
- package/dist/platformProjects/interface.d.ts.map +0 -1
- package/dist/platformProjects/interface.js.map +0 -1
- package/dist/platformProjects/schemas.d.ts.map +0 -1
- package/dist/platformProjects/schemas.js.map +0 -1
- package/dist/platformProjects/types.d.ts.map +0 -1
- package/dist/platformProjects/types.js.map +0 -1
- package/dist/projects/index.d.ts.map +0 -1
- package/dist/projects/index.js.map +0 -1
- package/dist/projects/interface.d.ts.map +0 -1
- package/dist/projects/interface.js.map +0 -1
- package/dist/projects/schemas.d.ts.map +0 -1
- package/dist/projects/schemas.js.map +0 -1
- package/dist/projects/types.d.ts.map +0 -1
- package/dist/projects/types.js.map +0 -1
- package/dist/shareLinks/index.d.ts.map +0 -1
- package/dist/shareLinks/index.js.map +0 -1
- package/dist/shareLinks/interface.d.ts.map +0 -1
- package/dist/shareLinks/interface.js.map +0 -1
- package/dist/shareLinks/schemas.d.ts.map +0 -1
- package/dist/shareLinks/schemas.js.map +0 -1
- package/dist/shareLinks/types.d.ts.map +0 -1
- package/dist/shareLinks/types.js.map +0 -1
- package/dist/solveCache/interface.d.ts.map +0 -1
- package/dist/solveCache/interface.js.map +0 -1
- package/dist/storage/assetClasses.d.ts.map +0 -1
- package/dist/storage/assetClasses.js.map +0 -1
- package/dist/storage/cacheBust.d.ts.map +0 -1
- package/dist/storage/cacheBust.js.map +0 -1
- package/dist/storage/image.d.ts.map +0 -1
- package/dist/storage/image.js.map +0 -1
- package/dist/storage/index.d.ts.map +0 -1
- package/dist/storage/index.js.map +0 -1
- package/dist/storage/interface.d.ts.map +0 -1
- package/dist/storage/interface.js.map +0 -1
- package/dist/testing/index.d.ts.map +0 -1
- package/dist/testing/index.js.map +0 -1
- package/dist/testing/suites/apiTokenStoreSuite.d.ts.map +0 -1
- package/dist/testing/suites/apiTokenStoreSuite.js.map +0 -1
- package/dist/testing/suites/authProviderSuite.d.ts.map +0 -1
- package/dist/testing/suites/authProviderSuite.js.map +0 -1
- package/dist/testing/suites/computeServerStoreSuite.d.ts.map +0 -1
- package/dist/testing/suites/computeServerStoreSuite.js.map +0 -1
- package/dist/testing/suites/definitionStoreSuite.d.ts.map +0 -1
- package/dist/testing/suites/definitionStoreSuite.js.map +0 -1
- package/dist/testing/suites/emailLinkAuthSuite.d.ts.map +0 -1
- package/dist/testing/suites/emailLinkAuthSuite.js.map +0 -1
- package/dist/testing/suites/eventSinkSuite.d.ts.map +0 -1
- package/dist/testing/suites/eventSinkSuite.js.map +0 -1
- package/dist/testing/suites/helpers.d.ts.map +0 -1
- package/dist/testing/suites/helpers.js.map +0 -1
- package/dist/testing/suites/inviteStoreSuite.d.ts.map +0 -1
- package/dist/testing/suites/inviteStoreSuite.js.map +0 -1
- package/dist/testing/suites/orgStoreSuite.d.ts.map +0 -1
- package/dist/testing/suites/orgStoreSuite.js.map +0 -1
- package/dist/testing/suites/platformPermissionStoreSuite.d.ts.map +0 -1
- package/dist/testing/suites/platformPermissionStoreSuite.js.map +0 -1
- package/dist/testing/suites/platformProjectGrantStoreSuite.d.ts.map +0 -1
- package/dist/testing/suites/platformProjectGrantStoreSuite.js.map +0 -1
- package/dist/testing/suites/projectStoreSuite.d.ts.map +0 -1
- package/dist/testing/suites/projectStoreSuite.js.map +0 -1
- package/dist/testing/suites/shareLinkStoreSuite.d.ts.map +0 -1
- package/dist/testing/suites/shareLinkStoreSuite.js.map +0 -1
- package/dist/testing/suites/solveMetricSinkSuite.d.ts.map +0 -1
- package/dist/testing/suites/solveMetricSinkSuite.js.map +0 -1
- package/dist/testing/suites/storageProviderSuite.d.ts.map +0 -1
- package/dist/testing/suites/storageProviderSuite.js.map +0 -1
- package/dist/testing/suites/userProfileStoreSuite.d.ts.map +0 -1
- package/dist/testing/suites/userProfileStoreSuite.js.map +0 -1
- package/dist/userProfile/index.d.ts.map +0 -1
- package/dist/userProfile/index.js.map +0 -1
- package/dist/userProfile/interface.d.ts.map +0 -1
- package/dist/userProfile/interface.js.map +0 -1
- package/dist/userProfile/types.d.ts.map +0 -1
- package/dist/userProfile/types.js.map +0 -1
- package/dist/utils/audit.d.ts.map +0 -1
- package/dist/utils/audit.js.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,33 +1,27 @@
|
|
|
1
1
|
// @selvajs/platform — published API contract. Every symbol here is breaking-change-protected.
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export { serversVisibleTo, defaultServerIdFor, resolveServerForOrg, findServerById, platformServers, orgServersFor, scopeConfigToOrg } from './computeServer/utils.js';
|
|
20
|
-
export { canView, canSolve, canEdit, canCreateDefinition, canManage, canEditProjectSettings, canChangeVisibilityToPublic, canEditDefinition, canReclaim, canCreateProject, canChangeOrgRole, checkOwnerRemoval, withAdminBypass } from './access/rules.js';
|
|
21
|
-
export { actorFrom, actorOf, NoopEventSink, AUDIT_EVENT_VERSION } from './events/interface.js';
|
|
2
|
+
export * from './access/index.js';
|
|
3
|
+
export * from './apiTokens/index.js';
|
|
4
|
+
export * from './auth/index.js';
|
|
5
|
+
export * from './computeServer/public.js';
|
|
6
|
+
export * from './data/index.js';
|
|
7
|
+
export * from './definitions/index.js';
|
|
8
|
+
export * from './events/index.js';
|
|
9
|
+
export * from './invites/index.js';
|
|
10
|
+
export * from './notifications/index.js';
|
|
11
|
+
export * from './organizations/index.js';
|
|
12
|
+
export * from './permissions/index.js';
|
|
13
|
+
export * from './platformProjects/index.js';
|
|
14
|
+
export * from './projects/index.js';
|
|
15
|
+
export * from './shareLinks/index.js';
|
|
16
|
+
export * from './storage/index.js';
|
|
17
|
+
export * from './userProfile/index.js';
|
|
18
|
+
export * from './utils/index.js';
|
|
22
19
|
export { NoopSolveMetricSink } from './metrics/interface.js';
|
|
23
20
|
export { NoopSolveResultCache } from './solveCache/interface.js';
|
|
24
21
|
export { NoopErrorReporter } from './errors/interface.js';
|
|
25
22
|
export { NoopLogger } from './logging/interface.js';
|
|
26
|
-
export { NoopNotificationProvider } from './notifications/index.js';
|
|
27
23
|
export { NoopBindingResolver } from './bindings/interface.js';
|
|
28
|
-
export { auditUpdate, auditSoftDelete } from './utils/audit.js';
|
|
29
24
|
export { SYSTEM_CONTEXT, hasPermission, requireActingOrg, isShareContext, assertNotShareContext } from './context.js';
|
|
30
|
-
export { DEFAULT_PAGE_LIMIT, MAX_PAGE_LIMIT } from './pagination.js';
|
|
25
|
+
export { DEFAULT_PAGE_LIMIT, MAX_PAGE_LIMIT, clampPageLimit, decodeOffsetCursor, encodeOffsetCursor, listAll, walkPages } from './pagination.js';
|
|
31
26
|
export { isFlagEnabled, defineConfig } from './config.js';
|
|
32
27
|
export { ProviderError } from './errors.js';
|
|
33
|
-
//# sourceMappingURL=index.js.map
|
package/dist/invites/index.d.ts
CHANGED
package/dist/invites/index.js
CHANGED
|
@@ -18,7 +18,8 @@ export interface IInviteStore {
|
|
|
18
18
|
getByTokenHash(ctx: RequestContext, tokenHash: string): Promise<Invite | null>;
|
|
19
19
|
listByOrg(ctx: RequestContext, orgId: string, opts?: ListOptions): Promise<Page<Invite>>;
|
|
20
20
|
/** No-op if already accepted. */
|
|
21
|
-
|
|
21
|
+
/** True if this call accepted the invite, false if it was already accepted or is gone. */
|
|
22
|
+
markAccepted(ctx: RequestContext, id: string, userId: string): Promise<boolean>;
|
|
22
23
|
/** No-op if already consumed or missing. */
|
|
23
24
|
revoke(ctx: RequestContext, id: string): Promise<void>;
|
|
24
25
|
/**
|
|
@@ -26,10 +27,9 @@ export interface IInviteStore {
|
|
|
26
27
|
* revoked. Accepted invites are left alone — consuming one is history, not
|
|
27
28
|
* a live grant.
|
|
28
29
|
*
|
|
29
|
-
* Offboarding needs this: `removeOrgMember`
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* rather than user id is deliberate — an invite names an address, and the
|
|
30
|
+
* Offboarding needs this: `removeOrgMember` does not touch invites, so a
|
|
31
|
+
* dormant invite would let a removed user walk back in at their original role
|
|
32
|
+
* for the rest of its TTL. Matching by email rather than user id is deliberate — an invite names an address, and the
|
|
33
33
|
* account it will create may not exist yet.
|
|
34
34
|
*
|
|
35
35
|
* One call rather than list-then-revoke-each: the loop would race a
|
|
@@ -39,4 +39,3 @@ export interface IInviteStore {
|
|
|
39
39
|
/** Called from the `deleteOrg` cascade — invites to a deleted org are unredeemable orphans otherwise. */
|
|
40
40
|
deleteByOrg(ctx: RequestContext, orgId: string): Promise<void>;
|
|
41
41
|
}
|
|
42
|
-
//# sourceMappingURL=interface.d.ts.map
|
package/dist/invites/types.d.ts
CHANGED
package/dist/invites/types.js
CHANGED
|
@@ -35,12 +35,10 @@ export interface INotificationProvider {
|
|
|
35
35
|
* Default `INotificationProvider` — sends nothing, reports `not-configured`.
|
|
36
36
|
*
|
|
37
37
|
* Mail is optional in every deployment, so this is a supported wiring rather
|
|
38
|
-
* than a test double: callers already handle `not-configured` as "no mail"
|
|
39
|
-
* which keeps the no-SMTP path identical to the pre-notification behaviour.
|
|
38
|
+
* than a test double: callers already handle `not-configured` as "no mail".
|
|
40
39
|
*/
|
|
41
40
|
export declare class NoopNotificationProvider implements INotificationProvider {
|
|
42
41
|
readonly name = "None";
|
|
43
42
|
send(_message: OutboundMessage, _log?: ILogger): Promise<SendResult>;
|
|
44
43
|
isConfigured(): boolean;
|
|
45
44
|
}
|
|
46
|
-
//# sourceMappingURL=interface.d.ts.map
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
* Default `INotificationProvider` — sends nothing, reports `not-configured`.
|
|
3
3
|
*
|
|
4
4
|
* Mail is optional in every deployment, so this is a supported wiring rather
|
|
5
|
-
* than a test double: callers already handle `not-configured` as "no mail"
|
|
6
|
-
* which keeps the no-SMTP path identical to the pre-notification behaviour.
|
|
5
|
+
* than a test double: callers already handle `not-configured` as "no mail".
|
|
7
6
|
*/
|
|
8
7
|
export class NoopNotificationProvider {
|
|
9
8
|
name = 'None';
|
|
@@ -14,4 +13,3 @@ export class NoopNotificationProvider {
|
|
|
14
13
|
return false;
|
|
15
14
|
}
|
|
16
15
|
}
|
|
17
|
-
//# sourceMappingURL=interface.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export type { Organization, OrgMember, OrgAssets } from './types.js';
|
|
2
2
|
export type { IOrgStore } from './interface.js';
|
|
3
3
|
export { orgPaths } from './paths.js';
|
|
4
|
-
export type { OrgRole, OrgPermission, OrgAssetKind
|
|
5
|
-
export { OrgRoleSchema, OrgPermissionSchema, OrgAssetKindSchema,
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
4
|
+
export type { OrgRole, OrgPermission, OrgAssetKind } from './schemas.js';
|
|
5
|
+
export { OrgRoleSchema, OrgPermissionSchema, OrgAssetKindSchema, SlugSchema, slugify, RESERVED_SLUGS, orgSlugFromName, CreateOrgSchema, UpdateOrgSchema, ALL_ORG_PERMISSIONS, DEFAULT_ORG_PERMISSIONS, OWNER_ADMIN_ONLY_PERMISSIONS, MEMBER_ASSIGNABLE_PERMISSIONS } from './schemas.js';
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
export { orgPaths } from './paths.js';
|
|
2
|
-
export { OrgRoleSchema, OrgPermissionSchema, OrgAssetKindSchema,
|
|
3
|
-
//# sourceMappingURL=index.js.map
|
|
2
|
+
export { OrgRoleSchema, OrgPermissionSchema, OrgAssetKindSchema, SlugSchema, slugify, RESERVED_SLUGS, orgSlugFromName, CreateOrgSchema, UpdateOrgSchema, ALL_ORG_PERMISSIONS, DEFAULT_ORG_PERMISSIONS, OWNER_ADMIN_ONLY_PERMISSIONS, MEMBER_ASSIGNABLE_PERMISSIONS } from './schemas.js';
|
|
@@ -13,10 +13,9 @@ export interface IOrgStore {
|
|
|
13
13
|
createOrg(ctx: RequestContext, org: Organization): Promise<void>;
|
|
14
14
|
updateOrg(ctx: RequestContext, id: string, patch: Partial<Pick<Organization, 'name' | 'slug' | 'assets'>>): Promise<void>;
|
|
15
15
|
/**
|
|
16
|
-
* Soft-deletes the org, cascading to org members, projects, and
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* those up explicitly if needed.
|
|
16
|
+
* Soft-deletes the org, cascading to org members, projects, project members and
|
|
17
|
+
* definitions. Share links die with their definition. Hard-deletes its invites,
|
|
18
|
+
* API tokens, compute servers and compute defaults.
|
|
20
19
|
*/
|
|
21
20
|
deleteOrg(ctx: RequestContext, id: string): Promise<void>;
|
|
22
21
|
listOrgMembers(ctx: RequestContext, orgId: string, opts?: ListOptions): Promise<Page<OrgMember>>;
|
|
@@ -47,4 +46,3 @@ export interface IOrgStore {
|
|
|
47
46
|
updateOrgMemberPermissions(ctx: RequestContext, orgId: string, userId: string, permissions: readonly OrgPermission[]): Promise<void>;
|
|
48
47
|
removeOrgMember(ctx: RequestContext, orgId: string, userId: string): Promise<void>;
|
|
49
48
|
}
|
|
50
|
-
//# sourceMappingURL=interface.d.ts.map
|
|
@@ -6,14 +6,9 @@ import type { OrgAssetKind } from './schemas.js';
|
|
|
6
6
|
*
|
|
7
7
|
* Branding lives under `orgs/{id}/branding/` because it's a *public* asset
|
|
8
8
|
* class — anyone, including logged-out viewers, may read a company logo.
|
|
9
|
-
*
|
|
10
|
-
* `classifyAssetPath` / `ASSET_CLASSES` decide public-vs-private from these
|
|
11
|
-
* prefixes.
|
|
9
|
+
* `classifyAssetPath` / `ASSET_CLASSES` decide visibility from these prefixes.
|
|
12
10
|
*/
|
|
13
11
|
export declare const orgPaths: {
|
|
14
12
|
readonly asset: (id: string, kind: OrgAssetKind) => string;
|
|
15
|
-
/** Members-only blob; `name` includes the extension. */
|
|
16
|
-
readonly privateAsset: (id: string, name: string) => string;
|
|
17
13
|
readonly prefix: (id: string) => string;
|
|
18
14
|
};
|
|
19
|
-
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Blocks path traversal, separators, and empty segments. Called by every
|
|
3
|
-
* helper below so a malicious `id` can't escape the `orgs/` prefix.
|
|
4
|
-
*/
|
|
5
|
-
function assertSafeKey(value, label) {
|
|
6
|
-
// The regex alone allows '.' and '..' — both fully match the allowed alphabet — so they need an explicit check.
|
|
7
|
-
if (!value || !/^[A-Za-z0-9._-]+$/.test(value) || value === '.' || value === '..') {
|
|
8
|
-
throw new Error(`Unsafe ${label}: ${JSON.stringify(value)}`);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
1
|
+
import { assertSafeKey } from '../storage/safeKey.js';
|
|
11
2
|
/**
|
|
12
3
|
* Every branding asset is stored as `.webp` (uploads go through the shared
|
|
13
4
|
* transcoder), so the path per kind is fixed and a re-upload overwrites in
|
|
@@ -15,9 +6,7 @@ function assertSafeKey(value, label) {
|
|
|
15
6
|
*
|
|
16
7
|
* Branding lives under `orgs/{id}/branding/` because it's a *public* asset
|
|
17
8
|
* class — anyone, including logged-out viewers, may read a company logo.
|
|
18
|
-
*
|
|
19
|
-
* `classifyAssetPath` / `ASSET_CLASSES` decide public-vs-private from these
|
|
20
|
-
* prefixes.
|
|
9
|
+
* `classifyAssetPath` / `ASSET_CLASSES` decide visibility from these prefixes.
|
|
21
10
|
*/
|
|
22
11
|
export const orgPaths = {
|
|
23
12
|
asset: (id, kind) => {
|
|
@@ -25,15 +14,8 @@ export const orgPaths = {
|
|
|
25
14
|
assertSafeKey(kind, 'assetKind');
|
|
26
15
|
return `orgs/${id}/branding/${kind}.webp`;
|
|
27
16
|
},
|
|
28
|
-
/** Members-only blob; `name` includes the extension. */
|
|
29
|
-
privateAsset: (id, name) => {
|
|
30
|
-
assertSafeKey(id, 'orgId');
|
|
31
|
-
assertSafeKey(name, 'assetName');
|
|
32
|
-
return `orgs/${id}/private/${name}`;
|
|
33
|
-
},
|
|
34
17
|
prefix: (id) => {
|
|
35
18
|
assertSafeKey(id, 'orgId');
|
|
36
19
|
return `orgs/${id}/`;
|
|
37
20
|
}
|
|
38
21
|
};
|
|
39
|
-
//# sourceMappingURL=paths.js.map
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/**
|
|
3
3
|
* Top-level path segments a tenant slug must never equal, so a slug can never
|
|
4
|
-
* shadow (or be shadowed by) a route. `/o/{slug}/`
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* collision-free before any external link is minted against a slug.
|
|
8
|
-
* Lowercase; matching is case-insensitive so `Admin` can't slip through. Keep
|
|
9
|
-
* in sync with the route tree's top-level directories.
|
|
4
|
+
* shadow (or be shadowed by) a route. `o` is reserved for `/o/{slug}/` even though
|
|
5
|
+
* the length gate below already makes a 1-char slug impossible.
|
|
6
|
+
* `reserved-slugs.test.ts` in the selva app holds this to the route tree.
|
|
10
7
|
*/
|
|
11
8
|
export declare const RESERVED_SLUGS: readonly string[];
|
|
12
9
|
/**
|
|
@@ -15,6 +12,8 @@ export declare const RESERVED_SLUGS: readonly string[];
|
|
|
15
12
|
* untouched — run the result through `SlugSchema` where validity matters.
|
|
16
13
|
*/
|
|
17
14
|
export declare function slugify(name: string): string;
|
|
15
|
+
/** A slug for an org named without a slug of its own. Always passes `SlugSchema`. */
|
|
16
|
+
export declare function orgSlugFromName(name: string, fallback?: string): string;
|
|
18
17
|
/** Lowercase alphanumeric with internal hyphens, 3–63 chars, not a reserved word. */
|
|
19
18
|
export declare const SlugSchema: z.ZodString;
|
|
20
19
|
export declare const OrgRoleSchema: z.ZodEnum<{
|
|
@@ -54,4 +53,3 @@ export declare const UpdateOrgSchema: z.ZodObject<{
|
|
|
54
53
|
}, z.core.$strip>;
|
|
55
54
|
export type CreateOrgInput = z.infer<typeof CreateOrgSchema>;
|
|
56
55
|
export type UpdateOrgInput = z.infer<typeof UpdateOrgSchema>;
|
|
57
|
-
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/**
|
|
3
3
|
* Top-level path segments a tenant slug must never equal, so a slug can never
|
|
4
|
-
* shadow (or be shadowed by) a route. `/o/{slug}/`
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* collision-free before any external link is minted against a slug.
|
|
8
|
-
* Lowercase; matching is case-insensitive so `Admin` can't slip through. Keep
|
|
9
|
-
* in sync with the route tree's top-level directories.
|
|
4
|
+
* shadow (or be shadowed by) a route. `o` is reserved for `/o/{slug}/` even though
|
|
5
|
+
* the length gate below already makes a 1-char slug impossible.
|
|
6
|
+
* `reserved-slugs.test.ts` in the selva app holds this to the route tree.
|
|
10
7
|
*/
|
|
11
8
|
export const RESERVED_SLUGS = [
|
|
12
9
|
'o',
|
|
@@ -16,11 +13,13 @@ export const RESERVED_SLUGS = [
|
|
|
16
13
|
'login',
|
|
17
14
|
'logout',
|
|
18
15
|
'setup',
|
|
19
|
-
'settings',
|
|
20
16
|
'team',
|
|
21
17
|
'library',
|
|
22
18
|
'projects',
|
|
23
|
-
'accept-invite'
|
|
19
|
+
'accept-invite',
|
|
20
|
+
'docs',
|
|
21
|
+
'mcp',
|
|
22
|
+
'oauth'
|
|
24
23
|
];
|
|
25
24
|
const RESERVED_SLUG_SET = new Set(RESERVED_SLUGS);
|
|
26
25
|
/**
|
|
@@ -30,18 +29,27 @@ const RESERVED_SLUG_SET = new Set(RESERVED_SLUGS);
|
|
|
30
29
|
*/
|
|
31
30
|
export function slugify(name) {
|
|
32
31
|
return name
|
|
32
|
+
.normalize('NFKD')
|
|
33
|
+
.replace(/\p{M}/gu, '')
|
|
33
34
|
.trim()
|
|
34
35
|
.toLowerCase()
|
|
35
36
|
.replace(/[^a-z0-9]+/g, '-')
|
|
36
|
-
.
|
|
37
|
-
.
|
|
37
|
+
.slice(0, 63)
|
|
38
|
+
.replace(/^-+|-+$/g, '');
|
|
39
|
+
}
|
|
40
|
+
/** A slug for an org named without a slug of its own. Always passes `SlugSchema`. */
|
|
41
|
+
export function orgSlugFromName(name, fallback = 'default') {
|
|
42
|
+
const slug = slugify(name);
|
|
43
|
+
if (slug.length < 3)
|
|
44
|
+
return fallback;
|
|
45
|
+
return RESERVED_SLUG_SET.has(slug) ? `${slug}-org` : slug;
|
|
38
46
|
}
|
|
39
47
|
/** Lowercase alphanumeric with internal hyphens, 3–63 chars, not a reserved word. */
|
|
40
48
|
export const SlugSchema = z
|
|
41
49
|
.string()
|
|
42
50
|
.min(3, 'Slug must be at least 3 characters')
|
|
43
51
|
.max(63, 'Slug must be at most 63 characters')
|
|
44
|
-
.regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/, 'Slug must be lowercase alphanumeric with hyphens (no leading
|
|
52
|
+
.regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/, 'Slug must be lowercase alphanumeric with hyphens (no leading or trailing hyphen)')
|
|
45
53
|
.refine((s) => !RESERVED_SLUG_SET.has(s), {
|
|
46
54
|
message: 'Slug is reserved and cannot be used'
|
|
47
55
|
});
|
|
@@ -70,8 +78,7 @@ export const DEFAULT_ORG_PERMISSIONS = {
|
|
|
70
78
|
member: []
|
|
71
79
|
};
|
|
72
80
|
export const CreateOrgSchema = z.object({
|
|
73
|
-
name: z.string().min(1, 'Organization name is required').max(128),
|
|
81
|
+
name: z.string().trim().min(1, 'Organization name is required').max(128),
|
|
74
82
|
slug: SlugSchema
|
|
75
83
|
});
|
|
76
84
|
export const UpdateOrgSchema = CreateOrgSchema.partial();
|
|
77
|
-
//# sourceMappingURL=schemas.js.map
|
package/dist/pagination.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { DefinitionStatus } from './definitions/types.js';
|
|
2
2
|
/**
|
|
3
|
-
* Cursor-paginated list options. Adapters default to limit=50
|
|
4
|
-
* desc
|
|
3
|
+
* Cursor-paginated list options. Adapters default to limit=50 and clamp limit to
|
|
4
|
+
* `MAX_PAGE_LIMIT`. Order is `createdAt` desc unless a store says otherwise: local
|
|
5
|
+
* definitions default to `name` asc, and the Supabase member, invite and token
|
|
6
|
+
* lists have one fixed order and ignore `orderBy`.
|
|
5
7
|
*
|
|
6
8
|
* Cursors are opaque — adapters may use row ids, offsets, or keyset encodings.
|
|
7
9
|
* Callers must not inspect them.
|
|
@@ -44,4 +46,20 @@ export interface Page<T> {
|
|
|
44
46
|
}
|
|
45
47
|
export declare const DEFAULT_PAGE_LIMIT = 50;
|
|
46
48
|
export declare const MAX_PAGE_LIMIT = 200;
|
|
47
|
-
|
|
49
|
+
/** For adapters paging by offset. Junk and negatives read as the first page. */
|
|
50
|
+
export declare function decodeOffsetCursor(cursor: string | undefined): number;
|
|
51
|
+
export declare function encodeOffsetCursor(offset: number): string;
|
|
52
|
+
type PageFetcher<T> = (page: {
|
|
53
|
+
limit: number;
|
|
54
|
+
cursor?: string;
|
|
55
|
+
}) => Promise<Page<T>>;
|
|
56
|
+
/**
|
|
57
|
+
* Every page of a list, in order. One call stops at `MAX_PAGE_LIMIT` without saying so, which is
|
|
58
|
+
* fatal for a read that must see every row. Break out of the loop to stop reading.
|
|
59
|
+
*/
|
|
60
|
+
export declare function walkPages<T>(fetchPage: PageFetcher<T>): AsyncGenerator<Page<T>>;
|
|
61
|
+
/** Every row of a list, across all its pages. */
|
|
62
|
+
export declare function listAll<T>(fetchPage: PageFetcher<T>): Promise<T[]>;
|
|
63
|
+
/** The effective page size for a requested limit. */
|
|
64
|
+
export declare function clampPageLimit(limit: number | undefined): number;
|
|
65
|
+
export {};
|
package/dist/pagination.js
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
1
|
export const DEFAULT_PAGE_LIMIT = 50;
|
|
2
2
|
export const MAX_PAGE_LIMIT = 200;
|
|
3
|
-
|
|
3
|
+
/** For adapters paging by offset. Junk and negatives read as the first page. */
|
|
4
|
+
export function decodeOffsetCursor(cursor) {
|
|
5
|
+
const offset = cursor ? parseInt(cursor, 10) : 0;
|
|
6
|
+
return Number.isFinite(offset) && offset >= 0 ? offset : 0;
|
|
7
|
+
}
|
|
8
|
+
export function encodeOffsetCursor(offset) {
|
|
9
|
+
return String(offset);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Every page of a list, in order. One call stops at `MAX_PAGE_LIMIT` without saying so, which is
|
|
13
|
+
* fatal for a read that must see every row. Break out of the loop to stop reading.
|
|
14
|
+
*/
|
|
15
|
+
export async function* walkPages(fetchPage) {
|
|
16
|
+
let cursor;
|
|
17
|
+
do {
|
|
18
|
+
const page = await fetchPage({ limit: MAX_PAGE_LIMIT, cursor });
|
|
19
|
+
yield page;
|
|
20
|
+
cursor = page.nextCursor;
|
|
21
|
+
} while (cursor);
|
|
22
|
+
}
|
|
23
|
+
/** Every row of a list, across all its pages. */
|
|
24
|
+
export async function listAll(fetchPage) {
|
|
25
|
+
const items = [];
|
|
26
|
+
for await (const page of walkPages(fetchPage))
|
|
27
|
+
items.push(...page.items);
|
|
28
|
+
return items;
|
|
29
|
+
}
|
|
30
|
+
/** The effective page size for a requested limit. */
|
|
31
|
+
export function clampPageLimit(limit) {
|
|
32
|
+
const requested = limit ?? DEFAULT_PAGE_LIMIT;
|
|
33
|
+
if (!Number.isFinite(requested))
|
|
34
|
+
return DEFAULT_PAGE_LIMIT;
|
|
35
|
+
return Math.min(Math.max(1, Math.floor(requested)), MAX_PAGE_LIMIT);
|
|
36
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type { PlatformPermission } from './types.js';
|
|
2
|
-
export { PlatformPermissionSchema, ALL_PLATFORM_PERMISSIONS } from './types.js';
|
|
2
|
+
export { PlatformPermissionSchema, ALL_PLATFORM_PERMISSIONS, OPERATOR_PLATFORM_PERMISSIONS } from './types.js';
|
|
3
3
|
export type { IPlatformPermissionStore } from './interface.js';
|
|
4
|
-
|
|
4
|
+
export { assertCanManagePermissions, assertCanReadPermissions, assertCanReadPermissionsBatch } from '../context.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { PlatformPermissionSchema, ALL_PLATFORM_PERMISSIONS } from './types.js';
|
|
2
|
-
|
|
1
|
+
export { PlatformPermissionSchema, ALL_PLATFORM_PERMISSIONS, OPERATOR_PLATFORM_PERMISSIONS } from './types.js';
|
|
2
|
+
export { assertCanManagePermissions, assertCanReadPermissions, assertCanReadPermissionsBatch } from '../context.js';
|
|
@@ -27,7 +27,9 @@ export interface IPlatformPermissionStore {
|
|
|
27
27
|
set(ctx: RequestContext, userId: string, permissions: readonly PlatformPermission[]): Promise<UserManagementResult>;
|
|
28
28
|
/**
|
|
29
29
|
* True if at least one *enabled* user holds `instance_admin`. Adapters
|
|
30
|
-
* must exclude disabled users
|
|
30
|
+
* must exclude disabled users. One that can't see the disabled flag, like local,
|
|
31
|
+
* relies on the routes: disabling revokes `instance_admin` first, and a disabled
|
|
32
|
+
* user can't be granted it.
|
|
31
33
|
*/
|
|
32
34
|
hasInstanceAdmin(ctx: RequestContext): Promise<boolean>;
|
|
33
35
|
/**
|
|
@@ -45,8 +47,7 @@ export interface IPlatformPermissionStore {
|
|
|
45
47
|
* write: on a fresh single-tenant install with no
|
|
46
48
|
* `BOOTSTRAP_INSTANCE_ADMIN_EMAIL` configured, any signer is eligible, so
|
|
47
49
|
* two people signing in at the same moment both observe "no admin" and both
|
|
48
|
-
* become permanent platform admins.
|
|
49
|
-
* is what makes that true rather than aspirational.
|
|
50
|
+
* become permanent platform admins. This is what makes first signer win.
|
|
50
51
|
*
|
|
51
52
|
* Same shape as the sole-admin invariant (`set`), pointing the other way:
|
|
52
53
|
* that one refuses to drop the last admin, this one refuses to create a
|
|
@@ -54,4 +55,3 @@ export interface IPlatformPermissionStore {
|
|
|
54
55
|
*/
|
|
55
56
|
claimFirstInstanceAdmin(ctx: RequestContext, userId: string, permissions: readonly PlatformPermission[]): Promise<boolean>;
|
|
56
57
|
}
|
|
57
|
-
//# sourceMappingURL=interface.d.ts.map
|
|
@@ -23,4 +23,3 @@ export declare const ALL_PLATFORM_PERMISSIONS: readonly PlatformPermission[];
|
|
|
23
23
|
* `manage_api_tokens` is granted to ordinary users, who have no business there.
|
|
24
24
|
*/
|
|
25
25
|
export declare const OPERATOR_PLATFORM_PERMISSIONS: readonly PlatformPermission[];
|
|
26
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -22,4 +22,3 @@ export const ALL_PLATFORM_PERMISSIONS = PlatformPermissionSchema.options;
|
|
|
22
22
|
* `manage_api_tokens` is granted to ordinary users, who have no business there.
|
|
23
23
|
*/
|
|
24
24
|
export const OPERATOR_PLATFORM_PERMISSIONS = ALL_PLATFORM_PERMISSIONS.filter((p) => p !== 'manage_api_tokens');
|
|
25
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
export type { PlatformProjectGrant
|
|
1
|
+
export type { PlatformProjectGrant } from './types.js';
|
|
2
2
|
export type { IPlatformProjectGrantStore } from './interface.js';
|
|
3
|
-
export { PlatformProjectGrantSchema, PlatformProjectGranteeTypeSchema } from './schemas.js';
|
|
4
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import type { PlatformProjectGranteeTypeSchema } from './schemas.js';
|
|
3
|
+
export type PlatformProjectGranteeType = z.infer<typeof PlatformProjectGranteeTypeSchema>;
|
|
2
4
|
/**
|
|
3
5
|
* Grants view-only or view+solve access to a `platform`-visibility project
|
|
4
6
|
* for an org or an individual user, without creating project membership rows.
|
|
@@ -16,4 +18,3 @@ export interface PlatformProjectGrant {
|
|
|
16
18
|
createdBy: string;
|
|
17
19
|
createdAt: string;
|
|
18
20
|
}
|
|
19
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/projects/index.d.ts
CHANGED
|
@@ -2,4 +2,3 @@ export type { Project, ProjectMember } from './types.js';
|
|
|
2
2
|
export type { IProjectStore } from './interface.js';
|
|
3
3
|
export type { ProjectVisibility, ProjectRole } from './schemas.js';
|
|
4
4
|
export { ProjectVisibilitySchema, ProjectRoleSchema, validateProjectFlags } from './schemas.js';
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/projects/index.js
CHANGED
|
@@ -38,4 +38,3 @@ export interface IProjectStore {
|
|
|
38
38
|
updateProjectMemberRole(ctx: RequestContext, projectId: string, userId: string, role: ProjectRole): Promise<void>;
|
|
39
39
|
removeProjectMember(ctx: RequestContext, projectId: string, userId: string): Promise<void>;
|
|
40
40
|
}
|
|
41
|
-
//# sourceMappingURL=interface.d.ts.map
|
package/dist/projects/schemas.js
CHANGED