@contractspec/lib.identity-rbac 1.44.1 → 1.45.1
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/organization.d.ts +198 -198
- package/dist/contracts/organization.d.ts.map +1 -1
- package/dist/contracts/organization.js +13 -13
- package/dist/contracts/organization.js.map +1 -1
- package/dist/contracts/rbac.d.ts +128 -128
- package/dist/contracts/rbac.d.ts.map +1 -1
- package/dist/contracts/rbac.js +10 -10
- package/dist/contracts/rbac.js.map +1 -1
- package/dist/contracts/user.d.ts +142 -142
- package/dist/contracts/user.js +8 -8
- package/dist/contracts/user.js.map +1 -1
- package/dist/entities/index.d.ts +160 -160
- package/dist/entities/organization.d.ts +59 -59
- package/dist/entities/rbac.d.ts +63 -63
- package/dist/entities/user.d.ts +67 -67
- package/dist/events.d.ts +174 -174
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +15 -15
- package/dist/events.js.map +1 -1
- package/dist/identity-rbac.feature.js +39 -39
- package/dist/identity-rbac.feature.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.d.ts","names":[],"sources":["../../src/contracts/organization.ts"],"sourcesContent":[],"mappings":";;;;;cAQa,mBAAiB;;UAa5B,
|
|
1
|
+
{"version":3,"file":"organization.d.ts","names":[],"sources":["../../src/contracts/organization.ts"],"sourcesContent":[],"mappings":";;;;;cAQa,mBAAiB;;UAa5B,2BAAA,CAAA;;EAbW,CAAA;EAaX,IAAA,EAAA;;;;;;;;;IAb4B,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;EAejB,CAAA;EAQX,WAAA,EAAA;;;EAR0B,CAAA;EAAA,IAAA,EAAA;IAUf,IAAA,uCAcX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;;;;CAdsB,CAAA;AAAA,cAVX,eAUW,EAVI,WA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgDpB,oDAAoB,cAAA;;UAqC/B,2BAAA,CAAA;;;;;;;;;UArC+B,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;cA0CpB,mDAAmB,cAAA;;UAkB9B,2BAAA,CAAA;;;;;;;;;;;;;;;cAlB8B,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuBnB,sBAAoB,6BAAA,CAAA,cAkB/B,2BAAA,CAlB+B,cAAA,EAAA;;;;cAAA,2BAAA,CAAA"}
|
|
@@ -324,7 +324,7 @@ const ListUserOrgsOutputModel = new SchemaModel({
|
|
|
324
324
|
const CreateOrgContract = defineCommand({
|
|
325
325
|
meta: {
|
|
326
326
|
key: "identity.org.create",
|
|
327
|
-
version: 1,
|
|
327
|
+
version: "1.0.0",
|
|
328
328
|
stability: "stable",
|
|
329
329
|
owners: [...OWNERS],
|
|
330
330
|
tags: [
|
|
@@ -350,7 +350,7 @@ const CreateOrgContract = defineCommand({
|
|
|
350
350
|
sideEffects: {
|
|
351
351
|
emits: [{
|
|
352
352
|
key: "org.created",
|
|
353
|
-
version: 1,
|
|
353
|
+
version: "1.0.0",
|
|
354
354
|
when: "Organization is created",
|
|
355
355
|
payload: OrganizationModel
|
|
356
356
|
}],
|
|
@@ -363,7 +363,7 @@ const CreateOrgContract = defineCommand({
|
|
|
363
363
|
const GetOrgContract = defineQuery({
|
|
364
364
|
meta: {
|
|
365
365
|
key: "identity.org.get",
|
|
366
|
-
version: 1,
|
|
366
|
+
version: "1.0.0",
|
|
367
367
|
stability: "stable",
|
|
368
368
|
owners: [...OWNERS],
|
|
369
369
|
tags: [
|
|
@@ -387,7 +387,7 @@ const GetOrgContract = defineQuery({
|
|
|
387
387
|
const UpdateOrgContract = defineCommand({
|
|
388
388
|
meta: {
|
|
389
389
|
key: "identity.org.update",
|
|
390
|
-
version: 1,
|
|
390
|
+
version: "1.0.0",
|
|
391
391
|
stability: "stable",
|
|
392
392
|
owners: [...OWNERS],
|
|
393
393
|
tags: [
|
|
@@ -407,7 +407,7 @@ const UpdateOrgContract = defineCommand({
|
|
|
407
407
|
sideEffects: {
|
|
408
408
|
emits: [{
|
|
409
409
|
key: "org.updated",
|
|
410
|
-
version: 1,
|
|
410
|
+
version: "1.0.0",
|
|
411
411
|
when: "Organization is updated",
|
|
412
412
|
payload: OrganizationModel
|
|
413
413
|
}],
|
|
@@ -420,7 +420,7 @@ const UpdateOrgContract = defineCommand({
|
|
|
420
420
|
const InviteMemberContract = defineCommand({
|
|
421
421
|
meta: {
|
|
422
422
|
key: "identity.org.invite",
|
|
423
|
-
version: 1,
|
|
423
|
+
version: "1.0.0",
|
|
424
424
|
stability: "stable",
|
|
425
425
|
owners: [...OWNERS],
|
|
426
426
|
tags: [
|
|
@@ -455,7 +455,7 @@ const InviteMemberContract = defineCommand({
|
|
|
455
455
|
sideEffects: {
|
|
456
456
|
emits: [{
|
|
457
457
|
key: "org.invite.sent",
|
|
458
|
-
version: 1,
|
|
458
|
+
version: "1.0.0",
|
|
459
459
|
when: "Invitation is sent",
|
|
460
460
|
payload: InvitationModel
|
|
461
461
|
}],
|
|
@@ -468,7 +468,7 @@ const InviteMemberContract = defineCommand({
|
|
|
468
468
|
const AcceptInviteContract = defineCommand({
|
|
469
469
|
meta: {
|
|
470
470
|
key: "identity.org.invite.accept",
|
|
471
|
-
version: 1,
|
|
471
|
+
version: "1.0.0",
|
|
472
472
|
stability: "stable",
|
|
473
473
|
owners: [...OWNERS],
|
|
474
474
|
tags: [
|
|
@@ -503,7 +503,7 @@ const AcceptInviteContract = defineCommand({
|
|
|
503
503
|
sideEffects: {
|
|
504
504
|
emits: [{
|
|
505
505
|
key: "org.member.added",
|
|
506
|
-
version: 1,
|
|
506
|
+
version: "1.0.0",
|
|
507
507
|
when: "Member joins org",
|
|
508
508
|
payload: MemberModel
|
|
509
509
|
}],
|
|
@@ -516,7 +516,7 @@ const AcceptInviteContract = defineCommand({
|
|
|
516
516
|
const RemoveMemberContract = defineCommand({
|
|
517
517
|
meta: {
|
|
518
518
|
key: "identity.org.member.remove",
|
|
519
|
-
version: 1,
|
|
519
|
+
version: "1.0.0",
|
|
520
520
|
stability: "stable",
|
|
521
521
|
owners: [...OWNERS],
|
|
522
522
|
tags: [
|
|
@@ -543,7 +543,7 @@ const RemoveMemberContract = defineCommand({
|
|
|
543
543
|
sideEffects: {
|
|
544
544
|
emits: [{
|
|
545
545
|
key: "org.member.removed",
|
|
546
|
-
version: 1,
|
|
546
|
+
version: "1.0.0",
|
|
547
547
|
when: "Member is removed",
|
|
548
548
|
payload: MemberRemovedPayloadModel
|
|
549
549
|
}],
|
|
@@ -556,7 +556,7 @@ const RemoveMemberContract = defineCommand({
|
|
|
556
556
|
const ListMembersContract = defineQuery({
|
|
557
557
|
meta: {
|
|
558
558
|
key: "identity.org.members.list",
|
|
559
|
-
version: 1,
|
|
559
|
+
version: "1.0.0",
|
|
560
560
|
stability: "stable",
|
|
561
561
|
owners: [...OWNERS],
|
|
562
562
|
tags: [
|
|
@@ -581,7 +581,7 @@ const ListMembersContract = defineQuery({
|
|
|
581
581
|
const ListUserOrgsContract = defineQuery({
|
|
582
582
|
meta: {
|
|
583
583
|
key: "identity.org.list",
|
|
584
|
-
version: 1,
|
|
584
|
+
version: "1.0.0",
|
|
585
585
|
stability: "stable",
|
|
586
586
|
owners: [...OWNERS],
|
|
587
587
|
tags: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.js","names":[],"sources":["../../src/contracts/organization.ts"],"sourcesContent":["import { ScalarTypeEnum, SchemaModel } from '@contractspec/lib.schema';\nimport { defineCommand, defineQuery } from '@contractspec/lib.contracts';\nimport { SuccessResultModel } from './user';\n\nconst OWNERS = ['platform.identity-rbac'] as const;\n\n// ============ SchemaModels ============\n\nexport const OrganizationModel = new SchemaModel({\n name: 'Organization',\n description: 'Organization details',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n logo: { type: ScalarTypeEnum.URL(), isOptional: true },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n type: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }, // PLATFORM_ADMIN | CONTRACT_SPEC_CUSTOMER\n onboardingCompleted: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const MemberUserModel = new SchemaModel({\n name: 'MemberUser',\n description: 'Basic user info within a member',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n email: { type: ScalarTypeEnum.EmailAddress(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nexport const MemberModel = new SchemaModel({\n name: 'Member',\n description: 'Organization member',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n role: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n user: { type: MemberUserModel, isOptional: false },\n },\n});\n\nexport const InvitationModel = new SchemaModel({\n name: 'Invitation',\n description: 'Organization invitation',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n email: { type: ScalarTypeEnum.EmailAddress(), isOptional: false },\n role: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }, // pending | accepted | declined | expired\n expiresAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const CreateOrgInputModel = new SchemaModel({\n name: 'CreateOrgInput',\n description: 'Input for creating an organization',\n fields: {\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n type: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nexport const GetOrgInputModel = new SchemaModel({\n name: 'GetOrgInput',\n description: 'Input for getting an organization',\n fields: {\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nexport const UpdateOrgInputModel = new SchemaModel({\n name: 'UpdateOrgInput',\n description: 'Input for updating an organization',\n fields: {\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n logo: { type: ScalarTypeEnum.URL(), isOptional: true },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nexport const InviteMemberInputModel = new SchemaModel({\n name: 'InviteMemberInput',\n description: 'Input for inviting a member',\n fields: {\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n email: { type: ScalarTypeEnum.EmailAddress(), isOptional: false },\n role: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }, // owner | admin | member\n teamId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nexport const AcceptInviteInputModel = new SchemaModel({\n name: 'AcceptInviteInput',\n description: 'Input for accepting an invitation',\n fields: {\n invitationId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nexport const RemoveMemberInputModel = new SchemaModel({\n name: 'RemoveMemberInput',\n description: 'Input for removing a member',\n fields: {\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nexport const MemberRemovedPayloadModel = new SchemaModel({\n name: 'MemberRemovedPayload',\n description: 'Payload for member removed event',\n fields: {\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nexport const ListMembersInputModel = new SchemaModel({\n name: 'ListMembersInput',\n description: 'Input for listing members',\n fields: {\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n limit: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n offset: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n});\n\nexport const ListMembersOutputModel = new SchemaModel({\n name: 'ListMembersOutput',\n description: 'Output for listing members',\n fields: {\n members: { type: MemberModel, isOptional: false, isArray: true },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n});\n\nexport const OrganizationWithRoleModel = new SchemaModel({\n name: 'OrganizationWithRole',\n description: 'Organization with user role',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n logo: { type: ScalarTypeEnum.URL(), isOptional: true },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n type: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n onboardingCompleted: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n role: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nexport const ListUserOrgsOutputModel = new SchemaModel({\n name: 'ListUserOrgsOutput',\n description: 'Output for listing user organizations',\n fields: {\n organizations: {\n type: OrganizationWithRoleModel,\n isOptional: false,\n isArray: true,\n },\n },\n});\n\n// ============ Contracts ============\n\n/**\n * Create a new organization.\n */\nexport const CreateOrgContract = defineCommand({\n meta: {\n key: 'identity.org.create',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['identity', 'org', 'create'],\n description: 'Create a new organization.',\n goal: 'Allow users to create new organizations/workspaces.',\n context: 'Called during onboarding or when creating additional workspaces.',\n },\n io: {\n input: CreateOrgInputModel,\n output: OrganizationModel,\n errors: {\n SLUG_EXISTS: {\n description: 'An organization with this slug already exists',\n http: 409,\n gqlCode: 'SLUG_EXISTS',\n when: 'Slug is already taken',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'org.created',\n version: 1,\n when: 'Organization is created',\n payload: OrganizationModel,\n },\n ],\n audit: ['org.created'],\n },\n});\n\n/**\n * Get organization details.\n */\nexport const GetOrgContract = defineQuery({\n meta: {\n key: 'identity.org.get',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['identity', 'org', 'get'],\n description: 'Get organization details.',\n goal: 'Retrieve organization information.',\n context: 'Called when viewing organization settings or dashboard.',\n },\n io: {\n input: GetOrgInputModel,\n output: OrganizationModel,\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * Update organization.\n */\nexport const UpdateOrgContract = defineCommand({\n meta: {\n key: 'identity.org.update',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['identity', 'org', 'update'],\n description: 'Update organization details.',\n goal: 'Allow org admins to update organization settings.',\n context: 'Organization settings page.',\n },\n io: {\n input: UpdateOrgInputModel,\n output: OrganizationModel,\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'org.updated',\n version: 1,\n when: 'Organization is updated',\n payload: OrganizationModel,\n },\n ],\n audit: ['org.updated'],\n },\n});\n\n/**\n * Invite a member to the organization.\n */\nexport const InviteMemberContract = defineCommand({\n meta: {\n key: 'identity.org.invite',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['identity', 'org', 'invite', 'member'],\n description: 'Invite a user to join the organization.',\n goal: 'Allow org admins to invite new members.',\n context: 'Team management. Sends invitation email.',\n },\n io: {\n input: InviteMemberInputModel,\n output: InvitationModel,\n errors: {\n ALREADY_MEMBER: {\n description: 'User is already a member of this organization',\n http: 409,\n gqlCode: 'ALREADY_MEMBER',\n when: 'Invitee is already a member',\n },\n INVITE_PENDING: {\n description: 'An invitation for this email is already pending',\n http: 409,\n gqlCode: 'INVITE_PENDING',\n when: 'Active invitation exists',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'org.invite.sent',\n version: 1,\n when: 'Invitation is sent',\n payload: InvitationModel,\n },\n ],\n audit: ['org.invite.sent'],\n },\n});\n\n/**\n * Accept an invitation.\n */\nexport const AcceptInviteContract = defineCommand({\n meta: {\n key: 'identity.org.invite.accept',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['identity', 'org', 'invite', 'accept'],\n description: 'Accept an organization invitation.',\n goal: 'Allow users to join organizations via invitation.',\n context: 'Called from invitation email link.',\n },\n io: {\n input: AcceptInviteInputModel,\n output: MemberModel,\n errors: {\n INVITE_EXPIRED: {\n description: 'The invitation has expired',\n http: 410,\n gqlCode: 'INVITE_EXPIRED',\n when: 'Invitation is past expiry date',\n },\n INVITE_USED: {\n description: 'The invitation has already been used',\n http: 409,\n gqlCode: 'INVITE_USED',\n when: 'Invitation was already accepted',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'org.member.added',\n version: 1,\n when: 'Member joins org',\n payload: MemberModel,\n },\n ],\n audit: ['org.member.added'],\n },\n});\n\n/**\n * Remove a member from the organization.\n */\nexport const RemoveMemberContract = defineCommand({\n meta: {\n key: 'identity.org.member.remove',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['identity', 'org', 'member', 'remove'],\n description: 'Remove a member from the organization.',\n goal: 'Allow org admins to remove members.',\n context: 'Team management.',\n },\n io: {\n input: RemoveMemberInputModel,\n output: SuccessResultModel,\n errors: {\n CANNOT_REMOVE_OWNER: {\n description: 'Cannot remove the organization owner',\n http: 403,\n gqlCode: 'CANNOT_REMOVE_OWNER',\n when: 'Target is the org owner',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'org.member.removed',\n version: 1,\n when: 'Member is removed',\n payload: MemberRemovedPayloadModel,\n },\n ],\n audit: ['org.member.removed'],\n },\n});\n\n/**\n * List organization members.\n */\nexport const ListMembersContract = defineQuery({\n meta: {\n key: 'identity.org.members.list',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['identity', 'org', 'member', 'list'],\n description: 'List organization members.',\n goal: 'View all members of an organization.',\n context: 'Team management page.',\n },\n io: {\n input: ListMembersInputModel,\n output: ListMembersOutputModel,\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * List user's organizations.\n */\nexport const ListUserOrgsContract = defineQuery({\n meta: {\n key: 'identity.org.list',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['identity', 'org', 'list'],\n description: 'List organizations the current user belongs to.',\n goal: 'Show user their organizations for workspace switching.',\n context: 'Workspace switcher, org selection.',\n },\n io: {\n input: null,\n output: ListUserOrgsOutputModel,\n },\n policy: {\n auth: 'user',\n },\n});\n"],"mappings":";;;;;AAIA,MAAM,SAAS,CAAC,yBAAyB;AAIzC,MAAa,oBAAoB,IAAI,YAAY;CAC/C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EAClE,MAAM;GAAE,MAAM,eAAe,KAAK;GAAE,YAAY;GAAM;EACtD,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,qBAAqB;GAAE,MAAM,eAAe,SAAS;GAAE,YAAY;GAAO;EAC1E,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YA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AS;EAC7C,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACR,QAAQ,EACN,qBAAqB;GACnB,aAAa;GACb,MAAM;GACN,SAAS;GACT,MAAM;GACP,EACF;EACF;CACD,QAAQ,EACN,MAAM,QACP;CACD,aAAa;EACX,OAAO,CACL;GACE,KAAK;GACL,SAAS;GACT,MAAM;GACN,SAAS;GACV,CACF;EACD,OAAO,CAAC,qBAAqB;EAC9B;CACF,CAAC;;;;AAKF,MAAa,sBAAsB,YAAY;CAC7C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAY;GAAO;GAAU;GAAO;EAC3C,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EACN,MAAM,QACP;CACF,CAAC;;;;AAKF,MAAa,uBAAuB,YAAY;CAC9C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAY;GAAO;GAAO;EACjC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EACN,MAAM,QACP;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"organization.js","names":[],"sources":["../../src/contracts/organization.ts"],"sourcesContent":["import { ScalarTypeEnum, SchemaModel } from '@contractspec/lib.schema';\nimport { defineCommand, defineQuery } from '@contractspec/lib.contracts';\nimport { SuccessResultModel } from './user';\n\nconst OWNERS = ['platform.identity-rbac'] as const;\n\n// ============ SchemaModels ============\n\nexport const OrganizationModel = new SchemaModel({\n name: 'Organization',\n description: 'Organization details',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n logo: { type: ScalarTypeEnum.URL(), isOptional: true },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n type: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }, // PLATFORM_ADMIN | CONTRACT_SPEC_CUSTOMER\n onboardingCompleted: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const MemberUserModel = new SchemaModel({\n name: 'MemberUser',\n description: 'Basic user info within a member',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n email: { type: ScalarTypeEnum.EmailAddress(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nexport const MemberModel = new SchemaModel({\n name: 'Member',\n description: 'Organization member',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n role: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n user: { type: MemberUserModel, isOptional: false },\n },\n});\n\nexport const InvitationModel = new SchemaModel({\n name: 'Invitation',\n description: 'Organization invitation',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n email: { type: ScalarTypeEnum.EmailAddress(), isOptional: false },\n role: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }, // pending | accepted | declined | expired\n expiresAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const CreateOrgInputModel = new SchemaModel({\n name: 'CreateOrgInput',\n description: 'Input for creating an organization',\n fields: {\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n type: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nexport const GetOrgInputModel = new SchemaModel({\n name: 'GetOrgInput',\n description: 'Input for getting an organization',\n fields: {\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nexport const UpdateOrgInputModel = new SchemaModel({\n name: 'UpdateOrgInput',\n description: 'Input for updating an organization',\n fields: {\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n logo: { type: ScalarTypeEnum.URL(), isOptional: true },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nexport const InviteMemberInputModel = new SchemaModel({\n name: 'InviteMemberInput',\n description: 'Input for inviting a member',\n fields: {\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n email: { type: ScalarTypeEnum.EmailAddress(), isOptional: false },\n role: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }, // owner | admin | member\n teamId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nexport const AcceptInviteInputModel = new SchemaModel({\n name: 'AcceptInviteInput',\n description: 'Input for accepting an invitation',\n fields: {\n invitationId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nexport const RemoveMemberInputModel = new SchemaModel({\n name: 'RemoveMemberInput',\n description: 'Input for removing a member',\n fields: {\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nexport const MemberRemovedPayloadModel = new SchemaModel({\n name: 'MemberRemovedPayload',\n description: 'Payload for member removed event',\n fields: {\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nexport const ListMembersInputModel = new SchemaModel({\n name: 'ListMembersInput',\n description: 'Input for listing members',\n fields: {\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n limit: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n offset: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n});\n\nexport const ListMembersOutputModel = new SchemaModel({\n name: 'ListMembersOutput',\n description: 'Output for listing members',\n fields: {\n members: { type: MemberModel, isOptional: false, isArray: true },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n});\n\nexport const OrganizationWithRoleModel = new SchemaModel({\n name: 'OrganizationWithRole',\n description: 'Organization with user role',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n logo: { type: ScalarTypeEnum.URL(), isOptional: true },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n type: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n onboardingCompleted: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n role: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nexport const ListUserOrgsOutputModel = new SchemaModel({\n name: 'ListUserOrgsOutput',\n description: 'Output for listing user organizations',\n fields: {\n organizations: {\n type: OrganizationWithRoleModel,\n isOptional: false,\n isArray: true,\n },\n },\n});\n\n// ============ Contracts ============\n\n/**\n * Create a new organization.\n */\nexport const CreateOrgContract = defineCommand({\n meta: {\n key: 'identity.org.create',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['identity', 'org', 'create'],\n description: 'Create a new organization.',\n goal: 'Allow users to create new organizations/workspaces.',\n context: 'Called during onboarding or when creating additional workspaces.',\n },\n io: {\n input: CreateOrgInputModel,\n output: OrganizationModel,\n errors: {\n SLUG_EXISTS: {\n description: 'An organization with this slug already exists',\n http: 409,\n gqlCode: 'SLUG_EXISTS',\n when: 'Slug is already taken',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'org.created',\n version: '1.0.0',\n when: 'Organization is created',\n payload: OrganizationModel,\n },\n ],\n audit: ['org.created'],\n },\n});\n\n/**\n * Get organization details.\n */\nexport const GetOrgContract = defineQuery({\n meta: {\n key: 'identity.org.get',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['identity', 'org', 'get'],\n description: 'Get organization details.',\n goal: 'Retrieve organization information.',\n context: 'Called when viewing organization settings or dashboard.',\n },\n io: {\n input: GetOrgInputModel,\n output: OrganizationModel,\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * Update organization.\n */\nexport const UpdateOrgContract = defineCommand({\n meta: {\n key: 'identity.org.update',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['identity', 'org', 'update'],\n description: 'Update organization details.',\n goal: 'Allow org admins to update organization settings.',\n context: 'Organization settings page.',\n },\n io: {\n input: UpdateOrgInputModel,\n output: OrganizationModel,\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'org.updated',\n version: '1.0.0',\n when: 'Organization is updated',\n payload: OrganizationModel,\n },\n ],\n audit: ['org.updated'],\n },\n});\n\n/**\n * Invite a member to the organization.\n */\nexport const InviteMemberContract = defineCommand({\n meta: {\n key: 'identity.org.invite',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['identity', 'org', 'invite', 'member'],\n description: 'Invite a user to join the organization.',\n goal: 'Allow org admins to invite new members.',\n context: 'Team management. Sends invitation email.',\n },\n io: {\n input: InviteMemberInputModel,\n output: InvitationModel,\n errors: {\n ALREADY_MEMBER: {\n description: 'User is already a member of this organization',\n http: 409,\n gqlCode: 'ALREADY_MEMBER',\n when: 'Invitee is already a member',\n },\n INVITE_PENDING: {\n description: 'An invitation for this email is already pending',\n http: 409,\n gqlCode: 'INVITE_PENDING',\n when: 'Active invitation exists',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'org.invite.sent',\n version: '1.0.0',\n when: 'Invitation is sent',\n payload: InvitationModel,\n },\n ],\n audit: ['org.invite.sent'],\n },\n});\n\n/**\n * Accept an invitation.\n */\nexport const AcceptInviteContract = defineCommand({\n meta: {\n key: 'identity.org.invite.accept',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['identity', 'org', 'invite', 'accept'],\n description: 'Accept an organization invitation.',\n goal: 'Allow users to join organizations via invitation.',\n context: 'Called from invitation email link.',\n },\n io: {\n input: AcceptInviteInputModel,\n output: MemberModel,\n errors: {\n INVITE_EXPIRED: {\n description: 'The invitation has expired',\n http: 410,\n gqlCode: 'INVITE_EXPIRED',\n when: 'Invitation is past expiry date',\n },\n INVITE_USED: {\n description: 'The invitation has already been used',\n http: 409,\n gqlCode: 'INVITE_USED',\n when: 'Invitation was already accepted',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'org.member.added',\n version: '1.0.0',\n when: 'Member joins org',\n payload: MemberModel,\n },\n ],\n audit: ['org.member.added'],\n },\n});\n\n/**\n * Remove a member from the organization.\n */\nexport const RemoveMemberContract = defineCommand({\n meta: {\n key: 'identity.org.member.remove',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['identity', 'org', 'member', 'remove'],\n description: 'Remove a member from the organization.',\n goal: 'Allow org admins to remove members.',\n context: 'Team management.',\n },\n io: {\n input: RemoveMemberInputModel,\n output: SuccessResultModel,\n errors: {\n CANNOT_REMOVE_OWNER: {\n description: 'Cannot remove the organization owner',\n http: 403,\n gqlCode: 'CANNOT_REMOVE_OWNER',\n when: 'Target is the org owner',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'org.member.removed',\n version: '1.0.0',\n when: 'Member is removed',\n payload: MemberRemovedPayloadModel,\n },\n ],\n audit: ['org.member.removed'],\n },\n});\n\n/**\n * List organization members.\n */\nexport const ListMembersContract = defineQuery({\n meta: {\n key: 'identity.org.members.list',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['identity', 'org', 'member', 'list'],\n description: 'List organization members.',\n goal: 'View all members of an organization.',\n context: 'Team management page.',\n },\n io: {\n input: ListMembersInputModel,\n output: ListMembersOutputModel,\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * List user's organizations.\n */\nexport const ListUserOrgsContract = defineQuery({\n meta: {\n key: 'identity.org.list',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['identity', 'org', 'list'],\n description: 'List organizations the current user belongs to.',\n goal: 'Show user their organizations for workspace switching.',\n context: 'Workspace switcher, org selection.',\n },\n io: {\n input: null,\n output: ListUserOrgsOutputModel,\n },\n policy: {\n auth: 'user',\n },\n});\n"],"mappings":";;;;;AAIA,MAAM,SAAS,CAAC,yBAAyB;AAIzC,MAAa,oBAAoB,IAAI,YAAY;CAC/C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EAClE,MAAM;GAAE,MAAM,eAAe,KAAK;GAAE,YAAY;GAAM;EACtD,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,qBAAqB;GAAE,MAAM,eAAe,SAAS;GAAE,YAAY;GAAO;EAC1E,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAa,kBAAkB,IAAI,YAAY;CAC7C,MAAM;CACN,aA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