@unisonlabs/sixminute-admin 0.1.685-next → 0.1.1142-next
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sixminute-admin.mjs +35 -46
- package/package.json +1 -1
package/dist/sixminute-admin.mjs
CHANGED
|
@@ -21,7 +21,7 @@ import { homedir } from "node:os";
|
|
|
21
21
|
import { fileURLToPath } from "node:url";
|
|
22
22
|
|
|
23
23
|
// tools/admin/src/build-info.ts
|
|
24
|
-
var BUILT = { version: "0.1.
|
|
24
|
+
var BUILT = { version: "0.1.1142-next", commit: "d603f7ebc38a76f80993bb5c16c88e0034ef27fb", surface: "d06d43d7694bfe1d" };
|
|
25
25
|
|
|
26
26
|
// tools/admin/src/run.ts
|
|
27
27
|
import { rmSync as rmSync3 } from "node:fs";
|
|
@@ -4417,6 +4417,8 @@ var CapabilitiesSchema = exports_external.object({
|
|
|
4417
4417
|
narrative_max_chars: exports_external.number().int().positive().nullable(),
|
|
4418
4418
|
note_max_chars: exports_external.number().int().positive().nullable().default(null),
|
|
4419
4419
|
insolvency_groups: exports_external.boolean(),
|
|
4420
|
+
matter_visibility: exports_external.enum(["firm", "member"]).default("firm"),
|
|
4421
|
+
reviewer: exports_external.enum(["self", "configurable"]).default("configurable"),
|
|
4420
4422
|
fields: exports_external.array(FieldDeclarationSchema).superRefine((fields, ctx) => {
|
|
4421
4423
|
const seen = new Map;
|
|
4422
4424
|
fields.forEach((field, index) => {
|
|
@@ -4527,7 +4529,8 @@ var PmsListsSchema = exports_external.object({
|
|
|
4527
4529
|
fields: exports_external.record(exports_external.string(), exports_external.array(PmsOptionSetSchema)).default({}),
|
|
4528
4530
|
settings: PmsSettingsSchema.nullable().default(null),
|
|
4529
4531
|
cursors: exports_external.record(exports_external.string(), exports_external.string()).default({}),
|
|
4530
|
-
retired_timekeepers: exports_external.array(exports_external.string().min(1)).optional()
|
|
4532
|
+
retired_timekeepers: exports_external.array(exports_external.string().min(1)).optional(),
|
|
4533
|
+
visible_matters: exports_external.array(exports_external.string().min(1)).optional()
|
|
4531
4534
|
});
|
|
4532
4535
|
var MatterPmsRulesSchema = exports_external.object({
|
|
4533
4536
|
insolvency: exports_external.boolean().default(false),
|
|
@@ -4571,7 +4574,8 @@ var PushRefusalSchema = exports_external.enum([
|
|
|
4571
4574
|
"person_not_found",
|
|
4572
4575
|
"person_inactive",
|
|
4573
4576
|
"not_accepted",
|
|
4574
|
-
"reviewer"
|
|
4577
|
+
"reviewer",
|
|
4578
|
+
"sign_in"
|
|
4575
4579
|
]);
|
|
4576
4580
|
var DeliveryReasonSchema = exports_external.enum([
|
|
4577
4581
|
"deleted_in_pms",
|
|
@@ -4657,6 +4661,11 @@ var ConnectResultSchema = exports_external.object({
|
|
|
4657
4661
|
connector: ConnectorSummarySchema,
|
|
4658
4662
|
team: TeamProposalSchema.nullable()
|
|
4659
4663
|
});
|
|
4664
|
+
var ConnectorAccountPutSchema = exports_external.object({
|
|
4665
|
+
username: exports_external.string().min(1),
|
|
4666
|
+
password: exports_external.string().min(1),
|
|
4667
|
+
totp: exports_external.string().regex(/^[0-9]{6}$/, "the code is six digits").optional()
|
|
4668
|
+
}).strict();
|
|
4660
4669
|
var SyncReportSchema = exports_external.object({
|
|
4661
4670
|
kind: ConnectorKindSchema,
|
|
4662
4671
|
started_at: TimestampSchema,
|
|
@@ -4878,12 +4887,14 @@ var MeConnectorSchema = exports_external.object({
|
|
|
4878
4887
|
kind: ConnectorKindSchema,
|
|
4879
4888
|
narrative_max_chars: exports_external.number().int().positive().nullable(),
|
|
4880
4889
|
note_max_chars: exports_external.number().int().positive().nullable().optional(),
|
|
4881
|
-
supplies_languages: exports_external.boolean().optional()
|
|
4890
|
+
supplies_languages: exports_external.boolean().optional(),
|
|
4891
|
+
identity: IdentityModeSchema.optional()
|
|
4882
4892
|
});
|
|
4883
4893
|
var MeSystemLinkSchema = exports_external.object({
|
|
4884
4894
|
system: ConnectorKindSchema,
|
|
4885
4895
|
name: exports_external.string().min(1),
|
|
4886
|
-
code: exports_external.string().min(1).nullable()
|
|
4896
|
+
code: exports_external.string().min(1).nullable(),
|
|
4897
|
+
status: exports_external.enum(["connected", "needs_reconnect"]).optional()
|
|
4887
4898
|
});
|
|
4888
4899
|
var MeSchema = exports_external.object({
|
|
4889
4900
|
user: UserSchema,
|
|
@@ -6863,17 +6874,12 @@ is required; without one every command answers 403.
|
|
|
6863
6874
|
argument is a line in a shell history, and it is never printed.
|
|
6864
6875
|
Exits 2 when the system refuses the credentials, naming the step it
|
|
6865
6876
|
refused at, and 2 when the firm is already on another system.
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
LegalSense answers with, sealed under the firm's key; the password
|
|
6873
|
-
and the code are not stored. Sixminute's own integrator pair is the
|
|
6874
|
-
service's (its deploy's secrets), never this tool's: a deploy without
|
|
6875
|
-
it answers that LegalSense is not available. Run it again with the
|
|
6876
|
-
password (and a fresh code) to reconnect a firm that needs it.
|
|
6877
|
+
LegalSense is NOT connected from this tool: --kind legalsense is
|
|
6878
|
+
refused. Each person signs in to LegalSense in the app with their
|
|
6879
|
+
own account, under Settings, Practice system: an administrator of
|
|
6880
|
+
the firm first, which connects the firm, and then every member for
|
|
6881
|
+
themself. An operator never signs in for anybody. Status, sync and
|
|
6882
|
+
disconnect below work for a LegalSense firm once it is connected.
|
|
6877
6883
|
|
|
6878
6884
|
sixminute-admin connector team --env <env> --firm tenant_... \\
|
|
6879
6885
|
[--bind <external-ref>=<member-id>] [--unbind <external-ref>] [--confirm] [--json]
|
|
@@ -6889,14 +6895,17 @@ is required; without one every command answers 403.
|
|
|
6889
6895
|
sixminute-admin connector reviewer --env <env> --firm tenant_... \\
|
|
6890
6896
|
(--timekeeper | --person <external-ref>) [--json]
|
|
6891
6897
|
Who approves a released entry in a system that takes drafts for
|
|
6892
|
-
approval (
|
|
6893
|
-
|
|
6894
|
-
|
|
6898
|
+
approval and lets the firm choose (any other system is refused, and
|
|
6899
|
+
so is LegalSense, where the lawyer who released an entry is always
|
|
6900
|
+
its reviewer): --timekeeper, each lawyer their own time (the
|
|
6901
|
+
default), or --person, one active timekeeper of the team table by
|
|
6902
|
+
their ref. A sync never changes it.
|
|
6895
6903
|
|
|
6896
6904
|
sixminute-admin connector status --env <env> --firm tenant_... [--json]
|
|
6897
6905
|
sixminute-admin connector sync --env <env> --firm tenant_... [--json]
|
|
6898
6906
|
sixminute-admin connector disconnect --env <env> --firm tenant_... [--json]
|
|
6899
|
-
The connector, its fields and its team table
|
|
6907
|
+
The connector, its fields and its team table (for a system each
|
|
6908
|
+
person signs in to: who has signed in, read-only); one sync now with its report; and
|
|
6900
6909
|
Disconnect, which takes the team with it and leaves the deliveries,
|
|
6901
6910
|
the matters and the clients where they are. The attributes it bound
|
|
6902
6911
|
are unbound and inactive, their sets untouched; the ones no entry
|
|
@@ -7774,9 +7783,9 @@ async function connectBody(run2) {
|
|
|
7774
7783
|
return { kind, ...seed === undefined ? {} : { seed } };
|
|
7775
7784
|
}
|
|
7776
7785
|
if (kind === "legalsense")
|
|
7777
|
-
|
|
7786
|
+
throw new AdminUsageError(SIGNS_IN_IN_THE_APP);
|
|
7778
7787
|
if (kind !== "urios") {
|
|
7779
|
-
throw new AdminUsageError(
|
|
7788
|
+
throw new AdminUsageError(`--kind is urios, or fake for a rehearsal against the in-memory system, got ${JSON.stringify(kind)}`);
|
|
7780
7789
|
}
|
|
7781
7790
|
requirePasswordStdin(flags);
|
|
7782
7791
|
const port = flags.values.get("port") ?? "3306";
|
|
@@ -7790,30 +7799,7 @@ async function connectBody(run2) {
|
|
|
7790
7799
|
};
|
|
7791
7800
|
return { kind, ...rest, password: await pipedPassword(run2) };
|
|
7792
7801
|
}
|
|
7793
|
-
var
|
|
7794
|
-
async function legalsenseBody(run2) {
|
|
7795
|
-
const { flags } = run2;
|
|
7796
|
-
if (flags.values.has("host")) {
|
|
7797
|
-
throw new AdminUsageError("--host is not taken for legalsense: give the installation's name with --installation, and the host " + "is <name>.legalsense.nl.");
|
|
7798
|
-
}
|
|
7799
|
-
const installation = required(flags, "installation", "the firm's LegalSense name, as in <name>.legalsense.nl").trim().toLowerCase();
|
|
7800
|
-
if (!INSTALLATION_NAME.test(installation)) {
|
|
7801
|
-
throw new AdminUsageError(`--installation is the name before .legalsense.nl (letters, digits and hyphens), got ${JSON.stringify(installation)}`);
|
|
7802
|
-
}
|
|
7803
|
-
const username = required(flags, "username", "the LegalSense user the firm created for Sixminute");
|
|
7804
|
-
const totp = flags.values.get("totp");
|
|
7805
|
-
if (totp !== undefined && !/^\d{6}$/.test(totp)) {
|
|
7806
|
-
throw new AdminUsageError("--totp is the six-digit code from the seat's authenticator app");
|
|
7807
|
-
}
|
|
7808
|
-
requirePasswordStdin(flags);
|
|
7809
|
-
return {
|
|
7810
|
-
kind: "legalsense",
|
|
7811
|
-
host: `${installation}.legalsense.nl`,
|
|
7812
|
-
username,
|
|
7813
|
-
password: await pipedPassword(run2),
|
|
7814
|
-
...totp === undefined ? {} : { totp }
|
|
7815
|
-
};
|
|
7816
|
-
}
|
|
7802
|
+
var SIGNS_IN_IN_THE_APP = "LegalSense is not connected from this tool. Each person signs in to LegalSense in the app with their own " + "account, under Settings, Practice system: an administrator of the firm first, which connects the firm, and " + "then every member for themself. An operator never signs in for anybody. Status, sync and disconnect work " + "here once the firm is connected.";
|
|
7817
7803
|
function reviewerChoice(flags) {
|
|
7818
7804
|
const person = flags.values.get("person");
|
|
7819
7805
|
const own = switched(flags, "timekeeper");
|
|
@@ -7879,6 +7865,9 @@ async function runConnector(run2, subcommand) {
|
|
|
7879
7865
|
if (current.capabilities.accepts_by !== "approval") {
|
|
7880
7866
|
throw new AdminUsageError(`connector reviewer is for a practice system that takes entries as drafts for approval, and ` + `${current.kind} does not: there is no reviewer to choose.`);
|
|
7881
7867
|
}
|
|
7868
|
+
if (current.capabilities.reviewer === "self") {
|
|
7869
|
+
throw new AdminUsageError(`in ${current.kind} the person who releases an entry is always its reviewer: there is no reviewer to choose.`);
|
|
7870
|
+
}
|
|
7882
7871
|
let reviewer = { mode: "timekeeper" };
|
|
7883
7872
|
if (choice.mode === "person") {
|
|
7884
7873
|
const team = await call(run2.api, "GET", path("/team"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unisonlabs/sixminute-admin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1142-next",
|
|
4
4
|
"description": "Sixminute operator tool: the admin commands of the Sixminute API, run with your own operator sign-in.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|