Skip to main content
Version: 0.14.0 (Latest)

📐 Organization schemas

Organization schemas define source validation and OpenAPI request contracts. Use the matching feature and route for composition and endpoint behavior.

Inventory

ExportRequest locationContract
organizationCommonSchemaN/AReusable object; additionalProperties: false.
organizationAdminApprovedSchemaN/AReusable admin object; additionalProperties: false.
createOrganizationSchemaBodyJSON body required; outer and nested objects reject additional properties.
organizationMembersSchemaN/AReusable non-empty members array.
upsertOrganizationMembersSchemaPath, bodyRequired path and JSON members-array body.
updateOrganizationSchemaPath, bodyRequired path and JSON body; spreads organizationCommonSchema with no required body fields.
updateOrganizationAsAdminSchemaPath, bodyRequired path and JSON body; merges common and admin-approved fields.
getOrganizationSchemaPathRequired organization path parameter.
deleteOrganizationSchemaPathRequired organization path parameter.
getOrganizationMemberRoleSchemaPathRequired organization and identity path parameters.
checkOrganizationMemberExistenceSchemaPath, QueryRequired organization path and identity query parameter.
findOrganizationMembersSchemaPathRequired organization path parameter.
deleteOrganizationMemberSchemaPathRequired organization and identity path parameters.
findOrganizationsForMemberSchemaPath, QueryMember lookup with optional role and inheritance filters.
findOrganizationsSchemaQueryOptional filters plus shared pagination parameters.
findOrganizationDescendantsSchemaPath, QueryOrganization descendants with optional depth.
getCertificateUploadUrlSchemaPath, QueryCertificate upload URL inputs.
createChangeRequestSchemaPath, bodyRequired path and non-empty JSON change-request body.
findChangeRequestsForOrganizationSchemaPath, QueryOrganization path plus shared pagination; source does not define an identity filter.
findByOrganizationIdSchemaPath, QueryReusable cross-domain organization scope plus pagination.
getOrganizationFollowersSchemaPathRequired organization path parameter.

Details

organizationCommonSchema

Definition

Reusable object; additionalProperties: false.

LocationFieldTypeRequiredConstraints
N/AbranchName, contact_email, contact_phone, descriptionstringNocontact_email has email format.

Used by route: No direct Organization route. Used by feature: Reusable schema; consumed through composed request schemas..

View complete source
export const organizationCommonSchema: SchemaDefinition = {
$schema: 'http://json-schema.org/draft-07/schema#',
additionalProperties: false,
properties: {
branchName: { type: 'string' },
contact_email: { format: 'email', type: 'string' },
contact_phone: { type: 'string' },
description: { type: 'string' },
},
type: 'object',
};

organizationAdminApprovedSchema

Definition

Reusable admin object; additionalProperties: false.

LocationFieldTypeRequiredConstraints
N/AaddressobjectNoAllows additional properties.
N/AcertificateImageobjectNo{objectId: uuid string, type: string}; both nested fields required.
N/AcertifiedQualificationsarrayNoItems require string name, status, value.
N/Alogoobject or nullNoUploaded-file object or null.
N/Aname, typeIdstringNoname minimum length 1.

Used by route: No direct Organization route. Used by feature: Reusable schema; consumed through composed request schemas..

View complete source
export const organizationAdminApprovedSchema: SchemaDefinition = {
$schema: 'http://json-schema.org/draft-07/schema#',
additionalProperties: false,
properties: {
address: { additionalProperties: true, type: 'object' },
certificateImage: { ...uploadedFileSchema },
certifiedQualifications: { ...qualificationSchema },
logo: {
oneOf: [uploadedFileSchema, { type: 'null' }],
},
name: { minLength: 1, type: 'string' },
typeId: { type: 'string' },
},
type: 'object',
};

createOrganizationSchema

Definition

JSON body required; outer and nested objects reject additional properties.

