SeedCompany / cord-api-v3

Bible translation project management API
MIT License
18 stars 4 forks source link

Split TranslationProject into Momentum and Multiplication #3160

Closed andrewmurraydavid closed 4 months ago

andrewmurraydavid commented 5 months ago

Monday task

Description

A new Translation Project type was introduced, Multiplication Project. The old "Translation" project becomes "Momentum" from a business stand point, but from a data view, the Translation project becomes abstract and Momentum and Multiplication become "subtypes" of Translation.

Ready for review checklist

Use [N/A] if the item is not applicable to this PR or remove the item

  • [x] Change the task url above to the actual Monday task
  • [N/A] Add/update tests if needed
  • [ ] Add reviewers to this PR
github-actions[bot] commented 5 months ago

🗞 GraphQL Summary

View schema changes ```diff @@ -2629,8 +2629,111 @@ """ caption: String } +"""Formerly known as our TranslationProjects""" +type MomentumTranslationProject implements ChangesetAware & Commentable & Pinnable & Postable & Project & Resource & TranslationProject { + avatarLetters: String + + """The project's current budget""" + budget: SecuredBudget! + + """Whether the requesting user can delete this resource""" + canDelete: Boolean! + changeRequests(input: ProjectChangeRequestListInput = {count: 25, order: ASC, page: 1, sort: "createdAt"}): SecuredProjectChangeRequestList! + + """The current changeset that this object is for.""" + changeset: Changeset + + """ + The changes made within this changeset limited to this resource's sub-tree + """ + changesetDiff: ChangesetDiff + + """List of comment threads belonging to the parent node.""" + commentThreads(input: CommentThreadListInput = {count: 25, order: DESC, page: 1, sort: "createdAt"}): CommentThreadList! + createdAt: DateTime! + + """ + The financial report currently due. This is the period that most recently completed. + """ + currentFinancialReportDue: SecuredPeriodicReport! + + """ + The narrative report currently due. This is the period that most recently completed. + """ + currentNarrativeReportDue: SecuredPeriodicReport! + + """The legacy department ID""" + departmentId: SecuredStringNullable! + engagements(input: EngagementListInput = {count: 25, filter: {}, order: ASC, page: 1, sort: "createdAt"}): SecuredEngagementList! + estimatedSubmission: SecuredDateNullable! + fieldRegion: SecuredFieldRegion! + financialReportPeriod: SecuredReportPeriod! + financialReportReceivedAt: SecuredDateTimeNullable! + financialReports(input: PeriodicReportListInput = {count: 25, order: ASC, page: 1, sort: "end"}): SecuredPeriodicReportList! + id: ID! + initialMouEnd: SecuredDateNullable! + + """ + Same as `engagements` field just typed as a list of concrete LanguageEngagements instead of the interface. + TranslationProjects will only have LanguageEngagements. + """ + languageEngagements(input: EngagementListInput = {count: 25, filter: {}, order: ASC, page: 1, sort: "createdAt"}): SecuredLanguageEngagementList! + marketingLocation: SecuredLocation! + marketingRegionOverride: SecuredLocation! + modifiedAt: DateTime! + mouEnd: SecuredDateNullable! + mouRange: SecuredDateRange! + mouStart: SecuredDateNullable! + name: SecuredString! + narrativeReports(input: PeriodicReportListInput = {count: 25, order: ASC, page: 1, sort: "end"}): SecuredPeriodicReportList! + + """ + The financial report due next. This is the period currently in progress. + """ + nextFinancialReportDue: SecuredPeriodicReport! + + """ + The narrative report due next. This is the period currently in progress. + """ + nextNarrativeReportDue: SecuredPeriodicReport! + otherLocations(input: LocationListInput = {count: 25, order: ASC, page: 1, sort: "name"}): SecuredLocationList! + owningOrganization: SecuredOrganization! + + """The parent resource of this resource""" + parent: Resource + partnerships(input: PartnershipListInput = {count: 25, order: ASC, page: 1, sort: "createdAt"}): SecuredPartnershipList! + + """Does the requesting user have this pinned?""" + pinned: Boolean! + + """List of posts belonging to the parent node.""" + posts(input: PostListInput = {count: 25, order: DESC, page: 1, sort: "createdAt"}): SecuredPostList! + + """ + Whether or not this project and its associated languages (via engagements) + are a part of our "Preset Inventory". + + This indicates the project/language(s) will be exposed to major investors to directly fund. + It also means the project is committed to having quality, consistent reporting. + """ + presetInventory: SecuredBoolean! + primaryLocation: SecuredLocation! + + """The root filesystem directory of this project""" + rootDirectory: SecuredDirectory! + sensitivity: Sensitivity! + status: ProjectStatus! + step: SecuredProjectStep! + stepChangedAt: SecuredDateTime! + tags: SecuredTags! + + """The project members""" + team(input: ProjectMemberListInput = {count: 25, filter: {}, order: ASC, page: 1, sort: "createdAt"}): SecuredProjectMemberList! + type: ProjectType! +} + input MoveFileInput { """The file or directory's ID""" id: ID! @@ -2643,8 +2746,110 @@ """The new parent ID""" parentId: ID! } +type MultiplicationTranslationProject implements ChangesetAware & Commentable & Pinnable & Postable & Project & Resource & TranslationProject { + avatarLetters: String + + """The project's current budget""" + budget: SecuredBudget! + + """Whether the requesting user can delete this resource""" + canDelete: Boolean! + changeRequests(input: ProjectChangeRequestListInput = {count: 25, order: ASC, page: 1, sort: "createdAt"}): SecuredProjectChangeRequestList! + + """The current changeset that this object is for.""" + changeset: Changeset + + """ + The changes made within this changeset limited to this resource's sub-tree + """ + changesetDiff: ChangesetDiff + + """List of comment threads belonging to the parent node.""" + commentThreads(input: CommentThreadListInput = {count: 25, order: DESC, page: 1, sort: "createdAt"}): CommentThreadList! + createdAt: DateTime! + + """ + The financial report currently due. This is the period that most recently completed. + """ + currentFinancialReportDue: SecuredPeriodicReport! + + """ + The narrative report currently due. This is the period that most recently completed. + """ + currentNarrativeReportDue: SecuredPeriodicReport! + + """The legacy department ID""" + departmentId: SecuredStringNullable! + engagements(input: EngagementListInput = {count: 25, filter: {}, order: ASC, page: 1, sort: "createdAt"}): SecuredEngagementList! + estimatedSubmission: SecuredDateNullable! + fieldRegion: SecuredFieldRegion! + financialReportPeriod: SecuredReportPeriod! + financialReportReceivedAt: SecuredDateTimeNullable! + financialReports(input: PeriodicReportListInput = {count: 25, order: ASC, page: 1, sort: "end"}): SecuredPeriodicReportList! + id: ID! + initialMouEnd: SecuredDateNullable! + + """ + Same as `engagements` field just typed as a list of concrete LanguageEngagements instead of the interface. + TranslationProjects will only have LanguageEngagements. + """ + languageEngagements(input: EngagementListInput = {count: 25, filter: {}, order: ASC, page: 1, sort: "createdAt"}): SecuredLanguageEngagementList! + marketingLocation: SecuredLocation! + marketingRegionOverride: SecuredLocation! + modifiedAt: DateTime! + mouEnd: SecuredDateNullable! + mouRange: SecuredDateRange! + mouStart: SecuredDateNullable! + name: SecuredString! + narrativeReports(input: PeriodicReportListInput = {count: 25, order: ASC, page: 1, sort: "end"}): SecuredPeriodicReportList! + + """ + The financial report due next. This is the period currently in progress. + """ + nextFinancialReportDue: SecuredPeriodicReport! + + """ + The narrative report due next. This is the period currently in progress. + """ + nextNarrativeReportDue: SecuredPeriodicReport! + otherLocations(input: LocationListInput = {count: 25, order: ASC, page: 1, sort: "name"}): SecuredLocationList! + owningOrganization: SecuredOrganization! + + """The parent resource of this resource""" + parent: Resource + partnerships(input: PartnershipListInput = {count: 25, order: ASC, page: 1, sort: "createdAt"}): SecuredPartnershipList! + + """Does the requesting user have this pinned?""" + pinned: Boolean! + + """List of posts belonging to the parent node.""" + posts(input: PostListInput = {count: 25, order: DESC, page: 1, sort: "createdAt"}): SecuredPostList! + + """ + Whether or not this project and its associated languages (via engagements) + are a part of our "Preset Inventory". + + This indicates the project/language(s) will be exposed to major investors to directly fund. + It also means the project is committed to having quality, consistent reporting. + """ + presetInventory: SecuredBoolean! + primaryLocation: SecuredLocation! + + """The root filesystem directory of this project""" + rootDirectory: SecuredDirectory! + sensitivity: Sensitivity! + status: ProjectStatus! + step: SecuredProjectStep! + stepChangedAt: SecuredDateTime! + tags: SecuredTags! + + """The project members""" + team(input: ProjectMemberListInput = {count: 25, filter: {}, order: ASC, page: 1, sort: "createdAt"}): SecuredProjectMemberList! + type: ProjectType! +} + type Mutation { """Add a location to a language""" addLocationToLanguage(languageId: ID!, locationId: ID!): Language! @@ -4301,10 +4506,10 @@ """Only projects matching these steps""" step: [ProjectStep!] - """Only projects of this type""" - type: ProjectType + """Only projects of these types""" + type: [ProjectType!] } input ProjectListInput { """The number of items to return in a single page""" @@ -4433,9 +4638,14 @@ } enum ProjectType { Internship - Translation + + """@label Momentum""" + MomentumTranslation + + """@label Multiplication""" + MultiplicationTranslation } type Prompt { """Whether the requesting user can delete this resource""" @@ -4903,9 +5113,9 @@ """The search string to look for.""" items: [SearchResult!]! } -union SearchResult = DerivativeScriptureProduct | DirectScriptureProduct | EthnoArt | FieldRegion | FieldZone | Film | FinancialReport | FundingAccount | InternshipProject | Language | Location | NarrativeReport | Organization | OtherProduct | Partner | ProgressReport | Story | TranslationProject | User +union SearchResult = DerivativeScriptureProduct | DirectScriptureProduct | EthnoArt | FieldRegion | FieldZone | Film | FinancialReport | FundingAccount | InternshipProject | Language | Location | MomentumTranslationProject | MultiplicationTranslationProject | NarrativeReport | Organization | OtherProduct | Partner | ProgressReport | Story | User enum SearchType { DerivativeScriptureProduct DirectScriptureProduct @@ -4917,8 +5127,10 @@ FundingAccount InternshipProject Language Location + MomentumTranslationProject + MultiplicationTranslationProject NarrativeReport Organization OtherProduct Partner @@ -6296,9 +6508,9 @@ Neutral Reject } -type TranslationProject implements ChangesetAware & Commentable & Pinnable & Postable & Project & Resource { +interface TranslationProject implements ChangesetAware & Commentable & Pinnable & Postable & Project & Resource { avatarLetters: String """The project's current budget""" budget: SecuredBudget! @@ -6336,8 +6548,10 @@ fieldRegion: SecuredFieldRegion! financialReportPeriod: SecuredReportPeriod! financialReportReceivedAt: SecuredDateTimeNullable! financialReports(input: PeriodicReportListInput = {count: 25, order: ASC, page: 1, sort: "end"}): SecuredPeriodicReportList! + + """The object's ID""" id: ID! initialMouEnd: SecuredDateNullable! """ ```

🚨 Breaking Changes

⚠️ Dangerous Changes