@wildo-ai/saas-specifications 1.1.13 → 1.1.14

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 (46) hide show
  1. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.d.ts.map +1 -1
  2. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js +28 -5
  3. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js.map +1 -1
  4. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.js +4 -1
  5. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.js.map +1 -1
  6. package/dist/esm/_core/compliance-documents/processor-register.schemas.d.ts +4 -0
  7. package/dist/esm/_core/compliance-documents/processor-register.schemas.d.ts.map +1 -1
  8. package/dist/esm/_core/compliance-documents/processor-register.schemas.js +10 -0
  9. package/dist/esm/_core/compliance-documents/processor-register.schemas.js.map +1 -1
  10. package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.d.ts.map +1 -1
  11. package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.js +2 -1
  12. package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.js.map +1 -1
  13. package/dist/esm/engine/compliance/resources/data-subject-requests.resource.specification.d.ts.map +1 -1
  14. package/dist/esm/engine/compliance/resources/data-subject-requests.resource.specification.js +6 -2
  15. package/dist/esm/engine/compliance/resources/data-subject-requests.resource.specification.js.map +1 -1
  16. package/dist/esm/engine/compliance/resources/siem-delivery-dlq.resource.specification.d.ts.map +1 -1
  17. package/dist/esm/engine/compliance/resources/siem-delivery-dlq.resource.specification.js +6 -5
  18. package/dist/esm/engine/compliance/resources/siem-delivery-dlq.resource.specification.js.map +1 -1
  19. package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
  20. package/dist/esm/engine/engine-resource-specifications.registry.js +2 -0
  21. package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
  22. package/dist/esm/engine/infrastructure/resources/queue-messages.resource.specification.d.ts +9 -0
  23. package/dist/esm/engine/infrastructure/resources/queue-messages.resource.specification.d.ts.map +1 -0
  24. package/dist/esm/engine/infrastructure/resources/queue-messages.resource.specification.js +136 -0
  25. package/dist/esm/engine/infrastructure/resources/queue-messages.resource.specification.js.map +1 -0
  26. package/dist/esm/engine/notifications/resources/inbound-email.resource.specification.d.ts.map +1 -1
  27. package/dist/esm/engine/notifications/resources/inbound-email.resource.specification.js +4 -2
  28. package/dist/esm/engine/notifications/resources/inbound-email.resource.specification.js.map +1 -1
  29. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.d.ts.map +1 -1
  30. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js +6 -5
  31. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js.map +1 -1
  32. package/dist/esm/engine/organizations/resources/organization-custom-domains.resource.specification.d.ts.map +1 -1
  33. package/dist/esm/engine/organizations/resources/organization-custom-domains.resource.specification.js +2 -1
  34. package/dist/esm/engine/organizations/resources/organization-custom-domains.resource.specification.js.map +1 -1
  35. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts.map +1 -1
  36. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js +10 -7
  37. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js.map +1 -1
  38. package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts +1 -0
  39. package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts.map +1 -1
  40. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js +7 -7
  41. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
  42. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts +2 -2
  43. package/dist/esm/engine/users/resources/users.resource.specification.js +1 -1
  44. package/dist/esm/engine/users/resources/users.resource.specification.js.map +1 -1
  45. package/dist/tsconfig.build.tsbuildinfo +1 -1
  46. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"file":"organization-members.resource.specification.js","sourceRoot":"","sources":["../../../../../src/engine/organizations/resources/organization-members.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0CAA0C,IAAI,wCAAwC,EACtF,yCAAyC,IAAI,mCAAmC,GACjF,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,iCAAiC,EACjC,cAAc,EACd,qBAAqB,IAAI,EAAE,EAC3B,2BAA2B,EAC3B,aAAa,EACb,SAAS,EACT,wBAAwB,EACxB,wBAAwB,EACxB,8BAA8B,EAC9B,oBAAoB,EACpB,8DAA8D,IAAI,0BAA0B,GAC7F,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAO3E,MAAM,qCAAqC,GAAG,mCAAmF,CAAC;AAClI,MAAM,0CAA0C,GAAG,wCAAwF,CAAC;AAE5I,MAAM,2BAA2B,GAAG;IAClC,GAAG,EAAE,kCAAkC;IACvC,MAAM,EAAE,mBAAmB;IAC3B,SAAS,EAAE,yBAAyB;IACpC,cAAc,EAAE,2BAA2B;IAC3C,KAAK,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC;IAClC,MAAM,EAAE,wBAAwB,CAAC,MAAM;IACvC,SAAS,EAAE,gBAAgB;IAC3B,aAAa,EAAE,aAAa;IAC5B,SAAS,EAAE,0BAA0B;IACrC,SAAS,EAAE,0BAA0B;IACrC,QAAQ,EAAE,CAAC;CACH,CAAC;AAEX,MAAM,mCAAmC,GAAG;IAC1C,GAAG,EAAE,2BAA2B,CAAC,GAAG;IACpC,MAAM,EAAE,2BAA2B,CAAC,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AAE,OAAO,EAAE,gPAAgP,EAAE,SAAS,EAAE,iJAAiJ,EAAE;QAC7c,CAAC,8BAA8B,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,0DAA0D,EAAE,SAAS,EAAE,mEAAmE,EAAE;QAChM,CAAC,8BAA8B,CAAC,UAAU,CAAC,EAAE,EAAE,OAAO,EAAE,kEAAkE,EAAE,SAAS,EAAE,mDAAmD,EAAE;QAC5L,CAAC,8BAA8B,CAAC,kBAAkB,CAAC,EAAE,EAAE,OAAO,EAAE,4CAA4C,EAAE,SAAS,EAAE,kFAAkF,EAAE;KAC9M;CACF,CAAC,CACH,CAAC","sourcesContent":["import {\n organizationMembersAdminResourceUIBehavior as organizationMembersAdminUIBehaviorSource,\n organizationMembersMainResourceUIBehavior as organizationMembersUIBehaviorSource,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n AdministrativeContinuityErrorCode,\n CORE_ORG_ROLES,\n CoreResourceOperation as Op,\n ErrorCustomMessageReference,\n ErrorSeverity,\n ErrorType,\n OrganizationMemberSchema,\n OrganizationMemberStatus,\n OrganizationMembers_Operations,\n ResourcePrimaryScope,\n organizationMembersResourceConfiguration_InitializationFactory as organizationMembersFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype Cfg = ReturnType<typeof organizationMembersFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst organizationMembersResourceUIBehavior = organizationMembersUIBehaviorSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\nconst organizationMembersAdminResourceUIBehavior = organizationMembersAdminUIBehaviorSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\n\nconst ORGANIZATION_MEMBER_EXAMPLE = {\n _id: 'organization_member_01HX2EXAMPLE',\n userId: 'user_01HX2EXAMPLE',\n userEmail: 'alex.morgan@example.com',\n organizationId: 'organization_01HX2EXAMPLE',\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n status: OrganizationMemberStatus.ACTIVE,\n userTitle: 'Staff Engineer',\n instanceLabel: 'Alex Morgan',\n createdAt: '2026-07-03T09:15:00.000Z',\n updatedAt: '2026-08-18T08:00:00.000Z',\n _version: 4,\n} as const;\n\nconst ORGANIZATION_MEMBER_SUMMARY_EXAMPLE = {\n _id: ORGANIZATION_MEMBER_EXAMPLE._id,\n userId: ORGANIZATION_MEMBER_EXAMPLE.userId,\n userEmail: ORGANIZATION_MEMBER_EXAMPLE.userEmail,\n organizationId: ORGANIZATION_MEMBER_EXAMPLE.organizationId,\n roles: ORGANIZATION_MEMBER_EXAMPLE.roles,\n status: ORGANIZATION_MEMBER_EXAMPLE.status,\n // No `userTitle`: a job title is not a summary field (#1852), so the directory row does not carry it.\n instanceLabel: ORGANIZATION_MEMBER_EXAMPLE.instanceLabel,\n _version: ORGANIZATION_MEMBER_EXAMPLE._version,\n} as const;\n\nconst ORGANIZATION_MEMBER_CONTEXT_EXAMPLE = {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n user: { _id: ORGANIZATION_MEMBER_EXAMPLE.userId },\n organization: { _id: ORGANIZATION_MEMBER_EXAMPLE.organizationId },\n} as const;\n\nfunction organizationMembersPage<T>(data: readonly T[]) {\n return {\n data,\n pagination: { page: 1, limit: 20, total: data.length, totalPages: data.length === 0 ? 0 : 1 },\n };\n}\n\nconst ORGANIZATION_MEMBERS_PAGE_REQUEST = { page: 1, limit: 20, sort: 'createdAt:desc' } as const;\n\nexport const organizationMembersResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(organizationMembersResourceUIBehavior),\n resourceFrontendConfiguration(organizationMembersAdminResourceUIBehavior),\n ),\n resourceSpecification(\n organizationMembersFactory,\n OrganizationMemberSchema,\n ({ schemaShape }) => ({\n purpose: 'Represents one person’s membership in an organization, including their organization roles, directory title, and current access state.',\n businessRole: 'Use this resource to browse the organization directory and to manage invitations, membership access, and organization-level authority.',\n lifecycleRole: 'A membership begins as a pending invitation or an active provisioned membership, can be updated or suspended, and ends when the invitation is revoked or the member is removed.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.ORGANIZATIONS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrganizationMemberSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'organizationMembersResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'ORGANIZATION_MEMBERS',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n customEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrganizationMembers_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'organizationMembersMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'organizationMembersAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'The user this membership gives access to the organization.',\n whyItMatters: 'A membership has no name of its own: its name and email are read from this user and their profile (`userProfiles`). Together with `organizationId` it is the membership’s unique key, so a user holds at most one membership per organization.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n roles: schemaShape.roles.arraySpec({\n meaning: 'Org-wide roles granted to this member — the authority set every access check evaluates for the user within this organization.',\n elementMeaning: 'One role identifier: an organization role the framework defines (such as `ORG_ADMIN` or `ORG_MEMBER`) or a role the application defines.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CORE_ORG_ROLES',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n }),\n userTitle: schemaShape.userTitle.stringSpec({ meaning: 'Authored job title / role label for the member (e.g. “Engineering Lead”). Distinct from the directory record label — that is the linked user’s name (see `instanceLabel`).', whyItMatters: 'A fact of the member\\'s own page, not a summary field (#1852): most members have none, so a directory column or card line for it said nothing on most rows.' }),\n instanceLabel: schemaShape.instanceLabel.stringSpec({ meaning: 'The member’s name, read from the user’s profile (`userProfiles`) each time the membership is read: their first and last name. It is computed, never stored, so it always shows the current name. When the profile is unavailable it falls back to `userEmail`. Returned by a single read as well as on every list row.' }),\n userEmail: schemaShape.userEmail.stringSpec({ meaning: 'The member’s email address as it was when the membership was created; it never changes afterwards. Member search matches it directly (first and last names are matched through the user’s profile), and it names the member when `instanceLabel` cannot. The user’s current email is on the user (`users`). Read-only for clients.' }),\n status: schemaShape.status.enumSpec({\n meaning: 'Membership lifecycle and access posture in this org.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrganizationMemberStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [OrganizationMemberStatus.INVITED]: { meaning: 'A pending invitation — the membership was extended (via CREATE) but the invitee has not accepted yet. Carries a single-use accept link. Flips to ACTIVE on acceptance; the record is DELETED on decline/revoke (no terminal \"rejected\" status — the invite IS the membership in this pending state).' },\n [OrganizationMemberStatus.ACTIVE]: { meaning: 'Can participate as roles allow.' },\n [OrganizationMemberStatus.INACTIVE]: { meaning: 'Record retained but not participating.' },\n [OrganizationMemberStatus.SUSPENDED]: { meaning: 'Access blocked in-org while record remains.' },\n },\n }),\n organizationRelationshipId: schemaShape.organizationRelationshipId.stringSpec({\n meaning: 'Present only on a relationship membership: the organization relationship through which a representative of another organization is present in this organization.',\n whyItMatters: 'It changes what the row means everywhere. The membership confers authority only while that relationship passes the per-request live filter (active, within its term, its kind still admitting it with its role, the representative still an active member of the representing organization and assigned to it); its `roles` are owned by the relationship and cannot be edited here; it never counts toward the owner floor and cannot receive ownership; it grants no user type; and it is not part of the organization\\'s SCIM directory. System-written only by the relationship verbs: `assign` creates or re-points it, `amendScope` keeps its `roles` equal to the relationship\\'s role, and `unassign` or the relationship ending makes an ACTIVE one INACTIVE. The row keeps the (user, organization) key after the relationship or assignment ends (INACTIVE), so inviting that person as the organization\\'s own member is refused with `RELATIONSHIP_MEMBERSHIP_CONFLICTS_WITH_INVITATION` until the ended membership is removed. A relationship membership the organization SUSPENDS stays suspended when the representing organization unassigns the person or the relationship ends, and the representing organization cannot re-assign them (`REPRESENTATIVE_SUSPENDED_BY_GRANTOR`) until the organization reactivates it. Reactivating a relationship membership (by hand or by the reactivation sweep) restores ACTIVE only while its relationship has not ended (ACTIVE or SUSPENDED) and the person is still assigned; otherwise it lands INACTIVE, and a later assignment re-points it. Whether an ACTIVE row confers is the live filter\\'s decision on each request. Deleting a relationship membership ends the representing organization\\'s assignment of that person in the same transaction; it does not stop the representing organization assigning them again under the relationship — suspension is the organization\\'s bar against one person.',\n }),\n representingOrganizationId: schemaShape.representingOrganizationId.stringSpec({\n meaning: 'Present only on a relationship membership: the representing organization whose representative holds it.',\n whyItMatters: 'The live filter requires the representative to hold an active, ordinary membership in the representing organization, and that organization to still confer authority — a representing organization that deprovisions its representative ends their reach into every granting organization on the next request.',\n }),\n representingOrganizationName: schemaShape.representingOrganizationName.stringSpec({\n meaning: 'Present only on a relationship membership: the representing organization\\'s name, copied from its relationship when the representative was assigned — what the directory shows as \"via {Organization}\".',\n whyItMatters: 'The granting organization can never read the representing organization\\'s row, which lives in another tenant, so without this snapshot the directory could name that organization only by an opaque id. It is display only and decides nothing.',\n }),\n scheduledReactivationAt: schemaShape.scheduledReactivationAt.dateSpec({\n meaning: 'When an automated sweep lifts this suspension by dispatching REACTIVATE — to ACTIVE, or to INACTIVE for a relationship membership whose relationship has ended or whose person is no longer assigned. Set by SUSPEND when the caller time-boxes the suspension (its request contract calls this `suspensionEndDate`), cleared by REACTIVATE. Absent means the suspension is indefinite and only an explicit REACTIVATE lifts it — the default, since an unbounded suspension is the safer reading of “suspend”.',\n whyItMatters: 'The same field on a user (`users`), set by an administrator’s time-boxed suspension of the account, carries the same name and meaning. Read-only for clients: only the status operations write it, as for `status`.',\n }),\n scheduledReactivationPerformedAt: schemaShape.scheduledReactivationPerformedAt.dateSpec({\n meaning: 'When the reactivation sweep last lifted this membership\\'s time-boxed suspension because `scheduledReactivationAt` had passed. Written only by REACTIVATE when the system runs it on schedule; an administrator\\'s REACTIVATE leaves it as it was. Kept until the next scheduled lift overwrites it.',\n whyItMatters: 'It is the scheduled lift\\'s own stamp: the lift\\'s audit row is keyed by it, so a lift whose commit could not be confirmed (its reply was lost) is found by the sweep\\'s next run and its row and notices are written once. Server-owned, and it decides nothing about what the member may do.',\n }),\n invitedByUserId: schemaShape.invitedByUserId.stringSpec({\n meaning: 'The user who sent the invitation this membership started from. Set by the application; absent when the member was added directly or provisioned by the system.',\n whyItMatters: 'A record of who invited the member, not a link the API follows: the membership\\'s user is `userId`.',\n }),\n invitedAt: schemaShape.invitedAt.dateSpec({\n meaning: 'When the invitation was sent. Set by the application and never changed; absent when the member was not invited. Pending invitations expire relative to it.',\n }),\n },\n operations: {\n [Op.COUNT]: {\n purpose: 'Return the total number of memberships visible in the selected organization or relationship scope.',\n outcome: 'A single non-negative membership count is returned. A caller present in the organization only as a representative of another organization reads the organization\\'s own members and their own relationship\\'s representatives, never another relationship\\'s representatives (#2614).',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The current membership count is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization member permitted to read the membership count.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Count organization memberships',\n response: { count: 37 },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.CREATE]: {\n purpose: 'Invite a person by email, or provision an existing user through a user-linked relationship route. Email invitations create an INVITED membership; direct provisioning creates an ACTIVE membership.',\n outcome: 'The membership is created with its initial organization roles. An invitation sends one single-use acceptance link; direct provisioning sends no acceptance link. The resolved role grant is recorded in the audit trail.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A membership record was created linking the user to the organization with its initial roles, and the new record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The user reference, roles, or title fail schema validation.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an organization admin nor a representative of another organization holding `INVITE_MEMBERS` through a live capability grant this organization lent (#1631), or asks for a role above its own ceiling (`role_ceiling_exceeded`) — a delegated capability role is never grantable, and a representative\\'s ceiling is the role its relationship confers.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The user already holds a membership in this organization.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Invite a member by email with an initial title',\n request: {\n userEmail: 'new.lead@acme.com',\n userTitle: 'Engineering Lead',\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n },\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n userEmail: 'new.lead@acme.com',\n userTitle: 'Engineering Lead',\n status: OrganizationMemberStatus.INVITED,\n invitedByUserId: 'user_admin_01HX2EXAMPLE',\n invitedAt: '2026-08-18T08:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.READ]: {\n purpose: 'Retrieve one membership by its route identity. The `admin` variant is a platform super-administrator\\u2019s read of a member of a tenant they do not belong to (#2315), and crosses only under that tenant\\u2019s platform access grant.',\n outcome: 'The member’s organization roles, lifecycle state, directory title, and public identifiers are returned. A caller present in the organization only as a representative of another organization reads the organization\\'s own members and their own relationship\\'s representatives, never another relationship\\'s representatives (#2614). The membership of another relationship\\'s representative is not found for them.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The membership was found and its roles, title, state, and public identifiers are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization. On the `admin` variant, also when the caller holds no usable platform access grant for the tenant: answered exactly like a missing row, so nobody can probe which ids exist.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization member permitted to read the membership directory, or uses the `admin` variant without the platform super-administrator role.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Inspect an active organization member',\n response: ORGANIZATION_MEMBER_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Inspect a member with relationship identifiers',\n response: ORGANIZATION_MEMBER_CONTEXT_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Inspect the compact member summary',\n response: ORGANIZATION_MEMBER_SUMMARY_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'Browse the organization membership directory as a paginated collection. The `admin` variant is a platform super-administrator\\u2019s list of a tenant\\u2019s members (#2315), crossing only under that tenant\\u2019s platform access grant; every crossing is recorded as cross-tenant administrative access.',\n outcome: 'A page of memberships and pagination metadata is returned. A caller present in the organization only as a representative of another organization reads the organization\\'s own members and their own relationship\\'s representatives, never another relationship\\'s representatives (#2614).',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of membership records for the organization directory.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization member permitted to browse the membership directory, or uses the `admin` variant without the platform super-administrator role or without a usable platform access grant for the tenant.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Browse organization members',\n request: ORGANIZATION_MEMBERS_PAGE_REQUEST,\n response: organizationMembersPage([ORGANIZATION_MEMBER_EXAMPLE]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Browse members with relationship identifiers',\n request: ORGANIZATION_MEMBERS_PAGE_REQUEST,\n response: organizationMembersPage([{\n ...ORGANIZATION_MEMBER_EXAMPLE,\n user: { _id: ORGANIZATION_MEMBER_EXAMPLE.userId },\n organization: { _id: ORGANIZATION_MEMBER_EXAMPLE.organizationId },\n }]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Browse compact member summaries',\n request: ORGANIZATION_MEMBERS_PAGE_REQUEST,\n response: organizationMembersPage([ORGANIZATION_MEMBER_SUMMARY_EXAMPLE]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.SEARCH]: {\n purpose: 'Searchable member roster — matches on the member’s email (own field) and, through the linked user profile, on first/last name.',\n outcome: 'Org members matching the query by email or name, for people pickers and large-roster look-ups. A caller present in the organization only as a representative of another organization reads the organization\\'s own members and their own relationship\\'s representatives, never another relationship\\'s representatives (#2614). The organization\\'s people picker (`/organizations/{organizationId}/users/search`) is confined the same way.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of members whose email, or whose linked profile’s first/last name, matches the search query.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization member permitted to search the membership directory.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Find active members by email or name',\n request: { q: 'alex', status: OrganizationMemberStatus.ACTIVE, page: 1, limit: 20, sort: 'status:asc' },\n response: organizationMembersPage([ORGANIZATION_MEMBER_EXAMPLE]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.UPDATE]: {\n purpose: 'Update a member’s directory title or organization roles. This is the only API operation used to change a membership’s role set.',\n outcome: 'The updated membership is returned. Role changes take effect for subsequent authorization decisions and emit a dedicated authorization audit event with the previous and resulting role sets.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The membership’s title/org-unit/roles were updated and the new state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited title, org-unit, or role set fails schema validation.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin permitted to edit memberships.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The edit would remove the LAST administratively usable owner of the organization — either by rewriting `roles` so they no longer confer `ORG_OWNER` (directly or by inheritance), or by moving the membership `status` out of ACTIVE (the only status whose roles reach `initiatorRoles`). Grant an owner role to another active member first. Not a 403: the caller IS authorized — the current state of the organization forbids it. No TENANT authority lifts this floor; a platform administrator can repair an already-stranded organization through `grantOwnership`, which is the only cross-tenant variant this resource declares. An owner counts only when the membership is ACTIVE AND the linked user is ACTIVE; organizations in a terminal state (CANCELLED, DELETED, soft-deleted) are not protected.', customMessageReference: ErrorCustomMessageReference.LAST_ORGANIZATION_OWNER },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Update a member’s directory title without changing authority',\n request: { userTitle: 'Staff Engineer' },\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n userTitle: 'Staff Engineer',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [Op.DELETE]: {\n purpose: 'Remove an accepted member from the organization. Use REVOKE instead for a still-pending invitation.',\n outcome: 'The membership and its organization-unit assignments are removed, organization-scoped access ends, and the withdrawn roles and unit grants are recorded in the audit trail. For a relationship membership, the representing organization\\'s active assignment of that person to the relationship ends in the same transaction and is recorded as an unassignment, and that organization\\'s owners and administrators are emailed.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The membership record was removed; the body carries its `id`.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id (or it was already removed).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an organization admin nor a representative of another organization holding `MANAGE_RELATIONSHIP_REPRESENTATIVES` through a live capability grant this organization lent (#1631).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller holds `MANAGE_RELATIONSHIP_REPRESENTATIVES` (a capability a granting organization lends a relationship\\'s representing organization, #1631) and the target is not a representative of the SAME relationship it acts in the organization through — an ordinary member, another representing organization\\'s representative, or a representative of another of its relationships. Carries `code: RELATIONSHIP_CAPABILITY_TARGET_OUTSIDE_RELATIONSHIP`.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The target is the LAST administratively usable owner of the organization. Destroying the row that holds the last tenant authority strands the organization exactly as demoting it would, so it is refused on the same terms — grant an owner role to another active member first. Also returned when the membership snapshot cannot be read, since the floor must not assume an unreadable row is not the last owner.', customMessageReference: ErrorCustomMessageReference.LAST_ORGANIZATION_OWNER },\n ],\n idempotent: true,\n examples: [{\n title: 'Refuse removal of the last usable organization owner',\n response: {\n error: {\n type: ErrorType.CONFLICT,\n severity: ErrorSeverity.MEDIUM,\n message: ErrorCustomMessageReference.LAST_ORGANIZATION_OWNER,\n customMessage: ErrorCustomMessageReference.LAST_ORGANIZATION_OWNER,\n customMessageReference: ErrorCustomMessageReference.LAST_ORGANIZATION_OWNER,\n code: AdministrativeContinuityErrorCode.LAST_ORGANIZATION_OWNER,\n timestamp: '2026-08-18T08:00:00.000Z',\n },\n },\n forStatus: HttpResponseStatusCode.CONFLICT_409,\n }],\n },\n [OrganizationMembers_Operations.SUSPEND]: {\n operationId: OrganizationMembers_Operations.SUSPEND,\n purpose: 'Temporarily block access without deleting the membership record.',\n outcome: 'The membership becomes SUSPENDED and no longer grants organization access. If `suspensionEndDate` is supplied, it is exposed as `scheduledReactivationAt` and the membership is reactivated after that instant; otherwise an administrator must reactivate it explicitly. The suspended member is emailed about it, even with email notifications turned off, and the organization\\'s other active members, apart from the administrator who suspended it, are notified. A representative\\'s suspension is also emailed to the representing organization\\'s owners and administrators.',\n whenToUse: 'Use for temporary security or policy holds where the membership history must remain available. The last usable organization owner cannot be suspended.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The membership transitioned to suspended and the updated record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an organization admin nor a representative of another organization holding `MANAGE_RELATIONSHIP_REPRESENTATIVES` through a live capability grant this organization lent (#1631).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller holds `MANAGE_RELATIONSHIP_REPRESENTATIVES` (a capability a granting organization lends a relationship\\'s representing organization, #1631) and the target is not a representative of the SAME relationship it acts in the organization through — an ordinary member, another representing organization\\'s representative, or a representative of another of its relationships. Carries `code: RELATIONSHIP_CAPABILITY_TARGET_OUTSIDE_RELATIONSHIP`.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation is unavailable because the membership is not currently ACTIVE.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The membership is not ACTIVE, so this is not a legal transition — an INVITED row has not accepted yet (cancel it with REVOKE, which also revokes the accept token) and an INACTIVE or already-SUSPENDED one is already out. Carries `resource_status_transition_conflict`, whose context names the current status, the target status and the permitted source statuses, so a client can re-read and show the real state rather than treating it as an opaque clash. Most callers meet the earlier `enabledCondition` gate (403) instead; this reference covers the paths that gate does not reach.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The target is the organization’s LAST administratively usable owner (an ACTIVE membership holding a role that confers `ORG_OWNER`, directly or by inheritance, whose linked user is also ACTIVE). Suspending it leaves the organization with no principal able to administer it, so the tenant cannot administer itself afterwards. Grant an owner role to another active member first. Recovery is not impossible \\u2014 a platform administrator holds `grantOwnership` \\u2014 but it is an out-of-tenant escalation, which is why the in-tenant refusal stands. Not a 403: the caller IS authorized; the current state of the organization forbids it. Carries the stable client-branchable `code: LAST_ORGANIZATION_OWNER` — a DIFFERENT code from the application floor, because the remedy is scoped to this organization.', customMessageReference: ErrorCustomMessageReference.LAST_ORGANIZATION_OWNER },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Suspend a member until a scheduled review date',\n request: {\n suspensionReason: 'Access paused while the security review is completed.',\n suspensionEndDate: '2026-09-01T09:00:00.000Z',\n },\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n status: OrganizationMemberStatus.SUSPENDED,\n scheduledReactivationAt: '2026-09-01T09:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrganizationMembers_Operations.REACTIVATE]: {\n operationId: OrganizationMembers_Operations.REACTIVATE,\n purpose: 'Restore access for a currently suspended organization member.',\n outcome: 'The membership becomes ACTIVE with its existing roles and any scheduled reactivation deadline is cleared. A relationship membership becomes ACTIVE only while its relationship is still live (accepted and not ended — a suspended relationship counts) and the person is still assigned to it; otherwise it becomes INACTIVE, the state the relationship\\'s end or the unassignment would have given it, and a later assignment re-points it. An ACTIVE relationship membership confers authority only while the relationship does — the per-request live filter decides that. When the membership comes back ACTIVE, the member is emailed, even with email notifications turned off and also when the scheduled sweep lifted the suspension. The organization\\'s other active members are notified as well, leaving out the administrator who acted and the member themself (who has their own notice); a reactivation by the scheduled sweep is announced to the membership\\'s organization the same way. A representative restored to ACTIVE is also announced to the representing organization\\'s owners and administrators. A row that lands INACTIVE notifies nobody.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The suspended membership transitioned back to active and the updated record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin permitted to reactivate members. Deliberately NOT opened to `MANAGE_RELATIONSHIP_REPRESENTATIVES` (#1631): a suspension is the organization\\'s bar against one person, which a representing organization may never lift, even for its own representative.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation is unavailable because the membership is not currently SUSPENDED.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The membership is not SUSPENDED, so there is nothing to reactivate — notably an INVITED row is refused here rather than being silently promoted, which would grant a membership nobody accepted. Carries `resource_status_transition_conflict` with the current and permitted statuses in its context.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Reactivate a member after the review is complete',\n request: { reason: 'Security review completed without further action.' },\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n status: OrganizationMemberStatus.ACTIVE,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrganizationMembers_Operations.REVOKE]: {\n operationId: OrganizationMembers_Operations.REVOKE,\n purpose: 'Cancel a still-pending organization invitation. Use DELETE instead for an accepted member.',\n outcome: 'The INVITED membership is removed together with any organization-unit assignments it already carried, its acceptance token can no longer be used, and the invitee and acting administrator are notified. The optional reason is retained in the audit event.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The pending invitation was revoked (the INVITED membership removed) and a confirmation is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an organization admin nor a representative of another organization holding `INVITE_MEMBERS` through a live capability grant this organization lent (#1631).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation is unavailable because the membership is no longer INVITED.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Revoke a pending invitation before it is accepted',\n request: { reason: 'The invitee joined through another organization.' },\n // A delete answers with the removed record's id alone (#1838).\n response: { id: ORGANIZATION_MEMBER_EXAMPLE._id },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrganizationMembers_Operations.GRANT_OWNERSHIP]: {\n operationId: OrganizationMembers_Operations.GRANT_OWNERSHIP,\n purpose: 'Platform-tier repair door: grant ownership to an EXISTING member of an organization that has no administratively usable owner left — the ownership role the organization\\'s type offers (its founding owner role, else `ORG_OWNER`).',\n outcome: 'The existing ACTIVE membership gains the owner-conferring role; no role is removed and no new membership is created. The cross-tenant repair is audited with the required justification and the organization is notified.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The member now holds an owner-conferring role. Idempotent: a member who already owns the organization returns 200 with their role set unchanged.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The organization\\'s type offers no role that confers ownership (#2607). The door grants the type\\'s founding owner role, else `ORG_OWNER`, and only when the type offers it: a role the type does not grant would confer nothing, so the organization would stay as ownerless as before.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold `APP_ADMIN_SUPER_ADMIN` at APPLICATION scope. An organization-scope caller who merely writes that string into their own membership `roles` is denied: the role gate resolves an organization-scope entry against the organization role table, which does not contain that key.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The target membership is not administratively usable (only ACTIVE rows confer roles), or the linked user is not usable. Granting either would answer 200 while leaving the organization with zero usable owners \\u2014 a repair that repairs nothing and stops the operator looking. Fix the membership or user lifecycle first. Also returned when the user row cannot be read, since absence is not evidence of a usable owner.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Repair a stranded organization by granting an existing member ownership',\n request: { justification: 'Restore tenant administration after the sole owner was removed during account recovery.' },\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n roles: [CORE_ORG_ROLES.ORG_MEMBER, CORE_ORG_ROLES.ORG_OWNER],\n status: OrganizationMemberStatus.ACTIVE,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrganizationMembers_Operations.MAKE_OWNER]: {\n operationId: OrganizationMembers_Operations.MAKE_OWNER,\n purpose: 'An owner makes another member an owner of the organization too. An organization may have several owners, and having at least two keeps it administrable when one leaves.',\n outcome: 'The member keeps their roles and gains the owner role. The organization\\'s administrators are notified, and the change is recorded with the roles before and after.',\n whenToUse: 'Adding a second owner, or the first step of handing ownership to someone else (make them an owner, then step down).',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The member is an owner. A member who already was one returns 200 with their roles unchanged.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an owner of this organization.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership exists for the supplied id in this organization.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The organization\\'s type offers no role that confers ownership (#2607). The door grants the type\\'s founding owner role, else `ORG_OWNER`, and only when the type offers it: a role the type does not grant would confer nothing, so the organization would stay as ownerless as before.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The membership is not active, or its user is not active, so the new owner would not count as one. Also returned for a membership held through an organization relationship, whose roles that relationship decides.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Make a second owner',\n request: {},\n response: { ...ORGANIZATION_MEMBER_EXAMPLE, roles: [CORE_ORG_ROLES.ORG_MEMBER, CORE_ORG_ROLES.ORG_OWNER], status: OrganizationMemberStatus.ACTIVE },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [OrganizationMembers_Operations.STEP_DOWN_AS_OWNER]: {\n operationId: OrganizationMembers_Operations.STEP_DOWN_AS_OWNER,\n purpose: 'An owner gives up ownership of their own membership and stays an administrator — or a member, when the organization\\'s type offers no administrator role (#2607).',\n outcome: 'The owner role is replaced by the administrator role, or by the type\\'s default member role when the type does not offer `ORG_ADMIN` — never by a role the type does not offer. The organization\\'s administrators are notified, and the change is recorded with the roles before and after.',\n whenToUse: 'The second step of handing ownership over, once another member is an owner. To leave administration too, edit or remove the membership afterwards.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The caller is no longer an owner and is an administrator.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an owner, or the membership is not the caller\\'s own.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The caller is the organization\\'s last usable owner. Make another member an owner first.', customMessageReference: ErrorCustomMessageReference.LAST_ORGANIZATION_OWNER },\n ],\n idempotent: false,\n examples: [{\n title: 'Step down after handing ownership over',\n request: {},\n response: { ...ORGANIZATION_MEMBER_EXAMPLE, roles: [CORE_ORG_ROLES.ORG_ADMIN], status: OrganizationMemberStatus.ACTIVE },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [OrganizationMembers_Operations.RESEND]: {\n operationId: OrganizationMembers_Operations.RESEND,\n purpose: 'Re-mint and re-send the accept link for a still-pending invitation (an INVITED membership).',\n outcome: 'A fresh single-use accept token is issued (revoking any prior token for this membership) and the invitation email is re-delivered to the invitee.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A new accept token was minted and the invitation email re-sent; a confirmation is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an organization admin nor a representative of another organization holding `INVITE_MEMBERS` through a live capability grant this organization lent (#1631).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation is unavailable because the membership is no longer INVITED.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Send a fresh acceptance link for a pending invitation',\n request: {},\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n status: OrganizationMemberStatus.INVITED,\n invitedByUserId: 'user_admin_01HX2EXAMPLE',\n invitedAt: '2026-08-18T08:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n businessConstraints: [\n 'CREATE is polymorphic: the accept-link email AND the single-use accept token fire ONLY for the INVITE branch (resulting status INVITED). A direct/system provisioning create (userId supplied — founder org-owner grant, SSO JIT, SCIM) persists an ACTIVE row and fires NEITHER side-effect (nothing to accept; its `userEmail` is the member’s own address). The gate is keyed on the resulting `status`, not on which identity field the caller supplied.',\n 'Factory declares userNotifications on several mutations; companion should ground email/SMS copy on runtime `userNotifications[]`, not invent channels absent from the configuration.',\n 'Member search matches `userEmail` and the member’s first and last name. Names are matched through the user profiles (`userProfiles`), read as they are now rather than copied onto the membership. Results stay within the caller’s organization.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n ),\n () => ({\n layout: {\n purpose: 'The organization member directory (Settings → Members): who belongs, with which roles, in which state.',\n headerPurpose: 'The READ header: the member\\'s name (the forwarded `instanceLabel`, else the membership\\'s `userEmail`) on the title line, and the `status` badge on the facts line under it. Neither repeats in the body.',\n displayPurpose: 'READ is one flat list of rows and documents no section: `roles`, then `userTitle` and `representingOrganizationName` when set (both hide when empty), then `createdAt`. Unit assignments are the ORGANIZATION_UNIT_MEMBERS resource, composed below as its own tab.',\n summaryPurpose: 'A member card: the resolved member name as the title, then `status`, `roles` and the representing organization as bare values. The two relationship identifiers are hidden from display, so they are not directory columns; `representingOrganizationName` is their readable form.',\n editPurpose: 'One flat form, no section: the invitee `userEmail` first and focused (CREATE only), then `roles` and `userTitle`. `status` is owned by SUSPEND / REACTIVATE / REVOKE and never appears on a form.',\n },\n views: {\n [Op.COUNT]: { purpose: 'Header metrics and cap enforcement surfaces.', whenToUse: 'Dashboards, billing seat counts, and upgrade prompts.' },\n [Op.CREATE]: { purpose: 'Invite (writes an INVITED row + emails an accept link) or direct-add flows in org admin UIs.', whenToUse: 'Inviting a teammate by email, onboarding, and bulk import.' },\n [Op.READ]: {\n variants: {\n default: { purpose: 'Profile drawer and permission summaries.', whenToUse: 'Click-through from directory rows.' },\n admin: { purpose: 'One member of a tenant the operator does not belong to, opened from the operator\\u2019s list of its members (#2315). Crosses only under a usable platform access grant.', whenToUse: 'An operator checking who a member is and what they hold.' },\n },\n },\n [Op.LIST]: {\n variants: {\n default: { purpose: 'Addressable roster list per merged preset (only `LIST` is addressable).', whenToUse: 'Default org directory experience.' },\n admin: { purpose: 'A tenant\\u2019s members, on the tenant directory\\u2019s page for that organization (#2315), shown once the page\\u2019s own read has answered. Crosses only under a usable platform access grant.', whenToUse: 'An operator finding who administers a tenant, or the member `grantOwnership` would promote.' },\n },\n },\n [Op.SEARCH]: { purpose: 'Member discovery by email or name when search is enabled.', whenToUse: 'Large-tenant look-ups and people pickers.' },\n [Op.UPDATE]: { purpose: 'Inline edit of metadata, roles, and org-unit links.', whenToUse: 'HR and IT directory maintenance, and every role change — there is no dedicated promote/demote verb.' },\n [Op.DELETE]: { purpose: 'Revoke and remove directory presence.', whenToUse: 'Offboarding, abuse, and access reviews.' },\n [OrganizationMembers_Operations.SUSPEND]: { purpose: 'Degraded access while retaining audit of membership history.', whenToUse: 'Short-term ToS and security holds.' },\n [OrganizationMembers_Operations.REACTIVATE]: { purpose: 'Re-open access after hold clears.', whenToUse: 'After payment or review completion.' },\n [OrganizationMembers_Operations.REVOKE]: { purpose: 'Cancel a still-pending invitation (deletes the INVITED row and any unit assignments it carries, and revokes its accept token).', whenToUse: 'From the members list, on a row still showing INVITED.' },\n // GRANT_OWNERSHIP is offered on the operator's crossed list of a tenant's members (#2315). On the tenant's own\n // roster it reaches nobody but a platform super-administrator who is also a member, whom the backend admits for\n // a per-instance verb; an ordinary member never holds its role, so the tenant surface does not offer it to them.\n [OrganizationMembers_Operations.GRANT_OWNERSHIP]: { purpose: 'The platform operator\\u2019s repair of a tenant with no usable owner: make an existing active member an owner, with a recorded justification. On the tenant directory\\u2019s page for that organization, under a usable platform access grant.', whenToUse: 'A tenant that can no longer administer itself, after confirming it has no usable owner (see the runbook in the administrative-continuity rule).' },\n [OrganizationMembers_Operations.RESEND]: { purpose: 'Re-issue the accept link for a still-pending invitation.', whenToUse: 'When an invitee lost or never received the original invite email.' },\n [OrganizationMembers_Operations.MAKE_OWNER]: { purpose: 'Offered to an owner on an active member who is not an owner yet.', whenToUse: 'Adding a second owner, or handing ownership over.' },\n [OrganizationMembers_Operations.STEP_DOWN_AS_OWNER]: { purpose: 'Offered to an owner on their own row only.', whenToUse: 'Once another member is an owner, to give up ownership and stay an administrator.' },\n },\n }),\n);\n"]}
