@substrat-run/contracts 0.2.1 → 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.
@@ -1,257 +1,79 @@
1
1
  import { z } from 'zod';
2
2
  export declare const node: z.ZodObject<{
3
- tenantId: z.ZodBranded<z.ZodString, "TenantId">;
4
- scopeId: z.ZodNullable<z.ZodBranded<z.ZodString, "ScopeId">>;
5
- }, "strip", z.ZodTypeAny, {
6
- tenantId: string & z.BRAND<"TenantId">;
7
- scopeId: (string & z.BRAND<"ScopeId">) | null;
8
- }, {
9
- tenantId: string;
10
- scopeId: string | null;
11
- }>;
3
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
4
+ scopeId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "ScopeId", "out">>;
5
+ }, z.core.$strip>;
12
6
  export type Node = z.infer<typeof node>;
13
7
  export declare const roleKey: z.ZodString;
14
8
  export declare const roleDefinition: z.ZodObject<{
15
9
  key: z.ZodString;
16
- permissions: z.ZodArray<z.ZodBranded<z.ZodString, "PermissionKey">, "many">;
17
- source: z.ZodUnion<[z.ZodBranded<z.ZodString, "ModuleId">, z.ZodLiteral<"vertical">]>;
18
- }, "strip", z.ZodTypeAny, {
19
- key: string;
20
- permissions: (string & z.BRAND<"PermissionKey">)[];
21
- source: (string & z.BRAND<"ModuleId">) | "vertical";
22
- }, {
23
- key: string;
24
- permissions: string[];
25
- source: string;
26
- }>;
10
+ permissions: z.ZodArray<z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">>;
11
+ source: z.ZodUnion<readonly [z.core.$ZodBranded<z.ZodString, "ModuleId", "out">, z.ZodLiteral<"vertical">]>;
12
+ }, z.core.$strip>;
27
13
  export type RoleDefinition = z.infer<typeof roleDefinition>;
28
14
  export declare const roleAssignment: z.ZodObject<{
29
- principalId: z.ZodBranded<z.ZodString, "PrincipalId">;
15
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
30
16
  roleKey: z.ZodString;
31
17
  node: z.ZodObject<{
32
- tenantId: z.ZodBranded<z.ZodString, "TenantId">;
33
- scopeId: z.ZodNullable<z.ZodBranded<z.ZodString, "ScopeId">>;
34
- }, "strip", z.ZodTypeAny, {
35
- tenantId: string & z.BRAND<"TenantId">;
36
- scopeId: (string & z.BRAND<"ScopeId">) | null;
37
- }, {
38
- tenantId: string;
39
- scopeId: string | null;
40
- }>;
41
- }, "strip", z.ZodTypeAny, {
42
- principalId: string & z.BRAND<"PrincipalId">;
43
- roleKey: string;
44
- node: {
45
- tenantId: string & z.BRAND<"TenantId">;
46
- scopeId: (string & z.BRAND<"ScopeId">) | null;
47
- };
48
- }, {
49
- principalId: string;
50
- roleKey: string;
51
- node: {
52
- tenantId: string;
53
- scopeId: string | null;
54
- };
55
- }>;
18
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
19
+ scopeId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "ScopeId", "out">>;
20
+ }, z.core.$strip>;
21
+ }, z.core.$strip>;
56
22
  export type RoleAssignment = z.infer<typeof roleAssignment>;
