Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Social Media URL and Website URL to Partners #3067

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

brentkulwicki
Copy link
Contributor

@brentkulwicki brentkulwicki commented Jan 25, 2024

Backend for ticket 5428606347

Copy link

github-actions bot commented Jan 25, 2024

🗞 GraphQL Summary

View schema changes
@@ -47,9 +47,9 @@
     This sets the `Content-Disposition` header to `attachment` instead of `inline`.
     https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition
     """
     download: Boolean! = false
-  ): URL!
+  ): CustomURL!
 }
 
 type AvailableProgressReportMediaVariant {
   """Whether the user can upload/create media for this variant"""
@@ -800,10 +800,12 @@
   languagesOfConsulting: [ID!] = []
   organizationId: ID!
   pmcEntityCode: String
   pointOfContactId: ID
+  socialUrl: CustomURL
   startDate: Date
   types: [PartnerType!] = []
+  websiteUrl: CustomURL
 }
 
 input CreatePartnerInput {
   partner: CreatePartner!
@@ -986,8 +988,13 @@
   unavailability: Unavailability!
 }
 
 """
+A field whose value conforms to the standard URL format as specified in RFC3986: https://www.ietf.org/rfc/rfc3986.txt.
+"""
+scalar CustomURL
+
+"""
 An ISO-8601 date string.
 Time should be ignored for this field.
 """
 scalar Date
@@ -1752,9 +1759,9 @@
   """
   createdBy: User!
 
   """A direct url to download the file"""
-  downloadUrl: URL! @deprecated(reason: "Use `url` instead.\n\nNote while this url is anonymous, the new field, `url` is not.")
+  downloadUrl: CustomURL! @deprecated(reason: "Use `url` instead.\n\nNote while this url is anonymous, the new field, `url` is not.")
   id: ID!
   media: Media
   mimeType: String!
   modifiedAt: DateTime!
@@ -1794,9 +1801,9 @@
     This sets the `Content-Disposition` header to `attachment` instead of `inline`.
     https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition
     """
     download: Boolean! = false
-  ): URL!
+  ): CustomURL!
 }
 
 input FileFilters {
   """Only file nodes matching this name"""
@@ -1885,9 +1892,9 @@
   """
   createdBy: User!
 
   """A direct url to download the file version"""
-  downloadUrl: URL! @deprecated(reason: "Use `url` instead.\n\nNote while this url is anonymous, the new field, `url` is not.")
+  downloadUrl: CustomURL! @deprecated(reason: "Use `url` instead.\n\nNote while this url is anonymous, the new field, `url` is not.")
   id: ID!
   media: Media
   mimeType: String!
 
@@ -1923,9 +1930,9 @@
     This sets the `Content-Disposition` header to `attachment` instead of `inline`.
     https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition
     """
     download: Boolean! = false
-  ): URL!
+  ): CustomURL!
 }
 
 type Film implements Producible & Resource {
   """Whether the requesting user can delete this resource"""
@@ -2081,9 +2088,9 @@
     This sets the `Content-Disposition` header to `attachment` instead of `inline`.
     https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition
     """
     download: Boolean! = false
-  ): URL!
+  ): CustomURL!
 }
 
 """
 First scripture that has been created and managed _in_ CORD. `hasFirst` will always be true.
@@ -2639,9 +2646,9 @@
     This sets the `Content-Disposition` header to `attachment` instead of `inline`.
     https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition
     """
     download: Boolean! = false