1
+ {"version":3,"file":"organization-members.resource.specification.js","sourceRoot":"","sources":["../../../../../src/engine/organizations/resources/organization-members.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0CAA0C,IAAI,wCAAwC,EACtF,yCAAyC,IAAI,mCAAmC,GACjF,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,iCAAiC,EACjC,cAAc,EACd,qBAAqB,IAAI,EAAE,EAC3B,2BAA2B,EAC3B,aAAa,EACb,SAAS,EACT,wBAAwB,EACxB,wBAAwB,EACxB,8BAA8B,EAC9B,oBAAoB,EACpB,8DAA8D,IAAI,0BAA0B,GAC7F,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GA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AA8B,CAAC,kBAAkB,CAAC,EAAE,EAAE,OAAO,EAAE,4CAA4C,EAAE,SAAS,EAAE,kFAAkF,EAAE;KAC9M;CACF,CAAC,CACH,CAAC","sourcesContent":["import {\n organizationMembersAdminResourceUIBehavior as organizationMembersAdminUIBehaviorSource,\n organizationMembersMainResourceUIBehavior as organizationMembersUIBehaviorSource,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n AdministrativeContinuityErrorCode,\n CORE_ORG_ROLES,\n CoreResourceOperation as Op,\n ErrorCustomMessageReference,\n ErrorSeverity,\n ErrorType,\n OrganizationMemberSchema,\n OrganizationMemberStatus,\n OrganizationMembers_Operations,\n ResourcePrimaryScope,\n organizationMembersResourceConfiguration_InitializationFactory as organizationMembersFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype Cfg = ReturnType<typeof organizationMembersFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst organizationMembersResourceUIBehavior = organizationMembersUIBehaviorSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\nconst organizationMembersAdminResourceUIBehavior = organizationMembersAdminUIBehaviorSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\n\nconst ORGANIZATION_MEMBER_EXAMPLE = {\n _id: 'organization_member_01HX2EXAMPLE',\n userId: 'user_01HX2EXAMPLE',\n userEmail: 'alex.morgan@example.com',\n organizationId: 'organization_01HX2EXAMPLE',\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n status: OrganizationMemberStatus.ACTIVE,\n userTitle: 'Staff Engineer',\n instanceLabel: 'Alex Morgan',\n createdAt: '2026-07-03T09:15:00.000Z',\n updatedAt: '2026-08-18T08:00:00.000Z',\n _version: 4,\n} as const;\n\nconst ORGANIZATION_MEMBER_SUMMARY_EXAMPLE = {\n _id: ORGANIZATION_MEMBER_EXAMPLE._id,\n userId: ORGANIZATION_MEMBER_EXAMPLE.userId,\n userEmail: ORGANIZATION_MEMBER_EXAMPLE.userEmail,\n organizationId: ORGANIZATION_MEMBER_EXAMPLE.organizationId,\n roles: ORGANIZATION_MEMBER_EXAMPLE.roles,\n status: ORGANIZATION_MEMBER_EXAMPLE.status,\n // No `userTitle`: a job title is not a summary field (#1852), so the directory row does not carry it.\n instanceLabel: ORGANIZATION_MEMBER_EXAMPLE.instanceLabel,\n _version: ORGANIZATION_MEMBER_EXAMPLE._version,\n} as const;\n\nconst ORGANIZATION_MEMBER_CONTEXT_EXAMPLE = {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n user: { _id: ORGANIZATION_MEMBER_EXAMPLE.userId },\n organization: { _id: ORGANIZATION_MEMBER_EXAMPLE.organizationId },\n} as const;\n\nfunction organizationMembersPage<T>(data: readonly T[]) {\n return {\n data,\n pagination: { page: 1, limit: 20, total: data.length, totalPages: data.length === 0 ? 0 : 1 },\n };\n}\n\nconst ORGANIZATION_MEMBERS_PAGE_REQUEST = { page: 1, limit: 20, sort: 'createdAt:desc' } as const;\n\nexport const organizationMembersResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(organizationMembersResourceUIBehavior),\n resourceFrontendConfiguration(organizationMembersAdminResourceUIBehavior),\n ),\n resourceSpecification(\n organizationMembersFactory,\n OrganizationMemberSchema,\n ({ schemaShape }) => ({\n purpose: 'Represents one person’s membership in an organization, including their organization roles, directory title, and current access state.',\n businessRole: 'Use this resource to browse the organization directory and to manage invitations, membership access, and organization-level authority.',\n lifecycleRole: 'A membership begins as a pending invitation or an active provisioned membership, can be updated or suspended, and ends when the invitation is revoked or the member is removed.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.ORGANIZATIONS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrganizationMemberSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'organizationMembersResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'ORGANIZATION_MEMBERS',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n customEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrganizationMembers_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'organizationMembersMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'organizationMembersAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'The user this membership gives access to the organization.',\n whyItMatters: 'A membership has no name of its own: its name and email are read from this user and their profile (`userProfiles`). Together with `organizationId` it is the membership’s unique key, so a user holds at most one membership per organization.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n roles: schemaShape.roles.arraySpec({\n meaning: 'Org-wide roles granted to this member — the authority set every access check evaluates for the user within this organization.',\n elementMeaning: 'One role identifier: an organization role the framework defines (such as `ORG_ADMIN` or `ORG_MEMBER`) or a role the application defines.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CORE_ORG_ROLES',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n }),\n userTitle: schemaShape.userTitle.stringSpec({ meaning: 'Authored job title / role label for the member (e.g. “Engineering Lead”). Distinct from the directory record label — that is the linked user’s name (see `instanceLabel`).', whyItMatters: 'A fact of the member\\'s own page, not a summary field (#1852): most members have none, so a directory column or card line for it said nothing on most rows.' }),\n instanceLabel: schemaShape.instanceLabel.stringSpec({ meaning: 'The member’s name, read from the user’s profile (`userProfiles`) each time the membership is read: their first and last name. It is computed, never stored, so it always shows the current name. When the profile is unavailable it falls back to `userEmail`. Returned by a single read as well as on every list row.' }),\n userEmail: schemaShape.userEmail.stringSpec({ meaning: 'The member’s email address as it was when the membership was created; it never changes afterwards. Member search matches it directly (first and last names are matched through the user’s profile), and it names the member when `instanceLabel` cannot. The user’s current email is on the user (`users`). Read-only for clients.' }),\n status: schemaShape.status.enumSpec({\n meaning: 'Membership lifecycle and access posture in this org.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrganizationMemberStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [OrganizationMemberStatus.INVITED]: { meaning: 'A pending invitation — the membership was extended (via CREATE) but the invitee has not accepted yet. Carries a single-use accept link. Flips to ACTIVE on acceptance; the record is DELETED on decline/revoke (no terminal \"rejected\" status — the invite IS the membership in this pending state).' },\n [OrganizationMemberStatus.ACTIVE]: { meaning: 'Can participate as roles allow.' },\n [OrganizationMemberStatus.INACTIVE]: { meaning: 'Record retained but not participating.' },\n [OrganizationMemberStatus.SUSPENDED]: { meaning: 'Access blocked in-org while record remains.' },\n },\n }),\n organizationRelationshipId: schemaShape.organizationRelationshipId.stringSpec({\n meaning: 'Present only on a relationship membership: the organization relationship through which a representative of another organization is present in this organization.',\n whyItMatters: 'It changes what the row means everywhere. The membership confers authority only while that relationship passes the per-request live filter (active, within its term, its kind still admitting it with its role, the representative still an active member of the representing organization and assigned to it); its `roles` are owned by the relationship and cannot be edited here; it never counts toward the owner floor and cannot receive ownership; it grants no user type; and it is not part of the organization\\'s SCIM directory. System-written only by the relationship verbs: `assign` creates or re-points it, `amendScope` keeps its `roles` equal to the relationship\\'s role, and `unassign` or the relationship ending makes an ACTIVE one INACTIVE. The row keeps the (user, organization) key after the relationship or assignment ends (INACTIVE), so inviting that person as the organization\\'s own member is refused with `RELATIONSHIP_MEMBERSHIP_CONFLICTS_WITH_INVITATION` until the ended membership is removed. A relationship membership the organization SUSPENDS stays suspended when the representing organization unassigns the person or the relationship ends, and the representing organization cannot re-assign them (`REPRESENTATIVE_SUSPENDED_BY_GRANTOR`) until the organization reactivates it. Reactivating a relationship membership (by hand or by the reactivation sweep) restores ACTIVE only while its relationship has not ended (ACTIVE or SUSPENDED) and the person is still assigned; otherwise it lands INACTIVE, and a later assignment re-points it. Whether an ACTIVE row confers is the live filter\\'s decision on each request. Deleting a relationship membership ends the representing organization\\'s assignment of that person in the same transaction; it does not stop the representing organization assigning them again under the relationship — suspension is the organization\\'s bar against one person.',\n }),\n representingOrganizationId: schemaShape.representingOrganizationId.stringSpec({\n meaning: 'Present only on a relationship membership: the representing organization whose representative holds it.',\n whyItMatters: 'The live filter requires the representative to hold an active, ordinary membership in the representing organization, and that organization to still confer authority — a representing organization that deprovisions its representative ends their reach into every granting organization on the next request.',\n }),\n representingOrganizationName: schemaShape.representingOrganizationName.stringSpec({\n meaning: 'Present only on a relationship membership: the representing organization\\'s name, copied from its relationship when the representative was assigned — what the directory shows as \"via {Organization}\".',\n whyItMatters: 'The granting organization can never read the representing organization\\'s row, which lives in another tenant, so without this snapshot the directory could name that organization only by an opaque id. It is display only and decides nothing.',\n }),\n scheduledReactivationAt: schemaShape.scheduledReactivationAt.dateSpec({\n meaning: 'When an automated sweep lifts this suspension by dispatching REACTIVATE — to ACTIVE, or to INACTIVE for a relationship membership whose relationship has ended or whose person is no longer assigned. Set by SUSPEND when the caller time-boxes the suspension (its request contract calls this `suspensionEndDate`), cleared by REACTIVATE. Absent means the suspension is indefinite and only an explicit REACTIVATE lifts it — the default, since an unbounded suspension is the safer reading of “suspend”.',\n whyItMatters: 'The same field on a user (`users`), set by an administrator’s time-boxed suspension of the account, carries the same name and meaning. Read-only for clients: only the status operations write it, as for `status`.',\n }),\n scheduledReactivationPerformedAt: schemaShape.scheduledReactivationPerformedAt.dateSpec({\n meaning: 'When the reactivation sweep last lifted this membership\\'s time-boxed suspension because `scheduledReactivationAt` had passed. Written only by REACTIVATE when the system runs it on schedule; an administrator\\'s REACTIVATE leaves it as it was. Kept until the next scheduled lift overwrites it.',\n whyItMatters: 'It is the scheduled lift\\'s own stamp: the lift\\'s audit row is keyed by it, so a lift whose commit could not be confirmed (its reply was lost) is found by the sweep\\'s next run and its row and notices are written once. Server-owned, and it decides nothing about what the member may do.',\n }),\n invitedByUserId: schemaShape.invitedByUserId.stringSpec({\n meaning: 'The user who sent the invitation this membership started from. Set by the application; absent when the member was added directly or provisioned by the system.',\n whyItMatters: 'A record of who invited the member, not a link the API follows: the membership\\'s user is `userId`.',\n }),\n invitedAt: schemaShape.invitedAt.dateSpec({\n meaning: 'When the invitation was sent. Set by the application and never changed; absent when the member was not invited. Pending invitations expire relative to it.',\n }),\n },\n operations: {\n [Op.COUNT]: {\n purpose: 'Return the total number of memberships visible in the selected organization or relationship scope.',\n outcome: 'A single non-negative membership count is returned. A caller present in the organization only as a representative of another organization reads the organization\\'s own members and their own relationship\\'s representatives, never another relationship\\'s representatives (#2614).',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The current membership count is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization member permitted to read the membership count.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Count organization memberships',\n response: { count: 37 },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.CREATE]: {\n purpose: 'Invite a person by email, or provision an existing user through a user-linked relationship route. Email invitations create an INVITED membership; direct provisioning creates an ACTIVE membership.',\n outcome: 'The membership is created with its initial organization roles. An invitation sends one single-use acceptance link; direct provisioning sends no acceptance link. The resolved role grant is recorded in the audit trail.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A membership record was created linking the user to the organization with its initial roles, and the new record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The user reference, roles, or title fail schema validation.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an organization admin nor a representative of another organization holding `INVITE_MEMBERS` through a live capability grant this organization lent (#1631), or asks for a role above its own ceiling (`role_ceiling_exceeded`) — a delegated capability role is never grantable, and a representative\\'s ceiling is the role its relationship confers.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The user already holds a membership in this organization.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Invite a member by email with an initial title',\n request: {\n userEmail: 'new.lead@acme.com',\n userTitle: 'Engineering Lead',\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n },\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n userEmail: 'new.lead@acme.com',\n userTitle: 'Engineering Lead',\n status: OrganizationMemberStatus.INVITED,\n invitedByUserId: 'user_admin_01HX2EXAMPLE',\n invitedAt: '2026-08-18T08:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.READ]: {\n purpose: 'Retrieve one membership by its route identity. The `admin` variant is a platform super-administrator\\u2019s read of a member of a tenant they do not belong to (#2315), and crosses only under that tenant\\u2019s platform access grant.',\n outcome: 'The member’s organization roles, lifecycle state, directory title, and public identifiers are returned. A caller present in the organization only as a representative of another organization reads the organization\\'s own members and their own relationship\\'s representatives, never another relationship\\'s representatives (#2614). The membership of another relationship\\'s representative is not found for them.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The membership was found and its roles, title, state, and public identifiers are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization. On the `admin` variant, also when the caller holds no usable platform access grant for the tenant: answered exactly like a missing row, so nobody can probe which ids exist.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization member permitted to read the membership directory, or uses the `admin` variant without the platform super-administrator role.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Inspect an active organization member',\n response: ORGANIZATION_MEMBER_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Inspect a member with relationship identifiers',\n response: ORGANIZATION_MEMBER_CONTEXT_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Inspect the compact member summary',\n response: ORGANIZATION_MEMBER_SUMMARY_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'Browse the organization membership directory as a paginated collection. The `admin` variant is a platform super-administrator\\u2019s list of a tenant\\u2019s members (#2315), crossing only under that tenant\\u2019s platform access grant; every crossing is recorded as cross-tenant administrative access.',\n outcome: 'A page of memberships and pagination metadata is returned. A caller present in the organization only as a representative of another organization reads the organization\\'s own members and their own relationship\\'s representatives, never another relationship\\'s representatives (#2614).',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of membership records for the organization directory.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization member permitted to browse the membership directory, or uses the `admin` variant without the platform super-administrator role or without a usable platform access grant for the tenant.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Browse organization members',\n request: ORGANIZATION_MEMBERS_PAGE_REQUEST,\n response: organizationMembersPage([ORGANIZATION_MEMBER_EXAMPLE]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Browse members with relationship identifiers',\n request: ORGANIZATION_MEMBERS_PAGE_REQUEST,\n response: organizationMembersPage([{\n ...ORGANIZATION_MEMBER_EXAMPLE,\n user: { _id: ORGANIZATION_MEMBER_EXAMPLE.userId },\n organization: { _id: ORGANIZATION_MEMBER_EXAMPLE.organizationId },\n }]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Browse compact member summaries',\n request: ORGANIZATION_MEMBERS_PAGE_REQUEST,\n response: organizationMembersPage([ORGANIZATION_MEMBER_SUMMARY_EXAMPLE]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.SEARCH]: {\n purpose: 'Searchable member roster — matches on the member’s email (own field) and, through the linked user profile, on first/last name.',\n outcome: 'Org members matching the query by email or name, for people pickers and large-roster look-ups. A caller present in the organization only as a representative of another organization reads the organization\\'s own members and their own relationship\\'s representatives, never another relationship\\'s representatives (#2614). The organization\\'s people picker (`/organizations/{organizationId}/users/search`) is confined the same way.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of members whose email, or whose linked profile’s first/last name, matches the search query.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization member permitted to search the membership directory.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Find active members by email or name',\n request: { q: 'alex', status: OrganizationMemberStatus.ACTIVE, page: 1, limit: 20, sort: 'status:asc' },\n response: organizationMembersPage([ORGANIZATION_MEMBER_EXAMPLE]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.UPDATE]: {\n purpose: 'Update a member’s directory title or organization roles. This is the only API operation used to change a membership’s role set.',\n outcome: 'The updated membership is returned. Role changes take effect for subsequent authorization decisions and emit a dedicated authorization audit event with the previous and resulting role sets.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The membership’s title/org-unit/roles were updated and the new state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited title, org-unit, or role set fails schema validation.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin permitted to edit memberships.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The edit would remove the LAST administratively usable owner of the organization — either by rewriting `roles` so they no longer confer `ORG_OWNER` (directly or by inheritance), or by moving the membership `status` out of ACTIVE (the only status whose roles reach `initiatorRoles`). Grant an owner role to another active member first. Not a 403: the caller IS authorized — the current state of the organization forbids it. No TENANT authority lifts this floor; a platform administrator can repair an already-stranded organization through `grantOwnership`, which is the only cross-tenant variant this resource declares. An owner counts only when the membership is ACTIVE AND the linked user is ACTIVE; organizations in a terminal state (CANCELLED, DELETED, soft-deleted) are not protected.', customMessageReference: ErrorCustomMessageReference.LAST_ORGANIZATION_OWNER },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Update a member’s directory title without changing authority',\n request: { userTitle: 'Staff Engineer' },\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n userTitle: 'Staff Engineer',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [Op.DELETE]: {\n purpose: 'Remove an accepted member from the organization. Use REVOKE instead for a still-pending invitation.',\n outcome: 'The membership and its organization-unit assignments are removed, organization-scoped access ends, and the withdrawn roles and unit grants are recorded in the audit trail. For a relationship membership, the representing organization\\'s active assignment of that person to the relationship ends in the same transaction and is recorded as an unassignment, and that organization\\'s owners and administrators are emailed.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The membership record was removed; the body carries its `id`.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id (or it was already removed).' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The membership is still an INVITED invitation: DELETE removes accepted members only (the operation is disabled for it). Cancel the invitation with REVOKE, which also revokes its accept token.', customMessageReference: ErrorCustomMessageReference.SERVICE_RESOURCE_OPERATION_DISABLED },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an organization admin nor a representative of another organization holding `MANAGE_RELATIONSHIP_REPRESENTATIVES` through a live capability grant this organization lent (#1631).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller holds `MANAGE_RELATIONSHIP_REPRESENTATIVES` (a capability a granting organization lends a relationship\\'s representing organization, #1631) and the target is not a representative of the SAME relationship it acts in the organization through — an ordinary member, another representing organization\\'s representative, or a representative of another of its relationships. Carries `code: RELATIONSHIP_CAPABILITY_TARGET_OUTSIDE_RELATIONSHIP`.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The target is the LAST administratively usable owner of the organization. Destroying the row that holds the last tenant authority strands the organization exactly as demoting it would, so it is refused on the same terms — grant an owner role to another active member first. Also returned when the membership snapshot cannot be read, since the floor must not assume an unreadable row is not the last owner.', customMessageReference: ErrorCustomMessageReference.LAST_ORGANIZATION_OWNER },\n ],\n idempotent: true,\n examples: [{\n title: 'Refuse removal of the last usable organization owner',\n response: {\n error: {\n type: ErrorType.CONFLICT,\n severity: ErrorSeverity.MEDIUM,\n message: ErrorCustomMessageReference.LAST_ORGANIZATION_OWNER,\n customMessage: ErrorCustomMessageReference.LAST_ORGANIZATION_OWNER,\n customMessageReference: ErrorCustomMessageReference.LAST_ORGANIZATION_OWNER,\n code: AdministrativeContinuityErrorCode.LAST_ORGANIZATION_OWNER,\n timestamp: '2026-08-18T08:00:00.000Z',\n },\n },\n forStatus: HttpResponseStatusCode.CONFLICT_409,\n }],\n },\n [OrganizationMembers_Operations.SUSPEND]: {\n operationId: OrganizationMembers_Operations.SUSPEND,\n purpose: 'Temporarily block access without deleting the membership record.',\n outcome: 'The membership becomes SUSPENDED and no longer grants organization access. If `suspensionEndDate` is supplied, it is exposed as `scheduledReactivationAt` and the membership is reactivated after that instant; otherwise an administrator must reactivate it explicitly. The suspended member is emailed about it, even with email notifications turned off, and the organization\\'s other active members, apart from the administrator who suspended it, are notified. A representative\\'s suspension is also emailed to the representing organization\\'s owners and administrators.',\n whenToUse: 'Use for temporary security or policy holds where the membership history must remain available. The last usable organization owner cannot be suspended.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The membership transitioned to suspended and the updated record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an organization admin nor a representative of another organization holding `MANAGE_RELATIONSHIP_REPRESENTATIVES` through a live capability grant this organization lent (#1631).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller holds `MANAGE_RELATIONSHIP_REPRESENTATIVES` (a capability a granting organization lends a relationship\\'s representing organization, #1631) and the target is not a representative of the SAME relationship it acts in the organization through — an ordinary member, another representing organization\\'s representative, or a representative of another of its relationships. Carries `code: RELATIONSHIP_CAPABILITY_TARGET_OUTSIDE_RELATIONSHIP`.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The operation is unavailable because the membership is not currently ACTIVE.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The membership is not ACTIVE, so this is not a legal transition — an INVITED row has not accepted yet (cancel it with REVOKE, which also revokes the accept token) and an INACTIVE or already-SUSPENDED one is already out. Carries `resource_status_transition_conflict`, whose context names the current status, the target status and the permitted source statuses, so a client can re-read and show the real state rather than treating it as an opaque clash. Most callers meet the earlier `enabledCondition` gate instead, also a 409 but carrying `service_resource_operation_disabled` (a state refusal, #3785); this reference covers the paths that gate does not reach.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The target is the organization’s LAST administratively usable owner (an ACTIVE membership holding a role that confers `ORG_OWNER`, directly or by inheritance, whose linked user is also ACTIVE). Suspending it leaves the organization with no principal able to administer it, so the tenant cannot administer itself afterwards. Grant an owner role to another active member first. Recovery is not impossible \\u2014 a platform administrator holds `grantOwnership` \\u2014 but it is an out-of-tenant escalation, which is why the in-tenant refusal stands. Not a 403: the caller IS authorized; the current state of the organization forbids it. Carries the stable client-branchable `code: LAST_ORGANIZATION_OWNER` — a DIFFERENT code from the application floor, because the remedy is scoped to this organization.', customMessageReference: ErrorCustomMessageReference.LAST_ORGANIZATION_OWNER },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Suspend a member until a scheduled review date',\n request: {\n suspensionReason: 'Access paused while the security review is completed.',\n suspensionEndDate: '2026-09-01T09:00:00.000Z',\n },\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n status: OrganizationMemberStatus.SUSPENDED,\n scheduledReactivationAt: '2026-09-01T09:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrganizationMembers_Operations.REACTIVATE]: {\n operationId: OrganizationMembers_Operations.REACTIVATE,\n purpose: 'Restore access for a currently suspended organization member.',\n outcome: 'The membership becomes ACTIVE with its existing roles and any scheduled reactivation deadline is cleared. A relationship membership becomes ACTIVE only while its relationship is still live (accepted and not ended — a suspended relationship counts) and the person is still assigned to it; otherwise it becomes INACTIVE, the state the relationship\\'s end or the unassignment would have given it, and a later assignment re-points it. An ACTIVE relationship membership confers authority only while the relationship does — the per-request live filter decides that. When the membership comes back ACTIVE, the member is emailed, even with email notifications turned off and also when the scheduled sweep lifted the suspension. The organization\\'s other active members are notified as well, leaving out the administrator who acted and the member themself (who has their own notice); a reactivation by the scheduled sweep is announced to the membership\\'s organization the same way. A representative restored to ACTIVE is also announced to the representing organization\\'s owners and administrators. A row that lands INACTIVE notifies nobody.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The suspended membership transitioned back to active and the updated record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin permitted to reactivate members. Deliberately NOT opened to `MANAGE_RELATIONSHIP_REPRESENTATIVES` (#1631): a suspension is the organization\\'s bar against one person, which a representing organization may never lift, even for its own representative.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The operation is unavailable because the membership is not currently SUSPENDED.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The membership is not SUSPENDED, so there is nothing to reactivate — notably an INVITED row is refused here rather than being silently promoted, which would grant a membership nobody accepted. Carries `resource_status_transition_conflict` with the current and permitted statuses in its context.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Reactivate a member after the review is complete',\n request: { reason: 'Security review completed without further action.' },\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n status: OrganizationMemberStatus.ACTIVE,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrganizationMembers_Operations.REVOKE]: {\n operationId: OrganizationMembers_Operations.REVOKE,\n purpose: 'Cancel a still-pending organization invitation. Use DELETE instead for an accepted member.',\n outcome: 'The INVITED membership is removed together with any organization-unit assignments it already carried, its acceptance token can no longer be used, and the invitee and acting administrator are notified. The optional reason is retained in the audit event.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The pending invitation was revoked (the INVITED membership removed) and a confirmation is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an organization admin nor a representative of another organization holding `INVITE_MEMBERS` through a live capability grant this organization lent (#1631).' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The operation is unavailable because the membership is no longer INVITED.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Revoke a pending invitation before it is accepted',\n request: { reason: 'The invitee joined through another organization.' },\n // A delete answers with the removed record's id alone (#1838).\n response: { id: ORGANIZATION_MEMBER_EXAMPLE._id },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrganizationMembers_Operations.GRANT_OWNERSHIP]: {\n operationId: OrganizationMembers_Operations.GRANT_OWNERSHIP,\n purpose: 'Platform-tier repair door: grant ownership to an EXISTING member of an organization that has no administratively usable owner left — the ownership role the organization\\'s type offers (its founding owner role, else `ORG_OWNER`).',\n outcome: 'The existing ACTIVE membership gains the owner-conferring role; no role is removed and no new membership is created. The cross-tenant repair is audited with the required justification and the organization is notified.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The member now holds an owner-conferring role. Idempotent: a member who already owns the organization returns 200 with their role set unchanged.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The organization\\'s type offers no role that confers ownership (#2607). The door grants the type\\'s founding owner role, else `ORG_OWNER`, and only when the type offers it: a role the type does not grant would confer nothing, so the organization would stay as ownerless as before.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold `APP_ADMIN_SUPER_ADMIN` at APPLICATION scope. An organization-scope caller who merely writes that string into their own membership `roles` is denied: the role gate resolves an organization-scope entry against the organization role table, which does not contain that key.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The target membership is not administratively usable (only ACTIVE rows confer roles), or the linked user is not usable. Granting either would answer 200 while leaving the organization with zero usable owners \\u2014 a repair that repairs nothing and stops the operator looking. Fix the membership or user lifecycle first. Also returned when the user row cannot be read, since absence is not evidence of a usable owner.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Repair a stranded organization by granting an existing member ownership',\n request: { justification: 'Restore tenant administration after the sole owner was removed during account recovery.' },\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n roles: [CORE_ORG_ROLES.ORG_MEMBER, CORE_ORG_ROLES.ORG_OWNER],\n status: OrganizationMemberStatus.ACTIVE,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrganizationMembers_Operations.MAKE_OWNER]: {\n operationId: OrganizationMembers_Operations.MAKE_OWNER,\n purpose: 'An owner makes another member an owner of the organization too. An organization may have several owners, and having at least two keeps it administrable when one leaves.',\n outcome: 'The member keeps their roles and gains the owner role. The organization\\'s administrators are notified, and the change is recorded with the roles before and after.',\n whenToUse: 'Adding a second owner, or the first step of handing ownership to someone else (make them an owner, then step down).',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The member is an owner.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an owner of this organization.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership exists for the supplied id in this organization.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The member is already an owner, or the membership is not active: the operation is not offered on such a row (disabled), so making an existing owner an owner again is refused rather than answered as a no-op. The member\\'s roles are unchanged.', customMessageReference: ErrorCustomMessageReference.SERVICE_RESOURCE_OPERATION_DISABLED },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The organization\\'s type offers no role that confers ownership (#2607). The door grants the type\\'s founding owner role, else `ORG_OWNER`, and only when the type offers it: a role the type does not grant would confer nothing, so the organization would stay as ownerless as before.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The membership is not active, or its user is not active, so the new owner would not count as one. Also returned for a membership held through an organization relationship, whose roles that relationship decides.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Make a second owner',\n request: {},\n response: { ...ORGANIZATION_MEMBER_EXAMPLE, roles: [CORE_ORG_ROLES.ORG_MEMBER, CORE_ORG_ROLES.ORG_OWNER], status: OrganizationMemberStatus.ACTIVE },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [OrganizationMembers_Operations.STEP_DOWN_AS_OWNER]: {\n operationId: OrganizationMembers_Operations.STEP_DOWN_AS_OWNER,\n purpose: 'An owner gives up ownership of their own membership and stays an administrator — or a member, when the organization\\'s type offers no administrator role (#2607).',\n outcome: 'The owner role is replaced by the administrator role, or by the type\\'s default member role when the type does not offer `ORG_ADMIN` — never by a role the type does not offer. The organization\\'s administrators are notified, and the change is recorded with the roles before and after.',\n whenToUse: 'The second step of handing ownership over, once another member is an owner. To leave administration too, edit or remove the membership afterwards.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The caller is no longer an owner and is an administrator.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an owner, or the membership is an ACTIVE owner membership that is not the caller\\'s own.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The membership is not ACTIVE or does not hold the owner role (the operation is disabled for it).' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The caller is the organization\\'s last usable owner. Make another member an owner first.', customMessageReference: ErrorCustomMessageReference.LAST_ORGANIZATION_OWNER },\n ],\n idempotent: false,\n examples: [{\n title: 'Step down after handing ownership over',\n request: {},\n response: { ...ORGANIZATION_MEMBER_EXAMPLE, roles: [CORE_ORG_ROLES.ORG_ADMIN], status: OrganizationMemberStatus.ACTIVE },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [OrganizationMembers_Operations.RESEND]: {\n operationId: OrganizationMembers_Operations.RESEND,\n purpose: 'Re-mint and re-send the accept link for a still-pending invitation (an INVITED membership).',\n outcome: 'A fresh single-use accept token is issued (revoking any prior token for this membership) and the invitation email is re-delivered to the invitee.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A new accept token was minted and the invitation email re-sent; a confirmation is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an organization admin nor a representative of another organization holding `INVITE_MEMBERS` through a live capability grant this organization lent (#1631).' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The operation is unavailable because the membership is no longer INVITED.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Send a fresh acceptance link for a pending invitation',\n request: {},\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n status: OrganizationMemberStatus.INVITED,\n invitedByUserId: 'user_admin_01HX2EXAMPLE',\n invitedAt: '2026-08-18T08:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n businessConstraints: [\n 'CREATE is polymorphic: the accept-link email AND the single-use accept token fire ONLY for the INVITE branch (resulting status INVITED). A direct/system provisioning create (userId supplied — founder org-owner grant, SSO JIT, SCIM) persists an ACTIVE row and fires NEITHER side-effect (nothing to accept; its `userEmail` is the member’s own address). The gate is keyed on the resulting `status`, not on which identity field the caller supplied.',\n 'Factory declares userNotifications on several mutations; companion should ground email/SMS copy on runtime `userNotifications[]`, not invent channels absent from the configuration.',\n 'Member search matches `userEmail` and the member’s first and last name. Names are matched through the user profiles (`userProfiles`), read as they are now rather than copied onto the membership. Results stay within the caller’s organization.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n ),\n () => ({\n layout: {\n purpose: 'The organization member directory (Settings → Members): who belongs, with which roles, in which state.',\n headerPurpose: 'The READ header: the member\\'s name (the forwarded `instanceLabel`, else the membership\\'s `userEmail`) on the title line, and the `status` badge on the facts line under it. Neither repeats in the body.',\n displayPurpose: 'READ is one flat list of rows and documents no section: `roles`, then `userTitle` and `representingOrganizationName` when set (both hide when empty), then `createdAt`. Unit assignments are the ORGANIZATION_UNIT_MEMBERS resource, composed below as its own tab.',\n summaryPurpose: 'A member card: the resolved member name as the title, then `status`, `roles` and the representing organization as bare values. The two relationship identifiers are hidden from display, so they are not directory columns; `representingOrganizationName` is their readable form.',\n editPurpose: 'One flat form, no section: the invitee `userEmail` first and focused (CREATE only), then `roles` and `userTitle`. `status` is owned by SUSPEND / REACTIVATE / REVOKE and never appears on a form.',\n },\n views: {\n [Op.COUNT]: { purpose: 'Header metrics and cap enforcement surfaces.', whenToUse: 'Dashboards, billing seat counts, and upgrade prompts.' },\n [Op.CREATE]: { purpose: 'Invite (writes an INVITED row + emails an accept link) or direct-add flows in org admin UIs.', whenToUse: 'Inviting a teammate by email, onboarding, and bulk import.' },\n [Op.READ]: {\n variants: {\n default: { purpose: 'Profile drawer and permission summaries.', whenToUse: 'Click-through from directory rows.' },\n admin: { purpose: 'One member of a tenant the operator does not belong to, opened from the operator\\u2019s list of its members (#2315). Crosses only under a usable platform access grant.', whenToUse: 'An operator checking who a member is and what they hold.' },\n },\n },\n [Op.LIST]: {\n variants: {\n default: { purpose: 'Addressable roster list per merged preset (only `LIST` is addressable).', whenToUse: 'Default org directory experience.' },\n admin: { purpose: 'A tenant\\u2019s members, on the tenant directory\\u2019s page for that organization (#2315), shown once the page\\u2019s own read has answered. Crosses only under a usable platform access grant.', whenToUse: 'An operator finding who administers a tenant, or the member `grantOwnership` would promote.' },\n },\n },\n [Op.SEARCH]: { purpose: 'Member discovery by email or name when search is enabled.', whenToUse: 'Large-tenant look-ups and people pickers.' },\n [Op.UPDATE]: { purpose: 'Inline edit of metadata, roles, and org-unit links.', whenToUse: 'HR and IT directory maintenance, and every role change — there is no dedicated promote/demote verb.' },\n [Op.DELETE]: { purpose: 'Revoke and remove directory presence.', whenToUse: 'Offboarding, abuse, and access reviews.' },\n [OrganizationMembers_Operations.SUSPEND]: { purpose: 'Degraded access while retaining audit of membership history.', whenToUse: 'Short-term ToS and security holds.' },\n [OrganizationMembers_Operations.REACTIVATE]: { purpose: 'Re-open access after hold clears.', whenToUse: 'After payment or review completion.' },\n [OrganizationMembers_Operations.REVOKE]: { purpose: 'Cancel a still-pending invitation (deletes the INVITED row and any unit assignments it carries, and revokes its accept token).', whenToUse: 'From the members list, on a row still showing INVITED.' },\n // GRANT_OWNERSHIP is offered on the operator's crossed list of a tenant's members (#2315). On the tenant's own\n // roster it reaches nobody but a platform super-administrator who is also a member, whom the backend admits for\n // a per-instance verb; an ordinary member never holds its role, so the tenant surface does not offer it to them.\n [OrganizationMembers_Operations.GRANT_OWNERSHIP]: { purpose: 'The platform operator\\u2019s repair of a tenant with no usable owner: make an existing active member an owner, with a recorded justification. On the tenant directory\\u2019s page for that organization, under a usable platform access grant.', whenToUse: 'A tenant that can no longer administer itself, after confirming it has no usable owner (see the runbook in the administrative-continuity rule).' },\n [OrganizationMembers_Operations.RESEND]: { purpose: 'Re-issue the accept link for a still-pending invitation.', whenToUse: 'When an invitee lost or never received the original invite email.' },\n [OrganizationMembers_Operations.MAKE_OWNER]: { purpose: 'Offered to an owner on an active member who is not an owner yet.', whenToUse: 'Adding a second owner, or handing ownership over.' },\n [OrganizationMembers_Operations.STEP_DOWN_AS_OWNER]: { purpose: 'Offered to an owner on their own row only.', whenToUse: 'Once another member is an owner, to give up ownership and stay an administrator.' },\n },\n }),\n);\n"]}
@@ -12,6 +12,7 @@ export declare const organizationsResourceSpecification: import("../../../_core"
12
12
  platformAccessApprovalRequired: import("zod").ZodDefault<import("zod").ZodBoolean>;
13
13
  dataResidency: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodObject<{
14
14
  territories: import("zod").ZodArray<import("zod").ZodString>;
15
+ storedAtRestTerritories: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
15
16
  }, import("zod/v4/core").$strict>>>;
16
17
  dataResidencyAdmissibleTerritories: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
17
18
  createdAt: import("zod").ZodDefault<import("zod").ZodDate>;
@@ -1 +1 @@
1
- {"version":3,"file":"organizations.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../src/engine/organizations/resources/organizations.resource.specification.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAE3B,kBAAkB,EAClB,iCAAiC,EAKlC,MAAM,uBAAuB,CAAC;AA0B/B;;;GAGG;AACH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;iCAic9C,CAAC"}
1
+ {"version":3,"file":"organizations.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../src/engine/organizations/resources/organizations.resource.specification.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAE3B,kBAAkB,EAClB,iCAAiC,EAKlC,MAAM,uBAAuB,CAAC;AA0B/B;;;GAGG;AACH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;iCAic9C,CAAC"}
@@ -240,14 +240,14 @@ export const organizationsResourceSpecification = resourceSpecificationFromFront
240
240
  [Organization_Lifecycle_Operations.REQUEST_DELETION]: {
241
241
  operationId: Organization_Lifecycle_Operations.REQUEST_DELETION,
242
242
  purpose: 'Mark the tenant for deletion — the tenant-facing delete. Replaces the former org-admin `DELETE` door.',
243
- outcome: 'The tenant becomes authorization-dead immediately and stays data-alive until the retention window elapses. NOW: `status` flips to `DELETED`, `deletionRequestedAt` and `purgeScheduledAt` are stamped, every affected user’s global `userTypes` are reconciled and their tokens invalidated, and members are notified. LATER: the `organization-purge` batch destroys the tenant once `purgeScheduledAt` has passed. No rows are removed here — membership rows in particular are preserved precisely so `restore` can re-derive organization-scoped authority from them. Every organization relationship that confers only because this tenant does stops conferring (dormant, not ended; the purge ends it): each is recorded in both parties\u2019 trails as `DORMANT_BY_PARTY_STATUS`, and the other party is emailed (#2795). A tenant already SUSPENDED moves none.',
243
+ outcome: 'The tenant becomes authorization-dead immediately and stays data-alive until the retention window elapses. NOW: `status` flips to `DELETED`, `deletionRequestedAt` and `purgeScheduledAt` are stamped, every affected user’s global `userTypes` are reconciled and their tokens invalidated, and members are notified. LATER: the `organization-purge` batch destroys the tenant once `purgeScheduledAt` has passed. No rows are removed here — membership rows in particular are preserved precisely so `restore` can re-derive organization-scoped authority from them. Every organization relationship that confers only because this tenant does stops conferring (dormant, not ended; the purge ends it): each is recorded in both parties\u2019 trails as `DORMANT_BY_PARTY_STATUS`, and the other party is emailed (#2795). A tenant already SUSPENDED moves none. The engine also marks a tenant through this operation, under a system context, when a data-subject erasure removes its last owner and only member (#3786): the same mark, the same window and notice, with the reason recorded on `ORGANIZATION_DELETION_REQUESTED`.',
244
244
  responseStatuses: [
245
245
  { code: HttpResponseStatusCode.OK_200, meaning: 'The organization transitioned to `DELETED` with its purge deadline stamped; the updated tenant record is returned.' },
246
246
  ],
247
247
  errorScenarios: [
248
248
  { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin role (default variant) or the platform super-admin role (`admin` variant) that gates this destructive transition. Only the `admin` variant declares `admitsCrossTenantPlatformAdministration`: an operator marks a tenant they are not a member of, which is the takedown path for a legal order or abuse report. It is the REVERSIBLE destructive door — mark, notify, window — crossed together with RESTORE deliberately, since a marking door without its release would be a one-way door calling itself a window.' },
249
249
  { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'Both variants declare `requiresStepUpAuthentication`, and the request carried no valid single-use re-authentication token. Obtain one from the re-authentication route and retry with it. Re-authentication accepts a password, an enrolled second factor (a TOTP code or a backup code), or a passkey assertion, so a directory-managed (SCIM) user whose local first factor the framework destroys by design can still clear this gate through an enrolled second factor. A principal holding none of the three cannot clear it and must route the teardown through the `admin` variant.', customMessageReference: ErrorCustomMessageReference.STEP_UP_REQUIRED },
250
- { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'REQUEST_DELETION is unavailable for the organization’s current status — it is enabled only from `ACTIVE`, `TRIAL`, `TRIAL_EXPIRED` or `SUSPENDED`. From `DELETED` (already marked) or the terminal `CANCELLED` the operation is disabled, so a double-mark cannot silently re-arm the retention window. Enforced as conditional availability (`enabledCondition`) on both the frontend (the action is disabled) and the backend (rejected as operation-disabled). On the default variant the `SUSPENDED` arm is additionally unreachable, because a suspended tenant confers no authority to its own admins.' },
250
+ { code: HttpResponseStatusCode.CONFLICT_409, when: 'REQUEST_DELETION is unavailable for the organization’s current status — it is enabled only from `ACTIVE`, `TRIAL`, `TRIAL_EXPIRED` or `SUSPENDED`. From `DELETED` (already marked) or the terminal `CANCELLED` the operation is disabled, so a double-mark cannot silently re-arm the retention window. Enforced as conditional availability (`enabledCondition`) on both the frontend (the action is disabled) and the backend (rejected as operation-disabled). On the default variant the `SUSPENDED` arm is additionally unreachable, because a suspended tenant confers no authority to its own admins.' },
251
251
  { code: HttpResponseStatusCode.CONFLICT_409, when: 'The organization OPERATES the application (its type declares `ownsApplication`), so it cannot be put on the deletion path. Everything the application owns as an operator belongs to it, and nothing could re-create it — no door mints a second owner. Refused at the MARK and not only at the purge, because the mark is what makes the tenant authorization-dead. SUSPENSION stays available: halting the owner tenant is incident response and is recoverable, where a purge is not.', errorCode: 'OWNER_ORGANIZATION_CANNOT_BE_DELETED' },
252
252
  { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No organization exists for the supplied id in the caller’s scope.' },
253
253
  ],
@@ -262,7 +262,7 @@ export const organizationsResourceSpecification = resourceSpecificationFromFront
262
262
  ],
263
263
  errorScenarios: [
264
264
  { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the platform super-admin role. There is deliberately NO org-scoped variant: a `DELETED` tenant confers no authority, so its own admin could never satisfy one — recovery is a provider-side action, as it is in comparable systems. The variant declares `admitsCrossTenantPlatformAdministration`, so a platform super-administrator reaches it WITHOUT being a member of the marked tenant. That crossing is what makes the retention window a real safety net: until 2026-08-05 the operator was refused by the tenant-boundary check too, so a marked tenant could be restored by NOBODY and was always collected by the purge batch.' },
265
- { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'RESTORE is unavailable unless the organization is currently `DELETED`. Enforced as conditional availability (`enabledCondition`) on both the frontend (the action is disabled) and the backend (rejected as operation-disabled).' },
265
+ { code: HttpResponseStatusCode.CONFLICT_409, when: 'RESTORE is unavailable unless the organization is currently `DELETED`. Enforced as conditional availability (`enabledCondition`) on both the frontend (the action is disabled) and the backend (rejected as operation-disabled).' },
266
266
  { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No organization exists for the supplied id — the retention window has elapsed and the tenant was purged, or the id is unknown. There is no separate “too late to restore” state: if the row is present it is restorable.' },
267
267
  ],
268
268
  idempotent: false,
@@ -276,7 +276,7 @@ export const organizationsResourceSpecification = resourceSpecificationFromFront
276
276
  ],
277
277
  errorScenarios: [
278
278
  { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the platform/super-admin role that gates organization lifecycle transitions. The variant declares `admitsCrossTenantPlatformAdministration`, so that role is sufficient on its own — membership of the target tenant is NOT additionally required, and could not be relied upon: ACTIVATE runs only from `SUSPENDED` or `TRIAL_EXPIRED`, and a `SUSPENDED` tenant confers no authority to its own members.' },
279
- { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'ACTIVATE is unavailable for the organization’s current status — it is enabled only from `SUSPENDED` or `TRIAL_EXPIRED`. From `ACTIVE` (a no-op) or the terminal `CANCELLED`/`DELETED` states the operation is disabled. Enforced as conditional availability (`enabledCondition`) on both the frontend (the action is disabled) and the backend (rejected as operation-disabled).' },
279
+ { code: HttpResponseStatusCode.CONFLICT_409, when: 'ACTIVATE is unavailable for the organization’s current status — it is enabled only from `SUSPENDED` or `TRIAL_EXPIRED`. From `ACTIVE` (a no-op) or the terminal `CANCELLED`/`DELETED` states the operation is disabled. Enforced as conditional availability (`enabledCondition`) on both the frontend (the action is disabled) and the backend (rejected as operation-disabled).' },
280
280
  { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No organization exists for the supplied id in the caller’s scope.' },
281
281
  ],
282
282
  idempotent: true,
@@ -291,7 +291,7 @@ export const organizationsResourceSpecification = resourceSpecificationFromFront
291
291
  errorScenarios: [
292
292
  { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the platform super-admin role. This variant deliberately does NOT declare `admitsCrossTenantPlatformAdministration` — unlike RESTORE, ACTIVATE and `requestDeletion: admin`, which are crossed because each is reversible. Promotion has no inverse, so the caller must ALSO be a member of the target organization; the bootstrap administrator is exactly that. Opening the crossing would require a demotion door or a two-person rule, neither of which exists.' },
293
293
  { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The variant declares `requiresStepUpAuthentication` and the request carried no valid single-use re-authentication token. The act is irreversible and re-points everything the application owns as an operator, so a session must not reach it on the strength of a login that happened at some earlier point.', customMessageReference: ErrorCustomMessageReference.STEP_UP_REQUIRED },
294
- { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation is unavailable unless the organization is currently `ACTIVE`. A suspended, marked or terminal tenant confers no authority, and an owner organization nobody can act through is not an owner. Enforced as conditional availability (`enabledCondition`) on both the frontend (the action is disabled) and the backend (rejected as operation-disabled).' },
294
+ { code: HttpResponseStatusCode.CONFLICT_409, when: 'The operation is unavailable unless the organization is currently `ACTIVE`. A suspended, marked or terminal tenant confers no authority, and an owner organization nobody can act through is not an owner. Enforced as conditional availability (`enabledCondition`) on both the frontend (the action is disabled) and the backend (rejected as operation-disabled).' },
295
295
  { code: HttpResponseStatusCode.CONFLICT_409, when: 'The application already has an owner organization: the recorded one, or the single organization of the owner type, which the first resolution records. Exactly one may exist and there is no operation that demotes one. A recorded owner that is gone or no longer carries the owner type resolves as no owner, so promotion is then the repair.', errorCode: 'APPLICATION_OWNER_ORGANIZATION_EXISTS' },
296
296
  { code: HttpResponseStatusCode.CONFLICT_409, when: 'No declared organization type carries `ownsApplication`, so there is nothing to promote into. Declare one in `wildo.saas.config.ts` and run `wildo config reapply-declaration`.', errorCode: 'APPLICATION_DECLARES_NO_OWNER_ORGANIZATION_TYPE' },
297
297
  { code: HttpResponseStatusCode.CONFLICT_409, when: 'The owner type would change what this organization’s members are or may hold: it grants different `userTypes` from the current type (fewer would revoke one from every member, more would leave current members without what a new member receives), a membership or one of its unit assignments holds a role it does not list in `availableOrgRoles`, a live API key or OAuth client of the organization holds such a role, or the organization holds an unrevoked SCIM token while only one of the two types declares `scimProvisioning` (leaving would make the SCIM API refuse its directory, deprovisioning included; entering would re-enable a token that did nothing — revoke it first). The refusal names which mismatch and the exact values; widen the owner type in the declaration and retry. Refusing rather than revoking and re-granting is what keeps the promotion a change of IDENTITY that touches nobody’s authority.', errorCode: 'OWNER_PROMOTION_INCOMPATIBLE_WITH_TARGET_TYPE' },
@@ -309,7 +309,7 @@ export const organizationsResourceSpecification = resourceSpecificationFromFront
309
309
  errorScenarios: [
310
310
  { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the platform super-admin role. The variant declares `admitsCrossTenantPlatformAdministration` because the change is reversible (the same door changes it back), so membership of the target is not required — but every crossing needs a usable platform access grant and is recorded as `cross_tenant_administrative_access`.' },
311
311
  { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The variant declares `requiresStepUpAuthentication` and the request carried no valid single-use re-authentication token. The change alters how every member signs in.', customMessageReference: ErrorCustomMessageReference.STEP_UP_REQUIRED },
312
- { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation is unavailable unless the organization is currently `ACTIVE`. Enforced as conditional availability (`enabledCondition`) on both the frontend (the action is disabled) and the backend (rejected as operation-disabled).' },
312
+ { code: HttpResponseStatusCode.CONFLICT_409, when: 'The operation is unavailable unless the organization is currently `ACTIVE`. Enforced as conditional availability (`enabledCondition`) on both the frontend (the action is disabled) and the backend (rejected as operation-disabled).' },
313
313
  { code: HttpResponseStatusCode.BAD_REQUEST_400, when: '`targetType` names no declared organization type. The refusal lists the declared ones.', errorCode: OrganizationTypeChangeErrorCode.TARGET_TYPE_NOT_DECLARED },
314
314
  { code: HttpResponseStatusCode.CONFLICT_409, when: 'The organization is the recorded owner of the application, or carries the owner type while no owner resolves (so which one is the owner is unknown). No door moves the owner out of the owner type: there is no demotion, because an application must never be left without one. Another organization of the owner type that is not the recorded owner is admitted, so it can be moved out.', errorCode: OrganizationTypeChangeErrorCode.OWNER_ORGANIZATION },
315
315
  { code: HttpResponseStatusCode.CONFLICT_409, when: '`targetType` is the owner type. The only way into it is `promoteToOwnerOrganization`, which guarantees there is never a second owner.', errorCode: OrganizationTypeChangeErrorCode.TARGET_IS_OWNER_TYPE },
@@ -327,7 +327,7 @@ export const organizationsResourceSpecification = resourceSpecificationFromFront
327
327
  ],
328
328
  errorScenarios: [
329
329
  { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the platform/super-admin role that gates organization lifecycle transitions.' },
330
- { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'SUSPEND is unavailable for the organization’s current status — it is enabled only from `ACTIVE` or `TRIAL`. From `SUSPENDED` (a no-op) or the terminal `CANCELLED`/`DELETED` states the operation is disabled. Enforced as conditional availability (`enabledCondition`) on both the frontend (the action is disabled) and the backend (rejected as operation-disabled).' },
330
+ { code: HttpResponseStatusCode.CONFLICT_409, when: 'SUSPEND is unavailable for the organization’s current status — it is enabled only from `ACTIVE` or `TRIAL`. From `SUSPENDED` (a no-op) or the terminal `CANCELLED`/`DELETED` states the operation is disabled. Enforced as conditional availability (`enabledCondition`) on both the frontend (the action is disabled) and the backend (rejected as operation-disabled).' },
331
331
  { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No organization exists for the supplied id in the caller’s scope.' },
332
332
  ],
333
333
  idempotent: true,