-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add new program certificate events (#253)
GitHub Issue: #250 Internal 2U ticket: APER-2625 This PR adds new `OpenEdxPublicSignal` events triggered by program certificate generation and revocation. - Adds a `PROGRAM_CERTIFICATE_AWARDED` event - Adds a `PROGRAM_CERTIFICATE_REVOKED` event - Adds new `ProgramCertificateData` and `ProgramData` data classes to support the new events
- Loading branch information
1 parent
c0eb4ba
commit 27ed4da
Showing
7 changed files
with
265 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ | |
more information about the project. | ||
""" | ||
|
||
__version__ = "8.3.0" | ||
__version__ = "8.4.0" |
96 changes: 96 additions & 0 deletions
96
...nt_bus/avro/tests/schemas/org+openedx+learning+program+certificate+awarded+v1_schema.avsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
{ | ||
"name": "CloudEvent", | ||
"type": "record", | ||
"doc": "Avro Event Format for CloudEvents created with openedx_events/schema", | ||
"fields": [ | ||
{ | ||
"name": "program_certificate", | ||
"type": { | ||
"name": "ProgramCertificateData", | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"name": "user", | ||
"type": { | ||
"name": "UserData", | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"name": "id", | ||
"type": "long" | ||
}, | ||
{ | ||
"name": "is_active", | ||
"type": "boolean" | ||
}, | ||
{ | ||
"name": "pii", | ||
"type": { | ||
"name": "UserPersonalData", | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"name": "username", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "email", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "name", | ||
"type": "string" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "program", | ||
"type": { | ||
"name": "ProgramData", | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"name": "uuid", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "title", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "program_type", | ||
"type": "string" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "uuid", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "status", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "url", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "certificate_available_date", | ||
"type": [ | ||
"null", | ||
"string" | ||
], | ||
"default": null | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"namespace": "org.openedx.learning.program.certificate.awarded.v1" | ||
} |
96 changes: 96 additions & 0 deletions
96
...nt_bus/avro/tests/schemas/org+openedx+learning+program+certificate+revoked+v1_schema.avsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
{ | ||
"name": "CloudEvent", | ||
"type": "record", | ||
"doc": "Avro Event Format for CloudEvents created with openedx_events/schema", | ||
"fields": [ | ||
{ | ||
"name": "program_certificate", | ||
"type": { | ||
"name": "ProgramCertificateData", | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"name": "user", | ||
"type": { | ||
"name": "UserData", | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"name": "id", | ||
"type": "long" | ||
}, | ||
{ | ||
"name": "is_active", | ||
"type": "boolean" | ||
}, | ||
{ | ||
"name": "pii", | ||
"type": { | ||
"name": "UserPersonalData", | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"name": "username", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "email", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "name", | ||
"type": "string" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "program", | ||
"type": { | ||
"name": "ProgramData", | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"name": "uuid", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "title", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "program_type", | ||
"type": "string" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "uuid", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "status", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "url", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "certificate_available_date", | ||
"type": [ | ||
"null", | ||
"string" | ||
], | ||
"default": null | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"namespace": "org.openedx.learning.program.certificate.revoked.v1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters