メインコンテンツまでスキップ
バージョン: 🚧 Canary

🏢 Organization Blocks

Organization blocks provide comprehensive functionality for organization management in Nodeblocks applications. These blocks handle organization lifecycle operations including creation, member management, and business logic.


🎯 Overview

Organization blocks are designed to:

  • Manage organizations with full CRUD operations
  • Handle member management and role assignments
  • Provide organization validation and business rules
  • Support multi-tenant application architecture
  • Enable organization administration with comprehensive controls

📦 Block Types

🔍 Schemas

JSON Schema definitions for organization data validation:

  • organizationSchema: Base organization entity structure
  • createOrganizationSchema: Organization creation validation
  • updateOrganizationSchema: Organization update validation
  • getOrganizationSchema: Organization retrieval validation
  • deleteOrganizationSchema: Organization deletion validation
  • organizationMembersSchema: Member role assignments array
  • upsertOrganizationMembersSchema: Upsert member roles payload
  • getOrganizationMemberRoleSchema: Member role retrieval
  • checkOrganizationMemberExistenceSchema: Member existence check
  • findOrganizationMembersSchema: Members listing query
  • deleteOrganizationMemberSchema: Member deletion validation
  • findOrganizationsSchema: Organizations search with filtering and pagination
  • findOrganizationsForMemberSchema: Organizations by member with optional roles and inheritance
  • findOrganizationDescendantsSchema: Descendants retrieval with optional depth

View Organization Schema Blocks →

🔧 Blocks

Pure business logic functions for organization operations:

  • createOrganization: Organization creation
  • getOrganizationById: Organization data retrieval
  • updateOrganization: Organization updates
  • deleteOrganization: Organization deletion
  • findOrganizations: Organization search and filtering
  • calculateDirectMemberRole: Calculate a member's direct role
  • checkOrganizationMemberExistence: Check if an identity is a member
  • findOrganizationMembers: List members with pagination metadata
  • upsertOrganizationMembers: Add/update members (merge with existing)
  • deleteOrganizationMember: Remove a member from organization
  • findOrganizationsForMember: List organizations for a specific identity
  • calculateChildAncestors: Calculate child ancestors from parent
  • buildDescendantsQuery: Build query for descendant search
  • generateSignedLogoUploadUrl: Generate signed URL for logo uploads

View Organization Blocks →

🧰 Handlers

Terminator and normalization handlers for API response formatting:

  • normalizeOrganizationTerminator: Normalize single organization response
  • normalizeOrganizationsListTerminator: Normalize organizations list response
  • deleteOrganizationTerminator: Format 204 response for organization deletion
  • normalizeOrganizationMemberExistenceTerminator: Normalize membership existence response
  • normalizeOrganizationMembersListTerminator: Normalize members list response
  • deleteOrganizationMemberTerminator: Format 204 response for member deletion
  • upsertOrganizationMembersTerminator: Format 204 response for members upsert

View Organization Handler Blocks →

🛣️ Routes

HTTP endpoint definitions for organization operations:

  • createOrganizationRoute: POST /organizations with creation block
  • getOrganizationRoute: GET /organizations/:organizationId with retrieval block
  • findOrganizationsRoute: GET /organizations with search and pagination
  • updateOrganizationRoute: PATCH /organizations/:organizationId with update block
  • deleteOrganizationRoute: DELETE /organizations/:organizationId with deletion block
  • getOrganizationMemberRoleRoute: GET /organizations/:organizationId/members/:identityId/role with role retrieval
  • checkOrganizationMemberExistenceRoute: GET /organizations/:organizationId/members/check-existence with membership check
  • findOrganizationMembersRoute: GET /organizations/:organizationId/members with members listing
  • upsertOrganizationMembersRoute: PATCH /organizations/:organizationId/members with member upsert
  • deleteOrganizationMemberRoute: DELETE /organizations/:organizationId/members/:identityId with member removal
  • findOrganizationsForMemberRoute: GET /organizations/members/:identityId with identity organizations
  • findOrganizationDescendantsRoute: GET /organizations/:organizationId/descendants with descendants listing
  • getLogoUploadUrlRoute: GET /organizations/:organizationId/logo-upload-url with signed URL generation

View Organization Route Blocks →

🚀 Features

Complete organization management features combining schemas, routes, and blocks:

  • createOrganizationFeature: Organization creation with validation and routing
  • getOrganizationFeatures: Retrieve individual organization
  • findOrganizationsFeatures: Search organizations with filtering and pagination
  • editOrganizationFeatures: Update organization with validation and routing
  • deleteOrganizationFeatures: Delete organization
  • getOrganizationMemberFeatures: Retrieve a member role within organization
  • checkOrganizationMemberExistenceFeatures: Validate identity membership in organization
  • findOrganizationMembersFeatures: List organization members with pagination
  • findOrganizationsForMemberFeatures: List organizations for a specific identity
  • editOrganizationMembersFeatures: Upsert organization members with validation
  • deleteOrganizationMemberFeatures: Delete an organization member
  • findOrganizationDescendantsFeatures: Retrieve descendant organizations
  • getLogoUploadUrlFeature: Generate signed URL for logo upload

View Organization Feature Blocks →

Validators

Validation functions for organization operations:

  • hasOrgRole: Validates organization member role based on allowed roles and organization ID
  • validateOrganizationAccess (deprecated): Legacy access validator; replaced by hasOrgRole

View Organization Validator Blocks →