@lssm/lib.identity-rbac 0.0.0-canary-20251217083314 → 1.41.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/dist/contracts/index.js +1 -5
- package/dist/contracts/organization.js +1 -607
- package/dist/contracts/rbac.js +1 -487
- package/dist/contracts/user.js +1 -335
- package/dist/entities/index.js +1 -35
- package/dist/entities/organization.js +1 -151
- package/dist/entities/rbac.js +1 -138
- package/dist/entities/user.js +1 -194
- package/dist/events.js +1 -543
- package/dist/identity-rbac.feature.js +1 -186
- package/dist/index.js +1 -14
- package/dist/policies/engine.js +1 -167
- package/dist/policies/index.js +1 -3
- package/package.json +18 -19
- package/dist/contracts/dist/capabilities/openbanking.js +0 -88
- package/dist/contracts/dist/client/index.js +0 -5
- package/dist/contracts/dist/client/react/feature-render.js +0 -2
- package/dist/contracts/dist/client/react/form-render.js +0 -4
- package/dist/contracts/dist/client/react/index.js +0 -4
- package/dist/contracts/dist/contract-registry/index.js +0 -1
- package/dist/contracts/dist/contract-registry/schemas.js +0 -60
- package/dist/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
- package/dist/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -16
- package/dist/contracts/dist/docs/index.js +0 -29
- package/dist/contracts/dist/docs/presentations.js +0 -71
- package/dist/contracts/dist/docs/registry.js +0 -44
- package/dist/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
- package/dist/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
- package/dist/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
- package/dist/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
- package/dist/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
- package/dist/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +0 -80
- package/dist/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +0 -57
- package/dist/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -16
- package/dist/contracts/dist/docs/tech/llm/llm-integration.docblock.js +0 -357
- package/dist/contracts/dist/docs/tech/mcp-endpoints.docblock.js +0 -37
- package/dist/contracts/dist/docs/tech/presentation-runtime.docblock.js +0 -16
- package/dist/contracts/dist/docs/tech/schema/README.docblock.js +0 -20
- package/dist/contracts/dist/docs/tech/studio/learning-events.docblock.js +0 -48
- package/dist/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +0 -79
- package/dist/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +0 -84
- package/dist/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +0 -45
- package/dist/contracts/dist/docs/tech/studio/project-routing.docblock.js +0 -67
- package/dist/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -40
- package/dist/contracts/dist/docs/tech/studio/team-invitations.docblock.js +0 -69
- package/dist/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +0 -47
- package/dist/contracts/dist/docs/tech/studio/workspaces.docblock.js +0 -62
- package/dist/contracts/dist/docs/tech/telemetry-ingest.docblock.js +0 -155
- package/dist/contracts/dist/docs/tech/templates/runtime.docblock.js +0 -20
- package/dist/contracts/dist/docs/tech/vscode-extension.docblock.js +0 -101
- package/dist/contracts/dist/docs/tech/workflows/overview.docblock.js +0 -20
- package/dist/contracts/dist/events.js +0 -10
- package/dist/contracts/dist/experiments/evaluator.js +0 -1
- package/dist/contracts/dist/index.js +0 -71
- package/dist/contracts/dist/install.js +0 -2
- package/dist/contracts/dist/integrations/contracts.js +0 -377
- package/dist/contracts/dist/integrations/index.js +0 -18
- package/dist/contracts/dist/integrations/openbanking/contracts/accounts.js +0 -228
- package/dist/contracts/dist/integrations/openbanking/contracts/balances.js +0 -159
- package/dist/contracts/dist/integrations/openbanking/contracts/index.js +0 -3
- package/dist/contracts/dist/integrations/openbanking/contracts/transactions.js +0 -210
- package/dist/contracts/dist/integrations/openbanking/models.js +0 -242
- package/dist/contracts/dist/integrations/openbanking/telemetry.js +0 -13
- package/dist/contracts/dist/integrations/providers/elevenlabs.js +0 -52
- package/dist/contracts/dist/integrations/providers/gcs-storage.js +0 -75
- package/dist/contracts/dist/integrations/providers/gmail.js +0 -87
- package/dist/contracts/dist/integrations/providers/google-calendar.js +0 -66
- package/dist/contracts/dist/integrations/providers/index.js +0 -11
- package/dist/contracts/dist/integrations/providers/mistral.js +0 -68
- package/dist/contracts/dist/integrations/providers/postmark.js +0 -68
- package/dist/contracts/dist/integrations/providers/powens.js +0 -116
- package/dist/contracts/dist/integrations/providers/qdrant.js +0 -73
- package/dist/contracts/dist/integrations/providers/registry.js +0 -10
- package/dist/contracts/dist/integrations/providers/stripe.js +0 -83
- package/dist/contracts/dist/integrations/providers/twilio-sms.js +0 -61
- package/dist/contracts/dist/jsonschema.js +0 -1
- package/dist/contracts/dist/knowledge/contracts.js +0 -306
- package/dist/contracts/dist/knowledge/index.js +0 -7
- package/dist/contracts/dist/knowledge/spaces/email-threads.js +0 -34
- package/dist/contracts/dist/knowledge/spaces/financial-docs.js +0 -34
- package/dist/contracts/dist/knowledge/spaces/financial-overview.js +0 -38
- package/dist/contracts/dist/knowledge/spaces/index.js +0 -6
- package/dist/contracts/dist/knowledge/spaces/product-canon.js +0 -34
- package/dist/contracts/dist/knowledge/spaces/support-faq.js +0 -37
- package/dist/contracts/dist/knowledge/spaces/uploaded-docs.js +0 -34
- package/dist/contracts/dist/llm/exporters.js +0 -19
- package/dist/contracts/dist/llm/index.js +0 -2
- package/dist/contracts/dist/llm/prompts.js +0 -1
- package/dist/contracts/dist/onboarding-base.js +0 -196
- package/dist/contracts/dist/openapi.js +0 -1
- package/dist/contracts/dist/ownership.js +0 -21
- package/dist/contracts/dist/presentations.js +0 -1
- package/dist/contracts/dist/presentations.v2.js +0 -11
- package/dist/contracts/dist/prompt.js +0 -1
- package/dist/contracts/dist/promptRegistry.js +0 -1
- package/dist/contracts/dist/regenerator/index.js +0 -1
- package/dist/contracts/dist/regenerator/service.js +0 -6
- package/dist/contracts/dist/registry.js +0 -2
- package/dist/contracts/dist/resources.js +0 -1
- package/dist/contracts/dist/schema/dist/EnumType.js +0 -2
- package/dist/contracts/dist/schema/dist/FieldType.js +0 -49
- package/dist/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -236
- package/dist/contracts/dist/schema/dist/SchemaModel.js +0 -34
- package/dist/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
- package/dist/contracts/dist/schema/dist/entity/index.js +0 -2
- package/dist/contracts/dist/schema/dist/entity/types.js +0 -1
- package/dist/contracts/dist/schema/dist/index.js +0 -6
- package/dist/contracts/dist/server/graphql-pothos.js +0 -6
- package/dist/contracts/dist/server/index.js +0 -8
- package/dist/contracts/dist/server/mcp/createMcpServer.js +0 -4
- package/dist/contracts/dist/server/mcp/registerPresentations.js +0 -2
- package/dist/contracts/dist/server/mcp/registerPrompts.js +0 -1
- package/dist/contracts/dist/server/mcp/registerResources.js +0 -2
- package/dist/contracts/dist/server/mcp/registerTools.js +0 -1
- package/dist/contracts/dist/server/provider-mcp.js +0 -1
- package/dist/contracts/dist/server/rest-elysia.js +0 -1
- package/dist/contracts/dist/server/rest-express.js +0 -1
- package/dist/contracts/dist/server/rest-generic.js +0 -1
- package/dist/contracts/dist/server/rest-next-app.js +0 -1
- package/dist/contracts/dist/server/rest-next-pages.js +0 -1
- package/dist/contracts/dist/spec.js +0 -34
- package/dist/contracts/dist/telemetry/index.js +0 -1
- package/dist/contracts/dist/telemetry/tracker.js +0 -1
- package/dist/contracts/dist/tests/index.js +0 -1
- package/dist/contracts/dist/tests/runner.js +0 -2
- package/dist/contracts/dist/workflow/index.js +0 -1
- package/dist/contracts/dist/workflow/runner.js +0 -1
- package/dist/contracts/index.d.ts +0 -4
- package/dist/contracts/organization.d.ts +0 -895
- package/dist/contracts/rbac.d.ts +0 -611
- package/dist/contracts/user.d.ts +0 -610
- package/dist/entities/index.d.ts +0 -176
- package/dist/entities/organization.d.ts +0 -86
- package/dist/entities/rbac.d.ts +0 -87
- package/dist/entities/user.d.ts +0 -87
- package/dist/events.d.ts +0 -689
- package/dist/identity-rbac.feature.d.ts +0 -11
- package/dist/index.d.ts +0 -11
- package/dist/policies/engine.d.ts +0 -132
- package/dist/policies/index.d.ts +0 -2
- package/dist/schema/dist/EnumType.js +0 -2
- package/dist/schema/dist/FieldType.js +0 -49
- package/dist/schema/dist/ScalarTypeEnum.js +0 -236
- package/dist/schema/dist/SchemaModel.js +0 -34
- package/dist/schema/dist/entity/defineEntity.js +0 -236
- package/dist/schema/dist/entity/index.js +0 -2
- package/dist/schema/dist/entity/types.js +0 -1
- package/dist/schema/dist/index.js +0 -6
package/dist/events.js
CHANGED
|
@@ -1,543 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SchemaModel } from "./schema/dist/SchemaModel.js";
|
|
3
|
-
import "./schema/dist/index.js";
|
|
4
|
-
import { defineEvent } from "./contracts/dist/events.js";
|
|
5
|
-
import "./contracts/dist/index.js";
|
|
6
|
-
|
|
7
|
-
//#region src/events.ts
|
|
8
|
-
const UserCreatedPayload = new SchemaModel({
|
|
9
|
-
name: "UserCreatedPayload",
|
|
10
|
-
description: "Payload for user created event",
|
|
11
|
-
fields: {
|
|
12
|
-
userId: {
|
|
13
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
14
|
-
isOptional: false
|
|
15
|
-
},
|
|
16
|
-
email: {
|
|
17
|
-
type: ScalarTypeEnum.EmailAddress(),
|
|
18
|
-
isOptional: false
|
|
19
|
-
},
|
|
20
|
-
name: {
|
|
21
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
22
|
-
isOptional: true
|
|
23
|
-
},
|
|
24
|
-
createdAt: {
|
|
25
|
-
type: ScalarTypeEnum.DateTime(),
|
|
26
|
-
isOptional: false
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
const UserUpdatedPayload = new SchemaModel({
|
|
31
|
-
name: "UserUpdatedPayload",
|
|
32
|
-
description: "Payload for user updated event",
|
|
33
|
-
fields: {
|
|
34
|
-
userId: {
|
|
35
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
36
|
-
isOptional: false
|
|
37
|
-
},
|
|
38
|
-
updatedFields: {
|
|
39
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
40
|
-
isOptional: false,
|
|
41
|
-
isArray: true
|
|
42
|
-
},
|
|
43
|
-
updatedAt: {
|
|
44
|
-
type: ScalarTypeEnum.DateTime(),
|
|
45
|
-
isOptional: false
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
const UserDeletedPayload = new SchemaModel({
|
|
50
|
-
name: "UserDeletedPayload",
|
|
51
|
-
description: "Payload for user deleted event",
|
|
52
|
-
fields: {
|
|
53
|
-
userId: {
|
|
54
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
55
|
-
isOptional: false
|
|
56
|
-
},
|
|
57
|
-
email: {
|
|
58
|
-
type: ScalarTypeEnum.EmailAddress(),
|
|
59
|
-
isOptional: false
|
|
60
|
-
},
|
|
61
|
-
deletedAt: {
|
|
62
|
-
type: ScalarTypeEnum.DateTime(),
|
|
63
|
-
isOptional: false
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
const UserEmailVerifiedPayload = new SchemaModel({
|
|
68
|
-
name: "UserEmailVerifiedPayload",
|
|
69
|
-
description: "Payload for user email verified event",
|
|
70
|
-
fields: {
|
|
71
|
-
userId: {
|
|
72
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
73
|
-
isOptional: false
|
|
74
|
-
},
|
|
75
|
-
email: {
|
|
76
|
-
type: ScalarTypeEnum.EmailAddress(),
|
|
77
|
-
isOptional: false
|
|
78
|
-
},
|
|
79
|
-
verifiedAt: {
|
|
80
|
-
type: ScalarTypeEnum.DateTime(),
|
|
81
|
-
isOptional: false
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
const OrgCreatedPayload = new SchemaModel({
|
|
86
|
-
name: "OrgCreatedPayload",
|
|
87
|
-
description: "Payload for org created event",
|
|
88
|
-
fields: {
|
|
89
|
-
orgId: {
|
|
90
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
91
|
-
isOptional: false
|
|
92
|
-
},
|
|
93
|
-
name: {
|
|
94
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
95
|
-
isOptional: false
|
|
96
|
-
},
|
|
97
|
-
slug: {
|
|
98
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
99
|
-
isOptional: true
|
|
100
|
-
},
|
|
101
|
-
createdBy: {
|
|
102
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
103
|
-
isOptional: false
|
|
104
|
-
},
|
|
105
|
-
createdAt: {
|
|
106
|
-
type: ScalarTypeEnum.DateTime(),
|
|
107
|
-
isOptional: false
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
const OrgUpdatedPayload = new SchemaModel({
|
|
112
|
-
name: "OrgUpdatedPayload",
|
|
113
|
-
description: "Payload for org updated event",
|
|
114
|
-
fields: {
|
|
115
|
-
orgId: {
|
|
116
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
117
|
-
isOptional: false
|
|
118
|
-
},
|
|
119
|
-
updatedFields: {
|
|
120
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
121
|
-
isOptional: false,
|
|
122
|
-
isArray: true
|
|
123
|
-
},
|
|
124
|
-
updatedBy: {
|
|
125
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
126
|
-
isOptional: false
|
|
127
|
-
},
|
|
128
|
-
updatedAt: {
|
|
129
|
-
type: ScalarTypeEnum.DateTime(),
|
|
130
|
-
isOptional: false
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
const OrgDeletedPayload = new SchemaModel({
|
|
135
|
-
name: "OrgDeletedPayload",
|
|
136
|
-
description: "Payload for org deleted event",
|
|
137
|
-
fields: {
|
|
138
|
-
orgId: {
|
|
139
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
140
|
-
isOptional: false
|
|
141
|
-
},
|
|
142
|
-
name: {
|
|
143
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
144
|
-
isOptional: false
|
|
145
|
-
},
|
|
146
|
-
deletedBy: {
|
|
147
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
148
|
-
isOptional: false
|
|
149
|
-
},
|
|
150
|
-
deletedAt: {
|
|
151
|
-
type: ScalarTypeEnum.DateTime(),
|
|
152
|
-
isOptional: false
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
const OrgMemberAddedPayload = new SchemaModel({
|
|
157
|
-
name: "OrgMemberAddedPayload",
|
|
158
|
-
description: "Payload for member added event",
|
|
159
|
-
fields: {
|
|
160
|
-
orgId: {
|
|
161
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
162
|
-
isOptional: false
|
|
163
|
-
},
|
|
164
|
-
userId: {
|
|
165
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
166
|
-
isOptional: false
|
|
167
|
-
},
|
|
168
|
-
role: {
|
|
169
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
170
|
-
isOptional: false
|
|
171
|
-
},
|
|
172
|
-
invitedBy: {
|
|
173
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
174
|
-
isOptional: true
|
|
175
|
-
},
|
|
176
|
-
joinedAt: {
|
|
177
|
-
type: ScalarTypeEnum.DateTime(),
|
|
178
|
-
isOptional: false
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
const OrgMemberRemovedPayload = new SchemaModel({
|
|
183
|
-
name: "OrgMemberRemovedPayload",
|
|
184
|
-
description: "Payload for member removed event",
|
|
185
|
-
fields: {
|
|
186
|
-
orgId: {
|
|
187
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
188
|
-
isOptional: false
|
|
189
|
-
},
|
|
190
|
-
userId: {
|
|
191
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
192
|
-
isOptional: false
|
|
193
|
-
},
|
|
194
|
-
removedBy: {
|
|
195
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
196
|
-
isOptional: true
|
|
197
|
-
},
|
|
198
|
-
reason: {
|
|
199
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
200
|
-
isOptional: true
|
|
201
|
-
},
|
|
202
|
-
removedAt: {
|
|
203
|
-
type: ScalarTypeEnum.DateTime(),
|
|
204
|
-
isOptional: false
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
const OrgMemberRoleChangedPayload = new SchemaModel({
|
|
209
|
-
name: "OrgMemberRoleChangedPayload",
|
|
210
|
-
description: "Payload for member role changed event",
|
|
211
|
-
fields: {
|
|
212
|
-
orgId: {
|
|
213
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
214
|
-
isOptional: false
|
|
215
|
-
},
|
|
216
|
-
userId: {
|
|
217
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
218
|
-
isOptional: false
|
|
219
|
-
},
|
|
220
|
-
previousRole: {
|
|
221
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
222
|
-
isOptional: false
|
|
223
|
-
},
|
|
224
|
-
newRole: {
|
|
225
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
226
|
-
isOptional: false
|
|
227
|
-
},
|
|
228
|
-
changedBy: {
|
|
229
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
230
|
-
isOptional: false
|
|
231
|
-
},
|
|
232
|
-
changedAt: {
|
|
233
|
-
type: ScalarTypeEnum.DateTime(),
|
|
234
|
-
isOptional: false
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
const OrgInviteSentPayload = new SchemaModel({
|
|
239
|
-
name: "OrgInviteSentPayload",
|
|
240
|
-
description: "Payload for invite sent event",
|
|
241
|
-
fields: {
|
|
242
|
-
invitationId: {
|
|
243
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
244
|
-
isOptional: false
|
|
245
|
-
},
|
|
246
|
-
orgId: {
|
|
247
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
248
|
-
isOptional: false
|
|
249
|
-
},
|
|
250
|
-
email: {
|
|
251
|
-
type: ScalarTypeEnum.EmailAddress(),
|
|
252
|
-
isOptional: false
|
|
253
|
-
},
|
|
254
|
-
role: {
|
|
255
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
256
|
-
isOptional: false
|
|
257
|
-
},
|
|
258
|
-
invitedBy: {
|
|
259
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
260
|
-
isOptional: false
|
|
261
|
-
},
|
|
262
|
-
expiresAt: {
|
|
263
|
-
type: ScalarTypeEnum.DateTime(),
|
|
264
|
-
isOptional: true
|
|
265
|
-
},
|
|
266
|
-
sentAt: {
|
|
267
|
-
type: ScalarTypeEnum.DateTime(),
|
|
268
|
-
isOptional: false
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
const OrgInviteAcceptedPayload = new SchemaModel({
|
|
273
|
-
name: "OrgInviteAcceptedPayload",
|
|
274
|
-
description: "Payload for invite accepted event",
|
|
275
|
-
fields: {
|
|
276
|
-
invitationId: {
|
|
277
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
278
|
-
isOptional: false
|
|
279
|
-
},
|
|
280
|
-
orgId: {
|
|
281
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
282
|
-
isOptional: false
|
|
283
|
-
},
|
|
284
|
-
userId: {
|
|
285
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
286
|
-
isOptional: false
|
|
287
|
-
},
|
|
288
|
-
acceptedAt: {
|
|
289
|
-
type: ScalarTypeEnum.DateTime(),
|
|
290
|
-
isOptional: false
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
});
|
|
294
|
-
const OrgInviteDeclinedPayload = new SchemaModel({
|
|
295
|
-
name: "OrgInviteDeclinedPayload",
|
|
296
|
-
description: "Payload for invite declined event",
|
|
297
|
-
fields: {
|
|
298
|
-
invitationId: {
|
|
299
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
300
|
-
isOptional: false
|
|
301
|
-
},
|
|
302
|
-
orgId: {
|
|
303
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
304
|
-
isOptional: false
|
|
305
|
-
},
|
|
306
|
-
declinedAt: {
|
|
307
|
-
type: ScalarTypeEnum.DateTime(),
|
|
308
|
-
isOptional: false
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
});
|
|
312
|
-
const RoleAssignedPayload = new SchemaModel({
|
|
313
|
-
name: "RoleAssignedPayload",
|
|
314
|
-
description: "Payload for role assigned event",
|
|
315
|
-
fields: {
|
|
316
|
-
bindingId: {
|
|
317
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
318
|
-
isOptional: false
|
|
319
|
-
},
|
|
320
|
-
roleId: {
|
|
321
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
322
|
-
isOptional: false
|
|
323
|
-
},
|
|
324
|
-
roleName: {
|
|
325
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
326
|
-
isOptional: false
|
|
327
|
-
},
|
|
328
|
-
targetType: {
|
|
329
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
330
|
-
isOptional: false
|
|
331
|
-
},
|
|
332
|
-
targetId: {
|
|
333
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
334
|
-
isOptional: false
|
|
335
|
-
},
|
|
336
|
-
assignedBy: {
|
|
337
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
338
|
-
isOptional: false
|
|
339
|
-
},
|
|
340
|
-
expiresAt: {
|
|
341
|
-
type: ScalarTypeEnum.DateTime(),
|
|
342
|
-
isOptional: true
|
|
343
|
-
},
|
|
344
|
-
assignedAt: {
|
|
345
|
-
type: ScalarTypeEnum.DateTime(),
|
|
346
|
-
isOptional: false
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
});
|
|
350
|
-
const RoleRevokedPayload = new SchemaModel({
|
|
351
|
-
name: "RoleRevokedPayload",
|
|
352
|
-
description: "Payload for role revoked event",
|
|
353
|
-
fields: {
|
|
354
|
-
bindingId: {
|
|
355
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
356
|
-
isOptional: false
|
|
357
|
-
},
|
|
358
|
-
roleId: {
|
|
359
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
360
|
-
isOptional: false
|
|
361
|
-
},
|
|
362
|
-
roleName: {
|
|
363
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
364
|
-
isOptional: false
|
|
365
|
-
},
|
|
366
|
-
targetType: {
|
|
367
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
368
|
-
isOptional: false
|
|
369
|
-
},
|
|
370
|
-
targetId: {
|
|
371
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
372
|
-
isOptional: false
|
|
373
|
-
},
|
|
374
|
-
revokedBy: {
|
|
375
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
376
|
-
isOptional: false
|
|
377
|
-
},
|
|
378
|
-
revokedAt: {
|
|
379
|
-
type: ScalarTypeEnum.DateTime(),
|
|
380
|
-
isOptional: false
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
});
|
|
384
|
-
/**
|
|
385
|
-
* Emitted when a new user is created.
|
|
386
|
-
*/
|
|
387
|
-
const UserCreatedEvent = defineEvent({
|
|
388
|
-
name: "user.created",
|
|
389
|
-
version: 1,
|
|
390
|
-
description: "A new user has been created.",
|
|
391
|
-
payload: UserCreatedPayload
|
|
392
|
-
});
|
|
393
|
-
/**
|
|
394
|
-
* Emitted when a user profile is updated.
|
|
395
|
-
*/
|
|
396
|
-
const UserUpdatedEvent = defineEvent({
|
|
397
|
-
name: "user.updated",
|
|
398
|
-
version: 1,
|
|
399
|
-
description: "A user profile has been updated.",
|
|
400
|
-
payload: UserUpdatedPayload
|
|
401
|
-
});
|
|
402
|
-
/**
|
|
403
|
-
* Emitted when a user is deleted.
|
|
404
|
-
*/
|
|
405
|
-
const UserDeletedEvent = defineEvent({
|
|
406
|
-
name: "user.deleted",
|
|
407
|
-
version: 1,
|
|
408
|
-
description: "A user account has been deleted.",
|
|
409
|
-
pii: ["email"],
|
|
410
|
-
payload: UserDeletedPayload
|
|
411
|
-
});
|
|
412
|
-
/**
|
|
413
|
-
* Emitted when a user's email is verified.
|
|
414
|
-
*/
|
|
415
|
-
const UserEmailVerifiedEvent = defineEvent({
|
|
416
|
-
name: "user.email_verified",
|
|
417
|
-
version: 1,
|
|
418
|
-
description: "A user has verified their email address.",
|
|
419
|
-
payload: UserEmailVerifiedPayload
|
|
420
|
-
});
|
|
421
|
-
/**
|
|
422
|
-
* Emitted when a new organization is created.
|
|
423
|
-
*/
|
|
424
|
-
const OrgCreatedEvent = defineEvent({
|
|
425
|
-
name: "org.created",
|
|
426
|
-
version: 1,
|
|
427
|
-
description: "A new organization has been created.",
|
|
428
|
-
payload: OrgCreatedPayload
|
|
429
|
-
});
|
|
430
|
-
/**
|
|
431
|
-
* Emitted when an organization is updated.
|
|
432
|
-
*/
|
|
433
|
-
const OrgUpdatedEvent = defineEvent({
|
|
434
|
-
name: "org.updated",
|
|
435
|
-
version: 1,
|
|
436
|
-
description: "An organization has been updated.",
|
|
437
|
-
payload: OrgUpdatedPayload
|
|
438
|
-
});
|
|
439
|
-
/**
|
|
440
|
-
* Emitted when an organization is deleted.
|
|
441
|
-
*/
|
|
442
|
-
const OrgDeletedEvent = defineEvent({
|
|
443
|
-
name: "org.deleted",
|
|
444
|
-
version: 1,
|
|
445
|
-
description: "An organization has been deleted.",
|
|
446
|
-
payload: OrgDeletedPayload
|
|
447
|
-
});
|
|
448
|
-
/**
|
|
449
|
-
* Emitted when a member joins an organization.
|
|
450
|
-
*/
|
|
451
|
-
const OrgMemberAddedEvent = defineEvent({
|
|
452
|
-
name: "org.member.added",
|
|
453
|
-
version: 1,
|
|
454
|
-
description: "A user has joined an organization.",
|
|
455
|
-
payload: OrgMemberAddedPayload
|
|
456
|
-
});
|
|
457
|
-
/**
|
|
458
|
-
* Emitted when a member leaves or is removed from an organization.
|
|
459
|
-
*/
|
|
460
|
-
const OrgMemberRemovedEvent = defineEvent({
|
|
461
|
-
name: "org.member.removed",
|
|
462
|
-
version: 1,
|
|
463
|
-
description: "A user has left or been removed from an organization.",
|
|
464
|
-
payload: OrgMemberRemovedPayload
|
|
465
|
-
});
|
|
466
|
-
/**
|
|
467
|
-
* Emitted when a member's role is changed.
|
|
468
|
-
*/
|
|
469
|
-
const OrgMemberRoleChangedEvent = defineEvent({
|
|
470
|
-
name: "org.member.role_changed",
|
|
471
|
-
version: 1,
|
|
472
|
-
description: "A member's role in an organization has changed.",
|
|
473
|
-
payload: OrgMemberRoleChangedPayload
|
|
474
|
-
});
|
|
475
|
-
/**
|
|
476
|
-
* Emitted when an invitation is sent.
|
|
477
|
-
*/
|
|
478
|
-
const OrgInviteSentEvent = defineEvent({
|
|
479
|
-
name: "org.invite.sent",
|
|
480
|
-
version: 1,
|
|
481
|
-
description: "An invitation to join an organization has been sent.",
|
|
482
|
-
pii: ["email"],
|
|
483
|
-
payload: OrgInviteSentPayload
|
|
484
|
-
});
|
|
485
|
-
/**
|
|
486
|
-
* Emitted when an invitation is accepted.
|
|
487
|
-
*/
|
|
488
|
-
const OrgInviteAcceptedEvent = defineEvent({
|
|
489
|
-
name: "org.invite.accepted",
|
|
490
|
-
version: 1,
|
|
491
|
-
description: "An invitation has been accepted.",
|
|
492
|
-
payload: OrgInviteAcceptedPayload
|
|
493
|
-
});
|
|
494
|
-
/**
|
|
495
|
-
* Emitted when an invitation is declined.
|
|
496
|
-
*/
|
|
497
|
-
const OrgInviteDeclinedEvent = defineEvent({
|
|
498
|
-
name: "org.invite.declined",
|
|
499
|
-
version: 1,
|
|
500
|
-
description: "An invitation has been declined.",
|
|
501
|
-
payload: OrgInviteDeclinedPayload
|
|
502
|
-
});
|
|
503
|
-
/**
|
|
504
|
-
* Emitted when a role is assigned to a user or organization.
|
|
505
|
-
*/
|
|
506
|
-
const RoleAssignedEvent = defineEvent({
|
|
507
|
-
name: "role.assigned",
|
|
508
|
-
version: 1,
|
|
509
|
-
description: "A role has been assigned.",
|
|
510
|
-
payload: RoleAssignedPayload
|
|
511
|
-
});
|
|
512
|
-
/**
|
|
513
|
-
* Emitted when a role is revoked from a user or organization.
|
|
514
|
-
*/
|
|
515
|
-
const RoleRevokedEvent = defineEvent({
|
|
516
|
-
name: "role.revoked",
|
|
517
|
-
version: 1,
|
|
518
|
-
description: "A role has been revoked.",
|
|
519
|
-
payload: RoleRevokedPayload
|
|
520
|
-
});
|
|
521
|
-
/**
|
|
522
|
-
* All identity-rbac events.
|
|
523
|
-
*/
|
|
524
|
-
const IdentityRbacEvents = {
|
|
525
|
-
UserCreatedEvent,
|
|
526
|
-
UserUpdatedEvent,
|
|
527
|
-
UserDeletedEvent,
|
|
528
|
-
UserEmailVerifiedEvent,
|
|
529
|
-
OrgCreatedEvent,
|
|
530
|
-
OrgUpdatedEvent,
|
|
531
|
-
OrgDeletedEvent,
|
|
532
|
-
OrgMemberAddedEvent,
|
|
533
|
-
OrgMemberRemovedEvent,
|
|
534
|
-
OrgMemberRoleChangedEvent,
|
|
535
|
-
OrgInviteSentEvent,
|
|
536
|
-
OrgInviteAcceptedEvent,
|
|
537
|
-
OrgInviteDeclinedEvent,
|
|
538
|
-
RoleAssignedEvent,
|
|
539
|
-
RoleRevokedEvent
|
|
540
|
-
};
|
|
541
|
-
|
|
542
|
-
//#endregion
|
|
543
|
-
export { IdentityRbacEvents, OrgCreatedEvent, OrgDeletedEvent, OrgInviteAcceptedEvent, OrgInviteDeclinedEvent, OrgInviteSentEvent, OrgMemberAddedEvent, OrgMemberRemovedEvent, OrgMemberRoleChangedEvent, OrgUpdatedEvent, RoleAssignedEvent, RoleRevokedEvent, UserCreatedEvent, UserDeletedEvent, UserEmailVerifiedEvent, UserUpdatedEvent };
|
|
1
|
+
import{ScalarTypeEnum as e,SchemaModel as t}from"@lssm/lib.schema";import{defineEvent as n}from"@lssm/lib.contracts";const r=new t({name:`UserCreatedPayload`,description:`Payload for user created event`,fields:{userId:{type:e.String_unsecure(),isOptional:!1},email:{type:e.EmailAddress(),isOptional:!1},name:{type:e.String_unsecure(),isOptional:!0},createdAt:{type:e.DateTime(),isOptional:!1}}}),i=new t({name:`UserUpdatedPayload`,description:`Payload for user updated event`,fields:{userId:{type:e.String_unsecure(),isOptional:!1},updatedFields:{type:e.String_unsecure(),isOptional:!1,isArray:!0},updatedAt:{type:e.DateTime(),isOptional:!1}}}),a=new t({name:`UserDeletedPayload`,description:`Payload for user deleted event`,fields:{userId:{type:e.String_unsecure(),isOptional:!1},email:{type:e.EmailAddress(),isOptional:!1},deletedAt:{type:e.DateTime(),isOptional:!1}}}),o=new t({name:`UserEmailVerifiedPayload`,description:`Payload for user email verified event`,fields:{userId:{type:e.String_unsecure(),isOptional:!1},email:{type:e.EmailAddress(),isOptional:!1},verifiedAt:{type:e.DateTime(),isOptional:!1}}}),s=new t({name:`OrgCreatedPayload`,description:`Payload for org created event`,fields:{orgId:{type:e.String_unsecure(),isOptional:!1},name:{type:e.String_unsecure(),isOptional:!1},slug:{type:e.String_unsecure(),isOptional:!0},createdBy:{type:e.String_unsecure(),isOptional:!1},createdAt:{type:e.DateTime(),isOptional:!1}}}),c=new t({name:`OrgUpdatedPayload`,description:`Payload for org updated event`,fields:{orgId:{type:e.String_unsecure(),isOptional:!1},updatedFields:{type:e.String_unsecure(),isOptional:!1,isArray:!0},updatedBy:{type:e.String_unsecure(),isOptional:!1},updatedAt:{type:e.DateTime(),isOptional:!1}}}),l=new t({name:`OrgDeletedPayload`,description:`Payload for org deleted event`,fields:{orgId:{type:e.String_unsecure(),isOptional:!1},name:{type:e.String_unsecure(),isOptional:!1},deletedBy:{type:e.String_unsecure(),isOptional:!1},deletedAt:{type:e.DateTime(),isOptional:!1}}}),u=new t({name:`OrgMemberAddedPayload`,description:`Payload for member added event`,fields:{orgId:{type:e.String_unsecure(),isOptional:!1},userId:{type:e.String_unsecure(),isOptional:!1},role:{type:e.String_unsecure(),isOptional:!1},invitedBy:{type:e.String_unsecure(),isOptional:!0},joinedAt:{type:e.DateTime(),isOptional:!1}}}),d=new t({name:`OrgMemberRemovedPayload`,description:`Payload for member removed event`,fields:{orgId:{type:e.String_unsecure(),isOptional:!1},userId:{type:e.String_unsecure(),isOptional:!1},removedBy:{type:e.String_unsecure(),isOptional:!0},reason:{type:e.String_unsecure(),isOptional:!0},removedAt:{type:e.DateTime(),isOptional:!1}}}),f=new t({name:`OrgMemberRoleChangedPayload`,description:`Payload for member role changed event`,fields:{orgId:{type:e.String_unsecure(),isOptional:!1},userId:{type:e.String_unsecure(),isOptional:!1},previousRole:{type:e.String_unsecure(),isOptional:!1},newRole:{type:e.String_unsecure(),isOptional:!1},changedBy:{type:e.String_unsecure(),isOptional:!1},changedAt:{type:e.DateTime(),isOptional:!1}}}),p=new t({name:`OrgInviteSentPayload`,description:`Payload for invite sent event`,fields:{invitationId:{type:e.String_unsecure(),isOptional:!1},orgId:{type:e.String_unsecure(),isOptional:!1},email:{type:e.EmailAddress(),isOptional:!1},role:{type:e.String_unsecure(),isOptional:!1},invitedBy:{type:e.String_unsecure(),isOptional:!1},expiresAt:{type:e.DateTime(),isOptional:!0},sentAt:{type:e.DateTime(),isOptional:!1}}}),m=new t({name:`OrgInviteAcceptedPayload`,description:`Payload for invite accepted event`,fields:{invitationId:{type:e.String_unsecure(),isOptional:!1},orgId:{type:e.String_unsecure(),isOptional:!1},userId:{type:e.String_unsecure(),isOptional:!1},acceptedAt:{type:e.DateTime(),isOptional:!1}}}),h=new t({name:`OrgInviteDeclinedPayload`,description:`Payload for invite declined event`,fields:{invitationId:{type:e.String_unsecure(),isOptional:!1},orgId:{type:e.String_unsecure(),isOptional:!1},declinedAt:{type:e.DateTime(),isOptional:!1}}}),g=new t({name:`RoleAssignedPayload`,description:`Payload for role assigned event`,fields:{bindingId:{type:e.String_unsecure(),isOptional:!1},roleId:{type:e.String_unsecure(),isOptional:!1},roleName:{type:e.String_unsecure(),isOptional:!1},targetType:{type:e.String_unsecure(),isOptional:!1},targetId:{type:e.String_unsecure(),isOptional:!1},assignedBy:{type:e.String_unsecure(),isOptional:!1},expiresAt:{type:e.DateTime(),isOptional:!0},assignedAt:{type:e.DateTime(),isOptional:!1}}}),_=new t({name:`RoleRevokedPayload`,description:`Payload for role revoked event`,fields:{bindingId:{type:e.String_unsecure(),isOptional:!1},roleId:{type:e.String_unsecure(),isOptional:!1},roleName:{type:e.String_unsecure(),isOptional:!1},targetType:{type:e.String_unsecure(),isOptional:!1},targetId:{type:e.String_unsecure(),isOptional:!1},revokedBy:{type:e.String_unsecure(),isOptional:!1},revokedAt:{type:e.DateTime(),isOptional:!1}}}),v=n({name:`user.created`,version:1,description:`A new user has been created.`,payload:r}),y=n({name:`user.updated`,version:1,description:`A user profile has been updated.`,payload:i}),b=n({name:`user.deleted`,version:1,description:`A user account has been deleted.`,pii:[`email`],payload:a}),x=n({name:`user.email_verified`,version:1,description:`A user has verified their email address.`,payload:o}),S=n({name:`org.created`,version:1,description:`A new organization has been created.`,payload:s}),C=n({name:`org.updated`,version:1,description:`An organization has been updated.`,payload:c}),w=n({name:`org.deleted`,version:1,description:`An organization has been deleted.`,payload:l}),T=n({name:`org.member.added`,version:1,description:`A user has joined an organization.`,payload:u}),E=n({name:`org.member.removed`,version:1,description:`A user has left or been removed from an organization.`,payload:d}),D=n({name:`org.member.role_changed`,version:1,description:`A member's role in an organization has changed.`,payload:f}),O=n({name:`org.invite.sent`,version:1,description:`An invitation to join an organization has been sent.`,pii:[`email`],payload:p}),k=n({name:`org.invite.accepted`,version:1,description:`An invitation has been accepted.`,payload:m}),A=n({name:`org.invite.declined`,version:1,description:`An invitation has been declined.`,payload:h}),j=n({name:`role.assigned`,version:1,description:`A role has been assigned.`,payload:g}),M=n({name:`role.revoked`,version:1,description:`A role has been revoked.`,payload:_}),N={UserCreatedEvent:v,UserUpdatedEvent:y,UserDeletedEvent:b,UserEmailVerifiedEvent:x,OrgCreatedEvent:S,OrgUpdatedEvent:C,OrgDeletedEvent:w,OrgMemberAddedEvent:T,OrgMemberRemovedEvent:E,OrgMemberRoleChangedEvent:D,OrgInviteSentEvent:O,OrgInviteAcceptedEvent:k,OrgInviteDeclinedEvent:A,RoleAssignedEvent:j,RoleRevokedEvent:M};export{N as IdentityRbacEvents,S as OrgCreatedEvent,w as OrgDeletedEvent,k as OrgInviteAcceptedEvent,A as OrgInviteDeclinedEvent,O as OrgInviteSentEvent,T as OrgMemberAddedEvent,E as OrgMemberRemovedEvent,D as OrgMemberRoleChangedEvent,C as OrgUpdatedEvent,j as RoleAssignedEvent,M as RoleRevokedEvent,v as UserCreatedEvent,b as UserDeletedEvent,x as UserEmailVerifiedEvent,y as UserUpdatedEvent};
|