@unisonlabs/sixminute-admin 0.1.1260-next → 0.1.1262-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 +26 -14
- 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.1262-next", commit: "8599d1bf28d630046efb94dfd23788d94ac26873", surface: "e4d3796ead6a528e" };
|
|
25
25
|
|
|
26
26
|
// node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.js
|
|
27
27
|
var exports_external = {};
|
|
@@ -4770,6 +4770,25 @@ var TeamConfirmationSchema = exports_external.array(exports_external.object({
|
|
|
4770
4770
|
external_ref: exports_external.string().min(1),
|
|
4771
4771
|
member_id: MemberIdSchema.nullable()
|
|
4772
4772
|
}));
|
|
4773
|
+
var LEGALSENSE_HOST = exports_external.string().min(1).regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?\.legalsense\.nl$/i, "a LegalSense host is <installation>.legalsense.nl");
|
|
4774
|
+
var LEGALSENSE_SIGN_IN = {
|
|
4775
|
+
username: exports_external.string().min(1).optional(),
|
|
4776
|
+
password: exports_external.string().min(1).optional(),
|
|
4777
|
+
totp: exports_external.string().regex(/^[0-9]{6}$/, "the code is six digits").optional(),
|
|
4778
|
+
api_token: exports_external.string().trim().min(1).optional()
|
|
4779
|
+
};
|
|
4780
|
+
function oneSignIn(body, ctx) {
|
|
4781
|
+
const login = body.username !== undefined || body.password !== undefined || body.totp !== undefined;
|
|
4782
|
+
if (body.api_token !== undefined) {
|
|
4783
|
+
if (login)
|
|
4784
|
+
ctx.addIssue({ code: exports_external.ZodIssueCode.custom, path: ["api_token"], message: "a token, or a username and password, not both" });
|
|
4785
|
+
return;
|
|
4786
|
+
}
|
|
4787
|
+
for (const key of ["username", "password"]) {
|
|
4788
|
+
if (body[key] === undefined)
|
|
4789
|
+
ctx.addIssue({ code: exports_external.ZodIssueCode.custom, path: [key], message: "Required" });
|
|
4790
|
+
}
|
|
4791
|
+
}
|
|
4773
4792
|
var ConnectRequestSchema = exports_external.discriminatedUnion("kind", [
|
|
4774
4793
|
exports_external.object({
|
|
4775
4794
|
kind: exports_external.literal("urios"),
|
|
@@ -4779,18 +4798,15 @@ var ConnectRequestSchema = exports_external.discriminatedUnion("kind", [
|
|
|
4779
4798
|
user: exports_external.string().min(1),
|
|
4780
4799
|
password: exports_external.string().min(1)
|
|
4781
4800
|
}),
|
|
4782
|
-
exports_external.object({
|
|
4783
|
-
kind: exports_external.literal("legalsense"),
|
|
4784
|
-
host: exports_external.string().min(1).regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?\.legalsense\.nl$/i, "a LegalSense host is <installation>.legalsense.nl"),
|
|
4785
|
-
username: exports_external.string().min(1),
|
|
4786
|
-
password: exports_external.string().min(1),
|
|
4787
|
-
totp: exports_external.string().regex(/^[0-9]{6}$/, "the code is six digits").optional()
|
|
4788
|
-
}),
|
|
4801
|
+
exports_external.object({ kind: exports_external.literal("legalsense"), host: LEGALSENSE_HOST, ...LEGALSENSE_SIGN_IN }),
|
|
4789
4802
|
exports_external.object({
|
|
4790
4803
|
kind: exports_external.literal("fake"),
|
|
4791
4804
|
seed: exports_external.string().optional()
|
|
4792
4805
|
})
|
|
4793
|
-
])
|
|
4806
|
+
]).superRefine((body, ctx) => {
|
|
4807
|
+
if (body.kind === "legalsense")
|
|
4808
|
+
oneSignIn(body, ctx);
|
|
4809
|
+
});
|
|
4794
4810
|
var ConnectorSummarySchema = exports_external.object({
|
|
4795
4811
|
kind: ConnectorKindSchema,
|
|
4796
4812
|
status: ConnectorStatusSchema,
|
|
@@ -4818,11 +4834,7 @@ var ConnectResultSchema = exports_external.object({
|
|
|
4818
4834
|
connector: ConnectorSummarySchema,
|
|
4819
4835
|
team: TeamProposalSchema.nullable()
|
|
4820
4836
|
});
|
|
4821
|
-
var ConnectorAccountPutSchema = exports_external.object(
|
|
4822
|
-
username: exports_external.string().min(1),
|
|
4823
|
-
password: exports_external.string().min(1),
|
|
4824
|
-
totp: exports_external.string().regex(/^[0-9]{6}$/, "the code is six digits").optional()
|
|
4825
|
-
}).strict();
|
|
4837
|
+
var ConnectorAccountPutSchema = exports_external.object(LEGALSENSE_SIGN_IN).strict().superRefine(oneSignIn);
|
|
4826
4838
|
var SyncReportSchema = exports_external.object({
|
|
4827
4839
|
kind: ConnectorKindSchema,
|
|
4828
4840
|
started_at: TimestampSchema,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unisonlabs/sixminute-admin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1262-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": {
|