57
23
  export declare const capabilityGrant: z.ZodObject<{
58
- principalId: z.ZodBranded<z.ZodString, "PrincipalId">;
59
- permission: z.ZodBranded<z.ZodString, "PermissionKey">;
24
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
25
+ permission: z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">;
60
26
  node: z.ZodObject<{
61
- tenantId: z.ZodBranded<z.ZodString, "TenantId">;
62
- scopeId: z.ZodNullable<z.ZodBranded<z.ZodString, "ScopeId">>;
63
- }, "strip", z.ZodTypeAny, {
64
- tenantId: string & z.BRAND<"TenantId">;
65
- scopeId: (string & z.BRAND<"ScopeId">) | null;
66
- }, {
67
- tenantId: string;
68
- scopeId: string | null;
69
- }>;
27
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
28
+ scopeId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "ScopeId", "out">>;
29
+ }, z.core.$strip>;
70
30
  entity: z.ZodOptional<z.ZodObject<{
71
31
  entityType: z.ZodString;
72
32
  entityId: z.ZodString;
73
- }, "strip", z.ZodTypeAny, {
74
- entityType: string;
75
- entityId: string;
76
- }, {
77
- entityType: string;
78
- entityId: string;
79
- }>>;
80
- expiresAt: z.ZodOptional<z.ZodBranded<z.ZodString, "Instant">>;
81
- grantedBy: z.ZodBranded<z.ZodString, "PrincipalId">;
82
- }, "strip", z.ZodTypeAny, {
83
- principalId: string & z.BRAND<"PrincipalId">;
84
- node: {
85
- tenantId: string & z.BRAND<"TenantId">;
86
- scopeId: (string & z.BRAND<"ScopeId">) | null;
87
- };
88
- permission: string & z.BRAND<"PermissionKey">;
89
- grantedBy: string & z.BRAND<"PrincipalId">;
90
- entity?: {
91
- entityType: string;
92
- entityId: string;
93
- } | undefined;
94
- expiresAt?: (string & z.BRAND<"Instant">) | undefined;
95
- }, {
96
- principalId: string;
97
- node: {
98
- tenantId: string;
99
- scopeId: string | null;
100
- };
101
- permission: string;
102
- grantedBy: string;
103
- entity?: {
104
- entityType: string;
105
- entityId: string;
106
- } | undefined;
107
- expiresAt?: string | undefined;
108
- }>;
33
+ }, z.core.$strip>>;
34
+ expiresAt: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "Instant", "out">>;
35
+ grantedBy: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
36
+ }, z.core.$strip>;
109
37
  export type CapabilityGrant = z.infer<typeof capabilityGrant>;
110
- export declare const objectRef: z.ZodBranded<z.ZodString, "ObjectRef">;
38
+ export declare const objectRef: z.core.$ZodBranded<z.ZodString, "ObjectRef", "out">;
111
39
  export type ObjectRef = z.infer<typeof objectRef>;
112
40
  export declare const relationName: z.ZodString;
113
41
  export declare const relationTuple: z.ZodObject<{
114
- subject: z.ZodBranded<z.ZodString, "ObjectRef">;
42
+ subject: z.core.$ZodBranded<z.ZodString, "ObjectRef", "out">;
115
43
  relation: z.ZodString;
116
- object: z.ZodBranded<z.ZodString, "ObjectRef">;
117
- }, "strip", z.ZodTypeAny, {
118
- object: string & z.BRAND<"ObjectRef">;
119
- subject: string & z.BRAND<"ObjectRef">;
120
- relation: string;
121
- }, {
122
- object: string;
123
- subject: string;
124
- relation: string;
125
- }>;
44
+ object: z.core.$ZodBranded<z.ZodString, "ObjectRef", "out">;
45
+ }, z.core.$strip>;
126
46
  export type RelationTuple = z.infer<typeof relationTuple>;
