Skip to content

Commit ae5eadc

Browse files
authored
Merge pull request #667 from Automattic/hamorillo/GRA-248
Update OpenApi definition and regenerate new classes
2 parents c889e06 + d84fe4b commit ae5eadc

File tree

5 files changed

+311
-8
lines changed

5 files changed

+311
-8
lines changed

gravatar/api/gravatar.api

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,10 @@ public final class com/gravatar/restapi/models/Profile {
492492
public final fun getPronouns ()Ljava/lang/String;
493493
public final fun getPronunciation ()Ljava/lang/String;
494494
public final fun getRegistrationDate ()Ljava/lang/String;
495+
public final fun getSectionVisibility ()Lcom/gravatar/restapi/models/ProfileSectionVisibility;
495496
public final fun getTimezone ()Ljava/lang/String;
497+
public final fun getUserId ()Ljava/lang/Integer;
498+
public final fun getUserLogin ()Ljava/lang/String;
496499
public final fun getVerifiedAccounts ()Ljava/util/List;
497500
public fun hashCode ()I
498501
public final fun isOrganization ()Ljava/lang/Boolean;
@@ -526,7 +529,10 @@ public final class com/gravatar/restapi/models/Profile$Builder {
526529
public final fun getPronouns ()Ljava/lang/String;
527530
public final fun getPronunciation ()Ljava/lang/String;
528531
public final fun getRegistrationDate ()Ljava/lang/String;
532+
public final fun getSectionVisibility ()Lcom/gravatar/restapi/models/ProfileSectionVisibility;
529533
public final fun getTimezone ()Ljava/lang/String;
534+
public final fun getUserId ()Ljava/lang/Integer;
535+
public final fun getUserLogin ()Ljava/lang/String;
530536
public final fun getVerifiedAccounts ()Ljava/util/List;
531537
public final fun isOrganization ()Ljava/lang/Boolean;
532538
public final fun setAvatarAltText (Ljava/lang/String;)Lcom/gravatar/restapi/models/Profile$Builder;
@@ -579,8 +585,14 @@ public final class com/gravatar/restapi/models/Profile$Builder {
579585
public final synthetic fun setPronunciation (Ljava/lang/String;)V
580586
public final fun setRegistrationDate (Ljava/lang/String;)Lcom/gravatar/restapi/models/Profile$Builder;
581587
public final synthetic fun setRegistrationDate (Ljava/lang/String;)V
588+
public final fun setSectionVisibility (Lcom/gravatar/restapi/models/ProfileSectionVisibility;)Lcom/gravatar/restapi/models/Profile$Builder;
589+
public final synthetic fun setSectionVisibility (Lcom/gravatar/restapi/models/ProfileSectionVisibility;)V
582590
public final fun setTimezone (Ljava/lang/String;)Lcom/gravatar/restapi/models/Profile$Builder;
583591
public final synthetic fun setTimezone (Ljava/lang/String;)V
592+
public final fun setUserId (Ljava/lang/Integer;)Lcom/gravatar/restapi/models/Profile$Builder;
593+
public final synthetic fun setUserId (Ljava/lang/Integer;)V
594+
public final fun setUserLogin (Ljava/lang/String;)Lcom/gravatar/restapi/models/Profile$Builder;
595+
public final synthetic fun setUserLogin (Ljava/lang/String;)V
584596
public final fun setVerifiedAccounts (Ljava/util/List;)Lcom/gravatar/restapi/models/Profile$Builder;
585597
public final synthetic fun setVerifiedAccounts (Ljava/util/List;)V
586598
}
@@ -679,6 +691,55 @@ public final class com/gravatar/restapi/models/ProfilePaymentsKt {
679691
public static final synthetic fun ProfilePayments (Lkotlin/jvm/functions/Function1;)Lcom/gravatar/restapi/models/ProfilePayments;
680692
}
681693

694+
public final class com/gravatar/restapi/models/ProfileSectionVisibility {
695+
public fun <init> ()V
696+
public fun equals (Ljava/lang/Object;)Z
697+
public final fun getHiddenContactInfo ()Ljava/lang/Boolean;
698+
public final fun getHiddenInterests ()Ljava/lang/Boolean;
699+
public final fun getHiddenLinks ()Ljava/lang/Boolean;
700+
public final fun getHiddenPhotos ()Ljava/lang/Boolean;
701+
public final fun getHiddenVerifiedAccounts ()Ljava/lang/Boolean;
702+
public final fun getHiddenWallet ()Ljava/lang/Boolean;
703+
public fun hashCode ()I
704+
public fun toString ()Ljava/lang/String;
705+
}
706+
707+
public final class com/gravatar/restapi/models/ProfileSectionVisibility$Builder {
708+
public fun <init> ()V
709+
public final fun build ()Lcom/gravatar/restapi/models/ProfileSectionVisibility;
710+
public final fun getHiddenContactInfo ()Ljava/lang/Boolean;
711+
public final fun getHiddenInterests ()Ljava/lang/Boolean;
712+
public final fun getHiddenLinks ()Ljava/lang/Boolean;
713+
public final fun getHiddenPhotos ()Ljava/lang/Boolean;
714+
public final fun getHiddenVerifiedAccounts ()Ljava/lang/Boolean;
715+
public final fun getHiddenWallet ()Ljava/lang/Boolean;
716+
public final fun setHiddenContactInfo (Ljava/lang/Boolean;)Lcom/gravatar/restapi/models/ProfileSectionVisibility$Builder;
717+
public final synthetic fun setHiddenContactInfo (Ljava/lang/Boolean;)V
718+
public final fun setHiddenInterests (Ljava/lang/Boolean;)Lcom/gravatar/restapi/models/ProfileSectionVisibility$Builder;
719+
public final synthetic fun setHiddenInterests (Ljava/lang/Boolean;)V
720+
public final fun setHiddenLinks (Ljava/lang/Boolean;)Lcom/gravatar/restapi/models/ProfileSectionVisibility$Builder;
721+
public final synthetic fun setHiddenLinks (Ljava/lang/Boolean;)V
722+
public final fun setHiddenPhotos (Ljava/lang/Boolean;)Lcom/gravatar/restapi/models/ProfileSectionVisibility$Builder;
723+
public final synthetic fun setHiddenPhotos (Ljava/lang/Boolean;)V
724+
public final fun setHiddenVerifiedAccounts (Ljava/lang/Boolean;)Lcom/gravatar/restapi/models/ProfileSectionVisibility$Builder;
725+
public final synthetic fun setHiddenVerifiedAccounts (Ljava/lang/Boolean;)V
726+
public final fun setHiddenWallet (Ljava/lang/Boolean;)Lcom/gravatar/restapi/models/ProfileSectionVisibility$Builder;
727+
public final synthetic fun setHiddenWallet (Ljava/lang/Boolean;)V
728+
}
729+
730+
public final class com/gravatar/restapi/models/ProfileSectionVisibilityJsonAdapter : com/squareup/moshi/JsonAdapter {
731+
public fun <init> (Lcom/squareup/moshi/Moshi;)V
732+
public fun fromJson (Lcom/squareup/moshi/JsonReader;)Lcom/gravatar/restapi/models/ProfileSectionVisibility;
733+
public synthetic fun fromJson (Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object;
734+
public fun toJson (Lcom/squareup/moshi/JsonWriter;Lcom/gravatar/restapi/models/ProfileSectionVisibility;)V
735+
public synthetic fun toJson (Lcom/squareup/moshi/JsonWriter;Ljava/lang/Object;)V
736+
public fun toString ()Ljava/lang/String;
737+
}
738+
739+
public final class com/gravatar/restapi/models/ProfileSectionVisibilityKt {
740+
public static final synthetic fun ProfileSectionVisibility (Lkotlin/jvm/functions/Function1;)Lcom/gravatar/restapi/models/ProfileSectionVisibility;
741+
}
742+
682743
public final class com/gravatar/restapi/models/Rating : java/lang/Enum {
683744
public static final field Companion Lcom/gravatar/restapi/models/Rating$Companion;
684745
public static final field G Lcom/gravatar/restapi/models/Rating;
@@ -761,10 +822,13 @@ public final class com/gravatar/restapi/models/UpdateAvatarRequestKt {
761822
public final class com/gravatar/restapi/models/UpdateProfileRequest {
762823
public fun <init> ()V
763824
public fun equals (Ljava/lang/Object;)Z
825+
public final fun getCellPhone ()Ljava/lang/String;
764826
public final fun getCompany ()Ljava/lang/String;
827+
public final fun getContactEmail ()Ljava/lang/String;
765828
public final fun getDescription ()Ljava/lang/String;
766829
public final fun getDisplayName ()Ljava/lang/String;
767830
public final fun getFirstName ()Ljava/lang/String;
831+
public final fun getHiddenContactInfo ()Ljava/lang/Boolean;
768832
public final fun getJobTitle ()Ljava/lang/String;
769833
public final fun getLastName ()Ljava/lang/String;
770834
public final fun getLocation ()Ljava/lang/String;
@@ -777,23 +841,32 @@ public final class com/gravatar/restapi/models/UpdateProfileRequest {
777841
public final class com/gravatar/restapi/models/UpdateProfileRequest$Builder {
778842
public fun <init> ()V
779843
public final fun build ()Lcom/gravatar/restapi/models/UpdateProfileRequest;
844+
public final fun getCellPhone ()Ljava/lang/String;
780845
public final fun getCompany ()Ljava/lang/String;
846+
public final fun getContactEmail ()Ljava/lang/String;
781847
public final fun getDescription ()Ljava/lang/String;
782848
public final fun getDisplayName ()Ljava/lang/String;
783849
public final fun getFirstName ()Ljava/lang/String;
850+
public final fun getHiddenContactInfo ()Ljava/lang/Boolean;
784851
public final fun getJobTitle ()Ljava/lang/String;
785852
public final fun getLastName ()Ljava/lang/String;
786853
public final fun getLocation ()Ljava/lang/String;
787854
public final fun getPronouns ()Ljava/lang/String;
788855
public final fun getPronunciation ()Ljava/lang/String;
856+
public final fun setCellPhone (Ljava/lang/String;)Lcom/gravatar/restapi/models/UpdateProfileRequest$Builder;
857+
public final synthetic fun setCellPhone (Ljava/lang/String;)V
789858
public final fun setCompany (Ljava/lang/String;)Lcom/gravatar/restapi/models/UpdateProfileRequest$Builder;
790859
public final synthetic fun setCompany (Ljava/lang/String;)V
860+
public final fun setContactEmail (Ljava/lang/String;)Lcom/gravatar/restapi/models/UpdateProfileRequest$Builder;
861+
public final synthetic fun setContactEmail (Ljava/lang/String;)V
791862
public final fun setDescription (Ljava/lang/String;)Lcom/gravatar/restapi/models/UpdateProfileRequest$Builder;
792863
public final synthetic fun setDescription (Ljava/lang/String;)V
793864
public final fun setDisplayName (Ljava/lang/String;)Lcom/gravatar/restapi/models/UpdateProfileRequest$Builder;
794865
public final synthetic fun setDisplayName (Ljava/lang/String;)V
795866
public final fun setFirstName (Ljava/lang/String;)Lcom/gravatar/restapi/models/UpdateProfileRequest$Builder;
796867
public final synthetic fun setFirstName (Ljava/lang/String;)V
868+
public final fun setHiddenContactInfo (Ljava/lang/Boolean;)Lcom/gravatar/restapi/models/UpdateProfileRequest$Builder;
869+
public final synthetic fun setHiddenContactInfo (Ljava/lang/Boolean;)V
797870
public final fun setJobTitle (Ljava/lang/String;)Lcom/gravatar/restapi/models/UpdateProfileRequest$Builder;
798871
public final synthetic fun setJobTitle (Ljava/lang/String;)V
799872
public final fun setLastName (Ljava/lang/String;)Lcom/gravatar/restapi/models/UpdateProfileRequest$Builder;

gravatar/openapi/api-gravatar.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,20 @@
323323
"pronouns"
324324
],
325325
"properties": {
326+
"user_id": {
327+
"type": "integer",
328+
"description": "The unique user ID. NOTE: This is only provided in OAuth2 authenticated requests.",
329+
"examples": [
330+
1234567890
331+
]
332+
},
333+
"user_login": {
334+
"type": "string",
335+
"description": "The user's login name. NOTE: This is only provided in OAuth2 authenticated requests.",
336+
"examples": [
337+
"alex"
338+
]
339+
},
326340
"hash": {
327341
"type": "string",
328342
"description": "The SHA256 hash of the user's primary email address.",
@@ -582,6 +596,36 @@
582596
"examples": [
583597
"2021-10-01T12:00:00Z"
584598
]
599+
},
600+
"section_visibility": {
601+
"type": "object",
602+
"description": "The visibility of the user's profile sections.",
603+
"properties": {
604+
"hidden_contact_info": {
605+
"type": "boolean",
606+
"description": "Whether the user's contact info section is hidden."
607+
},
608+
"hidden_links": {
609+
"type": "boolean",
610+
"description": "Whether the user's links section is hidden."
611+
},
612+
"hidden_interests": {
613+
"type": "boolean",
614+
"description": "Whether the user's interests section is hidden."
615+
},
616+
"hidden_wallet": {
617+
"type": "boolean",
618+
"description": "Whether the user's wallet section is hidden."
619+
},
620+
"hidden_photos": {
621+
"type": "boolean",
622+
"description": "Whether the user's photo gallery section is hidden."
623+
},
624+
"hidden_verified_accounts": {
625+
"type": "boolean",
626+
"description": "Whether the user's verified accounts section is hidden."
627+
}
628+
}
585629
}
586630
}
587631
},
@@ -910,6 +954,27 @@
910954
"examples": [
911955
"ACME Corp"
912956
]
957+
},
958+
"cell_phone": {
959+
"type": "string",
960+
"description": "The user's cell phone number.",
961+
"examples": [
962+
"+1234567890"
963+
]
964+
},
965+
"contact_email": {
966+
"type": "string",
967+
"description": "The user's contact email address.",
968+
"examples": [
969+
970+
]
971+
},
972+
"hidden_contact_info": {
973+
"type": "boolean",
974+
"description": "Whether the user's contact information is hidden on their profile.",
975+
"examples": [
976+
true
977+
]
913978
}
914979
}
915980
}

0 commit comments

Comments
 (0)