blodemd 0.0.14 → 0.1.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/README.md +26 -1
- package/dist/cli.mjs +184 -47
- package/dist/cli.mjs.map +1 -1
- package/package.json +1 -1
- package/packages/@repo/contracts/dist/api-key.d.ts +27 -0
- package/packages/@repo/contracts/dist/api-key.d.ts.map +1 -0
- package/packages/@repo/contracts/dist/api-key.js +20 -0
- package/packages/@repo/contracts/dist/index.d.ts +1 -0
- package/packages/@repo/contracts/dist/index.d.ts.map +1 -1
- package/packages/@repo/contracts/dist/index.js +1 -0
- package/packages/@repo/contracts/src/api-key.ts +27 -0
- package/packages/@repo/contracts/src/index.ts +1 -0
package/package.json
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ApiKeySchema: z.ZodObject<{
|
|
3
|
+
createdAt: z.ZodString;
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
keyPrefix: z.ZodString;
|
|
6
|
+
lastUsedAt: z.ZodOptional<z.ZodString>;
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
projectId: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type ApiKey = z.infer<typeof ApiKeySchema>;
|
|
11
|
+
export declare const ApiKeyCreateSchema: z.ZodObject<{
|
|
12
|
+
name: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type ApiKeyCreateInput = z.infer<typeof ApiKeyCreateSchema>;
|
|
15
|
+
export declare const ApiKeyCreatedSchema: z.ZodObject<{
|
|
16
|
+
apiKey: z.ZodObject<{
|
|
17
|
+
createdAt: z.ZodString;
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
keyPrefix: z.ZodString;
|
|
20
|
+
lastUsedAt: z.ZodOptional<z.ZodString>;
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
projectId: z.ZodString;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
key: z.ZodString;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export type ApiKeyCreated = z.infer<typeof ApiKeyCreatedSchema>;
|
|
27
|
+
//# sourceMappingURL=api-key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-key.d.ts","sourceRoot":"","sources":["../src/api-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,YAAY;;;;;;;iBAOvB,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,eAAO,MAAM,kBAAkB;;iBAE7B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAInE,eAAO,MAAM,mBAAmB;;;;;;;;;;iBAG9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { IsoDateSchema } from "./dates.js";
|
|
3
|
+
import { IdSchema } from "./ids.js";
|
|
4
|
+
export const ApiKeySchema = z.object({
|
|
5
|
+
createdAt: IsoDateSchema,
|
|
6
|
+
id: IdSchema,
|
|
7
|
+
keyPrefix: z.string().min(1),
|
|
8
|
+
lastUsedAt: IsoDateSchema.optional(),
|
|
9
|
+
name: z.string().min(1),
|
|
10
|
+
projectId: IdSchema,
|
|
11
|
+
});
|
|
12
|
+
export const ApiKeyCreateSchema = z.object({
|
|
13
|
+
name: z.string().min(1).max(100).optional(),
|
|
14
|
+
});
|
|
15
|
+
// Returned exactly once, at creation time — the only moment the plaintext key
|
|
16
|
+
// is available. Callers must store `key`; the server keeps only its hash.
|
|
17
|
+
export const ApiKeyCreatedSchema = z.object({
|
|
18
|
+
apiKey: ApiKeySchema,
|
|
19
|
+
key: z.string().min(1),
|
|
20
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// biome-ignore lint/performance/noBarrelFile: This is the main entry point for the package
|
|
2
2
|
// eslint-disable-next-line no-barrel-file
|
|
3
3
|
export * from "./analytics.js";
|
|
4
|
+
export * from "./api-key.js";
|
|
4
5
|
export * from "./dates.js";
|
|
5
6
|
export * from "./deployment.js";
|
|
6
7
|
export * from "./domain.js";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
import { IsoDateSchema } from "./dates.js";
|
|
4
|
+
import { IdSchema } from "./ids.js";
|
|
5
|
+
|
|
6
|
+
export const ApiKeySchema = z.object({
|
|
7
|
+
createdAt: IsoDateSchema,
|
|
8
|
+
id: IdSchema,
|
|
9
|
+
keyPrefix: z.string().min(1),
|
|
10
|
+
lastUsedAt: IsoDateSchema.optional(),
|
|
11
|
+
name: z.string().min(1),
|
|
12
|
+
projectId: IdSchema,
|
|
13
|
+
});
|
|
14
|
+
export type ApiKey = z.infer<typeof ApiKeySchema>;
|
|
15
|
+
|
|
16
|
+
export const ApiKeyCreateSchema = z.object({
|
|
17
|
+
name: z.string().min(1).max(100).optional(),
|
|
18
|
+
});
|
|
19
|
+
export type ApiKeyCreateInput = z.infer<typeof ApiKeyCreateSchema>;
|
|
20
|
+
|
|
21
|
+
// Returned exactly once, at creation time — the only moment the plaintext key
|
|
22
|
+
// is available. Callers must store `key`; the server keeps only its hash.
|
|
23
|
+
export const ApiKeyCreatedSchema = z.object({
|
|
24
|
+
apiKey: ApiKeySchema,
|
|
25
|
+
key: z.string().min(1),
|
|
26
|
+
});
|
|
27
|
+
export type ApiKeyCreated = z.infer<typeof ApiKeyCreatedSchema>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// biome-ignore lint/performance/noBarrelFile: This is the main entry point for the package
|
|
2
2
|
// eslint-disable-next-line no-barrel-file
|
|
3
3
|
export * from "./analytics.js";
|
|
4
|
+
export * from "./api-key.js";
|
|
4
5
|
export * from "./dates.js";
|
|
5
6
|
export * from "./deployment.js";
|
|
6
7
|
export * from "./domain.js";
|