127
- export declare const decision: z.ZodDiscriminatedUnion<"allowed", [z.ZodObject<{
47
+ export declare const decision: z.ZodDiscriminatedUnion<[z.ZodObject<{
128
48
  allowed: z.ZodLiteral<true>;
129
49
  proof: z.ZodArray<z.ZodObject<{
130
- subject: z.ZodBranded<z.ZodString, "ObjectRef">;
50
+ subject: z.core.$ZodBranded<z.ZodString, "ObjectRef", "out">;
131
51
  relation: z.ZodString;
132
- object: z.ZodBranded<z.ZodString, "ObjectRef">;
133
- }, "strip", z.ZodTypeAny, {
134
- object: string & z.BRAND<"ObjectRef">;
135
- subject: string & z.BRAND<"ObjectRef">;
136
- relation: string;
137
- }, {
138
- object: string;
139
- subject: string;
140
- relation: string;
141
- }>, "many">;
142
- }, "strip", z.ZodTypeAny, {
143
- allowed: true;
144
- proof: {
145
- object: string & z.BRAND<"ObjectRef">;
146
- subject: string & z.BRAND<"ObjectRef">;
147
- relation: string;
148
- }[];
149
- }, {
150
- allowed: true;
151
- proof: {
152
- object: string;
153
- subject: string;
154
- relation: string;
155
- }[];
156
- }>, z.ZodObject<{
52
+ object: z.core.$ZodBranded<z.ZodString, "ObjectRef", "out">;
53
+ }, z.core.$strip>>;
54
+ }, z.core.$strip>, z.ZodObject<{
157
55
  allowed: z.ZodLiteral<false>;
158
- checked: z.ZodBranded<z.ZodString, "PermissionKey">;
56
+ checked: z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">;
159
57
  node: z.ZodObject<{
160
- tenantId: z.ZodBranded<z.ZodString, "TenantId">;
161
- scopeId: z.ZodNullable<z.ZodBranded<z.ZodString, "ScopeId">>;
162
- }, "strip", z.ZodTypeAny, {
163
- tenantId: string & z.BRAND<"TenantId">;
164
- scopeId: (string & z.BRAND<"ScopeId">) | null;
165
- }, {
166
- tenantId: string;
167
- scopeId: string | null;
168
- }>;
169
- }, "strip", z.ZodTypeAny, {
170
- node: {
171
- tenantId: string & z.BRAND<"TenantId">;
172
- scopeId: (string & z.BRAND<"ScopeId">) | null;
173
- };
174
- allowed: false;
175
- checked: string & z.BRAND<"PermissionKey">;
176
- }, {
177
- node: {
178
- tenantId: string;
179
- scopeId: string | null;
180
- };
181
- allowed: false;
182
- checked: string;
183
- }>]>;
58
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
59
+ scopeId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "ScopeId", "out">>;
60
+ }, z.core.$strip>;
61
+ }, z.core.$strip>], "allowed">;
184
62
  export type Decision = z.infer<typeof decision>;
185
63
  export declare const effectivePermissions: z.ZodObject<{
186
- principalId: z.ZodBranded<z.ZodString, "PrincipalId">;
64
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
187
65
  node: z.ZodObject<{
188
- tenantId: z.ZodBranded<z.ZodString, "TenantId">;
189
- scopeId: z.ZodNullable<z.ZodBranded<z.ZodString, "ScopeId">>;
190
- }, "strip", z.ZodTypeAny, {
191
- tenantId: string & z.BRAND<"TenantId">;
192
- scopeId: (string & z.BRAND<"ScopeId">) | null;
193
- }, {
194
- tenantId: string;
195
- scopeId: string | null;
196
- }>;
66
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
67
+ scopeId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "ScopeId", "out">>;
68
+ }, z.core.$strip>;
197
69
  permissions: z.ZodArray<z.ZodObject<{
198
- permission: z.ZodBranded<z.ZodString, "PermissionKey">;
70
+ permission: z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">;
199
71
  proof: z.ZodArray<z.ZodObject<{
200
- subject: z.ZodBranded<z.ZodString, "ObjectRef">;
72
+ subject: z.core.$ZodBranded<z.ZodString, "ObjectRef", "out">;
201
73
  relation: z.ZodString;
202
- object: z.ZodBranded<z.ZodString, "ObjectRef">;
203
- }, "strip", z.ZodTypeAny, {
204
- object: string & z.BRAND<"ObjectRef">;
205
- subject: string & z.BRAND<"ObjectRef">;
206
- relation: string;
207
- }, {
208
- object: string;
209
- subject: string;
210
- relation: string;
211
- }>, "many">;
212
- }, "strip", z.ZodTypeAny, {
213
- permission: string & z.BRAND<"PermissionKey">;
214
- proof: {
215
- object: string & z.BRAND<"ObjectRef">;
216
- subject: string & z.BRAND<"ObjectRef">;
217
- relation: string;
218
- }[];
219
- }, {
220
- permission: string;
221
- proof: {
222
- object: string;
223
- subject: string;
224
- relation: string;
225
- }[];
226
- }>, "many">;
227
- }, "strip", z.ZodTypeAny, {
228
- permissions: {
229
- permission: string & z.BRAND<"PermissionKey">;
230
- proof: {
231
- object: string & z.BRAND<"ObjectRef">;
232
- subject: string & z.BRAND<"ObjectRef">;
233
- relation: string;
234
- }[];
235
- }[];
236
- principalId: string & z.BRAND<"PrincipalId">;
237
- node: {
238
- tenantId: string & z.BRAND<"TenantId">;
239
- scopeId: (string & z.BRAND<"ScopeId">) | null;
240
- };
241
- }, {
242
- permissions: {
243
- permission: string;
244
- proof: {
245
- object: string;
246
- subject: string;
247
- relation: string;
248
- }[];
249
- }[];
250
- principalId: string;
251
- node: {
252
- tenantId: string;
253
- scopeId: string | null;
254
- };
255
- }>;
74
+ object: z.core.$ZodBranded<z.ZodString, "ObjectRef", "out">;
75
+ }, z.core.$strip>>;
76
+ }, z.core.$strip>>;
77
+ }, z.core.$strip>;
256
78
  export type EffectivePermissions = z.infer<typeof effectivePermissions>;