-  ): URL!
+  ): CustomURL!
 }
 
 input MediaUserMetadata {
   """
@@ -3276,10 +3283,12 @@
   projects(input: ProjectListInput = {count: 25, filter: {}, order: ASC, page: 1, sort: "name"}): SecuredProjectList!
 
   """Based on the project's sensitivity"""
   sensitivity: Sensitivity!
+  socialUrl: SecuredURLNullable!
   startDate: SecuredDateNullable!
   types: SecuredPartnerTypes!
+  websiteUrl: SecuredURLNullable!
 }
 
 input PartnerFilters {
   """Only partners that are pinned/unpinned by the requesting user"""
@@ -4713,12 +4722,12 @@
   unavailabilities(input: UnavailabilityListInput = {count: 25, order: DESC, page: 1, sort: "start"}): UnavailabilityListOutput! @deprecated(reason: "Query via user instead")
 
   """Look up a unavailability by its ID"""
   unavailability(id: ID!): Unavailability! @deprecated(reason: "Query via user instead")
+  unstable_stubCustomURL: CustomURL @deprecated(reason: "Only here to prevent schema errors, do not use")
   unstable_stubDate: Date @deprecated(reason: "Only here to prevent schema errors, do not use")
   unstable_stubDateTime: DateTime @deprecated(reason: "Only here to prevent schema errors, do not use")
   unstable_stubRichText: RichText @deprecated(reason: "Only here to prevent schema errors, do not use")
-  unstable_stubURL: URL @deprecated(reason: "Only here to prevent schema errors, do not use")
   unstable_stubUpload: Upload @deprecated(reason: "Only here to prevent schema errors, do not use")
 
   """Look up a user by its ID"""
   user(id: ID!): User!
@@ -6089,8 +6098,19 @@
   total: Int!
 }
 
 """
+An object with a secured URL string `value` and additional authorization information.
+The value is only given if `canRead` is `true` otherwise it is `null`.
+These `can*` authorization properties are specific to the user making the request.
+"""
+type SecuredURLNullable implements Secured {
+  canEdit: Boolean!
+  canRead: Boolean!
+  value: URL
+}
+
+"""
 An object whose `items` is a list of unavailabilities and additional authorization information.
 The value is only given if `canRead` is `true` otherwise it is an empty list.
 The `can*` properties are specific to the user making the request.
 """
@@ -6281,9 +6301,9 @@
     This sets the `Content-Disposition` header to `attachment` instead of `inline`.
     https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition
     """
     download: Boolean! = false
-  ): URL!
+  ): CustomURL!
 }
 
 """An IANA Time Zone"""
 type TimeZone {
@@ -6871,10 +6891,12 @@
   languageOfWiderCommunicationId: ID
   languagesOfConsulting: [ID!]
   pmcEntityCode: String
   pointOfContactId: ID
+  socialUrl: CustomURL
   startDate: Date
   types: [PartnerType!]
+  websiteUrl: CustomURL
 }
 
 input UpdatePartnerInput {
   partner: UpdatePartner!
@@ -7258,9 +7280,9 @@
     This sets the `Content-Disposition` header to `attachment` instead of `inline`.
     https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition
     """
     download: Boolean! = false
-  ): URL!
+  ): CustomURL!
 }
 
 interface VisualMedia implements Media {
   """
@@ -7297,6 +7319,6 @@
     This sets the `Content-Disposition` header to `attachment` instead of `inline`.
     https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition
     """
     download: Boolean! = false
-  ): URL!
+  ): CustomURL!
 }

🚨 Breaking Changes

  • Audio.url changed type from URL! to CustomURL!.
  • File.downloadUrl changed type from URL! to CustomURL!.
  • File.url changed type from URL! to CustomURL!.
  • FileVersion.downloadUrl changed type from URL! to CustomURL!.
  • FileVersion.url changed type from URL! to CustomURL!.
  • Image.url changed type from URL! to CustomURL!.
  • Media.url changed type from URL! to CustomURL!.
  • Query.unstable_stubURL was removed.
  • TemporalMedia.url changed type from URL! to CustomURL!.
  • Video.url changed type from URL! to CustomURL!.
  • VisualMedia.url changed type from URL! to CustomURL!.

⚠️ Dangerous Changes

  • An optional field socialUrl on input type CreatePartner was added.
  • An optional field websiteUrl on input type CreatePartner was added.
  • An optional field socialUrl on input type UpdatePartner was added.
  • An optional field websiteUrl on input type UpdatePartner was added.

@brentkulwicki brentkulwicki changed the title Adds Social Media URL and Website URL to Orgs Adds Social Media URL and Website URL to Partners Jan 31, 2024
@brentkulwicki brentkulwicki marked this pull request as ready for review January 31, 2024 01:19
@brentkulwicki brentkulwicki requested a review from a team January 31, 2024 01:20
src/common/secured-url.field.ts Outdated Show resolved Hide resolved
src/components/partner/dto/create-partner.dto.ts Outdated Show resolved Hide resolved
src/components/partner/dto/create-partner.dto.ts Outdated Show resolved Hide resolved
src/components/partner/dto/partner.dto.ts Outdated Show resolved Hide resolved
src/components/partner/dto/update-partner.dto.ts Outdated Show resolved Hide resolved
src/components/partner/dto/update-partner.dto.ts Outdated Show resolved Hide resolved
src/components/partner/dto/update-partner.dto.ts Outdated Show resolved Hide resolved
src/components/partner/partner.repository.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants