Skip to main content

Legal Service Policy Events 0.1.0 documentation

info

In this document, PUB means "publish" and SUB means "subscribe". This refers to the "publish/subscribe" (pub/sub) messaging framework, where "publish" means that the service sends data to Kafka topics, and "subscribe" means the service acts as a consumer that subscribes to specific Kafka topics to receive data.

  • Specification ID: http://legal-service
  • Protobuf File Spec: policy.proto

Table of Contents

Operations

PUB basePolicy Operation

Accepts one of the following messages:

Message basePolicyCreated

message is sent after base policy is created

Payload
NameTypeDescriptionValueConstraintsNotes
(root)object allOf---additional properties are allowed
payloadobject---additional properties are allowed
payload.basePolicyobject---additional properties are allowed
payload.basePolicy.idstringbase policy id---
payload.basePolicy.basePolicyNamestringname of the base policy---
payload.basePolicy.descriptionstringdescription of the base policy---
payload.basePolicy.typeIdstringpolicy type id---
payload.basePolicy.policyTypeNamestringpolicy type name, value can be Legal Document or Marketing Preference---
payload.basePolicy.affectedClientIdsarray<string>affected oauth clients---
payload.basePolicy.affectedClientIds (single item)string----
payload.basePolicy.affectedCountriesarray<string>countries included in the base policy---
payload.basePolicy.affectedCountries (single item)string----
payload.basePolicy.createdAtstringtime when the base policy is created-format (date-time)-
payload.basePolicy.updatedAtstringtime when the base policy is updated-format (date-time)-
payload.basePolicy.isMandatorybooleana flag indicates whether this base policy is mandatory---
payload.basePolicy.namespacestringnamespace of the base policy---
payload.basePolicy.tagsarray<string>tags of this base policy---
payload.basePolicy.tags (single item)string----
0 (allOf item)object---additional properties are allowed
idstring----
versioninteger----
namestring----
namespacestring----
parentNamespacestring----
timestampstring--format (date-time)-
clientIdstring----
userIdstring----
traceIdstring----
sessionIdstring----

Examples of payload (generated)