257
79
  //# sourceMappingURL=permission.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"permission.d.ts","sourceRoot":"","sources":["../src/permission.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,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C,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
package/dist/tenancy.d.ts CHANGED
@@ -1,84 +1,68 @@
1
1
  import { z } from 'zod';
2
- export declare const tenantStatus: z.ZodEnum<["active", "suspended", "deleting"]>;
2
+ export declare const tenantStatus: z.ZodEnum<{
3
+ active: "active";
4
+ suspended: "suspended";
5
+ deleting: "deleting";
6
+ }>;
3
7
  export type TenantStatus = z.infer<typeof tenantStatus>;
4
8
  export declare const tenant: z.ZodObject<{
5
- id: z.ZodBranded<z.ZodString, "TenantId">;
9
+ id: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
6
10
  slug: z.ZodString;
7
11
  name: z.ZodString;
8
- status: z.ZodEnum<["active", "suspended", "deleting"]>;
9
- createdAt: z.ZodBranded<z.ZodString, "Instant">;
10
- }, "strip", z.ZodTypeAny, {
11
- status: "active" | "suspended" | "deleting";
12
- id: string & z.BRAND<"TenantId">;
13
- slug: string;
14
- name: string;
15
- createdAt: string & z.BRAND<"Instant">;
16
- }, {
17
- status: "active" | "suspended" | "deleting";
18
- id: string;
19
- slug: string;
20
- name: string;
21
- createdAt: string;
22
- }>;
12
+ status: z.ZodEnum<{
13
+ active: "active";
14
+ suspended: "suspended";
15
+ deleting: "deleting";
16
+ }>;
17
+ createdAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
18
+ }, z.core.$strip>;
23
19
  export type Tenant = z.infer<typeof tenant>;
24
- export declare const createTenantInput: z.ZodObject<Pick<{
25
- id: z.ZodBranded<z.ZodString, "TenantId">;
20
+ export declare const createTenantInput: z.ZodObject<{
21
+ id: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
26
22
  slug: z.ZodString;
27
23
  name: z.ZodString;
28
- status: z.ZodEnum<["active", "suspended", "deleting"]>;
29
- createdAt: z.ZodBranded<z.ZodString, "Instant">;
30
- }, "id" | "slug" | "name">, "strip", z.ZodTypeAny, {
31
- id: string & z.BRAND<"TenantId">;
32
- slug: string;
33
- name: string;
34
- }, {
35
- id: string;
36
- slug: string;
37
- name: string;
38
- }>;
24
+ }, z.core.$strip>;
39
25
  export type CreateTenantInput = z.infer<typeof createTenantInput>;
40
- export declare const scopeStatus: z.ZodEnum<["provisioning", "active", "suspended", "archiving", "archived"]>;
26
+ export declare const scopeStatus: z.ZodEnum<{
27
+ active: "active";
28
+ suspended: "suspended";
29
+ provisioning: "provisioning";
30
+ archiving: "archiving";
31
+ archived: "archived";
32
+ }>;
41
33
  export type ScopeStatus = z.infer<typeof scopeStatus>;
