{ "$id": "https://c-git.crosscode.co.za/joshua/crosscode-platform/raw/branch/main/packages/contracts/schemas/identity-request.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "oneOf": [ { "type": "object", "properties": { "schema": { "type": "string", "const": "crosscode.identity-request/1" }, "requestId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "actor": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "type": { "type": "string", "const": "import.begin" }, "check": { "type": "boolean" }, "notices": { "maxItems": 100, "type": "array", "items": { "type": "object", "properties": { "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "title": { "type": "string", "minLength": 1, "maxLength": 200 }, "body": { "type": "string", "minLength": 1, "maxLength": 200000 }, "publishedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "version", "title", "body", "publishedAt" ] } }, "church": { "type": "object", "properties": { "name": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 200 }, { "type": "null" } ] }, "primaryColour": { "anyOf": [ { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" }, { "type": "null" } ] }, "accentColour": { "anyOf": [ { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" }, { "type": "null" } ] }, "logoUrl": { "anyOf": [ { "type": "string", "maxLength": 2048, "format": "uri" }, { "type": "null" } ] } }, "required": [ "name", "primaryColour" ] } }, "required": [ "schema", "requestId", "actor", "type", "check", "notices", "church" ] }, { "type": "object", "properties": { "schema": { "type": "string", "const": "crosscode.identity-request/1" }, "requestId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "actor": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "type": { "type": "string", "const": "import.batch" }, "check": { "type": "boolean" }, "people": { "minItems": 1, "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string", "minLength": 1, "maxLength": 200 }, "email": { "type": "string", "maxLength": 254, "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "emailVerified": { "type": "boolean" }, "phone": { "anyOf": [ { "type": "string", "pattern": "^\\+[1-9]\\d{6,14}$" }, { "type": "null" } ] }, "passwordHash": { "anyOf": [ { "type": "string", "maxLength": 4096, "pattern": "^sealed1\\.[A-Za-z0-9_-]{40,}$" }, { "type": "null" } ] }, "twoFactor": { "anyOf": [ { "type": "string", "enum": [ "email", "whatsapp", "totp" ] }, { "type": "null" } ] }, "totpSecret": { "anyOf": [ { "type": "string", "maxLength": 4096, "pattern": "^sealed1\\.[A-Za-z0-9_-]{40,}$" }, { "type": "null" } ] }, "totpLastStep": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "failedSignIns": { "type": "integer", "minimum": 0, "maximum": 1000 }, "lockedUntil": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, { "type": "null" } ] }, "news": { "type": "object", "properties": { "email": { "type": "boolean" }, "whatsapp": { "type": "boolean" } }, "required": [ "email", "whatsapp" ] }, "newsAskedAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, { "type": "null" } ] }, "noticeVersionAccepted": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "noticeAcceptances": { "maxItems": 100, "type": "array", "items": { "type": "object", "properties": { "version": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "acceptedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "version", "acceptedAt" ] } }, "consentChanges": { "maxItems": 500, "type": "array", "items": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "email", "whatsapp" ] }, "granted": { "type": "boolean" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "channel", "granted", "at" ] } }, "lastSignInAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, { "type": "null" } ] }, "status": { "type": "string", "enum": [ "active", "deactivated" ] }, "admin": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "name", "email", "emailVerified", "phone", "passwordHash", "twoFactor", "totpSecret", "totpLastStep", "failedSignIns", "lockedUntil", "news", "newsAskedAt", "noticeVersionAccepted", "noticeAcceptances", "consentChanges", "lastSignInAt", "status", "admin", "createdAt" ] } } }, "required": [ "schema", "requestId", "actor", "type", "check", "people" ] }, { "type": "object", "properties": { "schema": { "type": "string", "const": "crosscode.identity-request/1" }, "requestId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "actor": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "type": { "type": "string", "const": "import.finish" }, "subs": { "maxItems": 50000, "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } } }, "required": [ "schema", "requestId", "actor", "type", "subs" ] }, { "type": "object", "properties": { "schema": { "type": "string", "const": "crosscode.identity-request/1" }, "requestId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "actor": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "type": { "type": "string", "const": "import.abort" } }, "required": [ "schema", "requestId", "actor", "type" ] }, { "type": "object", "properties": { "schema": { "type": "string", "const": "crosscode.identity-request/1" }, "requestId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "actor": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "type": { "type": "string", "const": "people.ensure" }, "name": { "type": "string", "minLength": 1, "maxLength": 200 }, "email": { "type": "string", "maxLength": 254, "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "phone": { "anyOf": [ { "type": "string", "pattern": "^\\+[1-9]\\d{6,14}$" }, { "type": "null" } ] }, "returnUrl": { "type": "string", "maxLength": 2048, "format": "uri" } }, "required": [ "schema", "requestId", "actor", "type", "name", "email", "phone", "returnUrl" ] }, { "type": "object", "properties": { "schema": { "type": "string", "const": "crosscode.identity-request/1" }, "requestId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "actor": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "type": { "type": "string", "const": "people.update" }, "sub": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string", "minLength": 1, "maxLength": 200 }, "email": { "type": "string", "maxLength": 254, "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "phone": { "anyOf": [ { "type": "string", "pattern": "^\\+[1-9]\\d{6,14}$" }, { "type": "null" } ] } }, "required": [ "schema", "requestId", "actor", "type", "sub" ] }, { "type": "object", "properties": { "schema": { "type": "string", "const": "crosscode.identity-request/1" }, "requestId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "actor": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "type": { "type": "string", "const": "people.resetTwoFactor" }, "sub": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "schema", "requestId", "actor", "type", "sub" ] }, { "type": "object", "properties": { "schema": { "type": "string", "const": "crosscode.identity-request/1" }, "requestId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "actor": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "type": { "type": "string", "const": "people.unlock" }, "sub": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "schema", "requestId", "actor", "type", "sub" ] }, { "type": "object", "properties": { "schema": { "type": "string", "const": "crosscode.identity-request/1" }, "requestId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "actor": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "type": { "type": "string", "const": "people.setActive" }, "sub": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "active": { "type": "boolean" } }, "required": [ "schema", "requestId", "actor", "type", "sub", "active" ] }, { "type": "object", "properties": { "schema": { "type": "string", "const": "crosscode.identity-request/1" }, "requestId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "actor": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "type": { "type": "string", "const": "people.newsOff" }, "sub": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "channel": { "type": "string", "enum": [ "email", "whatsapp", "all" ] } }, "required": [ "schema", "requestId", "actor", "type", "sub", "channel" ] }, { "type": "object", "properties": { "schema": { "type": "string", "const": "crosscode.identity-request/1" }, "requestId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "actor": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "type": { "type": "string", "const": "people.removeDemo" }, "subs": { "maxItems": 1000, "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } } }, "required": [ "schema", "requestId", "actor", "type", "subs" ] }, { "type": "object", "properties": { "schema": { "type": "string", "const": "crosscode.identity-request/1" }, "requestId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "actor": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "type": { "type": "string", "const": "people.check" }, "subs": { "minItems": 1, "maxItems": 500, "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } } }, "required": [ "schema", "requestId", "actor", "type", "subs" ] }, { "type": "object", "properties": { "schema": { "type": "string", "const": "crosscode.identity-request/1" }, "requestId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "actor": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "type": { "type": "string", "const": "messaging.status" } }, "required": [ "schema", "requestId", "actor", "type" ] }, { "type": "object", "properties": { "schema": { "type": "string", "const": "crosscode.identity-request/1" }, "requestId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "actor": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "type": { "type": "string", "const": "messaging.test" }, "email": { "type": "object", "properties": { "settings": { "type": "object", "properties": { "host": { "type": "string", "minLength": 1, "maxLength": 253 }, "port": { "type": "integer", "minimum": 1, "maximum": 65535 }, "secure": { "type": "boolean" }, "user": { "type": "string", "maxLength": 254 }, "pass": { "anyOf": [ { "type": "string", "maxLength": 4096, "pattern": "^sealed1\\.[A-Za-z0-9_-]{40,}$" }, { "type": "null" } ] }, "from": { "type": "string", "minLength": 3, "maxLength": 320 } }, "required": [ "host", "port", "secure", "user", "pass", "from" ] }, "to": { "type": "string", "maxLength": 254, "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" } }, "required": [ "settings", "to" ] }, "whatsapp": { "type": "object", "properties": { "settings": { "type": "object", "properties": { "accessToken": { "anyOf": [ { "type": "string", "maxLength": 4096, "pattern": "^sealed1\\.[A-Za-z0-9_-]{40,}$" }, { "type": "null" } ] }, "instanceId": { "type": "string", "minLength": 1, "maxLength": 200 } }, "required": [ "accessToken", "instanceId" ] }, "to": { "type": "string", "pattern": "^\\+[1-9]\\d{6,14}$" } }, "required": [ "settings", "to" ] } }, "required": [ "schema", "requestId", "actor", "type" ] }, { "type": "object", "properties": { "schema": { "type": "string", "const": "crosscode.identity-request/1" }, "requestId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "actor": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "type": { "type": "string", "const": "messaging.set" }, "email": { "type": "object", "properties": { "settings": { "type": "object", "properties": { "host": { "type": "string", "minLength": 1, "maxLength": 253 }, "port": { "type": "integer", "minimum": 1, "maximum": 65535 }, "secure": { "type": "boolean" }, "user": { "type": "string", "maxLength": 254 }, "pass": { "anyOf": [ { "type": "string", "maxLength": 4096, "pattern": "^sealed1\\.[A-Za-z0-9_-]{40,}$" }, { "type": "null" } ] }, "from": { "type": "string", "minLength": 3, "maxLength": 320 } }, "required": [ "host", "port", "secure", "user", "pass", "from" ] }, "to": { "type": "string", "maxLength": 254, "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" } }, "required": [ "settings", "to" ] }, "whatsapp": { "type": "object", "properties": { "settings": { "type": "object", "properties": { "accessToken": { "anyOf": [ { "type": "string", "maxLength": 4096, "pattern": "^sealed1\\.[A-Za-z0-9_-]{40,}$" }, { "type": "null" } ] }, "instanceId": { "type": "string", "minLength": 1, "maxLength": 200 } }, "required": [ "accessToken", "instanceId" ] }, "to": { "type": "string", "pattern": "^\\+[1-9]\\d{6,14}$" } }, "required": [ "settings", "to" ] } }, "required": [ "schema", "requestId", "actor", "type" ] }, { "type": "object", "properties": { "schema": { "type": "string", "const": "crosscode.identity-request/1" }, "requestId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "actor": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" } ] }, "type": { "type": "string", "const": "church.branding" }, "church": { "type": "object", "properties": { "name": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 200 }, { "type": "null" } ] }, "primaryColour": { "anyOf": [ { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" }, { "type": "null" } ] }, "accentColour": { "anyOf": [ { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" }, { "type": "null" } ] }, "logoUrl": { "anyOf": [ { "type": "string", "maxLength": 2048, "format": "uri" }, { "type": "null" } ] } }, "required": [ "name", "primaryColour" ] }, "overwrite": { "type": "boolean" } }, "required": [ "schema", "requestId", "actor", "type", "church", "overwrite" ] }, { "type": "object", "properties": { "schema": { "type": "string", "const": "crosscode.identity-request/1" }, "requestId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "actor": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "type": { "type": "string", "const": "church.update" }, "ifUpdatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "church": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 200 }, "shortName": { "anyOf": [ { "type": "string", "maxLength": 30 }, { "type": "null" } ] }, "timezone": { "type": "string", "pattern": "^[A-Za-z_]+(\\/[A-Za-z0-9_+-]+){0,2}$|^UTC$" }, "locale": { "type": "string", "pattern": "^[a-z]{2,3}(-[A-Z]{2})?$" }, "branding": { "type": "object", "properties": { "logoUrl": { "anyOf": [ { "type": "string", "maxLength": 2048, "format": "uri" }, { "type": "null" } ] }, "iconUrl": { "anyOf": [ { "type": "string", "maxLength": 2048, "format": "uri" }, { "type": "null" } ] }, "colours": { "type": "object", "properties": { "primary": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" }, "accent": { "anyOf": [ { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" }, { "type": "null" } ] } }, "required": [ "primary", "accent" ] }, "style": { "type": "object", "properties": { "fontPairing": { "default": null, "anyOf": [ { "type": "string", "enum": [ "classic", "scholarly", "editorial", "impact", "contemporary", "friendly", "warm", "modern" ] }, { "type": "null" } ] }, "corners": { "default": null, "anyOf": [ { "type": "string", "enum": [ "sharp", "soft", "round" ] }, { "type": "null" } ] } }, "required": [ "fontPairing", "corners" ] } } }, "campuses": { "maxItems": 50, "type": "array", "items": { "type": "object", "properties": { "slug": { "type": "string", "maxLength": 100, "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" }, "name": { "type": "string", "minLength": 1, "maxLength": 200 }, "address": { "anyOf": [ { "type": "object", "properties": { "line1": { "type": "string", "minLength": 1, "maxLength": 200 }, "line2": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "suburb": { "anyOf": [ { "type": "string", "maxLength": 100 }, { "type": "null" } ] }, "city": { "type": "string", "minLength": 1, "maxLength": 100 }, "province": { "anyOf": [ { "type": "string", "maxLength": 100 }, { "type": "null" } ] }, "postalCode": { "anyOf": [ { "type": "string", "maxLength": 20 }, { "type": "null" } ] }, "country": { "type": "string", "pattern": "^[A-Z]{2}$" }, "geo": { "anyOf": [ { "type": "object", "properties": { "lat": { "type": "number", "minimum": -90, "maximum": 90 }, "lng": { "type": "number", "minimum": -180, "maximum": 180 } }, "required": [ "lat", "lng" ] }, { "type": "null" } ] } }, "required": [ "line1", "line2", "suburb", "city", "province", "postalCode", "country", "geo" ] }, { "type": "null" } ] } }, "required": [ "slug", "name", "address" ] } }, "serviceTimes": { "maxItems": 100, "type": "array", "items": { "type": "object", "properties": { "day": { "type": "string", "enum": [ "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday" ] }, "time": { "type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$" }, "label": { "anyOf": [ { "type": "string", "maxLength": 100 }, { "type": "null" } ] }, "campus": { "anyOf": [ { "type": "string", "maxLength": 100, "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" }, { "type": "null" } ] }, "note": { "anyOf": [ { "type": "string", "maxLength": 300 }, { "type": "null" } ] } }, "required": [ "day", "time", "label", "campus", "note" ] } }, "contact": { "type": "object", "properties": { "email": { "anyOf": [ { "type": "string", "maxLength": 254, "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, { "type": "null" } ] }, "phone": { "anyOf": [ { "type": "string", "pattern": "^\\+[1-9]\\d{6,14}$" }, { "type": "null" } ] }, "whatsapp": { "anyOf": [ { "type": "string", "pattern": "^\\+[1-9]\\d{6,14}$" }, { "type": "null" } ] }, "address": { "anyOf": [ { "type": "object", "properties": { "line1": { "type": "string", "minLength": 1, "maxLength": 200 }, "line2": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ] }, "suburb": { "anyOf": [ { "type": "string", "maxLength": 100 }, { "type": "null" } ] }, "city": { "type": "string", "minLength": 1, "maxLength": 100 }, "province": { "anyOf": [ { "type": "string", "maxLength": 100 }, { "type": "null" } ] }, "postalCode": { "anyOf": [ { "type": "string", "maxLength": 20 }, { "type": "null" } ] }, "country": { "type": "string", "pattern": "^[A-Z]{2}$" }, "geo": { "anyOf": [ { "type": "object", "properties": { "lat": { "type": "number", "minimum": -90, "maximum": 90 }, "lng": { "type": "number", "minimum": -180, "maximum": 180 } }, "required": [ "lat", "lng" ] }, { "type": "null" } ] } }, "required": [ "line1", "line2", "suburb", "city", "province", "postalCode", "country", "geo" ] }, { "type": "null" } ] } }, "required": [ "email", "phone", "whatsapp", "address" ] }, "social": { "maxItems": 20, "type": "array", "items": { "type": "object", "properties": { "network": { "type": "string", "enum": [ "facebook", "instagram", "youtube", "tiktok", "x", "spotify", "whatsapp-channel", "other" ] }, "url": { "type": "string", "maxLength": 2048, "format": "uri" } }, "required": [ "network", "url" ] } } } } }, "required": [ "schema", "requestId", "actor", "type", "church" ] } ] }