@voquill/types 0.3.15 → 0.3.17
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/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/tenant-invitation.types.d.ts +51 -0
- package/dist/tenant-invitation.types.d.ts.map +1 -0
- package/dist/tenant-invitation.types.js +22 -0
- package/dist/tenant-membership.types.d.ts +45 -0
- package/dist/tenant-membership.types.d.ts.map +1 -0
- package/dist/tenant-membership.types.js +14 -0
- package/dist/tenant.types.d.ts +39 -0
- package/dist/tenant.types.d.ts.map +1 -0
- package/dist/tenant.types.js +13 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,9 @@ export * from "./openrouter.types";
|
|
|
19
19
|
export * from "./preferences.types";
|
|
20
20
|
export * from "./remote.types";
|
|
21
21
|
export * from "./stt-provider.types";
|
|
22
|
+
export * from "./tenant.types";
|
|
23
|
+
export * from "./tenant-membership.types";
|
|
24
|
+
export * from "./tenant-invitation.types";
|
|
22
25
|
export * from "./term.types";
|
|
23
26
|
export * from "./tone.types";
|
|
24
27
|
export * from "./transcription.types";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -19,6 +19,9 @@ export * from "./openrouter.types";
|
|
|
19
19
|
export * from "./preferences.types";
|
|
20
20
|
export * from "./remote.types";
|
|
21
21
|
export * from "./stt-provider.types";
|
|
22
|
+
export * from "./tenant.types";
|
|
23
|
+
export * from "./tenant-membership.types";
|
|
24
|
+
export * from "./tenant-invitation.types";
|
|
22
25
|
export * from "./term.types";
|
|
23
26
|
export * from "./tone.types";
|
|
24
27
|
export * from "./transcription.types";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { FiremixTimestamp } from "@firemix/core";
|
|
2
|
+
import z from "zod";
|
|
3
|
+
import { Replace } from "./common.types";
|
|
4
|
+
import { TenantRole } from "./tenant.types";
|
|
5
|
+
export declare const TENANT_INVITATION_STATUSES: readonly ["pending", "accepted", "expired", "revoked"];
|
|
6
|
+
export type TenantInvitationStatus = (typeof TENANT_INVITATION_STATUSES)[number];
|
|
7
|
+
export declare const TenantInvitationStatusZod: z.ZodEnum<["pending", "accepted", "expired", "revoked"]>;
|
|
8
|
+
export type DatabaseTenantInvitation = {
|
|
9
|
+
id: string;
|
|
10
|
+
tenantId: string;
|
|
11
|
+
email: string;
|
|
12
|
+
role: TenantRole;
|
|
13
|
+
invitedBy: string;
|
|
14
|
+
status: TenantInvitationStatus;
|
|
15
|
+
expiresAt: FiremixTimestamp;
|
|
16
|
+
createdAt: FiremixTimestamp;
|
|
17
|
+
updatedAt: FiremixTimestamp;
|
|
18
|
+
};
|
|
19
|
+
export type TenantInvitation = Replace<DatabaseTenantInvitation, FiremixTimestamp, string>;
|
|
20
|
+
export declare const TenantInvitationZod: z.ZodObject<{
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
tenantId: z.ZodString;
|
|
23
|
+
email: z.ZodString;
|
|
24
|
+
role: z.ZodEnum<["owner", "admin", "member"]>;
|
|
25
|
+
invitedBy: z.ZodString;
|
|
26
|
+
status: z.ZodEnum<["pending", "accepted", "expired", "revoked"]>;
|
|
27
|
+
expiresAt: z.ZodString;
|
|
28
|
+
createdAt: z.ZodString;
|
|
29
|
+
updatedAt: z.ZodString;
|
|
30
|
+
}, "strict", z.ZodTypeAny, {
|
|
31
|
+
status: "pending" | "accepted" | "expired" | "revoked";
|
|
32
|
+
id: string;
|
|
33
|
+
createdAt: string;
|
|
34
|
+
updatedAt: string;
|
|
35
|
+
tenantId: string;
|
|
36
|
+
email: string;
|
|
37
|
+
role: "owner" | "admin" | "member";
|
|
38
|
+
invitedBy: string;
|
|
39
|
+
expiresAt: string;
|
|
40
|
+
}, {
|
|
41
|
+
status: "pending" | "accepted" | "expired" | "revoked";
|
|
42
|
+
id: string;
|
|
43
|
+
createdAt: string;
|
|
44
|
+
updatedAt: string;
|
|
45
|
+
tenantId: string;
|
|
46
|
+
email: string;
|
|
47
|
+
role: "owner" | "admin" | "member";
|
|
48
|
+
invitedBy: string;
|
|
49
|
+
expiresAt: string;
|
|
50
|
+
}>;
|
|
51
|
+
//# sourceMappingURL=tenant-invitation.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenant-invitation.types.d.ts","sourceRoot":"","sources":["../src/tenant-invitation.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAiB,MAAM,gBAAgB,CAAC;AAE3D,eAAO,MAAM,0BAA0B,wDAK7B,CAAC;AACX,MAAM,MAAM,sBAAsB,GAChC,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAC9C,eAAO,MAAM,yBAAyB,0DAAqC,CAAC;AAE5E,MAAM,MAAM,wBAAwB,GAAG;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,SAAS,EAAE,gBAAgB,CAAC;IAC5B,SAAS,EAAE,gBAAgB,CAAC;IAC5B,SAAS,EAAE,gBAAgB,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,OAAO,CACpC,wBAAwB,EACxB,gBAAgB,EAChB,MAAM,CACP,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYiB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import { TenantRoleZod } from "./tenant.types";
|
|
3
|
+
export const TENANT_INVITATION_STATUSES = [
|
|
4
|
+
"pending",
|
|
5
|
+
"accepted",
|
|
6
|
+
"expired",
|
|
7
|
+
"revoked",
|
|
8
|
+
];
|
|
9
|
+
export const TenantInvitationStatusZod = z.enum(TENANT_INVITATION_STATUSES);
|
|
10
|
+
export const TenantInvitationZod = z
|
|
11
|
+
.object({
|
|
12
|
+
id: z.string(),
|
|
13
|
+
tenantId: z.string(),
|
|
14
|
+
email: z.string().email(),
|
|
15
|
+
role: TenantRoleZod,
|
|
16
|
+
invitedBy: z.string(),
|
|
17
|
+
status: TenantInvitationStatusZod,
|
|
18
|
+
expiresAt: z.string(),
|
|
19
|
+
createdAt: z.string(),
|
|
20
|
+
updatedAt: z.string(),
|
|
21
|
+
})
|
|
22
|
+
.strict();
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { FiremixTimestamp } from "@firemix/core";
|
|
2
|
+
import z from "zod";
|
|
3
|
+
import { Replace } from "./common.types";
|
|
4
|
+
import { TenantRole } from "./tenant.types";
|
|
5
|
+
export type DatabaseTenantMembership = {
|
|
6
|
+
id: string;
|
|
7
|
+
tenantId: string;
|
|
8
|
+
userId: string;
|
|
9
|
+
email: string;
|
|
10
|
+
role: TenantRole;
|
|
11
|
+
/** Whether this member currently occupies one of the tenant's purchased seats. */
|
|
12
|
+
hasSeat: boolean;
|
|
13
|
+
createdAt: FiremixTimestamp;
|
|
14
|
+
updatedAt: FiremixTimestamp;
|
|
15
|
+
};
|
|
16
|
+
export type TenantMembership = Replace<DatabaseTenantMembership, FiremixTimestamp, string>;
|
|
17
|
+
export declare const TenantMembershipZod: z.ZodObject<{
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
tenantId: z.ZodString;
|
|
20
|
+
userId: z.ZodString;
|
|
21
|
+
email: z.ZodString;
|
|
22
|
+
role: z.ZodEnum<["owner", "admin", "member"]>;
|
|
23
|
+
hasSeat: z.ZodBoolean;
|
|
24
|
+
createdAt: z.ZodString;
|
|
25
|
+
updatedAt: z.ZodString;
|
|
26
|
+
}, "strict", z.ZodTypeAny, {
|
|
27
|
+
id: string;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
updatedAt: string;
|
|
30
|
+
tenantId: string;
|
|
31
|
+
userId: string;
|
|
32
|
+
email: string;
|
|
33
|
+
role: "owner" | "admin" | "member";
|
|
34
|
+
hasSeat: boolean;
|
|
35
|
+
}, {
|
|
36
|
+
id: string;
|
|
37
|
+
createdAt: string;
|
|
38
|
+
updatedAt: string;
|
|
39
|
+
tenantId: string;
|
|
40
|
+
userId: string;
|
|
41
|
+
email: string;
|
|
42
|
+
role: "owner" | "admin" | "member";
|
|
43
|
+
hasSeat: boolean;
|
|
44
|
+
}>;
|
|
45
|
+
//# sourceMappingURL=tenant-membership.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenant-membership.types.d.ts","sourceRoot":"","sources":["../src/tenant-membership.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAiB,MAAM,gBAAgB,CAAC;AAE3D,MAAM,MAAM,wBAAwB,GAAG;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IACjB,kFAAkF;IAClF,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,SAAS,EAAE,gBAAgB,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,OAAO,CACpC,wBAAwB,EACxB,gBAAgB,EAChB,MAAM,CACP,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWiB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import { TenantRoleZod } from "./tenant.types";
|
|
3
|
+
export const TenantMembershipZod = z
|
|
4
|
+
.object({
|
|
5
|
+
id: z.string(),
|
|
6
|
+
tenantId: z.string(),
|
|
7
|
+
userId: z.string(),
|
|
8
|
+
email: z.string().email(),
|
|
9
|
+
role: TenantRoleZod,
|
|
10
|
+
hasSeat: z.boolean(),
|
|
11
|
+
createdAt: z.string(),
|
|
12
|
+
updatedAt: z.string(),
|
|
13
|
+
})
|
|
14
|
+
.strict();
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { FiremixTimestamp } from "@firemix/core";
|
|
2
|
+
import z from "zod";
|
|
3
|
+
import { Replace } from "./common.types";
|
|
4
|
+
export declare const TENANT_ROLES: readonly ["owner", "admin", "member"];
|
|
5
|
+
export type TenantRole = (typeof TENANT_ROLES)[number];
|
|
6
|
+
export declare const TenantRoleZod: z.ZodEnum<["owner", "admin", "member"]>;
|
|
7
|
+
export type DatabaseTenant = {
|
|
8
|
+
id: string;
|
|
9
|
+
createdAt: FiremixTimestamp;
|
|
10
|
+
updatedAt: FiremixTimestamp;
|
|
11
|
+
name: string;
|
|
12
|
+
createdBy: string;
|
|
13
|
+
/** Total seats purchased for this tenant. Source of truth: Stripe webhook. */
|
|
14
|
+
seatCount: number;
|
|
15
|
+
};
|
|
16
|
+
export type Tenant = Replace<DatabaseTenant, FiremixTimestamp, string>;
|
|
17
|
+
export declare const TenantZod: z.ZodObject<{
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
createdAt: z.ZodString;
|
|
20
|
+
updatedAt: z.ZodString;
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
createdBy: z.ZodString;
|
|
23
|
+
seatCount: z.ZodNumber;
|
|
24
|
+
}, "strict", z.ZodTypeAny, {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
createdAt: string;
|
|
28
|
+
updatedAt: string;
|
|
29
|
+
createdBy: string;
|
|
30
|
+
seatCount: number;
|
|
31
|
+
}, {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
createdAt: string;
|
|
35
|
+
updatedAt: string;
|
|
36
|
+
createdBy: string;
|
|
37
|
+
seatCount: number;
|
|
38
|
+
}>;
|
|
39
|
+
//# sourceMappingURL=tenant.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenant.types.d.ts","sourceRoot":"","sources":["../src/tenant.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,eAAO,MAAM,YAAY,uCAAwC,CAAC;AAClE,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AACvD,eAAO,MAAM,aAAa,yCAAuB,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,gBAAgB,CAAC;IAC5B,SAAS,EAAE,gBAAgB,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC;AAEvE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;EASiB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
export const TENANT_ROLES = ["owner", "admin", "member"];
|
|
3
|
+
export const TenantRoleZod = z.enum(TENANT_ROLES);
|
|
4
|
+
export const TenantZod = z
|
|
5
|
+
.object({
|
|
6
|
+
id: z.string(),
|
|
7
|
+
createdAt: z.string(),
|
|
8
|
+
updatedAt: z.string(),
|
|
9
|
+
name: z.string(),
|
|
10
|
+
createdBy: z.string(),
|
|
11
|
+
seatCount: z.number().int().nonnegative(),
|
|
12
|
+
})
|
|
13
|
+
.strict();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voquill/types",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.17",
|
|
4
4
|
"description": "Shared types for the monorepo",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@types/json-schema": "^7.0.15",
|
|
14
14
|
"typescript": "5.9.2",
|
|
15
|
-
"@voquill/typescript-config": "0.3.
|
|
15
|
+
"@voquill/typescript-config": "0.3.17"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
18
|
"dist"
|