42
- export declare const storageShape: z.ZodEnum<["A", "B"]>;
34
+ export declare const storageShape: z.ZodEnum<{
35
+ A: "A";
36
+ B: "B";
37
+ }>;
43
38
  export type StorageShape = z.infer<typeof storageShape>;
44
- export declare const jurisdiction: z.ZodNullable<z.ZodEnum<["eu"]>>;
39
+ export declare const jurisdiction: z.ZodNullable<z.ZodEnum<{
40
+ eu: "eu";
41
+ }>>;
45
42
  export type Jurisdiction = z.infer<typeof jurisdiction>;
46
43
  export declare const scope: z.ZodObject<{
47
- id: z.ZodBranded<z.ZodString, "ScopeId">;
48
- tenantId: z.ZodBranded<z.ZodString, "TenantId">;
49
- parentScopeId: z.ZodNullable<z.ZodBranded<z.ZodString, "ScopeId">>;
44
+ id: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
45
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
46
+ parentScopeId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "ScopeId", "out">>;
50
47
  slug: z.ZodString;
51
48
  kind: z.ZodString;
52
49
  name: z.ZodString;
53
- status: z.ZodEnum<["provisioning", "active", "suspended", "archiving", "archived"]>;
54
- storageShape: z.ZodEnum<["A", "B"]>;
55
- jurisdiction: z.ZodNullable<z.ZodEnum<["eu"]>>;
50
+ status: z.ZodEnum<{
51
+ active: "active";
52
+ suspended: "suspended";
53
+ provisioning: "provisioning";
54
+ archiving: "archiving";
55
+ archived: "archived";
56
+ }>;
57
+ storageShape: z.ZodEnum<{
58
+ A: "A";
59
+ B: "B";
60
+ }>;
61
+ jurisdiction: z.ZodNullable<z.ZodEnum<{
62
+ eu: "eu";
63
+ }>>;
56
64
  schemaVersion: z.ZodString;
57
- createdAt: z.ZodBranded<z.ZodString, "Instant">;
58
- }, "strip", z.ZodTypeAny, {
59
- status: "active" | "suspended" | "provisioning" | "archiving" | "archived";
60
- tenantId: string & z.BRAND<"TenantId">;
61
- id: string & z.BRAND<"ScopeId">;
62
- schemaVersion: string;
63
- slug: string;
64
- name: string;
65
- createdAt: string & z.BRAND<"Instant">;
66
- parentScopeId: (string & z.BRAND<"ScopeId">) | null;
67
- kind: string;
68
- storageShape: "A" | "B";
69
- jurisdiction: "eu" | null;
70
- }, {
71
- status: "active" | "suspended" | "provisioning" | "archiving" | "archived";
72
- tenantId: string;
73
- id: string;
74
- schemaVersion: string;
75
- slug: string;
76
- name: string;
77
- createdAt: string;
78
- parentScopeId: string | null;
79
- kind: string;
80
- storageShape: "A" | "B";
81
- jurisdiction: "eu" | null;
82
- }>;
65
+ createdAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
66
+ }, z.core.$strip>;
83
67
  export type Scope = z.infer<typeof scope>;
84
68
  //# sourceMappingURL=tenancy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tenancy.d.ts","sourceRoot":"","sources":["../src/tenancy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,YAAY,gDAA8C,CAAC;AACxE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;EAMjB,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AAI5C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;EAAoD,CAAC;AACnF,MAAM,MAAM,iBA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C/C,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAGxD,eAAO,MAAM,YAAY;;GAA4B,CAAC;AACtD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;iBAYhB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@substrat-run/contracts",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Substrat kernel contract schemas — Zod is the source of truth (master plan D-22); OAS/JSON Schema are emitted artifacts",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -22,7 +22,7 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "zod": "^3.25.0"
25
+ "zod": "^4.4.3"
26
26
  },
27
27
  "devDependencies": {
28
28
  "typescript": "^5.6.0"