@substrat-run/contracts 0.2.0 → 0.3.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 +2 -0
- package/dist/attachments.d.ts +4 -1
- package/dist/attachments.d.ts.map +1 -1
- package/dist/control-plane.d.ts +80 -0
- package/dist/control-plane.d.ts.map +1 -0
- package/dist/control-plane.js +67 -0
- package/dist/control-plane.js.map +1 -0
- package/dist/events.d.ts +34 -160
- package/dist/events.d.ts.map +1 -1
- package/dist/ids.d.ts +10 -8
- package/dist/ids.d.ts.map +1 -1
- package/dist/ids.js +4 -0
- package/dist/ids.js.map +1 -1
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/dist/manifest.d.ts +29 -347
- package/dist/manifest.d.ts.map +1 -1
- package/dist/money.d.ts +5 -11
- package/dist/money.d.ts.map +1 -1
- package/dist/permission.d.ts +44 -222
- package/dist/permission.d.ts.map +1 -1
- package/dist/tenancy.d.ts +52 -52
- package/dist/tenancy.d.ts.map +1 -1
- package/dist/tenancy.js +3 -0
- package/dist/tenancy.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -9,6 +9,8 @@ boundary. The schemas are written in [Zod](https://zod.dev), so the reviewed art
|
|
|
9
9
|
*is* the runtime validator: OpenAPI and JSON Schema documents are emitted from this
|
|
10
10
|
package, never hand-maintained beside it.
|
|
11
11
|
|
|
12
|
+
**Full documentation: https://substrat.ahlstrand.es/reference/contracts**
|
|
13
|
+
|
|
12
14
|
## What's inside
|
|
13
15
|
|
|
14
16
|
- **IDs** — branded ULID types (`TenantId`, `ScopeId`, `PrincipalId`, `EventId`, …):
|
package/dist/attachments.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const visibility: z.ZodEnum<
|
|
2
|
+
export declare const visibility: z.ZodEnum<{
|
|
3
|
+
internal: "internal";
|
|
4
|
+
customer: "customer";
|
|
5
|
+
}>;
|
|
3
6
|
export type Visibility = z.infer<typeof visibility>;
|
|
4
7
|
//# sourceMappingURL=attachments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachments.d.ts","sourceRoot":"","sources":["../src/attachments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"attachments.d.ts","sourceRoot":"","sources":["../src/attachments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,UAAU;;;EAAmC,CAAC;AAC3D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const adminAction: z.ZodEnum<{
|
|
3
|
+
defineRole: "defineRole";
|
|
4
|
+
assignRole: "assignRole";
|
|
5
|
+
grant: "grant";
|
|
6
|
+
grantToOrg: "grantToOrg";
|
|
7
|
+
addMember: "addMember";
|
|
8
|
+
createTenant: "createTenant";
|
|
9
|
+
setTenantStatus: "setTenantStatus";
|
|
10
|
+
provisionScope: "provisionScope";
|
|
11
|
+
suspendScope: "suspendScope";
|
|
12
|
+
unsuspendScope: "unsuspendScope";
|
|
13
|
+
archiveScope: "archiveScope";
|
|
14
|
+
unarchiveScope: "unarchiveScope";
|
|
15
|
+
grantEntitlement: "grantEntitlement";
|
|
16
|
+
revokeEntitlement: "revokeEntitlement";
|
|
17
|
+
linkIdentity: "linkIdentity";
|
|
18
|
+
}>;
|
|
19
|
+
export type AdminAction = z.infer<typeof adminAction>;
|
|
20
|
+
/**
|
|
21
|
+
* The neutral identity seam (D-16; control-plane.md §6 "principal derivation").
|
|
22
|
+
* An auth adapter at the edge (Better Auth, an OIDC issuer, …) authenticates a
|
|
23
|
+
* user and maps its external identity to a Substrat principal + home node. The
|
|
24
|
+
* kernel never learns HOW a caller authenticated, only WHO they are — the
|
|
25
|
+
* mechanism stays a swappable adapter. Authentication only: authorization is
|
|
26
|
+
* roles/grants, and `provider` keeps N adapters (and OIDC upstreams) distinct.
|
|
27
|
+
*/
|
|
28
|
+
export declare const identityLink: z.ZodObject<{
|
|
29
|
+
provider: z.ZodString;
|
|
30
|
+
externalId: z.ZodString;
|
|
31
|
+
principal: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
32
|
+
tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
|
|
33
|
+
scopeId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "ScopeId", "out">>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type IdentityLink = z.infer<typeof identityLink>;
|
|
36
|
+
export declare const resolvedIdentity: z.ZodObject<{
|
|
37
|
+
principal: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
38
|
+
tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
|
|
39
|
+
scopeId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "ScopeId", "out">>;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
export type ResolvedIdentity = z.infer<typeof resolvedIdentity>;
|
|
42
|
+
/**
|
|
43
|
+
* An append-only admin audit row (control-plane.md §4.4). Every field except
|
|
44
|
+
* `before`/`after` is stamped platform-side — never supplied by the caller —
|
|
45
|
+
* for the same reason the kernel is trusted at all (K-4): a surface that can act
|
|
46
|
+
* without a durable record of who acted is worse than no surface.
|
|
47
|
+
*
|
|
48
|
+
* `target` is `(tenantId, scopeId?, vertical?)`. `scopeId`/`vertical` are null
|
|
49
|
+
* for tenant-wide actions; `vertical` stays null until §4.2 lifecycle actions
|
|
50
|
+
* (provision/suspend) that name one.
|
|
51
|
+
*/
|
|
52
|
+
export declare const adminLogEntry: z.ZodObject<{
|
|
53
|
+
id: z.ZodString;
|
|
54
|
+
actor: z.core.$ZodBranded<z.ZodString, "PlatformActorId", "out">;
|
|
55
|
+
action: z.ZodEnum<{
|
|
56
|
+
defineRole: "defineRole";
|
|
57
|
+
assignRole: "assignRole";
|
|
58
|
+
grant: "grant";
|
|
59
|
+
grantToOrg: "grantToOrg";
|
|
60
|
+
addMember: "addMember";
|
|
61
|
+
createTenant: "createTenant";
|
|
62
|
+
setTenantStatus: "setTenantStatus";
|
|
63
|
+
provisionScope: "provisionScope";
|
|
64
|
+
suspendScope: "suspendScope";
|
|
65
|
+
unsuspendScope: "unsuspendScope";
|
|
66
|
+
archiveScope: "archiveScope";
|
|
67
|
+
unarchiveScope: "unarchiveScope";
|
|
68
|
+
grantEntitlement: "grantEntitlement";
|
|
69
|
+
revokeEntitlement: "revokeEntitlement";
|
|
70
|
+
linkIdentity: "linkIdentity";
|
|
71
|
+
}>;
|
|
72
|
+
tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
|
|
73
|
+
scopeId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "ScopeId", "out">>;
|
|
74
|
+
vertical: z.ZodNullable<z.ZodString>;
|
|
75
|
+
before: z.ZodNullable<z.ZodUnknown>;
|
|
76
|
+
after: z.ZodNullable<z.ZodUnknown>;
|
|
77
|
+
at: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
export type AdminLogEntry = z.infer<typeof adminLogEntry>;
|
|
80
|
+
//# sourceMappingURL=control-plane.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-plane.d.ts","sourceRoot":"","sources":["../src/control-plane.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;EAgBtB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY;;;;;;iBAMvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD,eAAO,MAAM,gBAAgB;;;;iBAI3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;iBAUxB,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { instant, platformActorId, principalId, scopeId, tenantId } from './ids.js';
|
|
3
|
+
// The control plane — the shared layer across N per-vertical deployments (D-30,
|
|
4
|
+
// control-plane.md). This file carries the audit contract that every effecting
|
|
5
|
+
// mutation writes; the tenant registry, lifecycle, and entitlement store land in
|
|
6
|
+
// later slices (control-plane.md §4.1–4.3).
|
|
7
|
+
// One row per control-plane mutation. Extended additively as §4.2/§4.3 add
|
|
8
|
+
// lifecycle and entitlement actions (new enum members are additive — D-28).
|
|
9
|
+
export const adminAction = z.enum([
|
|
10
|
+
'defineRole',
|
|
11
|
+
'assignRole',
|
|
12
|
+
'grant',
|
|
13
|
+
'grantToOrg',
|
|
14
|
+
'addMember',
|
|
15
|
+
'createTenant', // §4.1
|
|
16
|
+
'setTenantStatus', // §4.1 — before/after carry the transitioned status
|
|
17
|
+
'provisionScope', // §4.2 — the first scope-lifecycle transition (→ active)
|
|
18
|
+
'suspendScope', // §4.2
|
|
19
|
+
'unsuspendScope', // §4.2
|
|
20
|
+
'archiveScope', // §4.2
|
|
21
|
+
'unarchiveScope', // §4.2 — an explicit restore, never a silent flag flip
|
|
22
|
+
'grantEntitlement', // §4.3 — the SKU flag turned on for a tenant
|
|
23
|
+
'revokeEntitlement', // §4.3
|
|
24
|
+
'linkIdentity', // D-16 — bind an external identity to a principal
|
|
25
|
+
]);
|
|
26
|
+
/**
|
|
27
|
+
* The neutral identity seam (D-16; control-plane.md §6 "principal derivation").
|
|
28
|
+
* An auth adapter at the edge (Better Auth, an OIDC issuer, …) authenticates a
|
|
29
|
+
* user and maps its external identity to a Substrat principal + home node. The
|
|
30
|
+
* kernel never learns HOW a caller authenticated, only WHO they are — the
|
|
31
|
+
* mechanism stays a swappable adapter. Authentication only: authorization is
|
|
32
|
+
* roles/grants, and `provider` keeps N adapters (and OIDC upstreams) distinct.
|
|
33
|
+
*/
|
|
34
|
+
export const identityLink = z.object({
|
|
35
|
+
provider: z.string().min(1), // 'better-auth' | 'oidc:<issuer>' | …
|
|
36
|
+
externalId: z.string().min(1), // the provider's stable user id (e.g. the OIDC `sub`)
|
|
37
|
+
principal: principalId,
|
|
38
|
+
tenantId,
|
|
39
|
+
scopeId: scopeId.optional(), // omitted = tenant-level home
|
|
40
|
+
});
|
|
41
|
+
export const resolvedIdentity = z.object({
|
|
42
|
+
principal: principalId,
|
|
43
|
+
tenantId,
|
|
44
|
+
scopeId: scopeId.nullable(),
|
|
45
|
+
});
|
|
46
|
+
/**
|
|
47
|
+
* An append-only admin audit row (control-plane.md §4.4). Every field except
|
|
48
|
+
* `before`/`after` is stamped platform-side — never supplied by the caller —
|
|
49
|
+
* for the same reason the kernel is trusted at all (K-4): a surface that can act
|
|
50
|
+
* without a durable record of who acted is worse than no surface.
|
|
51
|
+
*
|
|
52
|
+
* `target` is `(tenantId, scopeId?, vertical?)`. `scopeId`/`vertical` are null
|
|
53
|
+
* for tenant-wide actions; `vertical` stays null until §4.2 lifecycle actions
|
|
54
|
+
* (provision/suspend) that name one.
|
|
55
|
+
*/
|
|
56
|
+
export const adminLogEntry = z.object({
|
|
57
|
+
id: z.string().min(1), // ULID, stamped host-side; sortable = chronological
|
|
58
|
+
actor: platformActorId,
|
|
59
|
+
action: adminAction,
|
|
60
|
+
tenantId,
|
|
61
|
+
scopeId: scopeId.nullable(),
|
|
62
|
+
vertical: z.string().nullable(),
|
|
63
|
+
before: z.unknown().nullable(), // prior state where cheaply readable (e.g. a redefined role)
|
|
64
|
+
after: z.unknown().nullable(), // the applied payload
|
|
65
|
+
at: instant,
|
|
66
|
+
});
|
|
67
|
+
//# sourceMappingURL=control-plane.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-plane.js","sourceRoot":"","sources":["../src/control-plane.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpF,gFAAgF;AAChF,+EAA+E;AAC/E,iFAAiF;AACjF,4CAA4C;AAE5C,2EAA2E;AAC3E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC;IAChC,YAAY;IACZ,YAAY;IACZ,OAAO;IACP,YAAY;IACZ,WAAW;IACX,cAAc,EAAE,OAAO;IACvB,iBAAiB,EAAE,oDAAoD;IACvE,gBAAgB,EAAE,yDAAyD;IAC3E,cAAc,EAAE,OAAO;IACvB,gBAAgB,EAAE,OAAO;IACzB,cAAc,EAAE,OAAO;IACvB,gBAAgB,EAAE,uDAAuD;IACzE,kBAAkB,EAAE,6CAA6C;IACjE,mBAAmB,EAAE,OAAO;IAC5B,cAAc,EAAE,kDAAkD;CACnE,CAAC,CAAC;AAGH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,sCAAsC;IACnE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,sDAAsD;IACrF,SAAS,EAAE,WAAW;IACtB,QAAQ;IACR,OAAO,EAAE,OAAO,CAAC,QAAQ,EAAE,EAAE,8BAA8B;CAC5D,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,SAAS,EAAE,WAAW;IACtB,QAAQ;IACR,OAAO,EAAE,OAAO,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAC;AAGH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,oDAAoD;IAC3E,KAAK,EAAE,eAAe;IACtB,MAAM,EAAE,WAAW;IACnB,QAAQ;IACR,OAAO,EAAE,OAAO,CAAC,QAAQ,EAAE;IAC3B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,6DAA6D;IAC7F,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,sBAAsB;IACrD,EAAE,EAAE,OAAO;CACZ,CAAC,CAAC"}
|
package/dist/events.d.ts
CHANGED
|
@@ -2,185 +2,59 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const entityRef: z.ZodObject<{
|
|
3
3
|
entityType: z.ZodString;
|
|
4
4
|
entityId: z.ZodString;
|
|
5
|
-
},
|
|
6
|
-
entityType: string;
|
|
7
|
-
entityId: string;
|
|
8
|
-
}, {
|
|
9
|
-
entityType: string;
|
|
10
|
-
entityId: string;
|
|
11
|
-
}>;
|
|
5
|
+
}, z.core.$strip>;
|
|
12
6
|
export type EntityRef = z.infer<typeof entityRef>;
|
|
13
|
-
export declare const piiClass: z.ZodEnum<
|
|
7
|
+
export declare const piiClass: z.ZodEnum<{
|
|
8
|
+
none: "none";
|
|
9
|
+
pseudonymous: "pseudonymous";
|
|
10
|
+
direct: "direct";
|
|
11
|
+
}>;
|
|
14
12
|
export type PiiClass = z.infer<typeof piiClass>;
|
|
15
13
|
export declare const eventType: z.ZodString;
|
|
16
14
|
export declare const systemActor: z.ZodObject<{
|
|
17
|
-
system: z.ZodBranded<z.ZodString, "ModuleId">;
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}>;
|
|
23
|
-
export declare const actor: z.ZodUnion<[z.ZodBranded<z.ZodString, "PrincipalId">, z.ZodObject<{
|
|
24
|
-
system: z.ZodBranded<z.ZodString, "ModuleId">;
|
|
25
|
-
}, "strip", z.ZodTypeAny, {
|
|
26
|
-
system: string & z.BRAND<"ModuleId">;
|
|
27
|
-
}, {
|
|
28
|
-
system: string;
|
|
29
|
-
}>]>;
|
|
15
|
+
system: z.core.$ZodBranded<z.ZodString, "ModuleId", "out">;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export declare const actor: z.ZodUnion<readonly [z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">, z.ZodObject<{
|
|
18
|
+
system: z.core.$ZodBranded<z.ZodString, "ModuleId", "out">;
|
|
19
|
+
}, z.core.$strip>]>;
|
|
30
20
|
export type Actor = z.infer<typeof actor>;
|
|
31
|
-
export declare const domainEventInput: z.
|
|
21
|
+
export declare const domainEventInput: z.ZodObject<{
|
|
32
22
|
type: z.ZodString;
|
|
33
23
|
schemaVersion: z.ZodNumber;
|
|
34
24
|
entity: z.ZodObject<{
|
|
35
25
|
entityType: z.ZodString;
|
|
36
26
|
entityId: z.ZodString;
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
entityId: string;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
piiClass: z.ZodEnum<{
|
|
29
|
+
none: "none";
|
|
30
|
+
pseudonymous: "pseudonymous";
|
|
31
|
+
direct: "direct";
|
|
43
32
|
}>;
|
|
44
|
-
|
|
45
|
-
subjectId: z.ZodOptional<z.ZodBranded<z.ZodString, "DataSubjectId">>;
|
|
33
|
+
subjectId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "DataSubjectId", "out">>;
|
|
46
34
|
payload: z.ZodUnknown;
|
|
47
|
-
},
|
|
48
|
-
type: string;
|
|
49
|
-
schemaVersion: number;
|
|
50
|
-
entity: {
|
|
51
|
-
entityType: string;
|
|
52
|
-
entityId: string;
|
|
53
|
-
};
|
|
54
|
-
piiClass: "none" | "pseudonymous" | "direct";
|
|
55
|
-
subjectId?: (string & z.BRAND<"DataSubjectId">) | undefined;
|
|
56
|
-
payload?: unknown;
|
|
57
|
-
}, {
|
|
58
|
-
type: string;
|
|
59
|
-
schemaVersion: number;
|
|
60
|
-
entity: {
|
|
61
|
-
entityType: string;
|
|
62
|
-
entityId: string;
|
|
63
|
-
};
|
|
64
|
-
piiClass: "none" | "pseudonymous" | "direct";
|
|
65
|
-
subjectId?: string | undefined;
|
|
66
|
-
payload?: unknown;
|
|
67
|
-
}>, {
|
|
68
|
-
type: string;
|
|
69
|
-
schemaVersion: number;
|
|
70
|
-
entity: {
|
|
71
|
-
entityType: string;
|
|
72
|
-
entityId: string;
|
|
73
|
-
};
|
|
74
|
-
piiClass: "none" | "pseudonymous" | "direct";
|
|
75
|
-
subjectId?: (string & z.BRAND<"DataSubjectId">) | undefined;
|
|
76
|
-
payload?: unknown;
|
|
77
|
-
}, {
|
|
78
|
-
type: string;
|
|
79
|
-
schemaVersion: number;
|
|
80
|
-
entity: {
|
|
81
|
-
entityType: string;
|
|
82
|
-
entityId: string;
|
|
83
|
-
};
|
|
84
|
-
piiClass: "none" | "pseudonymous" | "direct";
|
|
85
|
-
subjectId?: string | undefined;
|
|
86
|
-
payload?: unknown;
|
|
87
|
-
}>;
|
|
35
|
+
}, z.core.$strip>;
|
|
88
36
|
export type DomainEventInput = z.infer<typeof domainEventInput>;
|
|
89
|
-
export declare const domainEvent: z.
|
|
90
|
-
id: z.ZodBranded<z.ZodString, "EventId">;
|
|
37
|
+
export declare const domainEvent: z.ZodObject<{
|
|
38
|
+
id: z.core.$ZodBranded<z.ZodString, "EventId", "out">;
|
|
91
39
|
type: z.ZodString;
|
|
92
40
|
schemaVersion: z.ZodNumber;
|
|
93
|
-
occurredAt: z.ZodBranded<z.ZodString, "Instant">;
|
|
94
|
-
tenantId: z.ZodBranded<z.ZodString, "TenantId">;
|
|
95
|
-
scopeId: z.ZodBranded<z.ZodString, "ScopeId">;
|
|
96
|
-
actor: z.ZodUnion<[z.ZodBranded<z.ZodString, "PrincipalId">, z.ZodObject<{
|
|
97
|
-
system: z.ZodBranded<z.ZodString, "ModuleId">;
|
|
98
|
-
},
|
|
99
|
-
system: string & z.BRAND<"ModuleId">;
|
|
100
|
-
}, {
|
|
101
|
-
system: string;
|
|
102
|
-
}>]>;
|
|
41
|
+
occurredAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
|
|
42
|
+
tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
|
|
43
|
+
scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
|
|
44
|
+
actor: z.ZodUnion<readonly [z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">, z.ZodObject<{
|
|
45
|
+
system: z.core.$ZodBranded<z.ZodString, "ModuleId", "out">;
|
|
46
|
+
}, z.core.$strip>]>;
|
|
103
47
|
entity: z.ZodObject<{
|
|
104
48
|
entityType: z.ZodString;
|
|
105
49
|
entityId: z.ZodString;
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
entityId: string;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
piiClass: z.ZodEnum<{
|
|
52
|
+
none: "none";
|
|
53
|
+
pseudonymous: "pseudonymous";
|
|
54
|
+
direct: "direct";
|
|
112
55
|
}>;
|
|
113
|
-
|
|
114
|
-
subjectId: z.ZodOptional<z.ZodBranded<z.ZodString, "DataSubjectId">>;
|
|
56
|
+
subjectId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "DataSubjectId", "out">>;
|
|
115
57
|
payload: z.ZodUnknown;
|
|
116
|
-
},
|
|
117
|
-
type: string;
|
|
118
|
-
schemaVersion: number;
|
|
119
|
-
entity: {
|
|
120
|
-
entityType: string;
|
|
121
|
-
entityId: string;
|
|
122
|
-
};
|
|
123
|
-
piiClass: "none" | "pseudonymous" | "direct";
|
|
124
|
-
id: string & z.BRAND<"EventId">;
|
|
125
|
-
occurredAt: string & z.BRAND<"Instant">;
|
|
126
|
-
tenantId: string & z.BRAND<"TenantId">;
|
|
127
|
-
scopeId: string & z.BRAND<"ScopeId">;
|
|
128
|
-
actor: (string & z.BRAND<"PrincipalId">) | {
|
|
129
|
-
system: string & z.BRAND<"ModuleId">;
|
|
130
|
-
};
|
|
131
|
-
subjectId?: (string & z.BRAND<"DataSubjectId">) | undefined;
|
|
132
|
-
payload?: unknown;
|
|
133
|
-
}, {
|
|
134
|
-
type: string;
|
|
135
|
-
schemaVersion: number;
|
|
136
|
-
entity: {
|
|
137
|
-
entityType: string;
|
|
138
|
-
entityId: string;
|
|
139
|
-
};
|
|
140
|
-
piiClass: "none" | "pseudonymous" | "direct";
|
|
141
|
-
id: string;
|
|
142
|
-
occurredAt: string;
|
|
143
|
-
tenantId: string;
|
|
144
|
-
scopeId: string;
|
|
145
|
-
actor: string | {
|
|
146
|
-
system: string;
|
|
147
|
-
};
|
|
148
|
-
subjectId?: string | undefined;
|
|
149
|
-
payload?: unknown;
|
|
150
|
-
}>, {
|
|
151
|
-
type: string;
|
|
152
|
-
schemaVersion: number;
|
|
153
|
-
entity: {
|
|
154
|
-
entityType: string;
|
|
155
|
-
entityId: string;
|
|
156
|
-
};
|
|
157
|
-
piiClass: "none" | "pseudonymous" | "direct";
|
|
158
|
-
id: string & z.BRAND<"EventId">;
|
|
159
|
-
occurredAt: string & z.BRAND<"Instant">;
|
|
160
|
-
tenantId: string & z.BRAND<"TenantId">;
|
|
161
|
-
scopeId: string & z.BRAND<"ScopeId">;
|
|
162
|
-
actor: (string & z.BRAND<"PrincipalId">) | {
|
|
163
|
-
system: string & z.BRAND<"ModuleId">;
|
|
164
|
-
};
|
|
165
|
-
subjectId?: (string & z.BRAND<"DataSubjectId">) | undefined;
|
|
166
|
-
payload?: unknown;
|
|
167
|
-
}, {
|
|
168
|
-
type: string;
|
|
169
|
-
schemaVersion: number;
|
|
170
|
-
entity: {
|
|
171
|
-
entityType: string;
|
|
172
|
-
entityId: string;
|
|
173
|
-
};
|
|
174
|
-
piiClass: "none" | "pseudonymous" | "direct";
|
|
175
|
-
id: string;
|
|
176
|
-
occurredAt: string;
|
|
177
|
-
tenantId: string;
|
|
178
|
-
scopeId: string;
|
|
179
|
-
actor: string | {
|
|
180
|
-
system: string;
|
|
181
|
-
};
|
|
182
|
-
subjectId?: string | undefined;
|
|
183
|
-
payload?: unknown;
|
|
184
|
-
}>;
|
|
58
|
+
}, z.core.$strip>;
|
|
185
59
|
export type DomainEvent = z.infer<typeof domainEvent>;
|
|
186
60
|
//# sourceMappingURL=events.d.ts.map
|
package/dist/events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,SAAS;;;iBAGpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAIlD,eAAO,MAAM,QAAQ;;;;EAA6C,CAAC;AACnE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAGhD,eAAO,MAAM,SAAS,aAA+C,CAAC;AAEtE,eAAO,MAAM,WAAW;;iBAAiC,CAAC;AAC1D,eAAO,MAAM,KAAK;;mBAAsC,CAAC;AACzD,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAC;AAiB1C,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;iBASD,CAAC;AAC7B,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAGhE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;iBAcI,CAAC;AAC7B,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
package/dist/ids.d.ts
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const tenantId: z.ZodBranded<z.ZodString, "TenantId">;
|
|
2
|
+
export declare const tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
|
|
3
3
|
export type TenantId = z.infer<typeof tenantId>;
|
|
4
|
-
export declare const scopeId: z.ZodBranded<z.ZodString, "ScopeId">;
|
|
4
|
+
export declare const scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
|
|
5
5
|
export type ScopeId = z.infer<typeof scopeId>;
|
|
6
|
-
export declare const principalId: z.ZodBranded<z.ZodString, "PrincipalId">;
|
|
6
|
+
export declare const principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
7
7
|
export type PrincipalId = z.infer<typeof principalId>;
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const platformActorId: z.core.$ZodBranded<z.ZodString, "PlatformActorId", "out">;
|
|
9
|
+
export type PlatformActorId = z.infer<typeof platformActorId>;
|
|
10
|
+
export declare const eventId: z.core.$ZodBranded<z.ZodString, "EventId", "out">;
|
|
9
11
|
export type EventId = z.infer<typeof eventId>;
|
|
10
|
-
export declare const dataSubjectId: z.ZodBranded<z.ZodString, "DataSubjectId">;
|
|
12
|
+
export declare const dataSubjectId: z.core.$ZodBranded<z.ZodString, "DataSubjectId", "out">;
|
|
11
13
|
export type DataSubjectId = z.infer<typeof dataSubjectId>;
|
|
12
|
-
export declare const moduleId: z.ZodBranded<z.ZodString, "ModuleId">;
|
|
14
|
+
export declare const moduleId: z.core.$ZodBranded<z.ZodString, "ModuleId", "out">;
|
|
13
15
|
export type ModuleId = z.infer<typeof moduleId>;
|
|
14
|
-
export declare const instant: z.ZodBranded<z.ZodString, "Instant">;
|
|
16
|
+
export declare const instant: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
|
|
15
17
|
export type Instant = z.infer<typeof instant>;
|
|
16
|
-
export declare const permissionKey: z.ZodBranded<z.ZodString, "PermissionKey">;
|
|
18
|
+
export declare const permissionKey: z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">;
|
|
17
19
|
export type PermissionKey = z.infer<typeof permissionKey>;
|
|
18
20
|
export declare const slug: z.ZodString;
|
|
19
21
|
//# sourceMappingURL=ids.d.ts.map
|
package/dist/ids.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../src/ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../src/ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,QAAQ,oDAA6C,CAAC;AACnE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEhD,eAAO,MAAM,OAAO,mDAA4C,CAAC;AACjE,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;AAE9C,eAAO,MAAM,WAAW,uDAAgD,CAAC;AACzE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAKtD,eAAO,MAAM,eAAe,2DAAoD,CAAC;AACjF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,eAAO,MAAM,OAAO,mDAA4C,CAAC;AACjE,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;AAE9C,eAAO,MAAM,aAAa,yDAAkD,CAAC;AAC7E,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAG1D,eAAO,MAAM,QAAQ,oDAGC,CAAC;AACvB,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAGhD,eAAO,MAAM,OAAO,mDAA2D,CAAC;AAChF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;AAG9C,eAAO,MAAM,aAAa,yDAGC,CAAC;AAC5B,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,eAAO,MAAM,IAAI,aAAwD,CAAC"}
|
package/dist/ids.js
CHANGED
|
@@ -6,6 +6,10 @@ const ULID = /^[0-9A-HJKMNP-TV-Z]{26}$/;
|
|
|
6
6
|
export const tenantId = z.string().regex(ULID).brand();
|
|
7
7
|
export const scopeId = z.string().regex(ULID).brand();
|
|
8
8
|
export const principalId = z.string().regex(ULID).brand();
|
|
9
|
+
// A platform-staff actor — the subject of every control-plane mutation (D-30, K-20).
|
|
10
|
+
// Branded DISTINCTLY from PrincipalId on purpose: a platform actor is not a principal
|
|
11
|
+
// in any tenant, and the compiler must refuse to confuse the two.
|
|
12
|
+
export const platformActorId = z.string().regex(ULID).brand();
|
|
9
13
|
export const eventId = z.string().regex(ULID).brand();
|
|
10
14
|
export const dataSubjectId = z.string().regex(ULID).brand();
|
|
11
15
|
// npm-package-shaped, e.g. '@substrat-run/engine-workorder'
|
package/dist/ids.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids.js","sourceRoot":"","sources":["../src/ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,oFAAoF;AACpF,oFAAoF;AACpF,oEAAoE;AAEpE,MAAM,IAAI,GAAG,0BAA0B,CAAC;AAExC,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAc,CAAC;AAGnE,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAa,CAAC;AAGjE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAiB,CAAC;AAGzE,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAa,CAAC;AAGjE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAmB,CAAC;AAG7E,4DAA4D;AAC5D,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC;KACtB,MAAM,EAAE;KACR,KAAK,CAAC,wDAAwD,CAAC;KAC/D,KAAK,EAAc,CAAC;AAGvB,gFAAgF;AAChF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,EAAa,CAAC;AAGhF,4DAA4D;AAC5D,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC;KAC3B,MAAM,EAAE;KACR,KAAK,CAAC,yBAAyB,CAAC;KAChC,KAAK,EAAmB,CAAC;AAG5B,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"ids.js","sourceRoot":"","sources":["../src/ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,oFAAoF;AACpF,oFAAoF;AACpF,oEAAoE;AAEpE,MAAM,IAAI,GAAG,0BAA0B,CAAC;AAExC,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAc,CAAC;AAGnE,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAa,CAAC;AAGjE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAiB,CAAC;AAGzE,qFAAqF;AACrF,sFAAsF;AACtF,kEAAkE;AAClE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAqB,CAAC;AAGjF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAa,CAAC;AAGjE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAmB,CAAC;AAG7E,4DAA4D;AAC5D,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC;KACtB,MAAM,EAAE;KACR,KAAK,CAAC,wDAAwD,CAAC;KAC/D,KAAK,EAAc,CAAC;AAGvB,gFAAgF;AAChF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,EAAa,CAAC;AAGhF,4DAA4D;AAC5D,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC;KAC3B,MAAM,EAAE;KACR,KAAK,CAAC,yBAAyB,CAAC;KAChC,KAAK,EAAmB,CAAC;AAG5B,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Zod instance these schemas were built with.
|
|
3
|
+
*
|
|
4
|
+
* Import `z` FROM HERE, not from 'zod', whenever you compose a contracts schema
|
|
5
|
+
* into your own — `z.object({ facility: entityRef, unitPrice: money })` is the
|
|
6
|
+
* pattern the engines themselves use, and it is what "parse, don't trust" asks
|
|
7
|
+
* of every operation input.
|
|
8
|
+
*
|
|
9
|
+
* Zod schemas do not compose across copies or majors: the mix fails at RUNTIME
|
|
10
|
+
* with `Invalid element at key "…": expected a Zod schema`, an error that points
|
|
11
|
+
* nowhere near the cause. We are on Zod 4, which is what `pnpm add zod` gives
|
|
12
|
+
* you today — so the trap is currently dormant, not gone. It re-arms the day Zod
|
|
13
|
+
* 5 ships, and it bit us once already (the packages were Zod 3 while the docs
|
|
14
|
+
* told users to install the then-current Zod 4).
|
|
15
|
+
*
|
|
16
|
+
* Importing `z` from here means the consumer never installs zod at all, so the
|
|
17
|
+
* versions cannot diverge no matter what the registry's `latest` becomes.
|
|
18
|
+
*/
|
|
19
|
+
export { z } from 'zod';
|
|
1
20
|
export * from './ids.js';
|
|
2
21
|
export * from './tenancy.js';
|
|
22
|
+
export * from './control-plane.js';
|
|
3
23
|
export * from './permission.js';
|
|
4
24
|
export * from './events.js';
|
|
5
25
|
export * from './manifest.js';
|
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,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Zod instance these schemas were built with.
|
|
3
|
+
*
|
|
4
|
+
* Import `z` FROM HERE, not from 'zod', whenever you compose a contracts schema
|
|
5
|
+
* into your own — `z.object({ facility: entityRef, unitPrice: money })` is the
|
|
6
|
+
* pattern the engines themselves use, and it is what "parse, don't trust" asks
|
|
7
|
+
* of every operation input.
|
|
8
|
+
*
|
|
9
|
+
* Zod schemas do not compose across copies or majors: the mix fails at RUNTIME
|
|
10
|
+
* with `Invalid element at key "…": expected a Zod schema`, an error that points
|
|
11
|
+
* nowhere near the cause. We are on Zod 4, which is what `pnpm add zod` gives
|
|
12
|
+
* you today — so the trap is currently dormant, not gone. It re-arms the day Zod
|
|
13
|
+
* 5 ships, and it bit us once already (the packages were Zod 3 while the docs
|
|
14
|
+
* told users to install the then-current Zod 4).
|
|
15
|
+
*
|
|
16
|
+
* Importing `z` from here means the consumer never installs zod at all, so the
|
|
17
|
+
* versions cannot diverge no matter what the registry's `latest` becomes.
|
|
18
|
+
*/
|
|
19
|
+
export { z } from 'zod';
|
|
1
20
|
export * from './ids.js';
|
|
2
21
|
export * from './tenancy.js';
|
|
22
|
+
export * from './control-plane.js';
|
|
3
23
|
export * from './permission.js';
|
|
4
24
|
export * from './events.js';
|
|
5
25
|
export * from './manifest.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
|