| 1 | using System.Text.Json.Serialization; |
| 2 | |
| 3 | namespace IntercomService.Contracts; |
| 4 | |
| 5 | public sealed record MeTeamDto( |
| 6 | [property: JsonPropertyName("team_id")] string TeamId, |
| 7 | [property: JsonPropertyName("team_role")] string TeamRole, |
| 8 | [property: JsonPropertyName("display_name")] string DisplayName, |
| 9 | [property: JsonPropertyName("team_display_name")] string? TeamDisplayName = null); |
| 10 | |
| 11 | public sealed record MeResponse( |
| 12 | [property: JsonPropertyName("member_id")] string MemberId, |
| 13 | [property: JsonPropertyName("display_name")] string DisplayName, |
| 14 | [property: JsonPropertyName("member_kind")] string MemberKind, |
| 15 | [property: JsonPropertyName("teams")] IReadOnlyList<MeTeamDto> Teams); |
| 16 | |
| 17 | public sealed record PatchMeRequest( |
| 18 | [property: JsonPropertyName("display_name")] string? DisplayName); |
| 19 | |
| 20 | public sealed record AuthProviderDto( |
| 21 | [property: JsonPropertyName("provider_id")] string ProviderId, |
| 22 | [property: JsonPropertyName("display_name")] string DisplayName, |
| 23 | [property: JsonPropertyName("enabled")] bool Enabled); |
| 24 | |
| 25 | public sealed record CreateTeamRequest( |
| 26 | [property: JsonPropertyName("team_id")] string TeamId, |
| 27 | [property: JsonPropertyName("display_name")] string? DisplayName); |
| 28 | |
| 29 | public sealed record PatchTeamRequest( |
| 30 | [property: JsonPropertyName("display_name")] string? DisplayName, |
| 31 | [property: JsonPropertyName("join_policy")] string? JoinPolicy, |
| 32 | [property: JsonPropertyName("default_team_role")] string? DefaultTeamRole, |
| 33 | [property: JsonPropertyName("join_policy_json")] string? JoinPolicyJson); |
| 34 | |
| 35 | public sealed record TeamDto( |
| 36 | [property: JsonPropertyName("team_id")] string TeamId, |
| 37 | [property: JsonPropertyName("display_name")] string DisplayName, |
| 38 | [property: JsonPropertyName("join_policy")] string JoinPolicy, |
| 39 | [property: JsonPropertyName("default_team_role")] string DefaultTeamRole); |
| 40 | |
| 41 | public sealed record TeamMemberDto( |
| 42 | [property: JsonPropertyName("member_id")] string MemberId, |
| 43 | [property: JsonPropertyName("member_kind")] string MemberKind, |
| 44 | [property: JsonPropertyName("team_role")] string TeamRole, |
| 45 | [property: JsonPropertyName("display_name")] string DisplayName, |
| 46 | [property: JsonPropertyName("team_display_name")] string? TeamDisplayName, |
| 47 | [property: JsonPropertyName("joined_at_utc")] string JoinedAtUtc); |
| 48 | |
| 49 | public sealed record PatchTeamMemberRequest( |
| 50 | [property: JsonPropertyName("team_role")] string? TeamRole, |
| 51 | [property: JsonPropertyName("team_display_name")] string? TeamDisplayName, |
| 52 | [property: JsonPropertyName("clear_team_display_name")] bool ClearTeamDisplayName = false); |
| 53 | |
| 54 | public sealed record PatchSelfTeamMemberRequest( |
| 55 | [property: JsonPropertyName("team_display_name")] string? TeamDisplayName, |
| 56 | [property: JsonPropertyName("clear_team_display_name")] bool ClearTeamDisplayName = false); |
| 57 | |
| 58 | public sealed record CreateInviteRequest( |
| 59 | [property: JsonPropertyName("team_role")] string? TeamRole, |
| 60 | [property: JsonPropertyName("ttl_hours")] int? TtlHours, |
| 61 | [property: JsonPropertyName("max_uses")] int? MaxUses); |
| 62 | |
| 63 | public sealed record InviteDto( |
| 64 | [property: JsonPropertyName("invite_id")] string InviteId, |
| 65 | [property: JsonPropertyName("token")] string Token, |
| 66 | [property: JsonPropertyName("team_role")] string TeamRole, |
| 67 | [property: JsonPropertyName("expires_at_utc")] string ExpiresAtUtc, |
| 68 | [property: JsonPropertyName("max_uses")] int MaxUses); |
| 69 | |
| 70 | public sealed record RedeemInviteRequest( |
| 71 | [property: JsonPropertyName("invite_token")] string InviteToken, |
| 72 | [property: JsonPropertyName("team_id")] string TeamId); |
| 73 | |
| 74 | public sealed record CreateAgentRequest( |
| 75 | [property: JsonPropertyName("display_name")] string DisplayName, |
| 76 | [property: JsonPropertyName("avatar_glyph")] string? AvatarGlyph); |
| 77 | |
| 78 | public sealed record AgentDto( |
| 79 | [property: JsonPropertyName("member_id")] string MemberId, |
| 80 | [property: JsonPropertyName("display_name")] string DisplayName, |
| 81 | [property: JsonPropertyName("avatar_glyph")] string? AvatarGlyph, |
| 82 | [property: JsonPropertyName("credential_token")] string CredentialToken); |
| 83 | |
| 84 | public sealed record PatchAgentRequest( |
| 85 | [property: JsonPropertyName("display_name")] string? DisplayName, |
| 86 | [property: JsonPropertyName("avatar_glyph")] string? AvatarGlyph, |
| 87 | [property: JsonPropertyName("revoke_credentials")] bool RevokeCredentials = false); |
| 88 | |
| 89 | public sealed record CreateProjectRequest( |
| 90 | [property: JsonPropertyName("project_id")] string ProjectId, |
| 91 | [property: JsonPropertyName("display_name")] string? DisplayName); |
| 92 | |
| 93 | public sealed record ProjectDto( |
| 94 | [property: JsonPropertyName("project_id")] string ProjectId, |
| 95 | [property: JsonPropertyName("display_name")] string DisplayName); |
| 96 | |
| 97 | public sealed record PutProjectReposRequest( |
| 98 | [property: JsonPropertyName("repo_urls")] IReadOnlyList<string> RepoUrls); |
| 99 | |
| 100 | public sealed record PutTeamProjectsRequest( |
| 101 | [property: JsonPropertyName("project_ids")] IReadOnlyList<string> ProjectIds); |
| 102 | |
| 103 | public sealed record WorkspaceContextProjectDto( |
| 104 | [property: JsonPropertyName("project_id")] string ProjectId, |
| 105 | [property: JsonPropertyName("display_name")] string DisplayName); |
| 106 | |
| 107 | public sealed record WorkspaceContextTeamDto( |
| 108 | [property: JsonPropertyName("team_id")] string TeamId, |
| 109 | [property: JsonPropertyName("display_name")] string DisplayName, |
| 110 | [property: JsonPropertyName("team_role")] string TeamRole, |
| 111 | [property: JsonPropertyName("project_id")] string ProjectId); |
| 112 | |
| 113 | public sealed record WorkspaceContextResponse( |
| 114 | [property: JsonPropertyName("normalized_repo_urls")] IReadOnlyList<string> NormalizedRepoUrls, |
| 115 | [property: JsonPropertyName("projects")] IReadOnlyList<WorkspaceContextProjectDto> Projects, |
| 116 | [property: JsonPropertyName("teams")] IReadOnlyList<WorkspaceContextTeamDto> Teams, |
| 117 | [property: JsonPropertyName("suggested_team_id")] string? SuggestedTeamId); |
| 118 | |