LocationFieldTypeRequiredConstraints
BodyorganizationobjectYesMerges common and admin-approved properties; requires name, description, contact_email.
BodyownerIdstringYes
BodyparentIdstringNo

Used by route: createOrganizationRoute. Used by feature: createOrganizationFeature.

View complete source
export const createOrganizationSchema = withSchema({
requestBody: {
content: {
'application/json': {
schema: {
$schema: 'http://json-schema.org/draft-07/schema#',
additionalProperties: false,
properties: {
organization: {
...organizationAdminApprovedSchema,
properties: {
...organizationCommonSchema.properties,
...organizationAdminApprovedSchema.properties,
},
required: ['name', 'description', 'contact_email'],
},
ownerId: { type: 'string' },
parentId: { type: 'string' },
},
required: ['organization', 'ownerId'],
type: 'object',
},
},
},
required: true,
},
});

organizationMembersSchema

Definition

Reusable non-empty members array.

LocationFieldTypeRequiredConstraints
N/Aitem.identityId, item.rolestringYesItem object rejects additional properties.

Used by route: No direct Organization route. Used by feature: Reusable schema; consumed through composed request schemas..

View complete source
export const organizationMembersSchema: SchemaDefinition = {
$schema: 'http://json-schema.org/draft-07/schema#',
items: {
additionalProperties: false,
properties: {
identityId: { type: 'string' },
role: { type: 'string' },
},
required: ['identityId', 'role'],
type: 'object',
},
minItems: 1,
type: 'array',
};

upsertOrganizationMembersSchema

Definition

Required path and JSON members-array body.

LocationFieldTypeRequiredConstraints
PathorganizationIdstringYes
Bodymembers arrayarrayYesorganizationMembersSchema; minimum one item.

Used by route: upsertOrganizationMembersRoute. Used by feature: editOrganizationMembersFeatures.

View complete source
export const upsertOrganizationMembersSchema = withSchema({
parameters: [{ ...organizationIdPathParameter }],
requestBody: {
content: {
'application/json': {
schema: {
...organizationMembersSchema,
},
},
},
required: true,
},
});

updateOrganizationSchema

Definition

Required path and JSON body; spreads organizationCommonSchema with no required body fields.

LocationFieldTypeRequiredConstraints
PathorganizationIdstringYes
BodybranchName, contact_email, contact_phone, descriptionstringNocontact_email has email format; body rejects additional properties.

Used by route: updateOrganizationRoute. Used by feature: editOrganizationFeatures.

View complete source
export const updateOrganizationSchema = withSchema({
parameters: [{ ...organizationIdPathParameter }],
requestBody: {
content: {
'application/json': {
schema: {
...organizationCommonSchema,
required: [],
},
},
},
required: true,
},
});

updateOrganizationAsAdminSchema

Definition

Required path and JSON body; merges common and admin-approved fields.

LocationFieldTypeRequiredConstraints
PathorganizationIdstringYes
Bodycommon fields, name, typeId, auditStatusstringNoname minimum length 1; body rejects additional properties.
Bodyaddress, certificateImage, certifiedQualifications, logoobject/array/object-or-nullNoSame nested contracts as organizationAdminApprovedSchema.

Used by route: updateOrganizationAsAdminRoute. Used by feature: updateOrganizationAsAdminFeature.

View complete source
export const updateOrganizationAsAdminSchema = withSchema({
parameters: [{ ...organizationIdPathParameter }],
requestBody: {
content: {
'application/json': {
schema: {
...organizationAdminApprovedSchema,
properties: {
...organizationCommonSchema.properties,
...organizationAdminApprovedSchema.properties,
auditStatus: { type: 'string' },
},
required: [],
},
},
},
required: true,
},
});

getOrganizationSchema

Definition

Required organization path parameter.

LocationFieldTypeRequiredConstraints
PathorganizationIdstringYes

Used by route: getOrganizationRoute. Used by feature: getOrganizationFeatures.

View complete source
export const getOrganizationSchema = withSchema({
parameters: [{ ...organizationIdPathParameter }],
});

