@contractspec/lib.identity-rbac 1.56.1 → 1.58.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.
Files changed (82) hide show
  1. package/dist/browser/contracts/index.js +1045 -0
  2. package/dist/browser/contracts/organization.js +655 -0
  3. package/dist/browser/contracts/rbac.js +599 -0
  4. package/dist/browser/contracts/user.js +235 -0
  5. package/dist/browser/entities/index.js +464 -0
  6. package/dist/browser/entities/organization.js +150 -0
  7. package/dist/browser/entities/rbac.js +124 -0
  8. package/dist/browser/entities/user.js +168 -0
  9. package/dist/browser/events.js +374 -0
  10. package/dist/browser/identity-rbac.capability.js +28 -0
  11. package/dist/browser/identity-rbac.feature.js +67 -0
  12. package/dist/browser/index.js +2099 -0
  13. package/dist/browser/policies/engine.js +154 -0
  14. package/dist/browser/policies/index.js +154 -0
  15. package/dist/contracts/index.d.ts +4 -4
  16. package/dist/contracts/index.d.ts.map +1 -0
  17. package/dist/contracts/index.js +1045 -4
  18. package/dist/contracts/organization.d.ts +758 -764
  19. package/dist/contracts/organization.d.ts.map +1 -1
  20. package/dist/contracts/organization.js +653 -602
  21. package/dist/contracts/rbac.d.ts +517 -523
  22. package/dist/contracts/rbac.d.ts.map +1 -1
  23. package/dist/contracts/rbac.js +597 -481
  24. package/dist/contracts/user.d.ts +513 -519
  25. package/dist/contracts/user.d.ts.map +1 -1
  26. package/dist/contracts/user.js +222 -319
  27. package/dist/entities/index.d.ts +164 -169
  28. package/dist/entities/index.d.ts.map +1 -1
  29. package/dist/entities/index.js +462 -33
  30. package/dist/entities/organization.d.ts +58 -63
  31. package/dist/entities/organization.d.ts.map +1 -1
  32. package/dist/entities/organization.js +145 -145
  33. package/dist/entities/rbac.d.ts +62 -67
  34. package/dist/entities/rbac.d.ts.map +1 -1
  35. package/dist/entities/rbac.js +119 -132
  36. package/dist/entities/user.d.ts +66 -71
  37. package/dist/entities/user.d.ts.map +1 -1
  38. package/dist/entities/user.js +164 -189
  39. package/dist/events.d.ts +537 -543
  40. package/dist/events.d.ts.map +1 -1
  41. package/dist/events.js +343 -651
  42. package/dist/identity-rbac.capability.d.ts +2 -7
  43. package/dist/identity-rbac.capability.d.ts.map +1 -1
  44. package/dist/identity-rbac.capability.js +29 -29
  45. package/dist/identity-rbac.feature.d.ts +1 -7
  46. package/dist/identity-rbac.feature.d.ts.map +1 -1
  47. package/dist/identity-rbac.feature.js +66 -193
  48. package/dist/index.d.ts +6 -12
  49. package/dist/index.d.ts.map +1 -0
  50. package/dist/index.js +2100 -14
  51. package/dist/node/contracts/index.js +1045 -0
  52. package/dist/node/contracts/organization.js +655 -0
  53. package/dist/node/contracts/rbac.js +599 -0
  54. package/dist/node/contracts/user.js +235 -0
  55. package/dist/node/entities/index.js +464 -0
  56. package/dist/node/entities/organization.js +150 -0
  57. package/dist/node/entities/rbac.js +124 -0
  58. package/dist/node/entities/user.js +168 -0
  59. package/dist/node/events.js +374 -0
  60. package/dist/node/identity-rbac.capability.js +28 -0
  61. package/dist/node/identity-rbac.feature.js +67 -0
  62. package/dist/node/index.js +2099 -0
  63. package/dist/node/policies/engine.js +154 -0
  64. package/dist/node/policies/index.js +154 -0
  65. package/dist/policies/engine.d.ts +98 -101
  66. package/dist/policies/engine.d.ts.map +1 -1
  67. package/dist/policies/engine.js +151 -164
  68. package/dist/policies/index.d.ts +2 -2
  69. package/dist/policies/index.d.ts.map +1 -0
  70. package/dist/policies/index.js +154 -2
  71. package/package.json +149 -40
  72. package/dist/contracts/organization.js.map +0 -1
  73. package/dist/contracts/rbac.js.map +0 -1
  74. package/dist/contracts/user.js.map +0 -1
  75. package/dist/entities/index.js.map +0 -1
  76. package/dist/entities/organization.js.map +0 -1
  77. package/dist/entities/rbac.js.map +0 -1
  78. package/dist/entities/user.js.map +0 -1
  79. package/dist/events.js.map +0 -1
  80. package/dist/identity-rbac.capability.js.map +0 -1
  81. package/dist/identity-rbac.feature.js.map +0 -1
  82. package/dist/policies/engine.js.map +0 -1
@@ -1,612 +1,606 @@
1
- import * as _contractspec_lib_schema141 from "@contractspec/lib.schema";
2
- import { SchemaModel } from "@contractspec/lib.schema";
3
- import * as _contractspec_lib_contracts32 from "@contractspec/lib.contracts";
4
-
5
- //#region src/contracts/rbac.d.ts
6
- declare const RoleModel: SchemaModel<{
7
- id: {
8
- type: _contractspec_lib_schema141.FieldType<string, string>;
9
- isOptional: false;
10
- };
11
- name: {
12
- type: _contractspec_lib_schema141.FieldType<string, string>;
13
- isOptional: false;
14
- };
15
- description: {
16
- type: _contractspec_lib_schema141.FieldType<string, string>;
17
- isOptional: true;
18
- };
19
- permissions: {
20
- type: _contractspec_lib_schema141.FieldType<string, string>;
21
- isOptional: false;
22
- isArray: true;
23
- };
24
- createdAt: {
25
- type: _contractspec_lib_schema141.FieldType<Date, string>;
26
- isOptional: false;
27
- };
28
- }>;
29
- declare const PolicyBindingModel: SchemaModel<{
30
- id: {
31
- type: _contractspec_lib_schema141.FieldType<string, string>;
32
- isOptional: false;
33
- };
34
- roleId: {
35
- type: _contractspec_lib_schema141.FieldType<string, string>;
36
- isOptional: false;
37
- };
38
- targetType: {
39
- type: _contractspec_lib_schema141.FieldType<string, string>;
40
- isOptional: false;
41
- };
42
- targetId: {
43
- type: _contractspec_lib_schema141.FieldType<string, string>;
44
- isOptional: false;
45
- };
46
- expiresAt: {
47
- type: _contractspec_lib_schema141.FieldType<Date, string>;
48
- isOptional: true;
49
- };
50
- createdAt: {
51
- type: _contractspec_lib_schema141.FieldType<Date, string>;
52
- isOptional: false;
53
- };
54
- role: {
55
- type: SchemaModel<{
56
- id: {
57
- type: _contractspec_lib_schema141.FieldType<string, string>;
58
- isOptional: false;
59
- };
60
- name: {
61
- type: _contractspec_lib_schema141.FieldType<string, string>;
62
- isOptional: false;
63
- };
64
- description: {
65
- type: _contractspec_lib_schema141.FieldType<string, string>;
1
+ import { SchemaModel } from '@contractspec/lib.schema';
2
+ export declare const RoleModel: SchemaModel<{
3
+ id: {
4
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
5
+ isOptional: false;
6
+ };
7
+ name: {
8
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
9
+ isOptional: false;
10
+ };
11
+ description: {
12
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
66
13
  isOptional: true;
67
- };
68
- permissions: {
69
- type: _contractspec_lib_schema141.FieldType<string, string>;
14
+ };
15
+ permissions: {
16
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
70
17
  isOptional: false;
71
18
  isArray: true;
72
- };
73
- createdAt: {
74
- type: _contractspec_lib_schema141.FieldType<Date, string>;
19
+ };
20
+ createdAt: {
21
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
75
22
  isOptional: false;
76
- };
77
- }>;
78
- isOptional: false;
79
- };
80
- }>;
81
- declare const PermissionCheckResultModel: SchemaModel<{
82
- allowed: {
83
- type: _contractspec_lib_schema141.FieldType<boolean, boolean>;
84
- isOptional: false;
85
- };
86
- reason: {
87
- type: _contractspec_lib_schema141.FieldType<string, string>;
88
- isOptional: true;
89
- };
90
- matchedRole: {
91
- type: _contractspec_lib_schema141.FieldType<string, string>;
92
- isOptional: true;
93
- };
94
- }>;
95
- declare const CreateRoleInputModel: SchemaModel<{
96
- name: {
97
- type: _contractspec_lib_schema141.FieldType<string, string>;
98
- isOptional: false;
99
- };
100
- description: {
101
- type: _contractspec_lib_schema141.FieldType<string, string>;
102
- isOptional: true;
103
- };
104
- permissions: {
105
- type: _contractspec_lib_schema141.FieldType<string, string>;
106
- isOptional: false;
107
- isArray: true;
108
- };
23
+ };
109
24
  }>;
110
- declare const UpdateRoleInputModel: SchemaModel<{
111
- roleId: {
112
- type: _contractspec_lib_schema141.FieldType<string, string>;
113
- isOptional: false;
114
- };
115
- name: {
116
- type: _contractspec_lib_schema141.FieldType<string, string>;
117
- isOptional: true;
118
- };
119
- description: {
120
- type: _contractspec_lib_schema141.FieldType<string, string>;
121
- isOptional: true;
122
- };
123
- permissions: {
124
- type: _contractspec_lib_schema141.FieldType<string, string>;
125
- isOptional: true;
126
- isArray: true;
127
- };
25
+ export declare const PolicyBindingModel: SchemaModel<{
26
+ id: {
27
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
28
+ isOptional: false;
29
+ };
30
+ roleId: {
31
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
32
+ isOptional: false;
33
+ };
34
+ targetType: {
35
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
36
+ isOptional: false;
37
+ };
38
+ targetId: {
39
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
40
+ isOptional: false;
41
+ };
42
+ expiresAt: {
43
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
44
+ isOptional: true;
45
+ };
46
+ createdAt: {
47
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
48
+ isOptional: false;
49
+ };
50
+ role: {
51
+ type: SchemaModel<{
52
+ id: {
53
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
54
+ isOptional: false;
55
+ };
56
+ name: {
57
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
58
+ isOptional: false;
59
+ };
60
+ description: {
61
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
62
+ isOptional: true;
63
+ };
64
+ permissions: {
65
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
66
+ isOptional: false;
67
+ isArray: true;
68
+ };
69
+ createdAt: {
70
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
71
+ isOptional: false;
72
+ };
73
+ }>;
74
+ isOptional: false;
75
+ };
128
76
  }>;
129
- declare const DeleteRoleInputModel: SchemaModel<{
130
- roleId: {
131
- type: _contractspec_lib_schema141.FieldType<string, string>;
132
- isOptional: false;
133
- };
77
+ export declare const PermissionCheckResultModel: SchemaModel<{
78
+ allowed: {
79
+ type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
80
+ isOptional: false;
81
+ };
82
+ reason: {
83
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
84
+ isOptional: true;
85
+ };
86
+ matchedRole: {
87
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
88
+ isOptional: true;
89
+ };
134
90
  }>;
135
- declare const ListRolesOutputModel: SchemaModel<{
136
- roles: {
137
- type: SchemaModel<{
138
- id: {
139
- type: _contractspec_lib_schema141.FieldType<string, string>;
140
- isOptional: false;
141
- };
142
- name: {
143
- type: _contractspec_lib_schema141.FieldType<string, string>;
144
- isOptional: false;
145
- };
146
- description: {
147
- type: _contractspec_lib_schema141.FieldType<string, string>;
91
+ export declare const CreateRoleInputModel: SchemaModel<{
92
+ name: {
93
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
94
+ isOptional: false;
95
+ };
96
+ description: {
97
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
148
98
  isOptional: true;
149
- };
150
- permissions: {
151
- type: _contractspec_lib_schema141.FieldType<string, string>;
99
+ };
100
+ permissions: {
101
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
152
102
  isOptional: false;
153
103
  isArray: true;
154
- };
155
- createdAt: {
156
- type: _contractspec_lib_schema141.FieldType<Date, string>;
104
+ };
105
+ }>;
106
+ export declare const UpdateRoleInputModel: SchemaModel<{
107
+ roleId: {
108
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
157
109
  isOptional: false;
158
- };
159
- }>;
160
- isOptional: false;
161
- isArray: true;
162
- };
110
+ };
111
+ name: {
112
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
113
+ isOptional: true;
114
+ };
115
+ description: {
116
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
117
+ isOptional: true;
118
+ };
119
+ permissions: {
120
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
121
+ isOptional: true;
122
+ isArray: true;
123
+ };
163
124
  }>;
164
- declare const AssignRoleInputModel: SchemaModel<{
165
- roleId: {
166
- type: _contractspec_lib_schema141.FieldType<string, string>;
167
- isOptional: false;
168
- };
169
- targetType: {
170
- type: _contractspec_lib_schema141.FieldType<string, string>;
171
- isOptional: false;
172
- };
173
- targetId: {
174
- type: _contractspec_lib_schema141.FieldType<string, string>;
175
- isOptional: false;
176
- };
177
- expiresAt: {
178
- type: _contractspec_lib_schema141.FieldType<Date, string>;
179
- isOptional: true;
180
- };
125
+ export declare const DeleteRoleInputModel: SchemaModel<{
126
+ roleId: {
127
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
128
+ isOptional: false;
129
+ };
181
130
  }>;
182
- declare const RevokeRoleInputModel: SchemaModel<{
183
- bindingId: {
184
- type: _contractspec_lib_schema141.FieldType<string, string>;
185
- isOptional: false;
186
- };
131
+ export declare const ListRolesOutputModel: SchemaModel<{
132
+ roles: {
133
+ type: SchemaModel<{
134
+ id: {
135
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
136
+ isOptional: false;
137
+ };
138
+ name: {
139
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
140
+ isOptional: false;
141
+ };
142
+ description: {
143
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
144
+ isOptional: true;
145
+ };
146
+ permissions: {
147
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
148
+ isOptional: false;
149
+ isArray: true;
150
+ };
151
+ createdAt: {
152
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
153
+ isOptional: false;
154
+ };
155
+ }>;
156
+ isOptional: false;
157
+ isArray: true;
158
+ };
187
159
  }>;
188
- declare const BindingIdPayloadModel: SchemaModel<{
189
- bindingId: {
190
- type: _contractspec_lib_schema141.FieldType<string, string>;
191
- isOptional: false;
192
- };
160
+ export declare const AssignRoleInputModel: SchemaModel<{
161
+ roleId: {
162
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
163
+ isOptional: false;
164
+ };
165
+ targetType: {
166
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
167
+ isOptional: false;
168
+ };
169
+ targetId: {
170
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
171
+ isOptional: false;
172
+ };
173
+ expiresAt: {
174
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
175
+ isOptional: true;
176
+ };
193
177
  }>;
194
- declare const CheckPermissionInputModel: SchemaModel<{
195
- userId: {
196
- type: _contractspec_lib_schema141.FieldType<string, string>;
197
- isOptional: false;
198
- };
199
- orgId: {
200
- type: _contractspec_lib_schema141.FieldType<string, string>;
201
- isOptional: true;
202
- };
203
- permission: {
204
- type: _contractspec_lib_schema141.FieldType<string, string>;
205
- isOptional: false;
206
- };
178
+ export declare const RevokeRoleInputModel: SchemaModel<{
179
+ bindingId: {
180
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
181
+ isOptional: false;
182
+ };
207
183
  }>;
208
- declare const ListUserPermissionsInputModel: SchemaModel<{
209
- userId: {
210
- type: _contractspec_lib_schema141.FieldType<string, string>;
211
- isOptional: false;
212
- };
213
- orgId: {
214
- type: _contractspec_lib_schema141.FieldType<string, string>;
215
- isOptional: true;
216
- };
184
+ export declare const BindingIdPayloadModel: SchemaModel<{
185
+ bindingId: {
186
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
187
+ isOptional: false;
188
+ };
217
189
  }>;
218
- declare const ListUserPermissionsOutputModel: SchemaModel<{
219
- permissions: {
220
- type: _contractspec_lib_schema141.FieldType<string, string>;
221
- isOptional: false;
222
- isArray: true;
223
- };
224
- roles: {
225
- type: SchemaModel<{
226
- id: {
227
- type: _contractspec_lib_schema141.FieldType<string, string>;
228
- isOptional: false;
229
- };
230
- name: {
231
- type: _contractspec_lib_schema141.FieldType<string, string>;
232
- isOptional: false;
233
- };
234
- description: {
235
- type: _contractspec_lib_schema141.FieldType<string, string>;
190
+ export declare const CheckPermissionInputModel: SchemaModel<{
191
+ userId: {
192
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
193
+ isOptional: false;
194
+ };
195
+ orgId: {
196
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
236
197
  isOptional: true;
237
- };
238
- permissions: {
239
- type: _contractspec_lib_schema141.FieldType<string, string>;
198
+ };
199
+ permission: {
200
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
201
+ isOptional: false;
202
+ };
203
+ }>;
204
+ export declare const ListUserPermissionsInputModel: SchemaModel<{
205
+ userId: {
206
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
207
+ isOptional: false;
208
+ };
209
+ orgId: {
210
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
211
+ isOptional: true;
212
+ };
213
+ }>;
214
+ export declare const ListUserPermissionsOutputModel: SchemaModel<{
215
+ permissions: {
216
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
240
217
  isOptional: false;
241
218
  isArray: true;
242
- };
243
- createdAt: {
244
- type: _contractspec_lib_schema141.FieldType<Date, string>;
219
+ };
220
+ roles: {
221
+ type: SchemaModel<{
222
+ id: {
223
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
224
+ isOptional: false;
225
+ };
226
+ name: {
227
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
228
+ isOptional: false;
229
+ };
230
+ description: {
231
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
232
+ isOptional: true;
233
+ };
234
+ permissions: {
235
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
236
+ isOptional: false;
237
+ isArray: true;
238
+ };
239
+ createdAt: {
240
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
241
+ isOptional: false;
242
+ };
243
+ }>;
245
244
  isOptional: false;
246
- };
247
- }>;
248
- isOptional: false;
249
- isArray: true;
250
- };
245
+ isArray: true;
246
+ };
251
247
  }>;
252
248
  /**
253
249
  * Create a new role.
254
250
  */
255
- declare const CreateRoleContract: _contractspec_lib_contracts32.OperationSpec<SchemaModel<{
256
- name: {
257
- type: _contractspec_lib_schema141.FieldType<string, string>;
258
- isOptional: false;
259
- };
260
- description: {
261
- type: _contractspec_lib_schema141.FieldType<string, string>;
262
- isOptional: true;
263
- };
264
- permissions: {
265
- type: _contractspec_lib_schema141.FieldType<string, string>;
266
- isOptional: false;
267
- isArray: true;
268
- };
251
+ export declare const CreateRoleContract: import("@contractspec/lib.contracts").OperationSpec<SchemaModel<{
252
+ name: {
253
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
254
+ isOptional: false;
255
+ };
256
+ description: {
257
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
258
+ isOptional: true;
259
+ };
260
+ permissions: {
261
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
262
+ isOptional: false;
263
+ isArray: true;
264
+ };
269
265
  }>, SchemaModel<{
270
- id: {
271
- type: _contractspec_lib_schema141.FieldType<string, string>;
272
- isOptional: false;
273
- };
274
- name: {
275
- type: _contractspec_lib_schema141.FieldType<string, string>;
276
- isOptional: false;
277
- };
278
- description: {
279
- type: _contractspec_lib_schema141.FieldType<string, string>;
280
- isOptional: true;
281
- };
282
- permissions: {
283
- type: _contractspec_lib_schema141.FieldType<string, string>;
284
- isOptional: false;
285
- isArray: true;
286
- };
287
- createdAt: {
288
- type: _contractspec_lib_schema141.FieldType<Date, string>;
289
- isOptional: false;
290
- };
266
+ id: {
267
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
268
+ isOptional: false;
269
+ };
270
+ name: {
271
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
272
+ isOptional: false;
273
+ };
274
+ description: {
275
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
276
+ isOptional: true;
277
+ };
278
+ permissions: {
279
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
280
+ isOptional: false;
281
+ isArray: true;
282
+ };
283
+ createdAt: {
284
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
285
+ isOptional: false;
286
+ };
291
287
  }>, undefined>;
292
288
  /**
293
289
  * Update a role.
294
290
  */
295
- declare const UpdateRoleContract: _contractspec_lib_contracts32.OperationSpec<SchemaModel<{
296
- roleId: {
297
- type: _contractspec_lib_schema141.FieldType<string, string>;
298
- isOptional: false;
299
- };
300
- name: {
301
- type: _contractspec_lib_schema141.FieldType<string, string>;
302
- isOptional: true;
303
- };
304
- description: {
305
- type: _contractspec_lib_schema141.FieldType<string, string>;
306
- isOptional: true;
307
- };
308
- permissions: {
309
- type: _contractspec_lib_schema141.FieldType<string, string>;
310
- isOptional: true;
311
- isArray: true;
312
- };
291
+ export declare const UpdateRoleContract: import("@contractspec/lib.contracts").OperationSpec<SchemaModel<{
292
+ roleId: {
293
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
294
+ isOptional: false;
295
+ };
296
+ name: {
297
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
298
+ isOptional: true;
299
+ };
300
+ description: {
301
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
302
+ isOptional: true;
303
+ };
304
+ permissions: {
305
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
306
+ isOptional: true;
307
+ isArray: true;
308
+ };
313
309
  }>, SchemaModel<{
314
- id: {
315
- type: _contractspec_lib_schema141.FieldType<string, string>;
316
- isOptional: false;
317
- };
318
- name: {
319
- type: _contractspec_lib_schema141.FieldType<string, string>;
320
- isOptional: false;
321
- };
322
- description: {
323
- type: _contractspec_lib_schema141.FieldType<string, string>;
324
- isOptional: true;
325
- };
326
- permissions: {
327
- type: _contractspec_lib_schema141.FieldType<string, string>;
328
- isOptional: false;
329
- isArray: true;
330
- };
331
- createdAt: {
332
- type: _contractspec_lib_schema141.FieldType<Date, string>;
333
- isOptional: false;
334
- };
310
+ id: {
311
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
312
+ isOptional: false;
313
+ };
314
+ name: {
315
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
316
+ isOptional: false;
317
+ };
318
+ description: {
319
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
320
+ isOptional: true;
321
+ };
322
+ permissions: {
323
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
324
+ isOptional: false;
325
+ isArray: true;
326
+ };
327
+ createdAt: {
328
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
329
+ isOptional: false;
330
+ };
335
331
  }>, undefined>;
336
332
  /**
337
333
  * Delete a role.
338
334
  */
339
- declare const DeleteRoleContract: _contractspec_lib_contracts32.OperationSpec<SchemaModel<{
340
- roleId: {
341
- type: _contractspec_lib_schema141.FieldType<string, string>;
342
- isOptional: false;
343
- };
335
+ export declare const DeleteRoleContract: import("@contractspec/lib.contracts").OperationSpec<SchemaModel<{
336
+ roleId: {
337
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
338
+ isOptional: false;
339
+ };
344
340
  }>, SchemaModel<{
345
- success: {
346
- type: _contractspec_lib_schema141.FieldType<boolean, boolean>;
347
- isOptional: false;
348
- };
341
+ success: {
342
+ type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
343
+ isOptional: false;
344
+ };
349
345
  }>, undefined>;
350
346
  /**
351
347
  * List all roles.
352
348
  */
353
- declare const ListRolesContract: _contractspec_lib_contracts32.OperationSpec<_contractspec_lib_schema141.AnySchemaModel, SchemaModel<{
354
- roles: {
355
- type: SchemaModel<{
356
- id: {
357
- type: _contractspec_lib_schema141.FieldType<string, string>;
358
- isOptional: false;
359
- };
360
- name: {
361
- type: _contractspec_lib_schema141.FieldType<string, string>;
362
- isOptional: false;
363
- };
364
- description: {
365
- type: _contractspec_lib_schema141.FieldType<string, string>;
366
- isOptional: true;
367
- };
368
- permissions: {
369
- type: _contractspec_lib_schema141.FieldType<string, string>;
349
+ export declare const ListRolesContract: import("@contractspec/lib.contracts").OperationSpec<import("@contractspec/lib.schema").AnySchemaModel, SchemaModel<{
350
+ roles: {
351
+ type: SchemaModel<{
352
+ id: {
353
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
354
+ isOptional: false;
355
+ };
356
+ name: {
357
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
358
+ isOptional: false;
359
+ };
360
+ description: {
361
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
362
+ isOptional: true;
363
+ };
364
+ permissions: {
365
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
366
+ isOptional: false;
367
+ isArray: true;
368
+ };
369
+ createdAt: {
370
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
371
+ isOptional: false;
372
+ };
373
+ }>;
370
374
  isOptional: false;
371
375
  isArray: true;
372
- };
373
- createdAt: {
374
- type: _contractspec_lib_schema141.FieldType<Date, string>;
375
- isOptional: false;
376
- };
377
- }>;
378
- isOptional: false;
379
- isArray: true;
380
- };
376
+ };
381
377
  }>, undefined>;
382
378
  /**
383
379
  * Assign a role to a user or organization.
384
380
  */
385
- declare const AssignRoleContract: _contractspec_lib_contracts32.OperationSpec<SchemaModel<{
386
- roleId: {
387
- type: _contractspec_lib_schema141.FieldType<string, string>;
388
- isOptional: false;
389
- };
390
- targetType: {
391
- type: _contractspec_lib_schema141.FieldType<string, string>;
392
- isOptional: false;
393
- };
394
- targetId: {
395
- type: _contractspec_lib_schema141.FieldType<string, string>;
396
- isOptional: false;
397
- };
398
- expiresAt: {
399
- type: _contractspec_lib_schema141.FieldType<Date, string>;
400
- isOptional: true;
401
- };
402
- }>, SchemaModel<{
403
- id: {
404
- type: _contractspec_lib_schema141.FieldType<string, string>;
405
- isOptional: false;
406
- };
407
- roleId: {
408
- type: _contractspec_lib_schema141.FieldType<string, string>;
409
- isOptional: false;
410
- };
411
- targetType: {
412
- type: _contractspec_lib_schema141.FieldType<string, string>;
413
- isOptional: false;
414
- };
415
- targetId: {
416
- type: _contractspec_lib_schema141.FieldType<string, string>;
417
- isOptional: false;
418
- };
419
- expiresAt: {
420
- type: _contractspec_lib_schema141.FieldType<Date, string>;
421
- isOptional: true;
422
- };
423
- createdAt: {
424
- type: _contractspec_lib_schema141.FieldType<Date, string>;
425
- isOptional: false;
426
- };
427
- role: {
428
- type: SchemaModel<{
429
- id: {
430
- type: _contractspec_lib_schema141.FieldType<string, string>;
431
- isOptional: false;
432
- };
433
- name: {
434
- type: _contractspec_lib_schema141.FieldType<string, string>;
435
- isOptional: false;
436
- };
437
- description: {
438
- type: _contractspec_lib_schema141.FieldType<string, string>;
439
- isOptional: true;
440
- };
441
- permissions: {
442
- type: _contractspec_lib_schema141.FieldType<string, string>;
381
+ export declare const AssignRoleContract: import("@contractspec/lib.contracts").OperationSpec<SchemaModel<{
382
+ roleId: {
383
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
443
384
  isOptional: false;
444
- isArray: true;
445
- };
446
- createdAt: {
447
- type: _contractspec_lib_schema141.FieldType<Date, string>;
385
+ };
386
+ targetType: {
387
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
448
388
  isOptional: false;
449
- };
450
- }>;
451
- isOptional: false;
452
- };
453
- }>, {
454
- key: string;
455
- version: string;
456
- when: string;
457
- payload: SchemaModel<{
389
+ };
390
+ targetId: {
391
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
392
+ isOptional: false;
393
+ };
394
+ expiresAt: {
395
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
396
+ isOptional: true;
397
+ };
398
+ }>, SchemaModel<{
458
399
  id: {
459
- type: _contractspec_lib_schema141.FieldType<string, string>;
460
- isOptional: false;
400
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
401
+ isOptional: false;
461
402
  };
462
403
  roleId: {
463
- type: _contractspec_lib_schema141.FieldType<string, string>;
464
- isOptional: false;
404
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
405
+ isOptional: false;
465
406
  };
466
407
  targetType: {
467
- type: _contractspec_lib_schema141.FieldType<string, string>;
468
- isOptional: false;
408
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
409
+ isOptional: false;
469
410
  };
470
411
  targetId: {
471
- type: _contractspec_lib_schema141.FieldType<string, string>;
472
- isOptional: false;
412
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
413
+ isOptional: false;
473
414
  };
474
415
  expiresAt: {
475
- type: _contractspec_lib_schema141.FieldType<Date, string>;
476
- isOptional: true;
416
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
417
+ isOptional: true;
477
418
  };
478
419
  createdAt: {
479
- type: _contractspec_lib_schema141.FieldType<Date, string>;
480
- isOptional: false;
420
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
421
+ isOptional: false;
481
422
  };
482
423
  role: {
483
- type: SchemaModel<{
424
+ type: SchemaModel<{
425
+ id: {
426
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
427
+ isOptional: false;
428
+ };
429
+ name: {
430
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
431
+ isOptional: false;
432
+ };
433
+ description: {
434
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
435
+ isOptional: true;
436
+ };
437
+ permissions: {
438
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
439
+ isOptional: false;
440
+ isArray: true;
441
+ };
442
+ createdAt: {
443
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
444
+ isOptional: false;
445
+ };
446
+ }>;
447
+ isOptional: false;
448
+ };
449
+ }>, {
450
+ key: string;
451
+ version: string;
452
+ when: string;
453
+ payload: SchemaModel<{
484
454
  id: {
485
- type: _contractspec_lib_schema141.FieldType<string, string>;
486
- isOptional: false;
455
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
456
+ isOptional: false;
487
457
  };
488
- name: {
489
- type: _contractspec_lib_schema141.FieldType<string, string>;
490
- isOptional: false;
458
+ roleId: {
459
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
460
+ isOptional: false;
491
461
  };
492
- description: {
493
- type: _contractspec_lib_schema141.FieldType<string, string>;
494
- isOptional: true;
462
+ targetType: {
463
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
464
+ isOptional: false;
495
465
  };
496
- permissions: {
497
- type: _contractspec_lib_schema141.FieldType<string, string>;
498
- isOptional: false;
499
- isArray: true;
466
+ targetId: {
467
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
468
+ isOptional: false;
469
+ };
470
+ expiresAt: {
471
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
472
+ isOptional: true;
500
473
  };
501
474
  createdAt: {
502
- type: _contractspec_lib_schema141.FieldType<Date, string>;
503
- isOptional: false;
475
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
476
+ isOptional: false;
504
477
  };
505
- }>;
506
- isOptional: false;
507
- };
508
- }>;
478
+ role: {
479
+ type: SchemaModel<{
480
+ id: {
481
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
482
+ isOptional: false;
483
+ };
484
+ name: {
485
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
486
+ isOptional: false;
487
+ };
488
+ description: {
489
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
490
+ isOptional: true;
491
+ };
492
+ permissions: {
493
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
494
+ isOptional: false;
495
+ isArray: true;
496
+ };
497
+ createdAt: {
498
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
499
+ isOptional: false;
500
+ };
501
+ }>;
502
+ isOptional: false;
503
+ };
504
+ }>;
509
505
  }[]>;
510
506
  /**
511
507
  * Revoke a role from a user or organization.
512
508
  */
513
- declare const RevokeRoleContract: _contractspec_lib_contracts32.OperationSpec<SchemaModel<{
514
- bindingId: {
515
- type: _contractspec_lib_schema141.FieldType<string, string>;
516
- isOptional: false;
517
- };
518
- }>, SchemaModel<{
519
- success: {
520
- type: _contractspec_lib_schema141.FieldType<boolean, boolean>;
521
- isOptional: false;
522
- };
523
- }>, {
524
- key: string;
525
- version: string;
526
- when: string;
527
- payload: SchemaModel<{
509
+ export declare const RevokeRoleContract: import("@contractspec/lib.contracts").OperationSpec<SchemaModel<{
528
510
  bindingId: {
529
- type: _contractspec_lib_schema141.FieldType<string, string>;
530
- isOptional: false;
511
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
512
+ isOptional: false;
531
513
  };
532
- }>;
514
+ }>, SchemaModel<{
515
+ success: {
516
+ type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
517
+ isOptional: false;
518
+ };
519
+ }>, {
520
+ key: string;
521
+ version: string;
522
+ when: string;
523
+ payload: SchemaModel<{
524
+ bindingId: {
525
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
526
+ isOptional: false;
527
+ };
528
+ }>;
533
529
  }[]>;
534
530
  /**
535
531
  * Check if a user has a specific permission.
536
532
  */
537
- declare const CheckPermissionContract: _contractspec_lib_contracts32.OperationSpec<SchemaModel<{
538
- userId: {
539
- type: _contractspec_lib_schema141.FieldType<string, string>;
540
- isOptional: false;
541
- };
542
- orgId: {
543
- type: _contractspec_lib_schema141.FieldType<string, string>;
544
- isOptional: true;
545
- };
546
- permission: {
547
- type: _contractspec_lib_schema141.FieldType<string, string>;
548
- isOptional: false;
549
- };
533
+ export declare const CheckPermissionContract: import("@contractspec/lib.contracts").OperationSpec<SchemaModel<{
534
+ userId: {
535
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
536
+ isOptional: false;
537
+ };
538
+ orgId: {
539
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
540
+ isOptional: true;
541
+ };
542
+ permission: {
543
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
544
+ isOptional: false;
545
+ };
550
546
  }>, SchemaModel<{
551
- allowed: {
552
- type: _contractspec_lib_schema141.FieldType<boolean, boolean>;
553
- isOptional: false;
554
- };
555
- reason: {
556
- type: _contractspec_lib_schema141.FieldType<string, string>;
557
- isOptional: true;
558
- };
559
- matchedRole: {
560
- type: _contractspec_lib_schema141.FieldType<string, string>;
561
- isOptional: true;
562
- };
547
+ allowed: {
548
+ type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
549
+ isOptional: false;
550
+ };
551
+ reason: {
552
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
553
+ isOptional: true;
554
+ };
555
+ matchedRole: {
556
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
557
+ isOptional: true;
558
+ };
563
559
  }>, undefined>;
564
560
  /**
565
561
  * List permissions for a user.
566
562
  */
567
- declare const ListUserPermissionsContract: _contractspec_lib_contracts32.OperationSpec<SchemaModel<{
568
- userId: {
569
- type: _contractspec_lib_schema141.FieldType<string, string>;
570
- isOptional: false;
571
- };
572
- orgId: {
573
- type: _contractspec_lib_schema141.FieldType<string, string>;
574
- isOptional: true;
575
- };
576
- }>, SchemaModel<{
577
- permissions: {
578
- type: _contractspec_lib_schema141.FieldType<string, string>;
579
- isOptional: false;
580
- isArray: true;
581
- };
582
- roles: {
583
- type: SchemaModel<{
584
- id: {
585
- type: _contractspec_lib_schema141.FieldType<string, string>;
586
- isOptional: false;
587
- };
588
- name: {
589
- type: _contractspec_lib_schema141.FieldType<string, string>;
590
- isOptional: false;
591
- };
592
- description: {
593
- type: _contractspec_lib_schema141.FieldType<string, string>;
563
+ export declare const ListUserPermissionsContract: import("@contractspec/lib.contracts").OperationSpec<SchemaModel<{
564
+ userId: {
565
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
566
+ isOptional: false;
567
+ };
568
+ orgId: {
569
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
594
570
  isOptional: true;
595
- };
596
- permissions: {
597
- type: _contractspec_lib_schema141.FieldType<string, string>;
571
+ };
572
+ }>, SchemaModel<{
573
+ permissions: {
574
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
598
575
  isOptional: false;
599
576
  isArray: true;
600
- };
601
- createdAt: {
602
- type: _contractspec_lib_schema141.FieldType<Date, string>;
577
+ };
578
+ roles: {
579
+ type: SchemaModel<{
580
+ id: {
581
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
582
+ isOptional: false;
583
+ };
584
+ name: {
585
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
586
+ isOptional: false;
587
+ };
588
+ description: {
589
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
590
+ isOptional: true;
591
+ };
592
+ permissions: {
593
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
594
+ isOptional: false;
595
+ isArray: true;
596
+ };
597
+ createdAt: {
598
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
599
+ isOptional: false;
600
+ };
601
+ }>;
603
602
  isOptional: false;
604
- };
605
- }>;
606
- isOptional: false;
607
- isArray: true;
608
- };
603
+ isArray: true;
604
+ };
609
605
  }>, undefined>;
610
- //#endregion
611
- export { AssignRoleContract, AssignRoleInputModel, BindingIdPayloadModel, CheckPermissionContract, CheckPermissionInputModel, CreateRoleContract, CreateRoleInputModel, DeleteRoleContract, DeleteRoleInputModel, ListRolesContract, ListRolesOutputModel, ListUserPermissionsContract, ListUserPermissionsInputModel, ListUserPermissionsOutputModel, PermissionCheckResultModel, PolicyBindingModel, RevokeRoleContract, RevokeRoleInputModel, RoleModel, UpdateRoleContract, UpdateRoleInputModel };
612
606
  //# sourceMappingURL=rbac.d.ts.map