{
"payload": {
"basePolicy": {
"id": "string",
"basePolicyName": "string",
"description": "string",
"typeId": "string",
"policyTypeName": "string",
"affectedClientIds": [
"string"
],
"affectedCountries": [
"string"
],
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"isMandatory": true,
"namespace": "string",
"tags": [
"string"
]
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

Message basePolicyUpdated

Payload
NameTypeDescriptionValueConstraintsNotes
(root)object allOf---additional properties are allowed
payloadobject---additional properties are allowed
payload.basePolicyobject---additional properties are allowed
payload.basePolicy.idstringbase policy id---
payload.basePolicy.basePolicyNamestringname of the base policy---
payload.basePolicy.descriptionstringdescription of the base policy---
payload.basePolicy.typeIdstringpolicy type id---
payload.basePolicy.policyTypeNamestringpolicy type name, value can be Legal Document or Marketing Preference---
payload.basePolicy.affectedClientIdsarray<string>affected oauth clients---
payload.basePolicy.affectedClientIds (single item)string----
payload.basePolicy.affectedCountriesarray<string>countries included in the base policy---
payload.basePolicy.affectedCountries (single item)string----
payload.basePolicy.createdAtstringtime when the base policy is created-format (date-time)-
payload.basePolicy.updatedAtstringtime when the base policy is updated-format (date-time)-
payload.basePolicy.isMandatorybooleana flag indicates whether this base policy is mandatory---
payload.basePolicy.namespacestringnamespace of the base policy---
payload.basePolicy.tagsarray<string>tags of this base policy---
payload.basePolicy.tags (single item)string----
0 (allOf item)object---additional properties are allowed
idstring----
versioninteger----
namestring----
namespacestring----
parentNamespacestring----
timestampstring--format (date-time)-
clientIdstring----
userIdstring----
traceIdstring----
sessionIdstring----

Examples of payload (generated)

{
"payload": {
"basePolicy": {
"id": "string",
"basePolicyName": "string",
"description": "string",
"typeId": "string",
"policyTypeName": "string",
"affectedClientIds": [
"string"
],
"affectedCountries": [
"string"
],
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"isMandatory": true,
"namespace": "string",
"tags": [
"string"
]
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

PUB policy Operation

Accepts one of the following messages:

Message policyCreated

message is sent when country based policy is created

Payload
NameTypeDescriptionValueConstraintsNotes
(root)object allOf---additional properties are allowed
payloadobject---additional properties are allowed
payload.policyobject---additional properties are allowed
payload.policy.idstringpolicy id---
payload.policy.policyNamestringpolicy name---
payload.policy.countryCodestringcountry code---
payload.policy.createdAtstringtime when the policy is created-format (date-time)-
payload.policy.updatedAtstringtime when the policy is updated-format (date-time)-
payload.policy.shouldNotifyOnUpdatebooleana flag indicates whether need to notify users if this policy is updated---
payload.policy.countryGroupCodestring---deprecated
payload.policy.isMandatorybooleana flag indicates whether this policy is mandatory---
payload.policy.isDefaultOptedboolean---deprecated
payload.policy.basePolicyIdstring---deprecated
payload.policy.readableIdstring---deprecated
payload.policy.descriptionstringdescription of this policy---
payload.policy.isDefaultSelectionbooleana flag indicates whether this country based policy is the default selected---
0 (allOf item)object---additional properties are allowed
idstring----
versioninteger----
namestring----
namespacestring----
parentNamespacestring----
timestampstring--format (date-time)-
clientIdstring----
userIdstring----
traceIdstring----
sessionIdstring----

Examples of payload (generated)

{
"payload": {
"policy": {
"id": "string",
"policyName": "string",
"countryCode": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"shouldNotifyOnUpdate": true,
"countryGroupCode": "string",
"isMandatory": true,
"isDefaultOpted": true,
"basePolicyId": "string",
"readableId": "string",
"description": "string",
"isDefaultSelection": true
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

Message policyUpdated

message is sent when country base policy is updated

Payload
NameTypeDescriptionValueConstraintsNotes
(root)object allOf---additional properties are allowed
payloadobject---additional properties are allowed
payload.policyobject---additional properties are allowed
payload.policy.idstringpolicy id---
payload.policy.policyNamestringpolicy name---
payload.policy.countryCodestringcountry code---
payload.policy.createdAtstringtime when the policy is created-format (date-time)-
payload.policy.updatedAtstringtime when the policy is updated-format (date-time)-
payload.policy.shouldNotifyOnUpdatebooleana flag indicates whether need to notify users if this policy is updated---
payload.policy.countryGroupCodestring---deprecated
payload.policy.isMandatorybooleana flag indicates whether this policy is mandatory---
payload.policy.isDefaultOptedboolean---deprecated
payload.policy.basePolicyIdstring---deprecated
payload.policy.readableIdstring---deprecated
payload.policy.descriptionstringdescription of this policy---
payload.policy.isDefaultSelectionbooleana flag indicates whether this country based policy is the default selected---
0 (allOf item)object---additional properties are allowed
idstring----
versioninteger----
namestring----
namespacestring----
parentNamespacestring----
timestampstring--format (date-time)-
clientIdstring----
userIdstring----
traceIdstring----
sessionIdstring----

Examples of payload (generated)

{
"payload": {
"policy": {
"id": "string",
"policyName": "string",
"countryCode": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"shouldNotifyOnUpdate": true,
"countryGroupCode": "string",
"isMandatory": true,
"isDefaultOpted": true,
"basePolicyId": "string",
"readableId": "string",
"description": "string",
"isDefaultSelection": true
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

Message defaultPolicyUpdated

message is sent when country based policy is set to default

Payload
NameTypeDescriptionValueConstraintsNotes
(root)object allOf---additional properties are allowed
payloadobject---additional properties are allowed
payload.policyobject---additional properties are allowed
payload.policy.idstringpolicy id---
payload.policy.policyNamestringpolicy name---
payload.policy.countryCodestringcountry code---
payload.policy.createdAtstringtime when the policy is created-format (date-time)-
payload.policy.updatedAtstringtime when the policy is updated-format (date-time)-
payload.policy.shouldNotifyOnUpdatebooleana flag indicates whether need to notify users if this policy is updated---
payload.policy.countryGroupCodestring---deprecated
payload.policy.isMandatorybooleana flag indicates whether this policy is mandatory---
payload.policy.isDefaultOptedboolean---deprecated
payload.policy.basePolicyIdstring---deprecated
payload.policy.readableIdstring---deprecated
payload.policy.descriptionstringdescription of this policy---
payload.policy.isDefaultSelectionbooleana flag indicates whether this country based policy is the default selected---
0 (allOf item)object---additional properties are allowed
idstring----
versioninteger----
namestring----
namespacestring----
parentNamespacestring----
timestampstring--format (date-time)-
clientIdstring----
userIdstring----
traceIdstring----
sessionIdstring----

Examples of payload (generated)

{
"payload": {
"policy": {
"id": "string",
"policyName": "string",
"countryCode": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"shouldNotifyOnUpdate": true,
"countryGroupCode": "string",
"isMandatory": true,
"isDefaultOpted": true,
"basePolicyId": "string",
"readableId": "string",
"description": "string",
"isDefaultSelection": true
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

PUB versionedPolicy Operation

Accepts one of the following messages:

Message versionedPolicyCreated

message is sent when policy version is created

Payload
NameTypeDescriptionValueConstraintsNotes
(root)object allOf---additional properties are allowed
payloadobject---additional properties are allowed
payload.versionedPolicyobject---additional properties are allowed
payload.versionedPolicy.idstringpolicy version id---
payload.versionedPolicy.policyIdstringpolicy id this policy version belongs to---
payload.versionedPolicy.displayVersionstringdisplay version of this policy version---
payload.versionedPolicy.descriptionstringdescription of this policy version---
payload.versionedPolicy.statusstringstatus of this policy version, values can be empty string if never published or PUBLISHED/ACTIVE---
payload.versionedPolicy.createdAtstringtime when this version is created-format (date-time)-
payload.versionedPolicy.updatedAtstringtime when this version is updated-format (date-time)-
payload.versionedPolicy.publishedDatestringtime when this version is published-format (date-time)-
payload.versionedPolicy.isCrucialboolean---deprecated
payload.versionedPolicy.isCommittedboolean---deprecated
payload.versionedPolicy.isInEffectbooleana flag indicates whether this version is currently published---
0 (allOf item)object---additional properties are allowed
idstring----
versioninteger----
namestring----
namespacestring----
parentNamespacestring----
timestampstring--format (date-time)-
clientIdstring----
userIdstring----
traceIdstring----
sessionIdstring----

Examples of payload (generated)

{
"payload": {
"versionedPolicy": {
"id": "string",
"policyId": "string",
"displayVersion": "string",
"description": "string",
"status": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"publishedDate": "2019-08-24T14:15:22Z",
"isCrucial": true,
"isCommitted": true,
"isInEffect": true
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

Message versionedPolicyUpdated

message is sent when policy version is updated

Payload
NameTypeDescriptionValueConstraintsNotes
(root)object allOf---additional properties are allowed
payloadobject---additional properties are allowed
payload.versionedPolicyobject---additional properties are allowed
payload.versionedPolicy.idstringpolicy version id---
payload.versionedPolicy.policyIdstringpolicy id this policy version belongs to---
payload.versionedPolicy.displayVersionstringdisplay version of this policy version---
payload.versionedPolicy.descriptionstringdescription of this policy version---
payload.versionedPolicy.statusstringstatus of this policy version, values can be empty string if never published or PUBLISHED/ACTIVE---
payload.versionedPolicy.createdAtstringtime when this version is created-format (date-time)-
payload.versionedPolicy.updatedAtstringtime when this version is updated-format (date-time)-
payload.versionedPolicy.publishedDatestringtime when this version is published-format (date-time)-
payload.versionedPolicy.isCrucialboolean---deprecated
payload.versionedPolicy.isCommittedboolean---deprecated
payload.versionedPolicy.isInEffectbooleana flag indicates whether this version is currently published---
0 (allOf item)object---additional properties are allowed
idstring----
versioninteger----
namestring----
namespacestring----
parentNamespacestring----
timestampstring--format (date-time)-
clientIdstring----
userIdstring----
traceIdstring----
sessionIdstring----

Examples of payload (generated)

{
"payload": {
"versionedPolicy": {
"id": "string",
"policyId": "string",
"displayVersion": "string",
"description": "string",
"status": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"publishedDate": "2019-08-24T14:15:22Z",
"isCrucial": true,
"isCommitted": true,
"isInEffect": true
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

Message versionedPolicyPublished

message is sent when policy version is published

Payload
NameTypeDescriptionValueConstraintsNotes
(root)object allOf---additional properties are allowed
payloadobject---additional properties are allowed
payload.versionedPolicyobject---additional properties are allowed
payload.versionedPolicy.idstringpolicy version id---
payload.versionedPolicy.policyIdstringpolicy id this policy version belongs to---
payload.versionedPolicy.displayVersionstringdisplay version of this policy version---
payload.versionedPolicy.descriptionstringdescription of this policy version---
payload.versionedPolicy.statusstringstatus of this policy version, values can be empty string if never published or PUBLISHED/ACTIVE---
payload.versionedPolicy.createdAtstringtime when this version is created-format (date-time)-
payload.versionedPolicy.updatedAtstringtime when this version is updated-format (date-time)-
payload.versionedPolicy.publishedDatestringtime when this version is published-format (date-time)-
payload.versionedPolicy.isCrucialboolean---deprecated
payload.versionedPolicy.isCommittedboolean---deprecated
payload.versionedPolicy.isInEffectbooleana flag indicates whether this version is currently published---
0 (allOf item)object---additional properties are allowed
idstring----
versioninteger----
namestring----
namespacestring----
parentNamespacestring----
timestampstring--format (date-time)-
clientIdstring----
userIdstring----
traceIdstring----
sessionIdstring----

Examples of payload (generated)

{
"payload": {
"versionedPolicy": {
"id": "string",
"policyId": "string",
"displayVersion": "string",
"description": "string",
"status": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"publishedDate": "2019-08-24T14:15:22Z",
"isCrucial": true,
"isCommitted": true,
"isInEffect": true
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

PUB localizedPolicy Operation

Accepts one of the following messages:

Message localizedPolicyCreated

message is sent when localized policy is created

Payload
NameTypeDescriptionValueConstraintsNotes
(root)object allOf---additional properties are allowed
payloadobject---additional properties are allowed
payload.localizedPolicyobject---additional properties are allowed
payload.localizedPolicy.idstringlocalized policy version id---
payload.localizedPolicy.versionedPolicyIdstringpolicy version id---
payload.localizedPolicy.descriptionstringdescription of localized policy version---
payload.localizedPolicy.localeCodestringlocale/language code---
payload.localizedPolicy.contentTypestringtype of the source file, text/html or text/markdown---
payload.localizedPolicy.attachmentLocationstringlocation of the source file in the storage---
payload.localizedPolicy.attachmentChecksumstringchecksum of the source file---
payload.localizedPolicy.attachmentVersionIdentifierstringidentifier of the source file---
payload.localizedPolicy.statusstring---deprecated
payload.localizedPolicy.createdAtstringtime when this localized version was created-format (date-time)-
payload.localizedPolicy.updatedAtstringtime when this localized version was updated-format (date-time)-
payload.localizedPolicy.publishedDatestring--format (date-time)deprecated
payload.localizedPolicy.isDefaultSelectionboolean---deprecated
0 (allOf item)object---additional properties are allowed
idstring----
versioninteger----
namestring----
namespacestring----
parentNamespacestring----
timestampstring--format (date-time)-
clientIdstring----
userIdstring----
traceIdstring----
sessionIdstring----

Examples of payload (generated)

{
"payload": {
"localizedPolicy": {
"id": "string",
"versionedPolicyId": "string",
"description": "string",
"localeCode": "string",
"contentType": "string",
"attachmentLocation": "string",
"attachmentChecksum": "string",
"attachmentVersionIdentifier": "string",
"status": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"publishedDate": "2019-08-24T14:15:22Z",
"isDefaultSelection": true
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

Message localizedPolicyUpdated

message is sent when localized policy is updated

Payload
NameTypeDescriptionValueConstraintsNotes
(root)object allOf---additional properties are allowed
payloadobject---additional properties are allowed
payload.localizedPolicyobject---additional properties are allowed
payload.localizedPolicy.idstringlocalized policy version id---
payload.localizedPolicy.versionedPolicyIdstringpolicy version id---
payload.localizedPolicy.descriptionstringdescription of localized policy version---
payload.localizedPolicy.localeCodestringlocale/language code---
payload.localizedPolicy.contentTypestringtype of the source file, text/html or text/markdown---
payload.localizedPolicy.attachmentLocationstringlocation of the source file in the storage---
payload.localizedPolicy.attachmentChecksumstringchecksum of the source file---
payload.localizedPolicy.attachmentVersionIdentifierstringidentifier of the source file---
payload.localizedPolicy.statusstring---deprecated
payload.localizedPolicy.createdAtstringtime when this localized version was created-format (date-time)-
payload.localizedPolicy.updatedAtstringtime when this localized version was updated-format (date-time)-
payload.localizedPolicy.publishedDatestring--format (date-time)deprecated
payload.localizedPolicy.isDefaultSelectionboolean---deprecated
0 (allOf item)object---additional properties are allowed
idstring----
versioninteger----
namestring----
namespacestring----
parentNamespacestring----
timestampstring--format (date-time)-
clientIdstring----
userIdstring----
traceIdstring----
sessionIdstring----

Examples of payload (generated)

{
"payload": {
"localizedPolicy": {
"id": "string",
"versionedPolicyId": "string",
"description": "string",
"localeCode": "string",
"contentType": "string",
"attachmentLocation": "string",
"attachmentChecksum": "string",
"attachmentVersionIdentifier": "string",
"status": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"publishedDate": "2019-08-24T14:15:22Z",
"isDefaultSelection": true
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

Message defaultLocalizedPolicyUpdated

Payload
NameTypeDescriptionValueConstraintsNotes
(root)object allOf---additional properties are allowed
payloadobject---additional properties are allowed
payload.localizedPolicyobject---additional properties are allowed
payload.localizedPolicy.idstringlocalized policy version id---
payload.localizedPolicy.versionedPolicyIdstringpolicy version id---
payload.localizedPolicy.descriptionstringdescription of localized policy version---
payload.localizedPolicy.localeCodestringlocale/language code---
payload.localizedPolicy.contentTypestringtype of the source file, text/html or text/markdown---
payload.localizedPolicy.attachmentLocationstringlocation of the source file in the storage---
payload.localizedPolicy.attachmentChecksumstringchecksum of the source file---
payload.localizedPolicy.attachmentVersionIdentifierstringidentifier of the source file---
payload.localizedPolicy.statusstring---deprecated
payload.localizedPolicy.createdAtstringtime when this localized version was created-format (date-time)-
payload.localizedPolicy.updatedAtstringtime when this localized version was updated-format (date-time)-
payload.localizedPolicy.publishedDatestring--format (date-time)deprecated
payload.localizedPolicy.isDefaultSelectionboolean---deprecated
0 (allOf item)object---additional properties are allowed
idstring----
versioninteger----
namestring----
namespacestring----
parentNamespacestring----
timestampstring--format (date-time)-
clientIdstring----
userIdstring----
traceIdstring----
sessionIdstring----

Examples of payload (generated)

{
"payload": {
"localizedPolicy": {
"id": "string",
"versionedPolicyId": "string",
"description": "string",
"localeCode": "string",
"contentType": "string",
"attachmentLocation": "string",
"attachmentChecksum": "string",
"attachmentVersionIdentifier": "string",
"status": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"publishedDate": "2019-08-24T14:15:22Z",
"isDefaultSelection": true
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}