deleteOrganizationSchema

Definition

Required organization path parameter.

LocationFieldTypeRequiredConstraints
PathorganizationIdstringYes

Used by route: deleteOrganizationRoute. Used by feature: deleteOrganizationFeatures.

View complete source
export const deleteOrganizationSchema = withSchema({
parameters: [{ ...organizationIdPathParameter }],
});

getOrganizationMemberRoleSchema

Definition

Required organization and identity path parameters.

LocationFieldTypeRequiredConstraints
PathorganizationId, identityIdstringYes

Used by route: getOrganizationMemberRoleRoute. Used by feature: getOrganizationMemberFeatures.

View complete source
export const getOrganizationMemberRoleSchema = withSchema({
parameters: [
{ ...organizationIdPathParameter },
{ ...identityIdPathParameter },
],
});

checkOrganizationMemberExistenceSchema

Definition

Required organization path and identity query parameter.

LocationFieldTypeRequiredConstraints
PathorganizationIdstringYes
QueryidentityIdstringYes

Used by route: checkOrganizationMemberExistenceRoute. Used by feature: checkOrganizationMemberExistenceFeatures.

View complete source
export const checkOrganizationMemberExistenceSchema = withSchema({
parameters: [
{ ...organizationIdPathParameter },
{
in: 'query',
name: 'identityId',
required: true,
schema: {
type: 'string',
},
},
],
});

findOrganizationMembersSchema

Definition

Required organization path parameter.

LocationFieldTypeRequiredConstraints
PathorganizationIdstringYes

Used by route: findOrganizationMembersRoute. Used by feature: findOrganizationMembersFeatures.

View complete source
export const findOrganizationMembersSchema = withSchema({
parameters: [{ ...organizationIdPathParameter }],
});

deleteOrganizationMemberSchema

Definition

Required organization and identity path parameters.

LocationFieldTypeRequiredConstraints
PathorganizationId, identityIdstringYes

Used by route: deleteOrganizationMemberRoute. Used by feature: deleteOrganizationMemberFeatures.

View complete source
export const deleteOrganizationMemberSchema = withSchema({
parameters: [
{ ...organizationIdPathParameter },
{ ...identityIdPathParameter },
],
});

findOrganizationsForMemberSchema

Definition

Member lookup with optional role and inheritance filters.

LocationFieldTypeRequiredConstraints
PathidentityIdstringYes
QueryrolesstringNoExact source name is plural.
QueryincludeInheritedbooleanNo

Used by route: findOrganizationsForMemberRoute. Used by feature: findOrganizationsForMemberFeatures.

View complete source
export const findOrganizationsForMemberSchema = withSchema({
parameters: [
{ ...identityIdPathParameter },
{
in: 'query',
name: 'roles',
required: false,
schema: {
type: 'string',
},
},
{
in: 'query',
name: 'includeInherited',
required: false,
schema: { type: 'boolean' },
},
],
});

findOrganizationsSchema

Definition

Optional filters plus shared pagination parameters.

LocationFieldTypeRequiredConstraints
Querycontact_emailstringNoemail format.
Querycontact_phone, descriptionstringNo
QuerynamestringNominimum length 1.
Querypage, limitshared paginationNoFrom paginationQueryParametersSchema.

Used by route: findOrganizationsRoute. Used by feature: findOrganizationsFeatures.

View complete source
export const findOrganizationsSchema = withSchema({
parameters: [
{
in: 'query',
name: 'contact_email',
required: false,
schema: {
format: 'email',
type: 'string',
},
},
{
in: 'query',
name: 'contact_phone',
required: false,
schema: {
type: 'string',
},
},
{
in: 'query',
name: 'description',
required: false,
schema: {
type: 'string',
},
},
{
in: 'query',
name: 'name',
required: false,
schema: {
minLength: 1,
type: 'string',
},
},
...paginationQueryParametersSchema,
],
});

findOrganizationDescendantsSchema

Definition

Organization descendants with optional depth.

