@sylphx/management 0.1.0 → 0.2.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 +88 -0
- package/LICENSE +21 -0
- package/README.md +157 -101
- package/dist/admin.d.ts +141 -0
- package/dist/admin.d.ts.map +1 -0
- package/dist/admin.js +96 -0
- package/dist/adminBootstrap.d.ts +46 -0
- package/dist/adminBootstrap.d.ts.map +1 -0
- package/dist/adminBootstrap.js +33 -0
- package/dist/adminBuilds.d.ts +72 -0
- package/dist/adminBuilds.d.ts.map +1 -0
- package/dist/adminBuilds.js +29 -0
- package/dist/adminEnvServices.d.ts +41 -0
- package/dist/adminEnvServices.d.ts.map +1 -0
- package/dist/adminEnvServices.js +22 -0
- package/dist/adminRateLimits.d.ts +61 -0
- package/dist/adminRateLimits.d.ts.map +1 -0
- package/dist/adminRateLimits.js +44 -0
- package/dist/adminReconcile.d.ts +45 -0
- package/dist/adminReconcile.d.ts.map +1 -0
- package/dist/adminReconcile.js +20 -0
- package/dist/adminResources.d.ts +97 -0
- package/dist/adminResources.d.ts.map +1 -0
- package/dist/adminResources.js +40 -0
- package/dist/adminSecrets.d.ts +60 -0
- package/dist/adminSecrets.d.ts.map +1 -0
- package/dist/adminSecrets.js +43 -0
- package/dist/adminTenants.d.ts +41 -0
- package/dist/adminTenants.d.ts.map +1 -0
- package/dist/adminTenants.js +29 -0
- package/dist/ai.d.ts +148 -0
- package/dist/ai.d.ts.map +1 -0
- package/dist/ai.js +29 -0
- package/dist/analytics.d.ts +49 -0
- package/dist/analytics.d.ts.map +1 -0
- package/dist/analytics.js +23 -0
- package/dist/auth.d.ts +39 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +27 -0
- package/dist/authSettings.d.ts +71 -0
- package/dist/authSettings.d.ts.map +1 -0
- package/dist/authSettings.js +39 -0
- package/dist/backups.d.ts +66 -0
- package/dist/backups.d.ts.map +1 -0
- package/dist/backups.js +32 -0
- package/dist/billing.d.ts +105 -0
- package/dist/billing.d.ts.map +1 -0
- package/dist/billing.js +42 -0
- package/dist/billingSettings.d.ts +78 -0
- package/dist/billingSettings.d.ts.map +1 -0
- package/dist/billingSettings.js +54 -0
- package/dist/branchDatabases.d.ts +53 -0
- package/dist/branchDatabases.d.ts.map +1 -0
- package/dist/branchDatabases.js +38 -0
- package/dist/certs.d.ts +63 -0
- package/dist/certs.d.ts.map +1 -0
- package/dist/certs.js +28 -0
- package/dist/ciSettings.d.ts +77 -0
- package/dist/ciSettings.d.ts.map +1 -0
- package/dist/ciSettings.js +41 -0
- package/dist/client.d.ts +36 -38
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +32 -90
- package/dist/consent.d.ts +111 -0
- package/dist/consent.d.ts.map +1 -0
- package/dist/consent.js +35 -0
- package/dist/databases.d.ts +17 -0
- package/dist/databases.d.ts.map +1 -0
- package/dist/databases.js +32 -0
- package/dist/deployments.d.ts +22 -0
- package/dist/deployments.d.ts.map +1 -0
- package/dist/deployments.js +39 -0
- package/dist/domains.d.ts +26 -0
- package/dist/domains.d.ts.map +1 -0
- package/dist/domains.js +39 -0
- package/dist/edgeDeployments.d.ts +43 -0
- package/dist/edgeDeployments.d.ts.map +1 -0
- package/dist/edgeDeployments.js +32 -0
- package/dist/email.d.ts +45 -0
- package/dist/email.d.ts.map +1 -0
- package/dist/email.js +21 -0
- package/dist/engagement.d.ts +100 -0
- package/dist/engagement.d.ts.map +1 -0
- package/dist/engagement.js +28 -0
- package/dist/envVars.d.ts +17 -0
- package/dist/envVars.d.ts.map +1 -0
- package/dist/envVars.js +34 -0
- package/dist/environments.d.ts +41 -0
- package/dist/environments.d.ts.map +1 -0
- package/dist/environments.js +54 -0
- package/dist/errors.d.ts +8 -3
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +8 -2
- package/dist/experiments.d.ts +80 -0
- package/dist/experiments.d.ts.map +1 -0
- package/dist/experiments.js +23 -0
- package/dist/flags.d.ts +85 -0
- package/dist/flags.d.ts.map +1 -0
- package/dist/flags.js +25 -0
- package/dist/functions.d.ts +39 -0
- package/dist/functions.d.ts.map +1 -0
- package/dist/functions.js +40 -0
- package/dist/github.d.ts +33 -0
- package/dist/github.d.ts.map +1 -0
- package/dist/github.js +22 -0
- package/dist/http.d.ts +28 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +71 -0
- package/dist/index.d.ts +85 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +86 -20
- package/dist/kv.d.ts +66 -0
- package/dist/kv.d.ts.map +1 -0
- package/dist/kv.js +36 -0
- package/dist/logs.d.ts +14 -0
- package/dist/logs.d.ts.map +1 -0
- package/dist/logs.js +17 -0
- package/dist/management.d.ts +55 -0
- package/dist/management.d.ts.map +1 -0
- package/dist/management.js +31 -0
- package/dist/monitoring.d.ts +65 -0
- package/dist/monitoring.d.ts.map +1 -0
- package/dist/monitoring.js +29 -0
- package/dist/newsletter.d.ts +279 -0
- package/dist/newsletter.d.ts.map +1 -0
- package/dist/newsletter.js +98 -0
- package/dist/notifications.d.ts +30 -0
- package/dist/notifications.d.ts.map +1 -0
- package/dist/notifications.js +19 -0
- package/dist/oidc.d.ts +46 -0
- package/dist/oidc.d.ts.map +1 -0
- package/dist/oidc.js +25 -0
- package/dist/organizations.d.ts +24 -0
- package/dist/organizations.d.ts.map +1 -0
- package/dist/organizations.js +42 -0
- package/dist/plans.d.ts +66 -0
- package/dist/plans.d.ts.map +1 -0
- package/dist/plans.js +42 -0
- package/dist/privacy.d.ts +138 -0
- package/dist/privacy.d.ts.map +1 -0
- package/dist/privacy.js +41 -0
- package/dist/projects.d.ts +14 -0
- package/dist/projects.d.ts.map +1 -0
- package/dist/projects.js +22 -0
- package/dist/realtime.d.ts +33 -0
- package/dist/realtime.d.ts.map +1 -0
- package/dist/realtime.js +19 -0
- package/dist/referrals.d.ts +100 -0
- package/dist/referrals.d.ts.map +1 -0
- package/dist/referrals.js +33 -0
- package/dist/refresh.d.ts +44 -0
- package/dist/refresh.d.ts.map +1 -0
- package/dist/refresh.js +33 -0
- package/dist/remoteConfig.d.ts +15 -0
- package/dist/remoteConfig.d.ts.map +1 -0
- package/dist/remoteConfig.js +35 -0
- package/dist/resourceBindings.d.ts +19 -0
- package/dist/resourceBindings.d.ts.map +1 -0
- package/dist/resourceBindings.js +24 -0
- package/dist/runners.d.ts +60 -0
- package/dist/runners.d.ts.map +1 -0
- package/dist/runners.js +17 -0
- package/dist/saml.d.ts +44 -0
- package/dist/saml.d.ts.map +1 -0
- package/dist/saml.js +77 -0
- package/dist/sandboxes.d.ts +15 -0
- package/dist/sandboxes.d.ts.map +1 -0
- package/dist/sandboxes.js +18 -0
- package/dist/search.d.ts +66 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +29 -0
- package/dist/secrets.d.ts +50 -0
- package/dist/secrets.d.ts.map +1 -0
- package/dist/secrets.js +61 -0
- package/dist/security.d.ts +58 -0
- package/dist/security.d.ts.map +1 -0
- package/dist/security.js +49 -0
- package/dist/serviceTokenRequests.d.ts +71 -0
- package/dist/serviceTokenRequests.d.ts.map +1 -0
- package/dist/serviceTokenRequests.js +43 -0
- package/dist/serviceTokens.d.ts +65 -0
- package/dist/serviceTokens.d.ts.map +1 -0
- package/dist/serviceTokens.js +22 -0
- package/dist/services.d.ts +10 -0
- package/dist/services.d.ts.map +1 -0
- package/dist/services.js +15 -0
- package/dist/sessionReplay.d.ts +116 -0
- package/dist/sessionReplay.d.ts.map +1 -0
- package/dist/sessionReplay.js +29 -0
- package/dist/storage.d.ts +12 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/storage.js +10 -0
- package/dist/tasks.d.ts +29 -0
- package/dist/tasks.d.ts.map +1 -0
- package/dist/tasks.js +29 -0
- package/dist/types.d.ts +59 -155
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +17 -3
- package/dist/user.d.ts +99 -0
- package/dist/user.d.ts.map +1 -0
- package/dist/user.js +58 -0
- package/dist/users.d.ts +9 -0
- package/dist/users.d.ts.map +1 -0
- package/dist/users.js +11 -0
- package/dist/volumes.d.ts +16 -0
- package/dist/volumes.d.ts.map +1 -0
- package/dist/volumes.js +9 -0
- package/dist/webhooks.d.ts +77 -0
- package/dist/webhooks.d.ts.map +1 -0
- package/dist/webhooks.js +27 -0
- package/package.json +194 -5
- package/dist/request.d.ts +0 -5
- package/dist/request.d.ts.map +0 -1
- package/dist/request.js +0 -1
- package/dist/resources/config.d.ts +0 -30
- package/dist/resources/config.d.ts.map +0 -1
- package/dist/resources/config.js +0 -62
- package/dist/resources/databases.d.ts +0 -26
- package/dist/resources/databases.d.ts.map +0 -1
- package/dist/resources/databases.js +0 -29
- package/dist/resources/deployments.d.ts +0 -24
- package/dist/resources/deployments.d.ts.map +0 -1
- package/dist/resources/deployments.js +0 -30
- package/dist/resources/domains.d.ts +0 -30
- package/dist/resources/domains.d.ts.map +0 -1
- package/dist/resources/domains.js +0 -46
- package/dist/resources/env-vars.d.ts +0 -19
- package/dist/resources/env-vars.d.ts.map +0 -1
- package/dist/resources/env-vars.js +0 -30
- package/dist/resources/environments.d.ts +0 -16
- package/dist/resources/environments.d.ts.map +0 -1
- package/dist/resources/environments.js +0 -24
- package/dist/resources/logs.d.ts +0 -13
- package/dist/resources/logs.d.ts.map +0 -1
- package/dist/resources/logs.js +0 -20
- package/dist/resources/org.d.ts +0 -15
- package/dist/resources/org.d.ts.map +0 -1
- package/dist/resources/org.js +0 -25
- package/dist/resources/projects.d.ts +0 -19
- package/dist/resources/projects.d.ts.map +0 -1
- package/dist/resources/projects.js +0 -19
- package/dist/resources/resources.d.ts +0 -26
- package/dist/resources/resources.d.ts.map +0 -1
- package/dist/resources/resources.js +0 -32
- package/dist/resources/services.d.ts +0 -21
- package/dist/resources/services.d.ts.map +0 -1
- package/dist/resources/services.js +0 -30
- package/dist/resources/storage.d.ts +0 -21
- package/dist/resources/storage.d.ts.map +0 -1
- package/dist/resources/storage.js +0 -25
- package/dist/resources/tasks.d.ts +0 -42
- package/dist/resources/tasks.d.ts.map +0 -1
- package/dist/resources/tasks.js +0 -49
- package/dist/resources/user.d.ts +0 -9
- package/dist/resources/user.d.ts.map +0 -1
- package/dist/resources/user.js +0 -10
- package/dist/resources/volumes.d.ts +0 -20
- package/dist/resources/volumes.d.ts.map +0 -1
- package/dist/resources/volumes.js +0 -19
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@sylphx/management/adminResources` — operator recovery for stuck resources.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors `DELETE /admin/resources/:id` in
|
|
5
|
+
* `apps/api/src/server/platform/routes/admin/resources.ts`. Replaces the
|
|
6
|
+
* raw `DELETE FROM managed_resources WHERE id=...` historically run from
|
|
7
|
+
* psql per `docs/how-to/teardown-failure.md`.
|
|
8
|
+
*
|
|
9
|
+
* Typical use: an on-call engineer mints a service token scoped to
|
|
10
|
+
* `platform:resources:forcedelete`, points the CLI
|
|
11
|
+
* (`sylphx admin resources force-delete <id>`) at the cluster, and the
|
|
12
|
+
* CLI calls `forceDelete()` here. CI / cron / dashboards call this SDK
|
|
13
|
+
* directly.
|
|
14
|
+
*/
|
|
15
|
+
import { adminResourcesEndpoints } from '@sylphx/contract';
|
|
16
|
+
import { interpolatePath, request } from './http.js';
|
|
17
|
+
/**
|
|
18
|
+
* Force-delete a stuck `managed_resources` row. Refuses the call when
|
|
19
|
+
* `reconcile_status !== 'terminating'` unless `reallyForce=true`. Returns
|
|
20
|
+
* 404 when the row does not exist; 409 on the wrong-status path.
|
|
21
|
+
*/
|
|
22
|
+
export const forceDelete = (client, id, input) => {
|
|
23
|
+
const { method, path } = adminResourcesEndpoints.forceDelete;
|
|
24
|
+
const interpolated = interpolatePath(path, { id });
|
|
25
|
+
const query = { reason: input.reason };
|
|
26
|
+
if (input.cascade !== undefined)
|
|
27
|
+
query.cascade = input.cascade ? 'true' : 'false';
|
|
28
|
+
if (input.reallyForce !== undefined)
|
|
29
|
+
query.reallyForce = input.reallyForce ? 'true' : 'false';
|
|
30
|
+
return request(client, method, interpolated, { query });
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Walk the canonical rotation registry and re-encrypt every row whose
|
|
34
|
+
* envelope is not under the active KEK. Idempotent: re-running after
|
|
35
|
+
* convergence rewrites zero rows. Returns 409 on `keyId` mismatch.
|
|
36
|
+
*/
|
|
37
|
+
export const reseal = (client, input) => {
|
|
38
|
+
const { method, path } = adminResourcesEndpoints.reseal;
|
|
39
|
+
return request(client, method, path, { body: input });
|
|
40
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@sylphx/management/adminSecrets` — operator-driven secret rotation
|
|
3
|
+
* audit ledger (G-5).
|
|
4
|
+
*
|
|
5
|
+
* Mirrors `/admin/secrets/*` in
|
|
6
|
+
* `apps/api/src/server/platform/routes/admin/secrets.ts`.
|
|
7
|
+
*
|
|
8
|
+
* Auth: service token + scope `platform:secrets:rotate`. Super-admin
|
|
9
|
+
* sessions are explicitly NOT accepted by the server — rotation MUST be
|
|
10
|
+
* a programmatic step in an Ops runbook.
|
|
11
|
+
*
|
|
12
|
+
* Typical use:
|
|
13
|
+
*
|
|
14
|
+
* sylphx admin rotate-secret --type break-glass --dry-run
|
|
15
|
+
* sylphx admin rotate-secret --type break-glass --reason "scheduled 90d cadence"
|
|
16
|
+
*
|
|
17
|
+
* dispatches here via `requireAuthEffect` + `withAuthedSdk`. The endpoint
|
|
18
|
+
* NEVER mints the new secret value; operators paste it into the cluster
|
|
19
|
+
* Secret store per `docs/runbooks/secret-rotation.md`.
|
|
20
|
+
*/
|
|
21
|
+
import type { Client } from './client.js';
|
|
22
|
+
/** Catalog entry shape mirrored from `AdminSecretStatus` in the contract. */
|
|
23
|
+
export interface AdminSecretStatus {
|
|
24
|
+
readonly type: 'break-glass' | 'encryption-key' | 'jwt-signing';
|
|
25
|
+
readonly lastRotatedAt: string | null;
|
|
26
|
+
readonly ageDays: number | null;
|
|
27
|
+
readonly cadenceDays: number;
|
|
28
|
+
readonly overdue: boolean;
|
|
29
|
+
readonly clusterSecretRef: string;
|
|
30
|
+
}
|
|
31
|
+
export interface ListSecretsResult {
|
|
32
|
+
readonly secrets: ReadonlyArray<AdminSecretStatus>;
|
|
33
|
+
}
|
|
34
|
+
export interface RotateSecretInput {
|
|
35
|
+
readonly type: 'break-glass' | 'encryption-key' | 'jwt-signing';
|
|
36
|
+
readonly dryRun?: boolean;
|
|
37
|
+
readonly reason?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface RotateSecretResult {
|
|
40
|
+
readonly rotated: boolean;
|
|
41
|
+
readonly status: AdminSecretStatus;
|
|
42
|
+
readonly auditLogId: string | null;
|
|
43
|
+
readonly message: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* List the rotation status of every rotatable platform secret.
|
|
47
|
+
*
|
|
48
|
+
* Used by the `sylphx_secret_age_days` Prometheus alert evaluator and
|
|
49
|
+
* the Console operator dashboard's secret-rotation widget.
|
|
50
|
+
*/
|
|
51
|
+
export declare const list: (client: Client) => Promise<ListSecretsResult>;
|
|
52
|
+
/**
|
|
53
|
+
* Record a rotation event.
|
|
54
|
+
*
|
|
55
|
+
* `dryRun=true` returns the eligibility report without writing an
|
|
56
|
+
* `audit_logs` row (the `secret_rotation_events` row is still inserted
|
|
57
|
+
* with `is_real=false` so the alert evaluator can read fresh state).
|
|
58
|
+
*/
|
|
59
|
+
export declare const rotate: (client: Client, body: RotateSecretInput) => Promise<RotateSecretResult>;
|
|
60
|
+
//# sourceMappingURL=adminSecrets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adminSecrets.d.ts","sourceRoot":"","sources":["../src/adminSecrets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAGzC,6EAA6E;AAC7E,MAAM,WAAW,iBAAiB;IACjC,QAAQ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server/platform/routes/admin/secrets.ts`.
|
|
7
|
+
*
|
|
8
|
+
* Auth: service token + scope `platform:secrets:rotate`. Super-admin
|
|
9
|
+
* sessions are explicitly NOT accepted by the server — rotation MUST be
|
|
10
|
+
* a programmatic step in an Ops runbook.
|
|
11
|
+
*
|
|
12
|
+
* Typical use:
|
|
13
|
+
*
|
|
14
|
+
* sylphx admin rotate-secret --type break-glass --dry-run
|
|
15
|
+
* sylphx admin rotate-secret --type break-glass --reason "scheduled 90d cadence"
|
|
16
|
+
*
|
|
17
|
+
* dispatches here via `requireAuthEffect` + `withAuthedSdk`. The endpoint
|
|
18
|
+
* NEVER mints the new secret value; operators paste it into the cluster
|
|
19
|
+
* Secret store per `docs/runbooks/secret-rotation.md`.
|
|
20
|
+
*/
|
|
21
|
+
import { adminSecretsEndpoints } from '@sylphx/contract';
|
|
22
|
+
import { request } from './http.js';
|
|
23
|
+
/**
|
|
24
|
+
* List the rotation status of every rotatable platform secret.
|
|
25
|
+
*
|
|
26
|
+
* Used by the `sylphx_secret_age_days` Prometheus alert evaluator and
|
|
27
|
+
* the Console operator dashboard's secret-rotation widget.
|
|
28
|
+
*/
|
|
29
|
+
export const list = (client) => {
|
|
30
|
+
const { method, path } = adminSecretsEndpoints.list;
|
|
31
|
+
return request(client, method, path, {});
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Record a rotation event.
|
|
35
|
+
*
|
|
36
|
+
* `dryRun=true` returns the eligibility report without writing an
|
|
37
|
+
* `audit_logs` row (the `secret_rotation_events` row is still inserted
|
|
38
|
+
* with `is_real=false` so the alert evaluator can read fresh state).
|
|
39
|
+
*/
|
|
40
|
+
export const rotate = (client, body) => {
|
|
41
|
+
const { method, path } = adminSecretsEndpoints.rotate;
|
|
42
|
+
return request(client, method, path, { body });
|
|
43
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@sylphx/management/adminTenants` — headless tenant provisioning.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors `POST /admin/tenants/` in
|
|
5
|
+
* `apps/api/src/server/platform/routes/admin/tenants.ts`. Replaces the
|
|
6
|
+
* legacy `POST /admin/bootstrap` call (ADR-089 Phase 7.5): same inputs
|
|
7
|
+
* and outputs; the caller now authenticates with a service token
|
|
8
|
+
* (`svc_*`) carrying scope `platform:tenants:provision` rather than the
|
|
9
|
+
* retired `SYLPHX_BOOTSTRAP_KEY` shared secret.
|
|
10
|
+
*
|
|
11
|
+
* Typical use: a CI job or ops script mints a scoped service token via
|
|
12
|
+
* `sylphx tokens create --scope platform:tenants:provision ...`, stores
|
|
13
|
+
* it in the operator's secret store, and calls `tenants.create` to
|
|
14
|
+
* onboard a new org headlessly.
|
|
15
|
+
*/
|
|
16
|
+
import type { Client } from './client.js';
|
|
17
|
+
export interface CreateTenantInput {
|
|
18
|
+
readonly orgName: string;
|
|
19
|
+
readonly orgSlug: string;
|
|
20
|
+
readonly projectName: string;
|
|
21
|
+
readonly projectSlug: string;
|
|
22
|
+
readonly ownerEmail: string;
|
|
23
|
+
}
|
|
24
|
+
export interface CreateTenantResult {
|
|
25
|
+
readonly orgId: string;
|
|
26
|
+
readonly projectId: string;
|
|
27
|
+
/** `sk_{env}_{64hex}` — production secret key. Returned raw, once. */
|
|
28
|
+
readonly secretKey: string;
|
|
29
|
+
/** `pk_{env}_{32hex}` — production publishable key. Returned raw, once. */
|
|
30
|
+
readonly publishableKey: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Provision a brand-new tenant (organization + initial project + dev and
|
|
34
|
+
* production environments) in a single transaction.
|
|
35
|
+
*
|
|
36
|
+
* The returned `secretKey` / `publishableKey` are the raw production
|
|
37
|
+
* credentials — only SHA-256 hashes are retained server-side. Callers
|
|
38
|
+
* MUST persist them immediately; they cannot be retrieved again.
|
|
39
|
+
*/
|
|
40
|
+
export declare const create: (client: Client, input: CreateTenantInput) => Promise<CreateTenantResult>;
|
|
41
|
+
//# sourceMappingURL=adminTenants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adminTenants.d.ts","sourceRoot":"","sources":["../src/adminTenants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAGzC,MAAM,WAAW,iBAAiB;IACjC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC3B;AAED,MAAM,WAAW,kBAAkB;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,sEAAsE;IACtE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,2EAA2E;IAC3E,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;CAC/B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,GAAI,QAAQ,MAAM,EAAE,OAAO,iBAAiB,KAAG,OAAO,CAAC,kBAAkB,CAG3F,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@sylphx/management/adminTenants` — headless tenant provisioning.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors `POST /admin/tenants/` in
|
|
5
|
+
* `apps/api/src/server/platform/routes/admin/tenants.ts`. Replaces the
|
|
6
|
+
* legacy `POST /admin/bootstrap` call (ADR-089 Phase 7.5): same inputs
|
|
7
|
+
* and outputs; the caller now authenticates with a service token
|
|
8
|
+
* (`svc_*`) carrying scope `platform:tenants:provision` rather than the
|
|
9
|
+
* retired `SYLPHX_BOOTSTRAP_KEY` shared secret.
|
|
10
|
+
*
|
|
11
|
+
* Typical use: a CI job or ops script mints a scoped service token via
|
|
12
|
+
* `sylphx tokens create --scope platform:tenants:provision ...`, stores
|
|
13
|
+
* it in the operator's secret store, and calls `tenants.create` to
|
|
14
|
+
* onboard a new org headlessly.
|
|
15
|
+
*/
|
|
16
|
+
import { adminTenantsEndpoints } from '@sylphx/contract';
|
|
17
|
+
import { request } from './http.js';
|
|
18
|
+
/**
|
|
19
|
+
* Provision a brand-new tenant (organization + initial project + dev and
|
|
20
|
+
* production environments) in a single transaction.
|
|
21
|
+
*
|
|
22
|
+
* The returned `secretKey` / `publishableKey` are the raw production
|
|
23
|
+
* credentials — only SHA-256 hashes are retained server-side. Callers
|
|
24
|
+
* MUST persist them immediately; they cannot be retrieved again.
|
|
25
|
+
*/
|
|
26
|
+
export const create = (client, input) => {
|
|
27
|
+
const { method, path } = adminTenantsEndpoints.create;
|
|
28
|
+
return request(client, method, path, { body: input });
|
|
29
|
+
};
|
package/dist/ai.d.ts
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI gateway — cross-model usage, cost tracking, per-project config.
|
|
3
|
+
*
|
|
4
|
+
* GET /ai/overview — platform-wide totals (admin only)
|
|
5
|
+
* GET /ai/projects/:projectId/usage — per-project rollup
|
|
6
|
+
* GET /ai/trends — cost trend time-series (admin only)
|
|
7
|
+
* GET /ai/projects/:projectId/config — model allow/block lists + rate limits
|
|
8
|
+
* PATCH /ai/projects/:projectId/config — update model config
|
|
9
|
+
*
|
|
10
|
+
* Costs are returned both as integer microdollars (safe for arithmetic)
|
|
11
|
+
* and a human-friendly `formatted` string; prefer the former for any math.
|
|
12
|
+
* Latency percentiles (`p95Ms`) are rounded to whole milliseconds.
|
|
13
|
+
*/
|
|
14
|
+
import type { Client } from './client.js';
|
|
15
|
+
export type Period = 'day' | 'week' | 'month';
|
|
16
|
+
export type Interval = 'hour' | 'day';
|
|
17
|
+
export type TrendPeriod = 'week' | 'month';
|
|
18
|
+
export interface Cost {
|
|
19
|
+
readonly microdollars: number;
|
|
20
|
+
readonly formatted: string;
|
|
21
|
+
}
|
|
22
|
+
export interface UsageByProject {
|
|
23
|
+
readonly projectId: string;
|
|
24
|
+
readonly projectName: string;
|
|
25
|
+
readonly requests: number;
|
|
26
|
+
readonly inputTokens: number;
|
|
27
|
+
readonly outputTokens: number;
|
|
28
|
+
readonly cost: Cost;
|
|
29
|
+
readonly successRate: number;
|
|
30
|
+
}
|
|
31
|
+
export interface UsageByModel {
|
|
32
|
+
readonly model: string;
|
|
33
|
+
readonly requests: number;
|
|
34
|
+
readonly tokens: number;
|
|
35
|
+
readonly cost: Cost;
|
|
36
|
+
}
|
|
37
|
+
export interface UsageByProvider {
|
|
38
|
+
readonly provider: string;
|
|
39
|
+
readonly requests: number;
|
|
40
|
+
readonly tokens: number;
|
|
41
|
+
readonly cost: Cost;
|
|
42
|
+
}
|
|
43
|
+
export interface UsageByType {
|
|
44
|
+
readonly type: string;
|
|
45
|
+
readonly requests: number;
|
|
46
|
+
readonly tokens: number;
|
|
47
|
+
}
|
|
48
|
+
export interface RecentError {
|
|
49
|
+
readonly id: string;
|
|
50
|
+
readonly model: string;
|
|
51
|
+
readonly type: string;
|
|
52
|
+
readonly error: string | null;
|
|
53
|
+
readonly code: string | null;
|
|
54
|
+
readonly timestamp: string;
|
|
55
|
+
}
|
|
56
|
+
export interface OverviewResult {
|
|
57
|
+
readonly period: Period;
|
|
58
|
+
readonly totals: {
|
|
59
|
+
readonly requests: number;
|
|
60
|
+
readonly tokens: number;
|
|
61
|
+
readonly cost: Cost;
|
|
62
|
+
readonly avgLatencyMs: number;
|
|
63
|
+
readonly successRate: number;
|
|
64
|
+
};
|
|
65
|
+
readonly byProject: readonly UsageByProject[];
|
|
66
|
+
readonly byModel: readonly UsageByModel[];
|
|
67
|
+
readonly byProvider: readonly UsageByProvider[];
|
|
68
|
+
}
|
|
69
|
+
export declare const overview: (client: Client, period?: Period) => Promise<OverviewResult>;
|
|
70
|
+
export interface ProjectUsageResult {
|
|
71
|
+
readonly app: {
|
|
72
|
+
readonly id: string;
|
|
73
|
+
readonly name: string;
|
|
74
|
+
readonly slug: string;
|
|
75
|
+
};
|
|
76
|
+
readonly period: Period;
|
|
77
|
+
readonly stats: {
|
|
78
|
+
readonly requests: number;
|
|
79
|
+
readonly inputTokens: number;
|
|
80
|
+
readonly outputTokens: number;
|
|
81
|
+
readonly cost: Cost;
|
|
82
|
+
readonly latency: {
|
|
83
|
+
readonly avgMs: number;
|
|
84
|
+
readonly p95Ms: number;
|
|
85
|
+
};
|
|
86
|
+
readonly successRate: number;
|
|
87
|
+
};
|
|
88
|
+
readonly byModel: readonly UsageByModel[];
|
|
89
|
+
readonly byType: readonly UsageByType[];
|
|
90
|
+
readonly recentErrors: readonly RecentError[];
|
|
91
|
+
}
|
|
92
|
+
export declare const projectUsage: (client: Client, projectId: string, period?: Period) => Promise<ProjectUsageResult>;
|
|
93
|
+
export interface TrendPoint {
|
|
94
|
+
readonly timestamp: string;
|
|
95
|
+
readonly requests: number;
|
|
96
|
+
readonly tokens: number;
|
|
97
|
+
readonly cost: Cost;
|
|
98
|
+
readonly avgLatencyMs: number;
|
|
99
|
+
}
|
|
100
|
+
export interface TrendsResult {
|
|
101
|
+
readonly period: TrendPeriod;
|
|
102
|
+
readonly interval: Interval;
|
|
103
|
+
readonly data: readonly TrendPoint[];
|
|
104
|
+
}
|
|
105
|
+
export interface TrendsOptions {
|
|
106
|
+
readonly projectId?: string;
|
|
107
|
+
readonly period?: TrendPeriod;
|
|
108
|
+
readonly interval?: Interval;
|
|
109
|
+
}
|
|
110
|
+
export declare const trends: (client: Client, options?: TrendsOptions) => Promise<TrendsResult>;
|
|
111
|
+
export interface ModelConfig {
|
|
112
|
+
readonly defaultMaxTokens: number;
|
|
113
|
+
readonly defaultTemperature: number;
|
|
114
|
+
readonly enableCaching: boolean;
|
|
115
|
+
readonly allowedModels: readonly string[] | null;
|
|
116
|
+
readonly blockedModels: readonly string[] | null;
|
|
117
|
+
}
|
|
118
|
+
export interface RateLimit {
|
|
119
|
+
readonly id: string;
|
|
120
|
+
readonly modelPattern: string;
|
|
121
|
+
readonly requestsPerMinute: number | null;
|
|
122
|
+
readonly requestsPerDay: number | null;
|
|
123
|
+
readonly tokensPerMinute: number | null;
|
|
124
|
+
readonly tokensPerDay: number | null;
|
|
125
|
+
readonly costPerDayMicrodollars: number | null;
|
|
126
|
+
readonly isActive: boolean;
|
|
127
|
+
}
|
|
128
|
+
export interface ProjectConfigResult {
|
|
129
|
+
readonly app: {
|
|
130
|
+
readonly id: string;
|
|
131
|
+
readonly name: string;
|
|
132
|
+
readonly slug: string;
|
|
133
|
+
};
|
|
134
|
+
readonly config: ModelConfig;
|
|
135
|
+
readonly rateLimits: readonly RateLimit[];
|
|
136
|
+
}
|
|
137
|
+
export declare const getProjectConfig: (client: Client, projectId: string) => Promise<ProjectConfigResult>;
|
|
138
|
+
export interface UpdateProjectConfigInput {
|
|
139
|
+
readonly defaultMaxTokens?: number;
|
|
140
|
+
readonly defaultTemperature?: number;
|
|
141
|
+
readonly enableCaching?: boolean;
|
|
142
|
+
readonly allowedModels?: readonly string[] | null;
|
|
143
|
+
readonly blockedModels?: readonly string[] | null;
|
|
144
|
+
}
|
|
145
|
+
export declare const updateProjectConfig: (client: Client, projectId: string, input: UpdateProjectConfigInput) => Promise<{
|
|
146
|
+
success: boolean;
|
|
147
|
+
}>;
|
|
148
|
+
//# sourceMappingURL=ai.d.ts.map
|
package/dist/ai.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../src/ai.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAGzC,MAAM,MAAM,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAA;AAC7C,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAA;AACrC,MAAM,MAAM,WA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,CAAC,EAAE,OAAO,CAAA;IAChC,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAA;IACjD,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAA;CACjD;AAED,eAAO,MAAM,mBAAmB,GAC/B,QAAQ,MAAM,EACd,WAAW,MAAM,EACjB,OAAO,wBAAwB,KAC7B,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAG5B,CAAA"}
|
package/dist/ai.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI gateway — cross-model usage, cost tracking, per-project config.
|
|
3
|
+
*
|
|
4
|
+
* GET /ai/overview — platform-wide totals (admin only)
|
|
5
|
+
* GET /ai/projects/:projectId/usage — per-project rollup
|
|
6
|
+
* GET /ai/trends — cost trend time-series (admin only)
|
|
7
|
+
* GET /ai/projects/:projectId/config — model allow/block lists + rate limits
|
|
8
|
+
* PATCH /ai/projects/:projectId/config — update model config
|
|
9
|
+
*
|
|
10
|
+
* Costs are returned both as integer microdollars (safe for arithmetic)
|
|
11
|
+
* and a human-friendly `formatted` string; prefer the former for any math.
|
|
12
|
+
* Latency percentiles (`p95Ms`) are rounded to whole milliseconds.
|
|
13
|
+
*/
|
|
14
|
+
import { request } from './http.js';
|
|
15
|
+
export const overview = (client, period) => request(client, 'GET', '/ai/overview', { query: { period } });
|
|
16
|
+
export const projectUsage = (client, projectId, period) => request(client, 'GET', `/ai/projects/${encodeURIComponent(projectId)}/usage`, {
|
|
17
|
+
query: { period },
|
|
18
|
+
});
|
|
19
|
+
export const trends = (client, options) => request(client, 'GET', '/ai/trends', {
|
|
20
|
+
query: {
|
|
21
|
+
projectId: options?.projectId,
|
|
22
|
+
period: options?.period,
|
|
23
|
+
interval: options?.interval,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
export const getProjectConfig = (client, projectId) => request(client, 'GET', `/ai/projects/${encodeURIComponent(projectId)}/config`);
|
|
27
|
+
export const updateProjectConfig = (client, projectId, input) => request(client, 'PATCH', `/ai/projects/${encodeURIComponent(projectId)}/config`, {
|
|
28
|
+
body: input,
|
|
29
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product analytics — data-routing destinations + user segmentation cohorts.
|
|
3
|
+
*
|
|
4
|
+
* GET /analytics/projects/:p/destinations
|
|
5
|
+
* POST /analytics/projects/:p/destinations
|
|
6
|
+
* DELETE /analytics/projects/:p/destinations/:id
|
|
7
|
+
* GET /analytics/projects/:p/cohorts
|
|
8
|
+
* POST /analytics/projects/:p/cohorts
|
|
9
|
+
*
|
|
10
|
+
* `destinations` route events to third-party systems (BigQuery, Snowflake,
|
|
11
|
+
* Segment, Amplitude, webhook, …); `cohorts` define dynamic user segments
|
|
12
|
+
* either via a structured predicate or a SQL fragment.
|
|
13
|
+
*/
|
|
14
|
+
import type { Client } from './client.js';
|
|
15
|
+
export interface Destination {
|
|
16
|
+
readonly id: string;
|
|
17
|
+
readonly type: string;
|
|
18
|
+
readonly name: string | null;
|
|
19
|
+
readonly enabled: boolean;
|
|
20
|
+
readonly createdAt: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const listDestinations: (client: Client, projectId: string) => Promise<{
|
|
23
|
+
destinations: readonly Destination[];
|
|
24
|
+
}>;
|
|
25
|
+
export interface AddDestinationInput {
|
|
26
|
+
readonly type: string;
|
|
27
|
+
readonly credentials: Readonly<Record<string, unknown>>;
|
|
28
|
+
readonly enabled?: boolean;
|
|
29
|
+
readonly name?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare const addDestination: (client: Client, projectId: string, input: AddDestinationInput) => Promise<Destination>;
|
|
32
|
+
export declare const removeDestination: (client: Client, projectId: string, destinationId: string) => Promise<void>;
|
|
33
|
+
export interface Cohort {
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly name: string;
|
|
36
|
+
readonly cohortType: string;
|
|
37
|
+
readonly memberCount: number | null;
|
|
38
|
+
readonly createdAt: string;
|
|
39
|
+
}
|
|
40
|
+
export declare const listCohorts: (client: Client, projectId: string) => Promise<{
|
|
41
|
+
cohorts: readonly Cohort[];
|
|
42
|
+
}>;
|
|
43
|
+
export interface CreateCohortInput {
|
|
44
|
+
readonly name: string;
|
|
45
|
+
readonly definition: unknown;
|
|
46
|
+
readonly cohortType?: 'dynamic' | 'static';
|
|
47
|
+
}
|
|
48
|
+
export declare const createCohort: (client: Client, projectId: string, input: CreateCohortInput) => Promise<Cohort>;
|
|
49
|
+
//# sourceMappingURL=analytics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../src/analytics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAKzC,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC1B;AAED,eAAO,MAAM,gBAAgB,GAC5B,QAAQ,MAAM,EACd,WAAW,MAAM,KACf,OAAO,CAAC;IAAE,YAAY,EAAE,SAAS,WAAW,EAAE,CAAA;CAAE,CACyC,CAAA;AAE5F,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IACvD,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,eAAO,MAAM,cAAc,GAC1B,QAAQ,MAAM,EACd,WAAW,MAAM,EACjB,OAAO,mBAAmB,KACxB,OAAO,CAAC,WAAW,CAGnB,CAAA;AAEH,eAAO,MAAM,iBAAiB,GAC7B,QAAQ,MAAM,EACd,WAAW,MAAM,EACjB,eAAe,MAAM,KACnB,OAAO,CAAC,IAAI,CAKb,CAAA;AAIF,MAAM,WAAW,MAAM;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC1B;AAED,eAAO,MAAM,WAAW,GACvB,QAAQ,MAAM,EACd,WAAW,MAAM,KACf,OAAO,CAAC;IAAE,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAC8C,CAAA;AAEvF,MAAM,WAAW,iBAAiB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;CAC1C;AAED,eAAO,MAAM,YAAY,GACxB,QAAQ,MAAM,EACd,WAAW,MAAM,EACjB,OAAO,iBAAiB,KACtB,OAAO,CAAC,MAAM,CAGd,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product analytics — data-routing destinations + user segmentation cohorts.
|
|
3
|
+
*
|
|
4
|
+
* GET /analytics/projects/:p/destinations
|
|
5
|
+
* POST /analytics/projects/:p/destinations
|
|
6
|
+
* DELETE /analytics/projects/:p/destinations/:id
|
|
7
|
+
* GET /analytics/projects/:p/cohorts
|
|
8
|
+
* POST /analytics/projects/:p/cohorts
|
|
9
|
+
*
|
|
10
|
+
* `destinations` route events to third-party systems (BigQuery, Snowflake,
|
|
11
|
+
* Segment, Amplitude, webhook, …); `cohorts` define dynamic user segments
|
|
12
|
+
* either via a structured predicate or a SQL fragment.
|
|
13
|
+
*/
|
|
14
|
+
import { request } from './http.js';
|
|
15
|
+
export const listDestinations = (client, projectId) => request(client, 'GET', `/analytics/projects/${encodeURIComponent(projectId)}/destinations`);
|
|
16
|
+
export const addDestination = (client, projectId, input) => request(client, 'POST', `/analytics/projects/${encodeURIComponent(projectId)}/destinations`, {
|
|
17
|
+
body: { enabled: true, ...input },
|
|
18
|
+
});
|
|
19
|
+
export const removeDestination = (client, projectId, destinationId) => request(client, 'DELETE', `/analytics/projects/${encodeURIComponent(projectId)}/destinations/${encodeURIComponent(destinationId)}`);
|
|
20
|
+
export const listCohorts = (client, projectId) => request(client, 'GET', `/analytics/projects/${encodeURIComponent(projectId)}/cohorts`);
|
|
21
|
+
export const createCohort = (client, projectId, input) => request(client, 'POST', `/analytics/projects/${encodeURIComponent(projectId)}/cohorts`, {
|
|
22
|
+
body: { cohortType: 'dynamic', ...input },
|
|
23
|
+
});
|
package/dist/auth.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auth admin namespace — thin re-export wrapper over `authSettings.ts`.
|
|
3
|
+
*
|
|
4
|
+
* The Platform route `apps/api/src/server/platform/routes/auth.ts`
|
|
5
|
+
* carries an `auth` top-level namespace in the coverage inventory.
|
|
6
|
+
* Consumers read more cleanly when the settings surface is called
|
|
7
|
+
* `authSettings` (distinguishes it from `@sylphx/sdk.auth` on the BaaS
|
|
8
|
+
* plane, which owns end-user sign-in / sign-up).
|
|
9
|
+
*
|
|
10
|
+
* This file re-binds every export of `authSettings.ts` as a local
|
|
11
|
+
* `export const` so that both:
|
|
12
|
+
*
|
|
13
|
+
* - `@sylphx/management/auth` — maps 1:1 to `authEndpoints`
|
|
14
|
+
* - `@sylphx/management/authSettings` — ergonomic alias
|
|
15
|
+
*
|
|
16
|
+
* resolve to the same transport functions, and the ADR-089 S7 coverage
|
|
17
|
+
* guard matches the route namespace 1:1.
|
|
18
|
+
*
|
|
19
|
+
* @see ./authSettings.ts — source of truth
|
|
20
|
+
*/
|
|
21
|
+
import * as settings from './authSettings.js';
|
|
22
|
+
export declare const getOAuthProviders: (client: import("./client.js").Client) => Promise<{
|
|
23
|
+
providers: readonly settings.OAuthProviderConfig[];
|
|
24
|
+
}>;
|
|
25
|
+
export declare const updateOAuthProviders: (client: import("./client.js").Client, body: settings.UpdateOAuthProvidersInput) => Promise<{
|
|
26
|
+
providers: readonly settings.OAuthProviderConfig[];
|
|
27
|
+
}>;
|
|
28
|
+
export declare const rotateOAuthSecret: (client: import("./client.js").Client, provider: string, newClientSecret: string) => Promise<{
|
|
29
|
+
providers: readonly settings.OAuthProviderConfig[];
|
|
30
|
+
}>;
|
|
31
|
+
export declare const getAuthSettings: (client: import("./client.js").Client) => Promise<{
|
|
32
|
+
settings: settings.AuthSettings;
|
|
33
|
+
}>;
|
|
34
|
+
export declare const updateAuthSettings: (client: import("./client.js").Client, body: Partial<settings.AuthSettings>) => Promise<{
|
|
35
|
+
settings: settings.AuthSettings;
|
|
36
|
+
}>;
|
|
37
|
+
export declare const getAuthStats: (client: import("./client.js").Client) => Promise<settings.AuthStats>;
|
|
38
|
+
export type { AuthSettings, AuthStats, OAuthProviderConfig, UpdateOAuthProvidersInput, } from './authSettings.js';
|
|
39
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAE7C,eAAO,MAAM,iBAAiB;;EAA6B,CAAA;AAC3D,eAAO,MAAM,oBAAoB;;EAAgC,CAAA;AACjE,eAAO,MAAM,iBAAiB;;EAA6B,CAAA;AAC3D,eAAO,MAAM,eAAe;;EAA2B,CAAA;AACvD,eAAO,MAAM,kBAAkB;;EAA8B,CAAA;AAC7D,eAAO,MAAM,YAAY,uEAAwB,CAAA;AAEjD,YAAY,EACX,YAAY,EACZ,SAAS,EACT,mBAAmB,EACnB,yBAAyB,GACzB,MAAM,mBAAmB,CAAA"}
|
package/dist/auth.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auth admin namespace — thin re-export wrapper over `authSettings.ts`.
|
|
3
|
+
*
|
|
4
|
+
* The Platform route `apps/api/src/server/platform/routes/auth.ts`
|
|
5
|
+
* carries an `auth` top-level namespace in the coverage inventory.
|
|
6
|
+
* Consumers read more cleanly when the settings surface is called
|
|
7
|
+
* `authSettings` (distinguishes it from `@sylphx/sdk.auth` on the BaaS
|
|
8
|
+
* plane, which owns end-user sign-in / sign-up).
|
|
9
|
+
*
|
|
10
|
+
* This file re-binds every export of `authSettings.ts` as a local
|
|
11
|
+
* `export const` so that both:
|
|
12
|
+
*
|
|
13
|
+
* - `@sylphx/management/auth` — maps 1:1 to `authEndpoints`
|
|
14
|
+
* - `@sylphx/management/authSettings` — ergonomic alias
|
|
15
|
+
*
|
|
16
|
+
* resolve to the same transport functions, and the ADR-089 S7 coverage
|
|
17
|
+
* guard matches the route namespace 1:1.
|
|
18
|
+
*
|
|
19
|
+
* @see ./authSettings.ts — source of truth
|
|
20
|
+
*/
|
|
21
|
+
import * as settings from './authSettings.js';
|
|
22
|
+
export const getOAuthProviders = settings.getOAuthProviders;
|
|
23
|
+
export const updateOAuthProviders = settings.updateOAuthProviders;
|
|
24
|
+
export const rotateOAuthSecret = settings.rotateOAuthSecret;
|
|
25
|
+
export const getAuthSettings = settings.getAuthSettings;
|
|
26
|
+
export const updateAuthSettings = settings.updateAuthSettings;
|
|
27
|
+
export const getAuthStats = settings.getAuthStats;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform-admin auth settings — OAuth provider configuration, auth
|
|
3
|
+
* policy settings, auth stats. Distinct from `@sylphx/sdk.auth.*` (end-
|
|
4
|
+
* user credentials on the BaaS plane) and from session / password /
|
|
5
|
+
* device endpoints (which are Management but operator-self-service).
|
|
6
|
+
*
|
|
7
|
+
* Mirrors the `authAdminEndpoints` portion of
|
|
8
|
+
* `apps/api/src/server/platform/routes/auth.ts`.
|
|
9
|
+
*/
|
|
10
|
+
import type { Client } from './client.js';
|
|
11
|
+
export interface OAuthProviderConfig {
|
|
12
|
+
readonly provider: 'google' | 'github' | 'microsoft' | 'apple' | string;
|
|
13
|
+
readonly enabled: boolean;
|
|
14
|
+
readonly clientId: string | null;
|
|
15
|
+
readonly hasClientSecret: boolean;
|
|
16
|
+
readonly scopes: readonly string[];
|
|
17
|
+
readonly updatedAt: string | null;
|
|
18
|
+
}
|
|
19
|
+
export declare const getOAuthProviders: (client: Client) => Promise<{
|
|
20
|
+
providers: readonly OAuthProviderConfig[];
|
|
21
|
+
}>;
|
|
22
|
+
export interface UpdateOAuthProvidersInput {
|
|
23
|
+
readonly providers: readonly {
|
|
24
|
+
readonly provider: string;
|
|
25
|
+
readonly enabled: boolean;
|
|
26
|
+
readonly clientId?: string;
|
|
27
|
+
/** Omit to keep the stored secret; pass `null` to clear; pass a new string to rotate. */
|
|
28
|
+
readonly clientSecret?: string | null;
|
|
29
|
+
readonly scopes?: readonly string[];
|
|
30
|
+
}[];
|
|
31
|
+
}
|
|
32
|
+
export declare const updateOAuthProviders: (client: Client, body: UpdateOAuthProvidersInput) => Promise<{
|
|
33
|
+
providers: readonly OAuthProviderConfig[];
|
|
34
|
+
}>;
|
|
35
|
+
/**
|
|
36
|
+
* Rotate a single OAuth provider's client secret without touching the
|
|
37
|
+
* rest of the provider list. Convenience wrapper over
|
|
38
|
+
* `updateOAuthProviders` — Phase 4b SOTA addition (ADR-089 Matrix 2 gap).
|
|
39
|
+
*/
|
|
40
|
+
export declare const rotateOAuthSecret: (client: Client, provider: string, newClientSecret: string) => Promise<{
|
|
41
|
+
providers: readonly OAuthProviderConfig[];
|
|
42
|
+
}>;
|
|
43
|
+
export interface AuthSettings {
|
|
44
|
+
readonly passwordMinLength: number;
|
|
45
|
+
readonly passwordRequireMixedCase: boolean;
|
|
46
|
+
readonly passwordRequireDigits: boolean;
|
|
47
|
+
readonly passwordRequireSymbols: boolean;
|
|
48
|
+
readonly mfaRequired: boolean;
|
|
49
|
+
readonly mfaGracePeriodDays: number;
|
|
50
|
+
readonly sessionMaxAgeSeconds: number;
|
|
51
|
+
readonly sessionIdleTimeoutSeconds: number;
|
|
52
|
+
readonly allowSignup: boolean;
|
|
53
|
+
readonly allowedEmailDomains: readonly string[] | null;
|
|
54
|
+
}
|
|
55
|
+
export declare const getAuthSettings: (client: Client) => Promise<{
|
|
56
|
+
settings: AuthSettings;
|
|
57
|
+
}>;
|
|
58
|
+
export declare const updateAuthSettings: (client: Client, body: Partial<AuthSettings>) => Promise<{
|
|
59
|
+
settings: AuthSettings;
|
|
60
|
+
}>;
|
|
61
|
+
export interface AuthStats {
|
|
62
|
+
readonly totalUsers: number;
|
|
63
|
+
readonly activeLast24h: number;
|
|
64
|
+
readonly activeLast7d: number;
|
|
65
|
+
readonly signupsLast24h: number;
|
|
66
|
+
readonly mfaEnabledCount: number;
|
|
67
|
+
readonly passkeyEnrolledCount: number;
|
|
68
|
+
readonly failedLoginsLast24h: number;
|
|
69
|
+
}
|
|
70
|
+
export declare const getAuthStats: (client: Client) => Promise<AuthStats>;
|
|
71
|
+
//# sourceMappingURL=authSettings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authSettings.d.ts","sourceRoot":"","sources":["../src/authSettings.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAGzC,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAA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