LocationFieldTypeRequiredConstraints
PathorganizationIdstringYes
QuerydepthnumberNominimum 1.

Used by route: findOrganizationDescendantsRoute. Used by feature: findOrganizationDescendantsFeatures.

View complete source
export const findOrganizationDescendantsSchema = withSchema({
parameters: [
{ ...organizationIdPathParameter },
{
in: 'query',
name: 'depth',
required: false,
schema: {
minimum: 1,
type: 'number',
},
},
],
});

getCertificateUploadUrlSchema

Definition

Certificate upload URL inputs.

LocationFieldTypeRequiredConstraints
PathorganizationIdstringYes
QuerycontentTypestringYesapplication/pdf, image/gif, image/jpeg, or image/png.
QuerycontentLengthshared parameterYesFrom contentLengthQueryParameter.

Used by route: getCertificateUploadUrlRoute. Used by feature: getCertificateUploadUrlFeature.

View complete source
export const getCertificateUploadUrlSchema = withSchema({
parameters: [
{ ...organizationIdPathParameter },
{
in: 'query',
name: 'contentType',
required: true,
schema: { enum: CERTIFICATE_MIME_TYPES, type: 'string' },
},
{ ...contentLengthQueryParameter },
],
});

createChangeRequestSchema

Definition

Required path and non-empty JSON change-request body.

LocationFieldTypeRequiredConstraints
PathorganizationIdstringYes
BodyaddressLine1, addressLine2, addressLine3, branchName, postalCode, typeIdstringNo
BodynamestringNominimum length 1.
BodycertificateImage, certifiedQualificationsobject/arrayNoUploaded-file and qualification reusable shapes; body rejects additional properties.

Used by route: createChangeRequestRoute. Used by feature: createChangeRequestFeature.

View complete source
export const createChangeRequestSchema = withSchema({
parameters: [{ ...organizationIdPathParameter }],
requestBody: {
content: {
'application/json': {
schema: {
$schema: 'http://json-schema.org/draft-07/schema#',
additionalProperties: false,
minProperties: 1,
properties: {
addressLine1: { type: 'string' },
addressLine2: { type: 'string' },
addressLine3: { type: 'string' },
branchName: { type: 'string' },
certificateImage: { ...uploadedFileSchema },
certifiedQualifications: { ...qualificationSchema },
name: { minLength: 1, type: 'string' },
postalCode: { type: 'string' },
typeId: { type: 'string' },
},
required: [],
type: 'object',
},
},
},
required: true,
},
});

findChangeRequestsForOrganizationSchema

Definition

Organization path plus shared pagination; source does not define an identity filter.

LocationFieldTypeRequiredConstraints
PathorganizationIdstringYes
Querypage, limitshared paginationNoFrom paginationQueryParametersSchema.

Used by route: findChangeRequestsForOrganizationRoute. Used by feature: findChangeRequestsForOrganizationFeature.

View complete source
export const findChangeRequestsForOrganizationSchema = withSchema({
parameters: [
{ ...organizationIdPathParameter },
...paginationQueryParametersSchema,
],
});

findByOrganizationIdSchema

Definition

Reusable cross-domain organization scope plus pagination.

LocationFieldTypeRequiredConstraints
PathorganizationIdstringYes
Querypage, limitshared paginationNoFrom paginationQueryParametersSchema.

Used by route: Cross-domain: Order and Product organization-scoped routes.. Used by feature: Cross-domain feature composition..

View complete source
export const findByOrganizationIdSchema = withSchema({
parameters: [
{ ...organizationIdPathParameter },
...paginationQueryParametersSchema,
],
});

getOrganizationFollowersSchema

Definition

Required organization path parameter.

LocationFieldTypeRequiredConstraints
PathorganizationIdstringYes

Used by route: getOrganizationFollowersRoute. Used by feature: getOrganizationFollowersFeature.

View complete source
export const getOrganizationFollowersSchema = withSchema({
parameters: [{ ...organizationIdPathParameter }],
});