Browse Source

generated launchdarkly api with openapi3 generator

tags/v0.1.0.0
ken-scarf 5 months ago
parent
commit
720573153c
100 changed files with 15788 additions and 0 deletions
  1. +23
    -0
      .gitignore
  2. +356
    -0
      launchdarklyapi.cabal
  3. +10
    -0
      shell.nix
  4. +665
    -0
      src/LaunchdarklyAPI.hs
  5. +366
    -0
      src/LaunchdarklyAPI/Common.hs
  6. +22
    -0
      src/LaunchdarklyAPI/Configuration.hs
  7. +195
    -0
      src/LaunchdarklyAPI/Operations/CopyFeatureFlag.hs
  8. +133
    -0
      src/LaunchdarklyAPI/Operations/CreateSubscription.hs
  9. +182
    -0
      src/LaunchdarklyAPI/Operations/CreateTriggerWorkflow.hs
  10. +172
    -0
      src/LaunchdarklyAPI/Operations/DeleteApprovalRequest.hs
  11. +127
    -0
      src/LaunchdarklyAPI/Operations/DeleteBranches.hs
  12. +105
    -0
      src/LaunchdarklyAPI/Operations/DeleteCustomRole.hs
  13. +163
    -0
      src/LaunchdarklyAPI/Operations/DeleteDestination.hs
  14. +154
    -0
      src/LaunchdarklyAPI/Operations/DeleteEnvironment.hs
  15. +145
    -0
      src/LaunchdarklyAPI/Operations/DeleteFeatureFlag.hs
  16. +190
    -0
      src/LaunchdarklyAPI/Operations/DeleteFlagConfigScheduledChanges.hs
  17. +123
    -0
      src/LaunchdarklyAPI/Operations/DeleteMember.hs
  18. +154
    -0
      src/LaunchdarklyAPI/Operations/DeleteMetric.hs
  19. +123
    -0
      src/LaunchdarklyAPI/Operations/DeleteProject.hs
  20. +114
    -0
      src/LaunchdarklyAPI/Operations/DeleteRelayAutoConfig.hs
  21. +123
    -0
      src/LaunchdarklyAPI/Operations/DeleteRepository.hs
  22. +172
    -0
      src/LaunchdarklyAPI/Operations/DeleteSegment.hs
  23. +154
    -0
      src/LaunchdarklyAPI/Operations/DeleteSubscription.hs
  24. +105
    -0
      src/LaunchdarklyAPI/Operations/DeleteTeam.hs
  25. +114
    -0
      src/LaunchdarklyAPI/Operations/DeleteToken.hs
  26. +181
    -0
      src/LaunchdarklyAPI/Operations/DeleteTriggerWorkflow.hs
  27. +172
    -0
      src/LaunchdarklyAPI/Operations/DeleteUser.hs
  28. +114
    -0
      src/LaunchdarklyAPI/Operations/DeleteWebhook.hs
  29. +181
    -0
      src/LaunchdarklyAPI/Operations/DeleteWorkflow.hs
  30. +106
    -0
      src/LaunchdarklyAPI/Operations/GetAllWebhooks.hs
  31. +178
    -0
      src/LaunchdarklyAPI/Operations/GetApproval.hs
  32. +169
    -0
      src/LaunchdarklyAPI/Operations/GetApprovals.hs
  33. +185
    -0
      src/LaunchdarklyAPI/Operations/GetAuditLogEntries.hs
  34. +124
    -0
      src/LaunchdarklyAPI/Operations/GetAuditLogEntry.hs
  35. +189
    -0
      src/LaunchdarklyAPI/Operations/GetBranch.hs
  36. +129
    -0
      src/LaunchdarklyAPI/Operations/GetBranches.hs
  37. +120
    -0
      src/LaunchdarklyAPI/Operations/GetCustomRole.hs
  38. +106
    -0
      src/LaunchdarklyAPI/Operations/GetCustomRoles.hs
  39. +178
    -0
      src/LaunchdarklyAPI/Operations/GetCustomWorkflow.hs
  40. +160
    -0
      src/LaunchdarklyAPI/Operations/GetDependentFlags.hs
  41. +169
    -0
      src/LaunchdarklyAPI/Operations/GetDependentFlagsByEnv.hs
  42. +169
    -0
      src/LaunchdarklyAPI/Operations/GetDestination.hs
  43. +106
    -0
      src/LaunchdarklyAPI/Operations/GetDestinations.hs
  44. +164
    -0
      src/LaunchdarklyAPI/Operations/GetEnvironment.hs
  45. +206
    -0
      src/LaunchdarklyAPI/Operations/GetEvaluationsUsage.hs
  46. +180
    -0
      src/LaunchdarklyAPI/Operations/GetEventsUsage.hs
  47. +207
    -0
      src/LaunchdarklyAPI/Operations/GetExperiment.hs
  48. +169
    -0
      src/LaunchdarklyAPI/Operations/GetExpiringFlagsForUser.hs
  49. +169
    -0
      src/LaunchdarklyAPI/Operations/GetExpiringUserTargets.hs
  50. +160
    -0
      src/LaunchdarklyAPI/Operations/GetExpiringUserTargetsForSegment.hs
  51. +184
    -0
      src/LaunchdarklyAPI/Operations/GetExtinctions.hs
  52. +167
    -0
      src/LaunchdarklyAPI/Operations/GetFeatureFlag.hs
  53. +169
    -0
      src/LaunchdarklyAPI/Operations/GetFeatureFlagScheduledChange.hs
  54. +169
    -0
      src/LaunchdarklyAPI/Operations/GetFeatureFlagStatus.hs
  55. +167
    -0
      src/LaunchdarklyAPI/Operations/GetFeatureFlagStatusAcrossEnvironments.hs
  56. +165
    -0
      src/LaunchdarklyAPI/Operations/GetFeatureFlagStatuses.hs
  57. +244
    -0
      src/LaunchdarklyAPI/Operations/GetFeatureFlags.hs
  58. +169
    -0
      src/LaunchdarklyAPI/Operations/GetFlagConfigScheduledChanges.hs
  59. +79
    -0
      src/LaunchdarklyAPI/Operations/GetIps.hs
  60. +169
    -0
      src/LaunchdarklyAPI/Operations/GetMauSdksByType.hs
  61. +209
    -0
      src/LaunchdarklyAPI/Operations/GetMauUsage.hs
  62. +170
    -0
      src/LaunchdarklyAPI/Operations/GetMauUsageByCategory.hs
  63. +120
    -0
      src/LaunchdarklyAPI/Operations/GetMember.hs
  64. +199
    -0
      src/LaunchdarklyAPI/Operations/GetMembers.hs
  65. +160
    -0
      src/LaunchdarklyAPI/Operations/GetMetric.hs
  66. +102
    -0
      src/LaunchdarklyAPI/Operations/GetMetrics.hs
  67. +73
    -0
      src/LaunchdarklyAPI/Operations/GetOpenapiSpec.hs
  68. +120
    -0
      src/LaunchdarklyAPI/Operations/GetProject.hs
  69. +106
    -0
      src/LaunchdarklyAPI/Operations/GetProjects.hs
  70. +120
    -0
      src/LaunchdarklyAPI/Operations/GetRelayProxyConfig.hs
  71. +106
    -0
      src/LaunchdarklyAPI/Operations/GetRelayProxyConfigs.hs
  72. +168
    -0
      src/LaunchdarklyAPI/Operations/GetRepositories.hs
  73. +129
    -0
      src/LaunchdarklyAPI/Operations/GetRepository.hs
  74. +79
    -0
      src/LaunchdarklyAPI/Operations/GetRoot.hs
  75. +115
    -0
      src/LaunchdarklyAPI/Operations/GetRootStatistic.hs
  76. +235
    -0
      src/LaunchdarklyAPI/Operations/GetSearchUsers.hs
  77. +160
    -0
      src/LaunchdarklyAPI/Operations/GetSegment.hs
  78. +178
    -0
      src/LaunchdarklyAPI/Operations/GetSegmentMembershipForUser.hs
  79. +142
    -0
      src/LaunchdarklyAPI/Operations/GetSegments.hs
  80. +158
    -0
      src/LaunchdarklyAPI/Operations/GetStatistics.hs
  81. +188
    -0
      src/LaunchdarklyAPI/Operations/GetStreamUsage.hs
  82. +204
    -0
      src/LaunchdarklyAPI/Operations/GetStreamUsageBySdkVersion.hs
  83. +111
    -0
      src/LaunchdarklyAPI/Operations/GetStreamUsageSdkversion.hs
  84. +160
    -0
      src/LaunchdarklyAPI/Operations/GetSubscriptionByID.hs
  85. +120
    -0
      src/LaunchdarklyAPI/Operations/GetSubscriptions.hs
  86. +138
    -0
      src/LaunchdarklyAPI/Operations/GetTeam.hs
  87. +166
    -0
      src/LaunchdarklyAPI/Operations/GetTeams.hs
  88. +120
    -0
      src/LaunchdarklyAPI/Operations/GetToken.hs
  89. +111
    -0
      src/LaunchdarklyAPI/Operations/GetTokens.hs
  90. +178
    -0
      src/LaunchdarklyAPI/Operations/GetTriggerWorkflowById.hs
  91. +160
    -0
      src/LaunchdarklyAPI/Operations/GetTriggerWorkflows.hs
  92. +178
    -0
      src/LaunchdarklyAPI/Operations/GetUser.hs
  93. +160
    -0
      src/LaunchdarklyAPI/Operations/GetUserAttributeNames.hs
  94. +187
    -0
      src/LaunchdarklyAPI/Operations/GetUserFlagSetting.hs
  95. +178
    -0
      src/LaunchdarklyAPI/Operations/GetUserFlagSettings.hs
  96. +189
    -0
      src/LaunchdarklyAPI/Operations/GetUsers.hs
  97. +106
    -0
      src/LaunchdarklyAPI/Operations/GetVersions.hs
  98. +120
    -0
      src/LaunchdarklyAPI/Operations/GetWebhook.hs
  99. +169
    -0
      src/LaunchdarklyAPI/Operations/GetWorkflows.hs
  100. +133
    -0
      src/LaunchdarklyAPI/Operations/PatchCustomRole.hs

+ 23
- 0
.gitignore View File

@@ -0,0 +1,23 @@
dist
dist-*
cabal-dev
*.o
*.hi
*.hie
*.chi
*.chs.h
*.dyn_o
*.dyn_hi
.hpc
.hsenv
.cabal-sandbox/
cabal.sandbox.config
*.prof
*.aux
*.hp
*.eventlog
.stack-work/
cabal.project.local
cabal.project.local~
.HTF/
.ghc.environment.*

+ 356
- 0
launchdarklyapi.cabal View File

@@ -0,0 +1,356 @@
cabal-version: 1.12

name: launchdarklyapi
version: 0.1.0.0
build-type: Simple

library
exposed-modules:
LaunchdarklyAPI
LaunchdarklyAPI.Operations.GetRoot
LaunchdarklyAPI.Operations.GetRelayProxyConfigs
LaunchdarklyAPI.Operations.PostRelayAutoConfig
LaunchdarklyAPI.Operations.GetRelayProxyConfig
LaunchdarklyAPI.Operations.DeleteRelayAutoConfig
LaunchdarklyAPI.Operations.PatchRelayAutoConfig
LaunchdarklyAPI.Operations.ResetRelayAutoConfig
LaunchdarklyAPI.Operations.GetAuditLogEntries
LaunchdarklyAPI.Operations.GetAuditLogEntry
LaunchdarklyAPI.Operations.GetExtinctions
LaunchdarklyAPI.Operations.GetRepositories
LaunchdarklyAPI.Operations.PostRepository
LaunchdarklyAPI.Operations.GetRepository
LaunchdarklyAPI.Operations.DeleteRepository
LaunchdarklyAPI.Operations.PatchRepository
LaunchdarklyAPI.Operations.DeleteBranches
LaunchdarklyAPI.Operations.GetBranches
LaunchdarklyAPI.Operations.GetBranch
LaunchdarklyAPI.Operations.PutBranch
LaunchdarklyAPI.Operations.PostExtinction
LaunchdarklyAPI.Operations.GetRootStatistic
LaunchdarklyAPI.Operations.GetStatistics
LaunchdarklyAPI.Operations.GetDestinations
LaunchdarklyAPI.Operations.PostDestination
LaunchdarklyAPI.Operations.GetDestination
LaunchdarklyAPI.Operations.DeleteDestination
LaunchdarklyAPI.Operations.PatchDestination
LaunchdarklyAPI.Operations.GetFeatureFlagStatusAcrossEnvironments
LaunchdarklyAPI.Operations.GetFeatureFlagStatuses
LaunchdarklyAPI.Operations.GetFeatureFlagStatus
LaunchdarklyAPI.Operations.GetFeatureFlags
LaunchdarklyAPI.Operations.PostFeatureFlag
LaunchdarklyAPI.Operations.GetDependentFlagsByEnv
LaunchdarklyAPI.Operations.CopyFeatureFlag
LaunchdarklyAPI.Operations.GetDependentFlags
LaunchdarklyAPI.Operations.GetExperiment
LaunchdarklyAPI.Operations.ResetExperiment
LaunchdarklyAPI.Operations.GetExpiringUserTargets
LaunchdarklyAPI.Operations.PatchExpiringUserTargets
LaunchdarklyAPI.Operations.GetTriggerWorkflows
LaunchdarklyAPI.Operations.CreateTriggerWorkflow
LaunchdarklyAPI.Operations.GetTriggerWorkflowById
LaunchdarklyAPI.Operations.DeleteTriggerWorkflow
LaunchdarklyAPI.Operations.PatchTriggerWorkflow
LaunchdarklyAPI.Operations.GetFeatureFlag
LaunchdarklyAPI.Operations.DeleteFeatureFlag
LaunchdarklyAPI.Operations.PatchFeatureFlag
LaunchdarklyAPI.Operations.GetSubscriptions
LaunchdarklyAPI.Operations.CreateSubscription
LaunchdarklyAPI.Operations.GetSubscriptionByID
LaunchdarklyAPI.Operations.DeleteSubscription
LaunchdarklyAPI.Operations.UpdateSubscription
LaunchdarklyAPI.Operations.GetMembers
LaunchdarklyAPI.Operations.PostMembers
LaunchdarklyAPI.Operations.GetMember
LaunchdarklyAPI.Operations.DeleteMember
LaunchdarklyAPI.Operations.PatchMember
LaunchdarklyAPI.Operations.PostMemberTeams
LaunchdarklyAPI.Operations.GetMetrics
LaunchdarklyAPI.Operations.PostMetric
LaunchdarklyAPI.Operations.GetMetric
LaunchdarklyAPI.Operations.DeleteMetric
LaunchdarklyAPI.Operations.PatchMetric
LaunchdarklyAPI.Operations.GetOpenapiSpec
LaunchdarklyAPI.Operations.GetProjects
LaunchdarklyAPI.Operations.PostProject
LaunchdarklyAPI.Operations.GetProject
LaunchdarklyAPI.Operations.DeleteProject
LaunchdarklyAPI.Operations.PatchProject
LaunchdarklyAPI.Operations.PostEnvironment
LaunchdarklyAPI.Operations.ResetEnvironmentSDKKey
LaunchdarklyAPI.Operations.ResetEnvironmentMobileKey
LaunchdarklyAPI.Operations.GetEnvironment
LaunchdarklyAPI.Operations.DeleteEnvironment
LaunchdarklyAPI.Operations.PatchEnvironment
LaunchdarklyAPI.Operations.GetApprovals
LaunchdarklyAPI.Operations.PostApprovalRequest
LaunchdarklyAPI.Operations.PostFlagCopyConfigApprovalRequest
LaunchdarklyAPI.Operations.GetApproval
LaunchdarklyAPI.Operations.DeleteApprovalRequest
LaunchdarklyAPI.Operations.PostApprovalRequestApplyRequest
LaunchdarklyAPI.Operations.PostApprovalRequestReview
LaunchdarklyAPI.Operations.GetFlagConfigScheduledChanges
LaunchdarklyAPI.Operations.PostFlagConfigScheduledChanges
LaunchdarklyAPI.Operations.GetFeatureFlagScheduledChange
LaunchdarklyAPI.Operations.DeleteFlagConfigScheduledChanges
LaunchdarklyAPI.Operations.PatchFlagConfigScheduledChange
LaunchdarklyAPI.Operations.GetWorkflows
LaunchdarklyAPI.Operations.PostWorkflow
LaunchdarklyAPI.Operations.GetCustomWorkflow
LaunchdarklyAPI.Operations.DeleteWorkflow
LaunchdarklyAPI.Operations.GetIps
LaunchdarklyAPI.Operations.GetCustomRoles
LaunchdarklyAPI.Operations.PostCustomRole
LaunchdarklyAPI.Operations.GetCustomRole
LaunchdarklyAPI.Operations.DeleteCustomRole
LaunchdarklyAPI.Operations.PatchCustomRole
LaunchdarklyAPI.Operations.GetSegments
LaunchdarklyAPI.Operations.PostSegment
LaunchdarklyAPI.Operations.GetSegment
LaunchdarklyAPI.Operations.DeleteSegment
LaunchdarklyAPI.Operations.PatchSegment
LaunchdarklyAPI.Operations.UpdateBigSegmentTargets
LaunchdarklyAPI.Operations.GetSegmentMembershipForUser
LaunchdarklyAPI.Operations.GetExpiringUserTargetsForSegment
LaunchdarklyAPI.Operations.PatchExpiringUserTargetsForSegment
LaunchdarklyAPI.Operations.GetTeams
LaunchdarklyAPI.Operations.PostTeam
LaunchdarklyAPI.Operations.GetTeam
LaunchdarklyAPI.Operations.DeleteTeam
LaunchdarklyAPI.Operations.PatchTeam
LaunchdarklyAPI.Operations.PostTeamMembers
LaunchdarklyAPI.Operations.GetTokens
LaunchdarklyAPI.Operations.PostToken
LaunchdarklyAPI.Operations.GetToken
LaunchdarklyAPI.Operations.DeleteToken
LaunchdarklyAPI.Operations.PatchToken
LaunchdarklyAPI.Operations.ResetToken
LaunchdarklyAPI.Operations.GetEvaluationsUsage
LaunchdarklyAPI.Operations.GetEventsUsage
LaunchdarklyAPI.Operations.GetMauUsage
LaunchdarklyAPI.Operations.GetMauUsageByCategory
LaunchdarklyAPI.Operations.GetMauSdksByType
LaunchdarklyAPI.Operations.GetStreamUsage
LaunchdarklyAPI.Operations.GetStreamUsageBySdkVersion
LaunchdarklyAPI.Operations.GetStreamUsageSdkversion
LaunchdarklyAPI.Operations.GetUserAttributeNames
LaunchdarklyAPI.Operations.GetSearchUsers
LaunchdarklyAPI.Operations.GetUsers
LaunchdarklyAPI.Operations.GetUser
LaunchdarklyAPI.Operations.DeleteUser
LaunchdarklyAPI.Operations.GetUserFlagSettings
LaunchdarklyAPI.Operations.GetUserFlagSetting
LaunchdarklyAPI.Operations.PutFlagSetting
LaunchdarklyAPI.Operations.GetExpiringFlagsForUser
LaunchdarklyAPI.Operations.PatchExpiringFlagsForUser
LaunchdarklyAPI.Operations.GetVersions
LaunchdarklyAPI.Operations.GetAllWebhooks
LaunchdarklyAPI.Operations.PostWebhook
LaunchdarklyAPI.Operations.GetWebhook
LaunchdarklyAPI.Operations.DeleteWebhook
LaunchdarklyAPI.Operations.PatchWebhook
LaunchdarklyAPI.Types
LaunchdarklyAPI.TypeAlias
LaunchdarklyAPI.Types.AccessDeniedReasonRep
LaunchdarklyAPI.Types.AccessDeniedRep
LaunchdarklyAPI.Types.AccessRep
LaunchdarklyAPI.Types.AccessTokenPost
LaunchdarklyAPI.Types.ActionInputRep
LaunchdarklyAPI.Types.ActionOutputRep
LaunchdarklyAPI.Types.ApprovalSettings
LaunchdarklyAPI.Types.AuditLogEntryListingRep
LaunchdarklyAPI.Types.AuditLogEntryListingRepCollection
LaunchdarklyAPI.Types.AuditLogEntryRep
LaunchdarklyAPI.Types.AuthorizedAppDataRep
LaunchdarklyAPI.Types.BigSegmentTarget
LaunchdarklyAPI.Types.BranchCollectionRep
LaunchdarklyAPI.Types.BranchRep
LaunchdarklyAPI.Types.Clause
LaunchdarklyAPI.Types.ClientSideAvailability
LaunchdarklyAPI.Types.ClientSideAvailabilityPost
LaunchdarklyAPI.Types.ConditionInputRep
LaunchdarklyAPI.Types.ConditionOutputRep
LaunchdarklyAPI.Types.ConfidenceIntervalRep
LaunchdarklyAPI.Types.Conflict
LaunchdarklyAPI.Types.ConflictOutputRep
LaunchdarklyAPI.Types.CopiedFromEnv
LaunchdarklyAPI.Types.CustomRole
LaunchdarklyAPI.Types.CustomRolePost
LaunchdarklyAPI.Types.CustomRoles
LaunchdarklyAPI.Types.CustomRolesRep
LaunchdarklyAPI.Types.CustomWorkflowInputRep
LaunchdarklyAPI.Types.CustomWorkflowMeta
LaunchdarklyAPI.Types.CustomWorkflowOutputRep
LaunchdarklyAPI.Types.CustomWorkflowStageMeta
LaunchdarklyAPI.Types.CustomWorkflowsListingOutputRep
LaunchdarklyAPI.Types.DefaultClientSideAvailabilityPost
LaunchdarklyAPI.Types.Defaults
LaunchdarklyAPI.Types.DependentFlag
LaunchdarklyAPI.Types.DependentFlagEnvironment
LaunchdarklyAPI.Types.DependentFlagsByEnvironment
LaunchdarklyAPI.Types.Destination
LaunchdarklyAPI.Types.DestinationPost
LaunchdarklyAPI.Types.Destinations
LaunchdarklyAPI.Types.Environment
LaunchdarklyAPI.Types.EnvironmentPost
LaunchdarklyAPI.Types.ExecutionOutputRep
LaunchdarklyAPI.Types.ExpandedTeamRep
LaunchdarklyAPI.Types.ExperimentInfoRep
LaunchdarklyAPI.Types.ExperimentMetadataRep
LaunchdarklyAPI.Types.ExperimentRep
LaunchdarklyAPI.Types.ExperimentResultsRep
LaunchdarklyAPI.Types.ExperimentStatsRep
LaunchdarklyAPI.Types.ExperimentTimeSeriesSlice
LaunchdarklyAPI.Types.ExperimentTimeSeriesVariationSlice
LaunchdarklyAPI.Types.ExperimentTotalsRep
LaunchdarklyAPI.Types.ExpiringUserTargetError
LaunchdarklyAPI.Types.ExpiringUserTargetGetResponse
LaunchdarklyAPI.Types.ExpiringUserTargetItem
LaunchdarklyAPI.Types.ExpiringUserTargetPatchResponse
LaunchdarklyAPI.Types.Extinction
LaunchdarklyAPI.Types.ExtinctionCollectionRep
LaunchdarklyAPI.Types.FeatureFlag
LaunchdarklyAPI.Types.FeatureFlagBody
LaunchdarklyAPI.Types.FeatureFlagScheduledChange
LaunchdarklyAPI.Types.FeatureFlagScheduledChanges
LaunchdarklyAPI.Types.FeatureFlagStatusAcrossEnvironments
LaunchdarklyAPI.Types.FeatureFlagStatuses
LaunchdarklyAPI.Types.FeatureFlags
LaunchdarklyAPI.Types.FlagConfigApprovalRequestResponse
LaunchdarklyAPI.Types.FlagConfigApprovalRequestsResponse
LaunchdarklyAPI.Types.FlagCopyConfigEnvironment
LaunchdarklyAPI.Types.FlagCopyConfigPost
LaunchdarklyAPI.Types.FlagListingRep
LaunchdarklyAPI.Types.FlagScheduledChangesInput
LaunchdarklyAPI.Types.FlagStatusRep
LaunchdarklyAPI.Types.FlagTriggerInput
LaunchdarklyAPI.Types.ForbiddenErrorRep
LaunchdarklyAPI.Types.HunkRep
LaunchdarklyAPI.Types.Integration
LaunchdarklyAPI.Types.IntegrationMetadata
LaunchdarklyAPI.Types.IntegrationStatus
LaunchdarklyAPI.Types.IntegrationStatusRep
LaunchdarklyAPI.Types.IntegrationSubscriptionStatusRep
LaunchdarklyAPI.Types.Integrations
LaunchdarklyAPI.Types.InvalidRequestErrorRep
LaunchdarklyAPI.Types.LastSeenMetadata
LaunchdarklyAPI.Types.Link
LaunchdarklyAPI.Types.Member
LaunchdarklyAPI.Types.MemberDataRep
LaunchdarklyAPI.Types.MemberImportItemRep
LaunchdarklyAPI.Types.MemberPermissionGrantSummaryRep
LaunchdarklyAPI.Types.MemberSummaryRep
LaunchdarklyAPI.Types.MemberTeamSummaryRep
LaunchdarklyAPI.Types.MemberTeamsPostInput
LaunchdarklyAPI.Types.Members
LaunchdarklyAPI.Types.MethodNotAllowedErrorRep
LaunchdarklyAPI.Types.MetricCollectionRep
LaunchdarklyAPI.Types.MetricListingRep
LaunchdarklyAPI.Types.MetricPost
LaunchdarklyAPI.Types.MetricRep
LaunchdarklyAPI.Types.MetricSeen
LaunchdarklyAPI.Types.Modification
LaunchdarklyAPI.Types.MultiEnvironmentDependentFlag
LaunchdarklyAPI.Types.MultiEnvironmentDependentFlags
LaunchdarklyAPI.Types.NewMemberForm
LaunchdarklyAPI.Types.NotFoundErrorRep
LaunchdarklyAPI.Types.ParentResourceRep
LaunchdarklyAPI.Types.PatchFailedErrorRep
LaunchdarklyAPI.Types.PatchOperation
LaunchdarklyAPI.Types.PatchWithComment
LaunchdarklyAPI.Types.PermissionGrantInput
LaunchdarklyAPI.Types.PermissionGrantRep
LaunchdarklyAPI.Types.PostFlagScheduledChangesInput
LaunchdarklyAPI.Types.Project
LaunchdarklyAPI.Types.ProjectPost
LaunchdarklyAPI.Types.Projects
LaunchdarklyAPI.Types.RateLimitedErrorRep
LaunchdarklyAPI.Types.RecentTriggerBody
LaunchdarklyAPI.Types.ReferenceRep
LaunchdarklyAPI.Types.RelayAutoConfigCollectionRep
LaunchdarklyAPI.Types.RelayAutoConfigPost
LaunchdarklyAPI.Types.RelayAutoConfigRep
LaunchdarklyAPI.Types.RepositoryCollectionRep
LaunchdarklyAPI.Types.RepositoryRep
LaunchdarklyAPI.Types.ResourceAccess
LaunchdarklyAPI.Types.ResourceIDResponse
LaunchdarklyAPI.Types.ReviewOutputRep
LaunchdarklyAPI.Types.ReviewResponse
LaunchdarklyAPI.Types.SdkListRep
LaunchdarklyAPI.Types.SdkVersionListRep
LaunchdarklyAPI.Types.SdkVersionRep
LaunchdarklyAPI.Types.SegmentBody
LaunchdarklyAPI.Types.SegmentMetadata
LaunchdarklyAPI.Types.SegmentUserList
LaunchdarklyAPI.Types.SegmentUserState
LaunchdarklyAPI.Types.SeriesListRep
LaunchdarklyAPI.Types.StageInputRep
LaunchdarklyAPI.Types.StageOutputRep
LaunchdarklyAPI.Types.Statement
LaunchdarklyAPI.Types.StatementPost
LaunchdarklyAPI.Types.StatementRep
LaunchdarklyAPI.Types.StatisticCollectionRep
LaunchdarklyAPI.Types.StatisticsRoot
LaunchdarklyAPI.Types.StatusConflictErrorRep
LaunchdarklyAPI.Types.SubjectDataRep
LaunchdarklyAPI.Types.TargetResourceRep
LaunchdarklyAPI.Types.TeamCollectionRep
LaunchdarklyAPI.Types.TeamImportsRep
LaunchdarklyAPI.Types.TeamRep
LaunchdarklyAPI.Types.Token
LaunchdarklyAPI.Types.TokenDataRep
LaunchdarklyAPI.Types.Tokens
LaunchdarklyAPI.Types.TriggerWorkflowCollectionRep
LaunchdarklyAPI.Types.TriggerWorkflowRep
LaunchdarklyAPI.Types.UnauthorizedErrorRep
LaunchdarklyAPI.Types.UrlPost
LaunchdarklyAPI.Types.User
LaunchdarklyAPI.Types.UserAttributeNamesRep
LaunchdarklyAPI.Types.UserFlagSetting
LaunchdarklyAPI.Types.UserFlagSettings
LaunchdarklyAPI.Types.UserRecord
LaunchdarklyAPI.Types.UserSegment
LaunchdarklyAPI.Types.UserSegmentRule
LaunchdarklyAPI.Types.UserSegments
LaunchdarklyAPI.Types.Users
LaunchdarklyAPI.Types.ValuePut
LaunchdarklyAPI.Types.Variation
LaunchdarklyAPI.Types.VersionsRep
LaunchdarklyAPI.Types.Webhook
LaunchdarklyAPI.Types.Webhooks
LaunchdarklyAPI.Types.CreateCopyFlagConfigApprovalRequestRequest
LaunchdarklyAPI.Types.CreateFlagConfigApprovalRequestRequest
LaunchdarklyAPI.Types.IpList
LaunchdarklyAPI.Types.PatchSegmentInstruction
LaunchdarklyAPI.Types.PatchSegmentRequest
LaunchdarklyAPI.Types.PostApprovalRequestApplyRequest
LaunchdarklyAPI.Types.PostApprovalRequestReviewRequest
LaunchdarklyAPI.Types.PutBranch
LaunchdarklyAPI.Types.RepositoryPost
LaunchdarklyAPI.Types.SourceFlag
LaunchdarklyAPI.Types.SubscriptionPost
LaunchdarklyAPI.Types.TeamPatchInput
LaunchdarklyAPI.Types.TeamPostInput
LaunchdarklyAPI.Types.TriggerPost
LaunchdarklyAPI.Types.WebhookPost
LaunchdarklyAPI.Configuration
LaunchdarklyAPI.SecuritySchemes
LaunchdarklyAPI.Common
hs-source-dirs:
src
build-depends:
base >=4.7 && <5
, text
, ghc-prim
, http-conduit
, http-client
, http-types
, bytestring
, aeson
, unordered-containers
, vector
, scientific
, time
, mtl
, transformers
default-language: Haskell2010

+ 10
- 0
shell.nix View File

@@ -0,0 +1,10 @@
let
pkgs = import <nixpkgs> {};
in
pkgs.mkShell {
name = "launchdarklyapi";
buildInputs = with pkgs; [
cabal-install
ghc
];
}

+ 665
- 0
src/LaunchdarklyAPI.hs View File

@@ -0,0 +1,665 @@
-- CHANGE WITH CAUTION: This is a generated code file generated by https://github.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator.

-- | The main module which exports all functionality.
module LaunchdarklyAPI
( module LaunchdarklyAPI.Operations.GetRoot,
module LaunchdarklyAPI.Operations.GetRelayProxyConfigs,
module LaunchdarklyAPI.Operations.PostRelayAutoConfig,
module LaunchdarklyAPI.Operations.GetRelayProxyConfig,
module LaunchdarklyAPI.Operations.DeleteRelayAutoConfig,
module LaunchdarklyAPI.Operations.PatchRelayAutoConfig,
module LaunchdarklyAPI.Operations.ResetRelayAutoConfig,
module LaunchdarklyAPI.Operations.GetAuditLogEntries,
module LaunchdarklyAPI.Operations.GetAuditLogEntry,
module LaunchdarklyAPI.Operations.GetExtinctions,
module LaunchdarklyAPI.Operations.GetRepositories,
module LaunchdarklyAPI.Operations.PostRepository,
module LaunchdarklyAPI.Operations.GetRepository,
module LaunchdarklyAPI.Operations.DeleteRepository,
module LaunchdarklyAPI.Operations.PatchRepository,
module LaunchdarklyAPI.Operations.DeleteBranches,
module LaunchdarklyAPI.Operations.GetBranches,
module LaunchdarklyAPI.Operations.GetBranch,
module LaunchdarklyAPI.Operations.PutBranch,
module LaunchdarklyAPI.Operations.PostExtinction,
module LaunchdarklyAPI.Operations.GetRootStatistic,
module LaunchdarklyAPI.Operations.GetStatistics,
module LaunchdarklyAPI.Operations.GetDestinations,
module LaunchdarklyAPI.Operations.PostDestination,
module LaunchdarklyAPI.Operations.GetDestination,
module LaunchdarklyAPI.Operations.DeleteDestination,
module LaunchdarklyAPI.Operations.PatchDestination,
module LaunchdarklyAPI.Operations.GetFeatureFlagStatusAcrossEnvironments,
module LaunchdarklyAPI.Operations.GetFeatureFlagStatuses,
module LaunchdarklyAPI.Operations.GetFeatureFlagStatus,
module LaunchdarklyAPI.Operations.GetFeatureFlags,
module LaunchdarklyAPI.Operations.PostFeatureFlag,
module LaunchdarklyAPI.Operations.GetDependentFlagsByEnv,
module LaunchdarklyAPI.Operations.CopyFeatureFlag,
module LaunchdarklyAPI.Operations.GetDependentFlags,
module LaunchdarklyAPI.Operations.GetExperiment,
module LaunchdarklyAPI.Operations.ResetExperiment,
module LaunchdarklyAPI.Operations.GetExpiringUserTargets,
module LaunchdarklyAPI.Operations.PatchExpiringUserTargets,
module LaunchdarklyAPI.Operations.GetTriggerWorkflows,
module LaunchdarklyAPI.Operations.CreateTriggerWorkflow,
module LaunchdarklyAPI.Operations.GetTriggerWorkflowById,
module LaunchdarklyAPI.Operations.DeleteTriggerWorkflow,
module LaunchdarklyAPI.Operations.PatchTriggerWorkflow,
module LaunchdarklyAPI.Operations.GetFeatureFlag,
module LaunchdarklyAPI.Operations.DeleteFeatureFlag,
module LaunchdarklyAPI.Operations.PatchFeatureFlag,
module LaunchdarklyAPI.Operations.GetSubscriptions,
module LaunchdarklyAPI.Operations.CreateSubscription,
module LaunchdarklyAPI.Operations.GetSubscriptionByID,
module LaunchdarklyAPI.Operations.DeleteSubscription,
module LaunchdarklyAPI.Operations.UpdateSubscription,
module LaunchdarklyAPI.Operations.GetMembers,
module LaunchdarklyAPI.Operations.PostMembers,
module LaunchdarklyAPI.Operations.GetMember,
module LaunchdarklyAPI.Operations.DeleteMember,
module LaunchdarklyAPI.Operations.PatchMember,
module LaunchdarklyAPI.Operations.PostMemberTeams,
module LaunchdarklyAPI.Operations.GetMetrics,
module LaunchdarklyAPI.Operations.PostMetric,
module LaunchdarklyAPI.Operations.GetMetric,
module LaunchdarklyAPI.Operations.DeleteMetric,
module LaunchdarklyAPI.Operations.PatchMetric,
module LaunchdarklyAPI.Operations.GetOpenapiSpec,
module LaunchdarklyAPI.Operations.GetProjects,
module LaunchdarklyAPI.Operations.PostProject,
module LaunchdarklyAPI.Operations.GetProject,
module LaunchdarklyAPI.Operations.DeleteProject,
module LaunchdarklyAPI.Operations.PatchProject,
module LaunchdarklyAPI.Operations.PostEnvironment,
module LaunchdarklyAPI.Operations.ResetEnvironmentSDKKey,
module LaunchdarklyAPI.Operations.ResetEnvironmentMobileKey,
module LaunchdarklyAPI.Operations.GetEnvironment,
module LaunchdarklyAPI.Operations.DeleteEnvironment,
module LaunchdarklyAPI.Operations.PatchEnvironment,
module LaunchdarklyAPI.Operations.GetApprovals,
module LaunchdarklyAPI.Operations.PostApprovalRequest,
module LaunchdarklyAPI.Operations.PostFlagCopyConfigApprovalRequest,
module LaunchdarklyAPI.Operations.GetApproval,
module LaunchdarklyAPI.Operations.DeleteApprovalRequest,
module LaunchdarklyAPI.Operations.PostApprovalRequestApplyRequest,
module LaunchdarklyAPI.Operations.PostApprovalRequestReview,
module LaunchdarklyAPI.Operations.GetFlagConfigScheduledChanges,
module LaunchdarklyAPI.Operations.PostFlagConfigScheduledChanges,
module LaunchdarklyAPI.Operations.GetFeatureFlagScheduledChange,
module LaunchdarklyAPI.Operations.DeleteFlagConfigScheduledChanges,
module LaunchdarklyAPI.Operations.PatchFlagConfigScheduledChange,
module LaunchdarklyAPI.Operations.GetWorkflows,
module LaunchdarklyAPI.Operations.PostWorkflow,
module LaunchdarklyAPI.Operations.GetCustomWorkflow,
module LaunchdarklyAPI.Operations.DeleteWorkflow,
module LaunchdarklyAPI.Operations.GetIps,
module LaunchdarklyAPI.Operations.GetCustomRoles,
module LaunchdarklyAPI.Operations.PostCustomRole,
module LaunchdarklyAPI.Operations.GetCustomRole,
module LaunchdarklyAPI.Operations.DeleteCustomRole,
module LaunchdarklyAPI.Operations.PatchCustomRole,
module LaunchdarklyAPI.Operations.GetSegments,
module LaunchdarklyAPI.Operations.PostSegment,
module LaunchdarklyAPI.Operations.GetSegment,
module LaunchdarklyAPI.Operations.DeleteSegment,
module LaunchdarklyAPI.Operations.PatchSegment,
module LaunchdarklyAPI.Operations.UpdateBigSegmentTargets,
module LaunchdarklyAPI.Operations.GetSegmentMembershipForUser,
module LaunchdarklyAPI.Operations.GetExpiringUserTargetsForSegment,
module LaunchdarklyAPI.Operations.PatchExpiringUserTargetsForSegment,
module LaunchdarklyAPI.Operations.GetTeams,
module LaunchdarklyAPI.Operations.PostTeam,
module LaunchdarklyAPI.Operations.GetTeam,
module LaunchdarklyAPI.Operations.DeleteTeam,
module LaunchdarklyAPI.Operations.PatchTeam,
module LaunchdarklyAPI.Operations.PostTeamMembers,
module LaunchdarklyAPI.Operations.GetTokens,
module LaunchdarklyAPI.Operations.PostToken,
module LaunchdarklyAPI.Operations.GetToken,
module LaunchdarklyAPI.Operations.DeleteToken,
module LaunchdarklyAPI.Operations.PatchToken,
module LaunchdarklyAPI.Operations.ResetToken,
module LaunchdarklyAPI.Operations.GetEvaluationsUsage,
module LaunchdarklyAPI.Operations.GetEventsUsage,
module LaunchdarklyAPI.Operations.GetMauUsage,
module LaunchdarklyAPI.Operations.GetMauUsageByCategory,
module LaunchdarklyAPI.Operations.GetMauSdksByType,
module LaunchdarklyAPI.Operations.GetStreamUsage,
module LaunchdarklyAPI.Operations.GetStreamUsageBySdkVersion,
module LaunchdarklyAPI.Operations.GetStreamUsageSdkversion,
module LaunchdarklyAPI.Operations.GetUserAttributeNames,
module LaunchdarklyAPI.Operations.GetSearchUsers,
module LaunchdarklyAPI.Operations.GetUsers,
module LaunchdarklyAPI.Operations.GetUser,
module LaunchdarklyAPI.Operations.DeleteUser,
module LaunchdarklyAPI.Operations.GetUserFlagSettings,
module LaunchdarklyAPI.Operations.GetUserFlagSetting,
module LaunchdarklyAPI.Operations.PutFlagSetting,
module LaunchdarklyAPI.Operations.GetExpiringFlagsForUser,
module LaunchdarklyAPI.Operations.PatchExpiringFlagsForUser,
module LaunchdarklyAPI.Operations.GetVersions,
module LaunchdarklyAPI.Operations.GetAllWebhooks,
module LaunchdarklyAPI.Operations.PostWebhook,
module LaunchdarklyAPI.Operations.GetWebhook,
module LaunchdarklyAPI.Operations.DeleteWebhook,
module LaunchdarklyAPI.Operations.PatchWebhook,
module LaunchdarklyAPI.Types,
module LaunchdarklyAPI.TypeAlias,
module LaunchdarklyAPI.Types.AccessDeniedReasonRep,
module LaunchdarklyAPI.Types.AccessDeniedRep,
module LaunchdarklyAPI.Types.AccessRep,
module LaunchdarklyAPI.Types.AccessTokenPost,
module LaunchdarklyAPI.Types.ActionInputRep,
module LaunchdarklyAPI.Types.ActionOutputRep,
module LaunchdarklyAPI.Types.ApprovalSettings,
module LaunchdarklyAPI.Types.AuditLogEntryListingRep,
module LaunchdarklyAPI.Types.AuditLogEntryListingRepCollection,
module LaunchdarklyAPI.Types.AuditLogEntryRep,
module LaunchdarklyAPI.Types.AuthorizedAppDataRep,
module LaunchdarklyAPI.Types.BigSegmentTarget,
module LaunchdarklyAPI.Types.BranchCollectionRep,
module LaunchdarklyAPI.Types.BranchRep,
module LaunchdarklyAPI.Types.Clause,
module LaunchdarklyAPI.Types.ClientSideAvailability,
module LaunchdarklyAPI.Types.ClientSideAvailabilityPost,
module LaunchdarklyAPI.Types.ConditionInputRep,
module LaunchdarklyAPI.Types.ConditionOutputRep,
module LaunchdarklyAPI.Types.ConfidenceIntervalRep,
module LaunchdarklyAPI.Types.Conflict,
module LaunchdarklyAPI.Types.ConflictOutputRep,
module LaunchdarklyAPI.Types.CopiedFromEnv,
module LaunchdarklyAPI.Types.CustomRole,
module LaunchdarklyAPI.Types.CustomRolePost,
module LaunchdarklyAPI.Types.CustomRoles,
module LaunchdarklyAPI.Types.CustomRolesRep,
module LaunchdarklyAPI.Types.CustomWorkflowInputRep,
module LaunchdarklyAPI.Types.CustomWorkflowMeta,
module LaunchdarklyAPI.Types.CustomWorkflowOutputRep,
module LaunchdarklyAPI.Types.CustomWorkflowStageMeta,
module LaunchdarklyAPI.Types.CustomWorkflowsListingOutputRep,
module LaunchdarklyAPI.Types.DefaultClientSideAvailabilityPost,
module LaunchdarklyAPI.Types.Defaults,
module LaunchdarklyAPI.Types.DependentFlag,
module LaunchdarklyAPI.Types.DependentFlagEnvironment,
module LaunchdarklyAPI.Types.DependentFlagsByEnvironment,
module LaunchdarklyAPI.Types.Destination,
module LaunchdarklyAPI.Types.DestinationPost,
module LaunchdarklyAPI.Types.Destinations,
module LaunchdarklyAPI.Types.Environment,
module LaunchdarklyAPI.Types.EnvironmentPost,
module LaunchdarklyAPI.Types.ExecutionOutputRep,
module LaunchdarklyAPI.Types.ExpandedTeamRep,
module LaunchdarklyAPI.Types.ExperimentInfoRep,
module LaunchdarklyAPI.Types.ExperimentMetadataRep,
module LaunchdarklyAPI.Types.ExperimentRep,
module LaunchdarklyAPI.Types.ExperimentResultsRep,
module LaunchdarklyAPI.Types.ExperimentStatsRep,
module LaunchdarklyAPI.Types.ExperimentTimeSeriesSlice,
module LaunchdarklyAPI.Types.ExperimentTimeSeriesVariationSlice,
module LaunchdarklyAPI.Types.ExperimentTotalsRep,
module LaunchdarklyAPI.Types.ExpiringUserTargetError,
module LaunchdarklyAPI.Types.ExpiringUserTargetGetResponse,
module LaunchdarklyAPI.Types.ExpiringUserTargetItem,
module LaunchdarklyAPI.Types.ExpiringUserTargetPatchResponse,
module LaunchdarklyAPI.Types.Extinction,
module LaunchdarklyAPI.Types.ExtinctionCollectionRep,
module LaunchdarklyAPI.Types.FeatureFlag,
module LaunchdarklyAPI.Types.FeatureFlagBody,
module LaunchdarklyAPI.Types.FeatureFlagScheduledChange,
module LaunchdarklyAPI.Types.FeatureFlagScheduledChanges,
module LaunchdarklyAPI.Types.FeatureFlagStatusAcrossEnvironments,
module LaunchdarklyAPI.Types.FeatureFlagStatuses,
module LaunchdarklyAPI.Types.FeatureFlags,
module LaunchdarklyAPI.Types.FlagConfigApprovalRequestResponse,
module LaunchdarklyAPI.Types.FlagConfigApprovalRequestsResponse,
module LaunchdarklyAPI.Types.FlagCopyConfigEnvironment,
module LaunchdarklyAPI.Types.FlagCopyConfigPost,
module LaunchdarklyAPI.Types.FlagListingRep,
module LaunchdarklyAPI.Types.FlagScheduledChangesInput,
module LaunchdarklyAPI.Types.FlagStatusRep,
module LaunchdarklyAPI.Types.FlagTriggerInput,
module LaunchdarklyAPI.Types.ForbiddenErrorRep,
module LaunchdarklyAPI.Types.HunkRep,
module LaunchdarklyAPI.Types.Integration,
module LaunchdarklyAPI.Types.IntegrationMetadata,
module LaunchdarklyAPI.Types.IntegrationStatus,
module LaunchdarklyAPI.Types.IntegrationStatusRep,
module LaunchdarklyAPI.Types.IntegrationSubscriptionStatusRep,
module LaunchdarklyAPI.Types.Integrations,
module LaunchdarklyAPI.Types.InvalidRequestErrorRep,
module LaunchdarklyAPI.Types.LastSeenMetadata,
module LaunchdarklyAPI.Types.Link,
module LaunchdarklyAPI.Types.Member,
module LaunchdarklyAPI.Types.MemberDataRep,
module LaunchdarklyAPI.Types.MemberImportItemRep,
module LaunchdarklyAPI.Types.MemberPermissionGrantSummaryRep,
module LaunchdarklyAPI.Types.MemberSummaryRep,
module LaunchdarklyAPI.Types.MemberTeamSummaryRep,
module LaunchdarklyAPI.Types.MemberTeamsPostInput,
module LaunchdarklyAPI.Types.Members,
module LaunchdarklyAPI.Types.MethodNotAllowedErrorRep,
module LaunchdarklyAPI.Types.MetricCollectionRep,
module LaunchdarklyAPI.Types.MetricListingRep,
module LaunchdarklyAPI.Types.MetricPost,
module LaunchdarklyAPI.Types.MetricRep,
module LaunchdarklyAPI.Types.MetricSeen,
module LaunchdarklyAPI.Types.Modification,
module LaunchdarklyAPI.Types.MultiEnvironmentDependentFlag,
module LaunchdarklyAPI.Types.MultiEnvironmentDependentFlags,
module LaunchdarklyAPI.Types.NewMemberForm,
module LaunchdarklyAPI.Types.NotFoundErrorRep,
module LaunchdarklyAPI.Types.ParentResourceRep,
module LaunchdarklyAPI.Types.PatchFailedErrorRep,
module LaunchdarklyAPI.Types.PatchOperation,
module LaunchdarklyAPI.Types.PatchWithComment,
module LaunchdarklyAPI.Types.PermissionGrantInput,
module LaunchdarklyAPI.Types.PermissionGrantRep,
module LaunchdarklyAPI.Types.PostFlagScheduledChangesInput,
module LaunchdarklyAPI.Types.Project,
module LaunchdarklyAPI.Types.ProjectPost,
module LaunchdarklyAPI.Types.Projects,
module LaunchdarklyAPI.Types.RateLimitedErrorRep,
module LaunchdarklyAPI.Types.RecentTriggerBody,
module LaunchdarklyAPI.Types.ReferenceRep,
module LaunchdarklyAPI.Types.RelayAutoConfigCollectionRep,
module LaunchdarklyAPI.Types.RelayAutoConfigPost,
module LaunchdarklyAPI.Types.RelayAutoConfigRep,
module LaunchdarklyAPI.Types.RepositoryCollectionRep,
module LaunchdarklyAPI.Types.RepositoryRep,
module LaunchdarklyAPI.Types.ResourceAccess,
module LaunchdarklyAPI.Types.ResourceIDResponse,
module LaunchdarklyAPI.Types.ReviewOutputRep,
module LaunchdarklyAPI.Types.ReviewResponse,
module LaunchdarklyAPI.Types.SdkListRep,
module LaunchdarklyAPI.Types.SdkVersionListRep,
module LaunchdarklyAPI.Types.SdkVersionRep,
module LaunchdarklyAPI.Types.SegmentBody,
module LaunchdarklyAPI.Types.SegmentMetadata,
module LaunchdarklyAPI.Types.SegmentUserList,
module LaunchdarklyAPI.Types.SegmentUserState,
module LaunchdarklyAPI.Types.SeriesListRep,
module LaunchdarklyAPI.Types.StageInputRep,
module LaunchdarklyAPI.Types.StageOutputRep,
module LaunchdarklyAPI.Types.Statement,
module LaunchdarklyAPI.Types.StatementPost,
module LaunchdarklyAPI.Types.StatementRep,
module LaunchdarklyAPI.Types.StatisticCollectionRep,
module LaunchdarklyAPI.Types.StatisticsRoot,
module LaunchdarklyAPI.Types.StatusConflictErrorRep,
module LaunchdarklyAPI.Types.SubjectDataRep,
module LaunchdarklyAPI.Types.TargetResourceRep,
module LaunchdarklyAPI.Types.TeamCollectionRep,
module LaunchdarklyAPI.Types.TeamImportsRep,
module LaunchdarklyAPI.Types.TeamRep,
module LaunchdarklyAPI.Types.Token,
module LaunchdarklyAPI.Types.TokenDataRep,
module LaunchdarklyAPI.Types.Tokens,
module LaunchdarklyAPI.Types.TriggerWorkflowCollectionRep,
module LaunchdarklyAPI.Types.TriggerWorkflowRep,
module LaunchdarklyAPI.Types.UnauthorizedErrorRep,
module LaunchdarklyAPI.Types.UrlPost,
module LaunchdarklyAPI.Types.User,
module LaunchdarklyAPI.Types.UserAttributeNamesRep,
module LaunchdarklyAPI.Types.UserFlagSetting,
module LaunchdarklyAPI.Types.UserFlagSettings,
module LaunchdarklyAPI.Types.UserRecord,
module LaunchdarklyAPI.Types.UserSegment,
module LaunchdarklyAPI.Types.UserSegmentRule,
module LaunchdarklyAPI.Types.UserSegments,
module LaunchdarklyAPI.Types.Users,
module LaunchdarklyAPI.Types.ValuePut,
module LaunchdarklyAPI.Types.Variation,
module LaunchdarklyAPI.Types.VersionsRep,
module LaunchdarklyAPI.Types.Webhook,
module LaunchdarklyAPI.Types.Webhooks,
module LaunchdarklyAPI.Types.CreateCopyFlagConfigApprovalRequestRequest,
module LaunchdarklyAPI.Types.CreateFlagConfigApprovalRequestRequest,
module LaunchdarklyAPI.Types.IpList,
module LaunchdarklyAPI.Types.PatchSegmentInstruction,
module LaunchdarklyAPI.Types.PatchSegmentRequest,
module LaunchdarklyAPI.Types.PostApprovalRequestApplyRequest,
module LaunchdarklyAPI.Types.PostApprovalRequestReviewRequest,
module LaunchdarklyAPI.Types.PutBranch,
module LaunchdarklyAPI.Types.RepositoryPost,
module LaunchdarklyAPI.Types.SourceFlag,
module LaunchdarklyAPI.Types.SubscriptionPost,
module LaunchdarklyAPI.Types.TeamPatchInput,
module LaunchdarklyAPI.Types.TeamPostInput,
module LaunchdarklyAPI.Types.TriggerPost,
module LaunchdarklyAPI.Types.WebhookPost,
module LaunchdarklyAPI.Configuration,
module LaunchdarklyAPI.SecuritySchemes,
module LaunchdarklyAPI.Common,
)
where

import LaunchdarklyAPI.Common
import LaunchdarklyAPI.Configuration
import LaunchdarklyAPI.Operations.CopyFeatureFlag
import LaunchdarklyAPI.Operations.CreateSubscription
import LaunchdarklyAPI.Operations.CreateTriggerWorkflow
import LaunchdarklyAPI.Operations.DeleteApprovalRequest
import LaunchdarklyAPI.Operations.DeleteBranches
import LaunchdarklyAPI.Operations.DeleteCustomRole
import LaunchdarklyAPI.Operations.DeleteDestination
import LaunchdarklyAPI.Operations.DeleteEnvironment
import LaunchdarklyAPI.Operations.DeleteFeatureFlag
import LaunchdarklyAPI.Operations.DeleteFlagConfigScheduledChanges
import LaunchdarklyAPI.Operations.DeleteMember
import LaunchdarklyAPI.Operations.DeleteMetric
import LaunchdarklyAPI.Operations.DeleteProject
import LaunchdarklyAPI.Operations.DeleteRelayAutoConfig
import LaunchdarklyAPI.Operations.DeleteRepository
import LaunchdarklyAPI.Operations.DeleteSegment
import LaunchdarklyAPI.Operations.DeleteSubscription
import LaunchdarklyAPI.Operations.DeleteTeam
import LaunchdarklyAPI.Operations.DeleteToken
import LaunchdarklyAPI.Operations.DeleteTriggerWorkflow
import LaunchdarklyAPI.Operations.DeleteUser
import LaunchdarklyAPI.Operations.DeleteWebhook
import LaunchdarklyAPI.Operations.DeleteWorkflow
import LaunchdarklyAPI.Operations.GetAllWebhooks
import LaunchdarklyAPI.Operations.GetApproval
import LaunchdarklyAPI.Operations.GetApprovals
import LaunchdarklyAPI.Operations.GetAuditLogEntries
import LaunchdarklyAPI.Operations.GetAuditLogEntry
import LaunchdarklyAPI.Operations.GetBranch
import LaunchdarklyAPI.Operations.GetBranches
import LaunchdarklyAPI.Operations.GetCustomRole
import LaunchdarklyAPI.Operations.GetCustomRoles
import LaunchdarklyAPI.Operations.GetCustomWorkflow
import LaunchdarklyAPI.Operations.GetDependentFlags
import LaunchdarklyAPI.Operations.GetDependentFlagsByEnv
import LaunchdarklyAPI.Operations.GetDestination
import LaunchdarklyAPI.Operations.GetDestinations
import LaunchdarklyAPI.Operations.GetEnvironment
import LaunchdarklyAPI.Operations.GetEvaluationsUsage
import LaunchdarklyAPI.Operations.GetEventsUsage
import LaunchdarklyAPI.Operations.GetExperiment
import LaunchdarklyAPI.Operations.GetExpiringFlagsForUser
import LaunchdarklyAPI.Operations.GetExpiringUserTargets
import LaunchdarklyAPI.Operations.GetExpiringUserTargetsForSegment
import LaunchdarklyAPI.Operations.GetExtinctions
import LaunchdarklyAPI.Operations.GetFeatureFlag
import LaunchdarklyAPI.Operations.GetFeatureFlagScheduledChange
import LaunchdarklyAPI.Operations.GetFeatureFlagStatus
import LaunchdarklyAPI.Operations.GetFeatureFlagStatusAcrossEnvironments
import LaunchdarklyAPI.Operations.GetFeatureFlagStatuses
import LaunchdarklyAPI.Operations.GetFeatureFlags
import LaunchdarklyAPI.Operations.GetFlagConfigScheduledChanges
import LaunchdarklyAPI.Operations.GetIps
import LaunchdarklyAPI.Operations.GetMauSdksByType
import LaunchdarklyAPI.Operations.GetMauUsage
import LaunchdarklyAPI.Operations.GetMauUsageByCategory
import LaunchdarklyAPI.Operations.GetMember
import LaunchdarklyAPI.Operations.GetMembers
import LaunchdarklyAPI.Operations.GetMetric
import LaunchdarklyAPI.Operations.GetMetrics
import LaunchdarklyAPI.Operations.GetOpenapiSpec
import LaunchdarklyAPI.Operations.GetProject
import LaunchdarklyAPI.Operations.GetProjects
import LaunchdarklyAPI.Operations.GetRelayProxyConfig
import LaunchdarklyAPI.Operations.GetRelayProxyConfigs
import LaunchdarklyAPI.Operations.GetRepositories
import LaunchdarklyAPI.Operations.GetRepository
import LaunchdarklyAPI.Operations.GetRoot
import LaunchdarklyAPI.Operations.GetRootStatistic
import LaunchdarklyAPI.Operations.GetSearchUsers
import LaunchdarklyAPI.Operations.GetSegment
import LaunchdarklyAPI.Operations.GetSegmentMembershipForUser
import LaunchdarklyAPI.Operations.GetSegments
import LaunchdarklyAPI.Operations.GetStatistics
import LaunchdarklyAPI.Operations.GetStreamUsage
import LaunchdarklyAPI.Operations.GetStreamUsageBySdkVersion
import LaunchdarklyAPI.Operations.GetStreamUsageSdkversion
import LaunchdarklyAPI.Operations.GetSubscriptionByID
import LaunchdarklyAPI.Operations.GetSubscriptions
import LaunchdarklyAPI.Operations.GetTeam
import LaunchdarklyAPI.Operations.GetTeams
import LaunchdarklyAPI.Operations.GetToken
import LaunchdarklyAPI.Operations.GetTokens
import LaunchdarklyAPI.Operations.GetTriggerWorkflowById
import LaunchdarklyAPI.Operations.GetTriggerWorkflows
import LaunchdarklyAPI.Operations.GetUser
import LaunchdarklyAPI.Operations.GetUserAttributeNames
import LaunchdarklyAPI.Operations.GetUserFlagSetting
import LaunchdarklyAPI.Operations.GetUserFlagSettings
import LaunchdarklyAPI.Operations.GetUsers
import LaunchdarklyAPI.Operations.GetVersions
import LaunchdarklyAPI.Operations.GetWebhook
import LaunchdarklyAPI.Operations.GetWorkflows
import LaunchdarklyAPI.Operations.PatchCustomRole
import LaunchdarklyAPI.Operations.PatchDestination
import LaunchdarklyAPI.Operations.PatchEnvironment
import LaunchdarklyAPI.Operations.PatchExpiringFlagsForUser
import LaunchdarklyAPI.Operations.PatchExpiringUserTargets
import LaunchdarklyAPI.Operations.PatchExpiringUserTargetsForSegment
import LaunchdarklyAPI.Operations.PatchFeatureFlag
import LaunchdarklyAPI.Operations.PatchFlagConfigScheduledChange
import LaunchdarklyAPI.Operations.PatchMember
import LaunchdarklyAPI.Operations.PatchMetric
import LaunchdarklyAPI.Operations.PatchProject
import LaunchdarklyAPI.Operations.PatchRelayAutoConfig
import LaunchdarklyAPI.Operations.PatchRepository
import LaunchdarklyAPI.Operations.PatchSegment
import LaunchdarklyAPI.Operations.PatchTeam
import LaunchdarklyAPI.Operations.PatchToken
import LaunchdarklyAPI.Operations.PatchTriggerWorkflow
import LaunchdarklyAPI.Operations.PatchWebhook
import LaunchdarklyAPI.Operations.PostApprovalRequest
import LaunchdarklyAPI.Operations.PostApprovalRequestApplyRequest
import LaunchdarklyAPI.Operations.PostApprovalRequestReview
import LaunchdarklyAPI.Operations.PostCustomRole
import LaunchdarklyAPI.Operations.PostDestination
import LaunchdarklyAPI.Operations.PostEnvironment
import LaunchdarklyAPI.Operations.PostExtinction
import LaunchdarklyAPI.Operations.PostFeatureFlag
import LaunchdarklyAPI.Operations.PostFlagConfigScheduledChanges
import LaunchdarklyAPI.Operations.PostFlagCopyConfigApprovalRequest
import LaunchdarklyAPI.Operations.PostMemberTeams
import LaunchdarklyAPI.Operations.PostMembers
import LaunchdarklyAPI.Operations.PostMetric
import LaunchdarklyAPI.Operations.PostProject
import LaunchdarklyAPI.Operations.PostRelayAutoConfig
import LaunchdarklyAPI.Operations.PostRepository
import LaunchdarklyAPI.Operations.PostSegment
import LaunchdarklyAPI.Operations.PostTeam
import LaunchdarklyAPI.Operations.PostTeamMembers
import LaunchdarklyAPI.Operations.PostToken
import LaunchdarklyAPI.Operations.PostWebhook
import LaunchdarklyAPI.Operations.PostWorkflow
import LaunchdarklyAPI.Operations.PutBranch
import LaunchdarklyAPI.Operations.PutFlagSetting
import LaunchdarklyAPI.Operations.ResetEnvironmentMobileKey
import LaunchdarklyAPI.Operations.ResetEnvironmentSDKKey
import LaunchdarklyAPI.Operations.ResetExperiment
import LaunchdarklyAPI.Operations.ResetRelayAutoConfig
import LaunchdarklyAPI.Operations.ResetToken
import LaunchdarklyAPI.Operations.UpdateBigSegmentTargets
import LaunchdarklyAPI.Operations.UpdateSubscription
import LaunchdarklyAPI.SecuritySchemes
import LaunchdarklyAPI.TypeAlias
import LaunchdarklyAPI.Types
import LaunchdarklyAPI.Types.AccessDeniedReasonRep
import LaunchdarklyAPI.Types.AccessDeniedRep
import LaunchdarklyAPI.Types.AccessRep
import LaunchdarklyAPI.Types.AccessTokenPost
import LaunchdarklyAPI.Types.ActionInputRep
import LaunchdarklyAPI.Types.ActionOutputRep
import LaunchdarklyAPI.Types.ApprovalSettings
import LaunchdarklyAPI.Types.AuditLogEntryListingRep
import LaunchdarklyAPI.Types.AuditLogEntryListingRepCollection
import LaunchdarklyAPI.Types.AuditLogEntryRep
import LaunchdarklyAPI.Types.AuthorizedAppDataRep
import LaunchdarklyAPI.Types.BigSegmentTarget
import LaunchdarklyAPI.Types.BranchCollectionRep
import LaunchdarklyAPI.Types.BranchRep
import LaunchdarklyAPI.Types.Clause
import LaunchdarklyAPI.Types.ClientSideAvailability
import LaunchdarklyAPI.Types.ClientSideAvailabilityPost
import LaunchdarklyAPI.Types.ConditionInputRep
import LaunchdarklyAPI.Types.ConditionOutputRep
import LaunchdarklyAPI.Types.ConfidenceIntervalRep
import LaunchdarklyAPI.Types.Conflict
import LaunchdarklyAPI.Types.ConflictOutputRep
import LaunchdarklyAPI.Types.CopiedFromEnv
import LaunchdarklyAPI.Types.CreateCopyFlagConfigApprovalRequestRequest
import LaunchdarklyAPI.Types.CreateFlagConfigApprovalRequestRequest
import LaunchdarklyAPI.Types.CustomRole
import LaunchdarklyAPI.Types.CustomRolePost
import LaunchdarklyAPI.Types.CustomRoles
import LaunchdarklyAPI.Types.CustomRolesRep
import LaunchdarklyAPI.Types.CustomWorkflowInputRep
import LaunchdarklyAPI.Types.CustomWorkflowMeta
import LaunchdarklyAPI.Types.CustomWorkflowOutputRep
import LaunchdarklyAPI.Types.CustomWorkflowStageMeta
import LaunchdarklyAPI.Types.CustomWorkflowsListingOutputRep
import LaunchdarklyAPI.Types.DefaultClientSideAvailabilityPost
import LaunchdarklyAPI.Types.Defaults
import LaunchdarklyAPI.Types.DependentFlag
import LaunchdarklyAPI.Types.DependentFlagEnvironment
import LaunchdarklyAPI.Types.DependentFlagsByEnvironment
import LaunchdarklyAPI.Types.Destination
import LaunchdarklyAPI.Types.DestinationPost
import LaunchdarklyAPI.Types.Destinations
import LaunchdarklyAPI.Types.Environment
import LaunchdarklyAPI.Types.EnvironmentPost
import LaunchdarklyAPI.Types.ExecutionOutputRep
import LaunchdarklyAPI.Types.ExpandedTeamRep
import LaunchdarklyAPI.Types.ExperimentInfoRep
import LaunchdarklyAPI.Types.ExperimentMetadataRep
import LaunchdarklyAPI.Types.ExperimentRep
import LaunchdarklyAPI.Types.ExperimentResultsRep
import LaunchdarklyAPI.Types.ExperimentStatsRep
import LaunchdarklyAPI.Types.ExperimentTimeSeriesSlice
import LaunchdarklyAPI.Types.ExperimentTimeSeriesVariationSlice
import LaunchdarklyAPI.Types.ExperimentTotalsRep
import LaunchdarklyAPI.Types.ExpiringUserTargetError
import LaunchdarklyAPI.Types.ExpiringUserTargetGetResponse
import LaunchdarklyAPI.Types.ExpiringUserTargetItem
import LaunchdarklyAPI.Types.ExpiringUserTargetPatchResponse
import LaunchdarklyAPI.Types.Extinction
import LaunchdarklyAPI.Types.ExtinctionCollectionRep
import LaunchdarklyAPI.Types.FeatureFlag
import LaunchdarklyAPI.Types.FeatureFlagBody
import LaunchdarklyAPI.Types.FeatureFlagScheduledChange
import LaunchdarklyAPI.Types.FeatureFlagScheduledChanges
import LaunchdarklyAPI.Types.FeatureFlagStatusAcrossEnvironments
import LaunchdarklyAPI.Types.FeatureFlagStatuses
import LaunchdarklyAPI.Types.FeatureFlags
import LaunchdarklyAPI.Types.FlagConfigApprovalRequestResponse
import LaunchdarklyAPI.Types.FlagConfigApprovalRequestsResponse
import LaunchdarklyAPI.Types.FlagCopyConfigEnvironment
import LaunchdarklyAPI.Types.FlagCopyConfigPost
import LaunchdarklyAPI.Types.FlagListingRep
import LaunchdarklyAPI.Types.FlagScheduledChangesInput
import LaunchdarklyAPI.Types.FlagStatusRep
import LaunchdarklyAPI.Types.FlagTriggerInput
import LaunchdarklyAPI.Types.ForbiddenErrorRep
import LaunchdarklyAPI.Types.HunkRep
import LaunchdarklyAPI.Types.Integration
import LaunchdarklyAPI.Types.IntegrationMetadata
import LaunchdarklyAPI.Types.IntegrationStatus
import LaunchdarklyAPI.Types.IntegrationStatusRep
import LaunchdarklyAPI.Types.IntegrationSubscriptionStatusRep
import LaunchdarklyAPI.Types.Integrations
import LaunchdarklyAPI.Types.InvalidRequestErrorRep
import LaunchdarklyAPI.Types.IpList
import LaunchdarklyAPI.Types.LastSeenMetadata
import LaunchdarklyAPI.Types.Link
import LaunchdarklyAPI.Types.Member
import LaunchdarklyAPI.Types.MemberDataRep
import LaunchdarklyAPI.Types.MemberImportItemRep
import LaunchdarklyAPI.Types.MemberPermissionGrantSummaryRep
import LaunchdarklyAPI.Types.MemberSummaryRep
import LaunchdarklyAPI.Types.MemberTeamSummaryRep
import LaunchdarklyAPI.Types.MemberTeamsPostInput
import LaunchdarklyAPI.Types.Members
import LaunchdarklyAPI.Types.MethodNotAllowedErrorRep
import LaunchdarklyAPI.Types.MetricCollectionRep
import LaunchdarklyAPI.Types.MetricListingRep
import LaunchdarklyAPI.Types.MetricPost
import LaunchdarklyAPI.Types.MetricRep
import LaunchdarklyAPI.Types.MetricSeen
import LaunchdarklyAPI.Types.Modification
import LaunchdarklyAPI.Types.MultiEnvironmentDependentFlag
import LaunchdarklyAPI.Types.MultiEnvironmentDependentFlags
import LaunchdarklyAPI.Types.NewMemberForm
import LaunchdarklyAPI.Types.NotFoundErrorRep
import LaunchdarklyAPI.Types.ParentResourceRep
import LaunchdarklyAPI.Types.PatchFailedErrorRep
import LaunchdarklyAPI.Types.PatchOperation
import LaunchdarklyAPI.Types.PatchSegmentInstruction
import LaunchdarklyAPI.Types.PatchSegmentRequest
import LaunchdarklyAPI.Types.PatchWithComment
import LaunchdarklyAPI.Types.PermissionGrantInput
import LaunchdarklyAPI.Types.PermissionGrantRep
import LaunchdarklyAPI.Types.PostApprovalRequestApplyRequest
import LaunchdarklyAPI.Types.PostApprovalRequestReviewRequest
import LaunchdarklyAPI.Types.PostFlagScheduledChangesInput
import LaunchdarklyAPI.Types.Project
import LaunchdarklyAPI.Types.ProjectPost
import LaunchdarklyAPI.Types.Projects
import LaunchdarklyAPI.Types.PutBranch
import LaunchdarklyAPI.Types.RateLimitedErrorRep
import LaunchdarklyAPI.Types.RecentTriggerBody
import LaunchdarklyAPI.Types.ReferenceRep
import LaunchdarklyAPI.Types.RelayAutoConfigCollectionRep
import LaunchdarklyAPI.Types.RelayAutoConfigPost
import LaunchdarklyAPI.Types.RelayAutoConfigRep
import LaunchdarklyAPI.Types.RepositoryCollectionRep
import LaunchdarklyAPI.Types.RepositoryPost
import LaunchdarklyAPI.Types.RepositoryRep
import LaunchdarklyAPI.Types.ResourceAccess
import LaunchdarklyAPI.Types.ResourceIDResponse
import LaunchdarklyAPI.Types.ReviewOutputRep
import LaunchdarklyAPI.Types.ReviewResponse
import LaunchdarklyAPI.Types.SdkListRep
import LaunchdarklyAPI.Types.SdkVersionListRep
import LaunchdarklyAPI.Types.SdkVersionRep
import LaunchdarklyAPI.Types.SegmentBody
import LaunchdarklyAPI.Types.SegmentMetadata
import LaunchdarklyAPI.Types.SegmentUserList
import LaunchdarklyAPI.Types.SegmentUserState
import LaunchdarklyAPI.Types.SeriesListRep
import LaunchdarklyAPI.Types.SourceFlag
import LaunchdarklyAPI.Types.StageInputRep
import LaunchdarklyAPI.Types.StageOutputRep
import LaunchdarklyAPI.Types.Statement
import LaunchdarklyAPI.Types.StatementPost
import LaunchdarklyAPI.Types.StatementRep
import LaunchdarklyAPI.Types.StatisticCollectionRep
import LaunchdarklyAPI.Types.StatisticsRoot
import LaunchdarklyAPI.Types.StatusConflictErrorRep
import LaunchdarklyAPI.Types.SubjectDataRep
import LaunchdarklyAPI.Types.SubscriptionPost
import LaunchdarklyAPI.Types.TargetResourceRep
import LaunchdarklyAPI.Types.TeamCollectionRep
import LaunchdarklyAPI.Types.TeamImportsRep
import LaunchdarklyAPI.Types.TeamPatchInput
import LaunchdarklyAPI.Types.TeamPostInput
import LaunchdarklyAPI.Types.TeamRep
import LaunchdarklyAPI.Types.Token
import LaunchdarklyAPI.Types.TokenDataRep
import LaunchdarklyAPI.Types.Tokens
import LaunchdarklyAPI.Types.TriggerPost
import LaunchdarklyAPI.Types.TriggerWorkflowCollectionRep
import LaunchdarklyAPI.Types.TriggerWorkflowRep
import LaunchdarklyAPI.Types.UnauthorizedErrorRep
import LaunchdarklyAPI.Types.UrlPost
import LaunchdarklyAPI.Types.User
import LaunchdarklyAPI.Types.UserAttributeNamesRep
import LaunchdarklyAPI.Types.UserFlagSetting
import LaunchdarklyAPI.Types.UserFlagSettings
import LaunchdarklyAPI.Types.UserRecord
import LaunchdarklyAPI.Types.UserSegment
import LaunchdarklyAPI.Types.UserSegmentRule
import LaunchdarklyAPI.Types.UserSegments
import LaunchdarklyAPI.Types.Users
import LaunchdarklyAPI.Types.ValuePut
import LaunchdarklyAPI.Types.Variation
import LaunchdarklyAPI.Types.VersionsRep
import LaunchdarklyAPI.Types.Webhook
import LaunchdarklyAPI.Types.WebhookPost
import LaunchdarklyAPI.Types.Webhooks

+ 366
- 0
src/LaunchdarklyAPI/Common.hs View File

@@ -0,0 +1,366 @@
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE UndecidableInstances #-}

-- | This module serves the purpose of defining common functionality which remains the same across all OpenAPI specifications.
module LaunchdarklyAPI.Common
( doCallWithConfiguration,
doCallWithConfigurationM,
doBodyCallWithConfiguration,
doBodyCallWithConfigurationM,
runWithConfiguration,
textToByte,
stringifyModel,
anonymousSecurityScheme,
Configuration (..),
SecurityScheme,
MonadHTTP (..),
StringifyModel,
JsonByteString (..),
JsonDateTime (..),
RequestBodyEncoding (..),
QueryParameter (..),
ClientT (..),
ClientM,
)
where

import qualified Control.Monad.IO.Class as MIO
import qualified Control.Monad.Reader as MR
import qualified Control.Monad.Trans.Class as MT
import qualified Data.Aeson as Aeson
import qualified Data.Bifunctor as BF
import qualified Data.ByteString.Char8 as B8
import qualified Data.ByteString.Lazy.Char8 as LB8
import qualified Data.HashMap.Strict as HMap
import qualified Data.Maybe as Maybe
import qualified Data.Scientific as Scientific
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.Encoding as TE
import qualified Data.Time.LocalTime as Time
import qualified Data.Vector as Vector
import qualified Network.HTTP.Client as HC
import qualified Network.HTTP.Simple as HS
import qualified Network.HTTP.Types as HT

-- | Abstracts the usage of 'Network.HTTP.Simple.httpBS' away,
-- so that it can be used for testing
class Monad m => MonadHTTP m where
httpBS :: HS.Request -> m (HS.Response B8.ByteString)

-- | This instance is the default instance used for production code
instance MonadHTTP IO where
httpBS = HS.httpBS

instance MonadHTTP m => MonadHTTP (MR.ReaderT r m) where
httpBS = MT.lift . httpBS

instance MonadHTTP m => MonadHTTP (ClientT m) where
httpBS = MT.lift . httpBS

-- | The monad in which the operations can be run.
-- Contains the 'Configuration' to run the requests with.
--
-- Run it with 'runWithConfiguration'
newtype ClientT m a = ClientT (MR.ReaderT Configuration m a)
deriving (Functor, Applicative, Monad, MR.MonadReader Configuration)

instance MT.MonadTrans ClientT where
lift = ClientT . MT.lift

instance MIO.MonadIO m => MIO.MonadIO (ClientT m) where
liftIO = ClientT . MIO.liftIO

-- | Utility type which uses 'IO' as underlying monad
type ClientM a = ClientT IO a

-- | Run a 'ClientT' monad transformer in another monad with a specified configuration
runWithConfiguration :: Configuration -> ClientT m a -> m a
runWithConfiguration c (ClientT r) = MR.runReaderT r c

-- | An operation can and must be configured with data, which may be common
-- for many operations.
--
-- This configuration consists of information about the server URL and the used security scheme.
--
-- In OpenAPI these information can be defined
--
-- * Root level
-- * Path level
-- * Operation level
--
-- To get started, the 'LaunchdarklyAPI.Configuration.defaultConfiguration' can be used and changed accordingly.
--
-- Note that it is possible that @bearerAuthenticationSecurityScheme@ is not available because it is not a security scheme in the OpenAPI specification.
--
-- > defaultConfiguration
-- > { configSecurityScheme = bearerAuthenticationSecurityScheme "token" }
data Configuration = Configuration
{ -- | The path of the operation is appended to this URL
configBaseURL :: Text,
-- | The 'SecurityScheme' which is applied to the request
-- This is used to set the @Authentication@ header for example
configSecurityScheme :: SecurityScheme,
-- | This flag indicates if an automatically generated @User-Agent@ header
-- should be added to the request. This allows the server to detect with
-- which version of the generator the code was generated.
configIncludeUserAgent :: Bool,
-- | The application name which will be included in the @User-Agent@ header
-- if 'configIncludeUserAgent' is set to 'True'
configApplicationName :: Text
}

-- | Defines how a request body is encoded
data RequestBodyEncoding
= -- | Encode the body as JSON
RequestBodyEncodingJSON
| -- | Encode the body as form data
RequestBodyEncodingFormData

-- | Defines a query parameter with the information necessary for serialization
data QueryParameter = QueryParameter
{ queryParamName :: Text,
queryParamValue :: Maybe Aeson.Value,
queryParamStyle :: Text,
queryParamExplode :: Bool
}
deriving (Show, Eq)

-- | This type specifies a security scheme which can modify a request according to the scheme (e. g. add an Authorization header)
type SecurityScheme = HS.Request -> HS.Request

-- | Anonymous security scheme which does not alter the request in any way
anonymousSecurityScheme :: SecurityScheme
anonymousSecurityScheme = id

-- | This is the main functionality of this module
--
-- It makes a concrete Call to a Server without a body
doCallWithConfiguration ::
MonadHTTP m =>
-- | Configuration options like base URL and security scheme
Configuration ->
-- | HTTP method (GET, POST, etc.)
Text ->
-- | Path to append to the base URL (path parameters should already be replaced)
Text ->
-- | Query parameters
[QueryParameter] ->
-- | The raw response from the server
m (HS.Response B8.ByteString)
doCallWithConfiguration config method path queryParams =
httpBS $ createBaseRequest config method path queryParams

-- | Same as 'doCallWithConfiguration' but run in a 'MR.ReaderT' environment which contains the configuration.
-- This is useful if multiple calls have to be executed with the same configuration.
doCallWithConfigurationM ::
MonadHTTP m =>
Text ->
Text ->
[QueryParameter] ->
ClientT m (HS.Response B8.ByteString)
doCallWithConfigurationM method path queryParams = do
config <- MR.ask
MT.lift $ doCallWithConfiguration config method path queryParams

-- | This is the main functionality of this module
--
-- It makes a concrete Call to a Server with a body
doBodyCallWithConfiguration ::
(MonadHTTP m, Aeson.ToJSON body) =>
-- | Configuration options like base URL and security scheme
Configuration ->
-- | HTTP method (GET, POST, etc.)
Text ->
-- | Path to append to the base URL (path parameters should already be replaced)
Text ->
-- | Query parameters
[QueryParameter] ->
-- | Request body
Maybe body ->
-- | JSON or form data deepobjects
RequestBodyEncoding ->
-- | The raw response from the server
m (HS.Response B8.ByteString)
doBodyCallWithConfiguration config method path queryParams Nothing _ = doCallWithConfiguration config method path queryParams
doBodyCallWithConfiguration config method path queryParams (Just body) RequestBodyEncodingJSON =
httpBS $ HS.setRequestMethod (textToByte method) $ HS.setRequestBodyJSON body baseRequest
where
baseRequest = createBaseRequest config method path queryParams
doBodyCallWithConfiguration config method path queryParams (Just body) RequestBodyEncodingFormData =
httpBS $ HS.setRequestMethod (textToByte method) $ HS.setRequestBodyURLEncoded byteStringData baseRequest
where
baseRequest = createBaseRequest config method path queryParams
byteStringData = createFormData body

-- | Same as 'doBodyCallWithConfiguration' but run in a 'MR.ReaderT' environment which contains the configuration.
-- This is useful if multiple calls have to be executed with the same configuration.
doBodyCallWithConfigurationM ::
(MonadHTTP m, Aeson.ToJSON body) =>
Text ->
Text ->
[QueryParameter] ->
Maybe body ->
RequestBodyEncoding ->
ClientT m (HS.Response B8.ByteString)
doBodyCallWithConfigurationM method path queryParams body encoding = do
config <- MR.ask
MT.lift $ doBodyCallWithConfiguration config method path queryParams body encoding

-- | Creates a Base Request
createBaseRequest ::
-- | Configuration options like base URL and security scheme
Configuration ->
-- | HTTP method (GET, POST, etc.)
Text ->
-- | The path for which the placeholders have already been replaced
Text ->
-- | Query Parameters
[QueryParameter] ->
-- | The Response from the server
HS.Request
createBaseRequest config method path queryParams =
configSecurityScheme config $
addUserAgent $
HS.setRequestMethod (textToByte method) $
HS.setRequestQueryString query $
HS.setRequestPath
(B8.pack (T.unpack $ byteToText basePathModifier <> path))
baseRequest
where
baseRequest = parseURL $ configBaseURL config
basePath = HC.path baseRequest
basePathModifier =
if basePath == B8.pack "/" && T.isPrefixOf "/" path
then ""
else basePath
-- filters all maybe
query = BF.second pure <$> serializeQueryParams queryParams
userAgent = configApplicationName config <> " openapi3-code-generator/0.1.0.6 (https://github.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator)"
addUserAgent =
if configIncludeUserAgent config
then HS.addRequestHeader HT.hUserAgent $ textToByte userAgent
else id

serializeQueryParams :: [QueryParameter] -> [(B8.ByteString, B8.ByteString)]
serializeQueryParams = (>>= serializeQueryParam)

serializeQueryParam :: QueryParameter -> [(B8.ByteString, B8.ByteString)]
serializeQueryParam QueryParameter {..} =
let concatValues joinWith = if queryParamExplode then pure . (queryParamName,) . B8.intercalate joinWith . fmap snd else id
in BF.first textToByte <$> case queryParamValue of
Nothing -> []
Just value ->
( case queryParamStyle of
"form" -> concatValues ","
"spaceDelimited" -> concatValues " "
"pipeDelimited" -> concatValues "|"
"deepObject" -> const $ BF.second textToByte <$> jsonToFormDataPrefixed queryParamName value
_ -> const []
)
$ jsonToFormDataFlat queryParamName value

encodeStrict :: Aeson.ToJSON a => a -> B8.ByteString
encodeStrict = LB8.toStrict . Aeson.encode

jsonToFormDataFlat :: Text -> Aeson.Value -> [(Text, B8.ByteString)]
jsonToFormDataFlat _ Aeson.Null = []
jsonToFormDataFlat name (Aeson.Number a) = [(name, encodeStrict a)]
jsonToFormDataFlat name (Aeson.String a) = [(name, textToByte a)]
jsonToFormDataFlat name (Aeson.Bool a) = [(name, encodeStrict a)]
jsonToFormDataFlat _ (Aeson.Object object) = HMap.toList object >>= uncurry jsonToFormDataFlat
jsonToFormDataFlat name (Aeson.Array vector) = Vector.toList vector >>= jsonToFormDataFlat name

-- | creates form data bytestring array
createFormData :: (Aeson.ToJSON a) => a -> [(B8.ByteString, B8.ByteString)]
createFormData body =
let formData = jsonToFormData $ Aeson.toJSON body
in fmap (BF.bimap textToByte textToByte) formData

-- | Convert a 'B8.ByteString' to 'Text'
byteToText :: B8.ByteString -> Text
byteToText = TE.decodeUtf8

-- | Convert 'Text' a to 'B8.ByteString'
textToByte :: Text -> B8.ByteString
textToByte = TE.encodeUtf8

parseURL :: Text -> HS.Request
parseURL url =
Maybe.fromMaybe HS.defaultRequest $
HS.parseRequest $
T.unpack url

jsonToFormData :: Aeson.Value -> [(Text, Text)]
jsonToFormData = jsonToFormDataPrefixed ""

jsonToFormDataPrefixed :: Text -> Aeson.Value -> [(Text, Text)]
jsonToFormDataPrefixed prefix (Aeson.Number a) = case Scientific.toBoundedInteger a :: Maybe Int of
Just myInt -> [(prefix, T.pack $ show myInt)]
Nothing -> [(prefix, T.pack $ show a)]
jsonToFormDataPrefixed prefix (Aeson.Bool True) = [(prefix, "true")]
jsonToFormDataPrefixed prefix (Aeson.Bool False) = [(prefix, "false")]
jsonToFormDataPrefixed _ Aeson.Null = []
jsonToFormDataPrefixed prefix (Aeson.String a) = [(prefix, a)]
jsonToFormDataPrefixed "" (Aeson.Object object) =
HMap.toList object >>= uncurry jsonToFormDataPrefixed
jsonToFormDataPrefixed prefix (Aeson.Object object) =
HMap.toList object >>= (\(x, y) -> jsonToFormDataPrefixed (prefix <> "[" <> x <> "]") y)
jsonToFormDataPrefixed prefix (Aeson.Array vector) =
Vector.toList vector >>= jsonToFormDataPrefixed (prefix <> "[]")

-- | This type class makes the code generation for URL parameters easier as it allows to stringify a value
--
-- The 'Show' class is not sufficient as strings should not be stringified with quotes.
class Show a => StringifyModel a where
-- | Stringifies a showable value
--
-- >>> stringifyModel "Test"
-- "Test"
--
-- >>> stringifyModel 123
-- "123"
stringifyModel :: a -> String

instance StringifyModel String where
-- stringifyModel :: String -> String
stringifyModel = id

instance StringifyModel Text where
-- stringifyModel :: Text -> String
stringifyModel = T.unpack

instance {-# OVERLAPS #-} Show a => StringifyModel a where
-- stringifyModel :: Show a => a -> String
stringifyModel = show

-- | Wraps a 'B8.ByteString' to implement 'Aeson.ToJSON' and 'Aeson.FromJSON'
newtype JsonByteString = JsonByteString B8.ByteString
deriving (Show, Eq, Ord)

instance Aeson.ToJSON JsonByteString where
toJSON (JsonByteString s) = Aeson.toJSON $ B8.unpack s

instance Aeson.FromJSON JsonByteString where
parseJSON (Aeson.String s) = pure $ JsonByteString $ textToByte s
parseJSON _ = fail "Value cannot be converted to a 'JsonByteString'"

-- | Wraps a 'Time.ZonedTime' to implement 'Aeson.ToJSON' and 'Aeson.FromJSON'
newtype JsonDateTime = JsonDateTime Time.ZonedTime
deriving (Show)

instance Eq JsonDateTime where
(JsonDateTime d1) == (JsonDateTime d2) = Time.zonedTimeToUTC d1 == Time.zonedTimeToUTC d2

instance Ord JsonDateTime where
(JsonDateTime d1) <= (JsonDateTime d2) = Time.zonedTimeToUTC d1 <= Time.zonedTimeToUTC d2

instance Aeson.ToJSON JsonDateTime where
toJSON (JsonDateTime d) = Aeson.toJSON d

instance Aeson.FromJSON JsonDateTime where
parseJSON o = JsonDateTime <$> Aeson.parseJSON o

+ 22
- 0
src/LaunchdarklyAPI/Configuration.hs View File

@@ -0,0 +1,22 @@
-- CHANGE WITH CAUTION: This is a generated code file generated by https://github.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator.
{-# LANGUAGE OverloadedStrings #-}

-- | Contains the default configuration
module LaunchdarklyAPI.Configuration where

import qualified Data.Text
import qualified GHC.Types
import qualified LaunchdarklyAPI.Common

-- | The default url specified by the OpenAPI specification
--
-- @https://app.launchdarkly.com@
defaultURL = Data.Text.pack "https://app.launchdarkly.com"

-- | The default application name used in the @User-Agent@ header which is based on the @info.title@ field of the specification
--
-- @LaunchDarkly REST API@
defaultApplicationName = Data.Text.pack "LaunchDarkly REST API"

-- | The default configuration containing the 'defaultURL' and no authorization
defaultConfiguration = LaunchdarklyAPI.Common.Configuration defaultURL LaunchdarklyAPI.Common.anonymousSecurityScheme GHC.Types.True defaultApplicationName

+ 195
- 0
src/LaunchdarklyAPI/Operations/CopyFeatureFlag.hs View File

@@ -0,0 +1,195 @@
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
-- CHANGE WITH CAUTION: This is a generated code file generated by https://github.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator.
{-# LANGUAGE OverloadedStrings #-}

-- | Contains the different functions to run the operation copyFeatureFlag
module LaunchdarklyAPI.Operations.CopyFeatureFlag where

import qualified Control.Monad.Fail
import qualified Control.Monad.Trans.Reader
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
import qualified Data.Aeson as Data.Aeson.Types
import qualified Data.Aeson as Data.Aeson.Types.FromJSON
import qualified Data.Aeson as Data.Aeson.Types.Internal
import qualified Data.Aeson as Data.Aeson.Types.ToJSON
import qualified Data.ByteString.Char8
import qualified Data.ByteString.Char8 as Data.ByteString.Internal
import qualified Data.Either
import qualified Data.Functor
import qualified Data.Scientific
import qualified Data.Text
import qualified Data.Text.Internal
import qualified Data.Time.Calendar as Data.Time.Calendar.Days
import qualified Data.Time.LocalTime as Data.Time.LocalTime.Internal.ZonedTime
import qualified Data.Vector
import qualified GHC.Base
import qualified GHC.Classes
import qualified GHC.Int
import qualified GHC.Show
import qualified GHC.Types
import qualified LaunchdarklyAPI.Common
import LaunchdarklyAPI.Types
import qualified Network.HTTP.Client
import qualified Network.HTTP.Client as Network.HTTP.Client.Request
import qualified Network.HTTP.Client as Network.HTTP.Client.Types
import qualified Network.HTTP.Simple
import qualified Network.HTTP.Types
import qualified Network.HTTP.Types as Network.HTTP.Types.Status
import qualified Network.HTTP.Types as Network.HTTP.Types.URI
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe

-- | > POST /api/v2/flags/{projKey}/{featureFlagKey}/copy
--
-- The includedActions and excludedActions define the parts of the flag configuration that are copied or not copied. By default, the entire flag configuration is copied.
--
-- You can have either \`includedActions\` or \`excludedActions\` but not both.
--
-- Valid \`includedActions\` and \`excludedActions\` include:
--
-- - \`updateOn\`
-- - \`updatePrerequisites\`
-- - \`updateTargets\`
-- - \`updateRules\`
-- - \`updateFallthrough\`
-- - \`updateOffVariation\`
--
-- The \`source\` and \`target\` must be JSON objects if using curl, specifying the environment key and (optional) current flag configuration version in that environment. For example:
--
-- \`\`\`json
-- {
-- \"key\": \"production\",
-- \"currentVersion\": 3
-- }
-- \`\`\`
--
-- If target is specified as above, the API will test to ensure that the current flag version in the \`production\` environment is \`3\`, and reject attempts to copy settings to \`production\` otherwise. You can use this to enforce optimistic locking on copy attempts.
copyFeatureFlag ::
forall m.
LaunchdarklyAPI.Common.MonadHTTP m =>
-- | Contains all available parameters of this operation (query and path parameters)
CopyFeatureFlagParameters ->
-- | The request body to send
FlagCopyConfigPost ->
-- | Monadic computation which returns the result of the operation
LaunchdarklyAPI.Common.ClientT m (Network.HTTP.Client.Types.Response CopyFeatureFlagResponse)
copyFeatureFlag
parameters
body =
GHC.Base.fmap
( \response_0 ->
GHC.Base.fmap
( Data.Either.either CopyFeatureFlagResponseError GHC.Base.id
GHC.Base.. ( \response body ->
if
| (\status_1 -> Network.HTTP.Types.Status.statusCode status_1 GHC.Classes.== 201) (Network.HTTP.Client.Types.responseStatus response) ->
CopyFeatureFlagResponse201
Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body ::
Data.Either.Either
GHC.Base.String
FeatureFlag
)
| (\status_2 -> Network.HTTP.Types.Status.statusCode status_2 GHC.Classes.== 400) (Network.HTTP.Client.Types.responseStatus response) ->
CopyFeatureFlagResponse400
Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body ::
Data.Either.Either
GHC.Base.String
InvalidRequestErrorRep
)
| (\status_3 -> Network.HTTP.Types.Status.statusCode status_3 GHC.Classes.== 401) (Network.HTTP.Client.Types.responseStatus response) ->
CopyFeatureFlagResponse401
Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body ::
Data.Either.Either
GHC.Base.String
UnauthorizedErrorRep
)
| (\status_4 -> Network.HTTP.Types.Status.statusCode status_4 GHC.Classes.== 405) (Network.HTTP.Client.Types.responseStatus response) ->
CopyFeatureFlagResponse405
Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body ::
Data.Either.Either
GHC.Base.String
MethodNotAllowedErrorRep
)
| (\status_5 -> Network.HTTP.Types.Status.statusCode status_5 GHC.Classes.== 409) (Network.HTTP.Client.Types.responseStatus response) ->
CopyFeatureFlagResponse409
Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body ::
Data.Either.Either
GHC.Base.String
StatusConflictErrorRep
)
| (\status_6 -> Network.HTTP.Types.Status.statusCode status_6 GHC.Classes.== 429) (Network.HTTP.Client.Types.responseStatus response) ->
CopyFeatureFlagResponse429
Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body ::
Data.Either.Either
GHC.Base.String
RateLimitedErrorRep
)
| GHC.Base.otherwise -> Data.Either.Left "Missing default response type"
)
response_0
)
response_0
)
(LaunchdarklyAPI.Common.doBodyCallWithConfigurationM (Data.Text.toUpper GHC.Base.$ Data.Text.pack "POST") (Data.Text.pack ("/api/v2/flags/" GHC.Base.++ (Data.ByteString.Char8.unpack (Network.HTTP.Types.URI.urlEncode GHC.Types.True GHC.Base.$ (Data.ByteString.Char8.pack GHC.Base.$ LaunchdarklyAPI.Common.stringifyModel (copyFeatureFlagParametersPathProjKey parameters))) GHC.Base.++ ("/" GHC.Base.++ (Data.ByteString.Char8.unpack (Network.HTTP.Types.URI.urlEncode GHC.Types.True GHC.Base.$ (Data.ByteString.Char8.pack GHC.Base.$ LaunchdarklyAPI.Common.stringifyModel (copyFeatureFlagParametersPathFeatureFlagKey parameters))) GHC.Base.++ "/copy"))))) GHC.Base.mempty (GHC.Maybe.Just body) LaunchdarklyAPI.Common.RequestBodyEncodingJSON)

-- | Defines the object schema located at @paths.\/api\/v2\/flags\/{projKey}\/{featureFlagKey}\/copy.POST.parameters@ in the specification.
data CopyFeatureFlagParameters = CopyFeatureFlagParameters
{ -- | pathFeatureFlagKey: Represents the parameter named \'featureFlagKey\'
--
-- The feature flag\'s key. The key identifies the flag in your code.
--
-- The feature flag\'s key. The key identifies the flag in your code.
copyFeatureFlagParametersPathFeatureFlagKey :: Data.Text.Internal.Text,
-- | pathProjKey: Represents the parameter named \'projKey\'
--
-- The project key.
--
-- The project key.
copyFeatureFlagParametersPathProjKey :: Data.Text.Internal.Text
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)

instance Data.Aeson.Types.ToJSON.ToJSON CopyFeatureFlagParameters where
toJSON obj = Data.Aeson.Types.Internal.object ("pathFeatureFlagKey" Data.Aeson.Types.ToJSON..= copyFeatureFlagParametersPathFeatureFlagKey obj : "pathProjKey" Data.Aeson.Types.ToJSON..= copyFeatureFlagParametersPathProjKey obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("pathFeatureFlagKey" Data.Aeson.Types.ToJSON..= copyFeatureFlagParametersPathFeatureFlagKey obj) GHC.Base.<> ("pathProjKey" Data.Aeson.Types.ToJSON..= copyFeatureFlagParametersPathProjKey obj))

instance Data.Aeson.Types.FromJSON.FromJSON CopyFeatureFlagParameters where
parseJSON = Data.Aeson.Types.FromJSON.withObject "CopyFeatureFlagParameters" (\obj -> (GHC.Base.pure CopyFeatureFlagParameters GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "pathFeatureFlagKey")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "pathProjKey"))

-- | Create a new 'CopyFeatureFlagParameters' with all required fields.
mkCopyFeatureFlagParameters ::
-- | 'copyFeatureFlagParametersPathFeatureFlagKey'
Data.Text.Internal.Text ->
-- | 'copyFeatureFlagParametersPathProjKey'
Data.Text.Internal.Text ->
CopyFeatureFlagParameters
mkCopyFeatureFlagParameters copyFeatureFlagParametersPathFeatureFlagKey copyFeatureFlagParametersPathProjKey =
CopyFeatureFlagParameters
{ copyFeatureFlagParametersPathFeatureFlagKey = copyFeatureFlagParametersPathFeatureFlagKey,
copyFeatureFlagParametersPathProjKey = copyFeatureFlagParametersPathProjKey
}

-- | Represents a response of the operation 'copyFeatureFlag'.
--
-- The response constructor is chosen by the status code of the response. If no case matches (no specific case for the response code, no range case, no default case), 'CopyFeatureFlagResponseError' is used.
data CopyFeatureFlagResponse
= -- | Means either no matching case available or a parse error
CopyFeatureFlagResponseError GHC.Base.String
| -- | Global flag response
CopyFeatureFlagResponse201 FeatureFlag
| -- | Invalid request
CopyFeatureFlagResponse400 InvalidRequestErrorRep
| -- | Invalid access token
CopyFeatureFlagResponse401 UnauthorizedErrorRep
| -- | Method not allowed
CopyFeatureFlagResponse405 MethodNotAllowedErrorRep
| -- | Status conflict
CopyFeatureFlagResponse409 StatusConflictErrorRep
| -- | Rate limited
CopyFeatureFlagResponse429 RateLimitedErrorRep
deriving (GHC.Show.Show, GHC.Classes.Eq)

+ 133
- 0
src/LaunchdarklyAPI/Operations/CreateSubscription.hs View File

@@ -0,0 +1,133 @@
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
-- CHANGE WITH CAUTION: This is a generated code file generated by https://github.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator.
{-# LANGUAGE OverloadedStrings #-}

-- | Contains the different functions to run the operation createSubscription
module LaunchdarklyAPI.Operations.CreateSubscription where

import qualified Control.Monad.Fail
import qualified Control.Monad.Trans.Reader
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
import qualified Data.Aeson as Data.Aeson.Types
import qualified Data.Aeson as Data.Aeson.Types.FromJSON
import qualified Data.Aeson as Data.Aeson.Types.Internal
import qualified Data.Aeson as Data.Aeson.Types.ToJSON
import qualified Data.ByteString.Char8
import qualified Data.ByteString.Char8 as Data.ByteString.Internal
import qualified Data.Either
import qualified Data.Functor
import qualified Data.Scientific
import qualified Data.Text
import qualified Data.Text.Internal
import qualified Data.Time.Calendar as Data.Time.Calendar.Days
import qualified Data.Time.LocalTime as Data.Time.LocalTime.Internal.ZonedTime
import qualified Data.Vector
import qualified GHC.Base
import qualified GHC.Classes
import qualified GHC.Int
import qualified GHC.Show
import qualified GHC.Types
import qualified LaunchdarklyAPI.Common
import LaunchdarklyAPI.Types
import qualified Network.HTTP.Client
import qualified Network.HTTP.Client as Network.HTTP.Client.Request
import qualified Network.HTTP.Client as Network.HTTP.Client.Types
import qualified Network.HTTP.Simple
import qualified Network.HTTP.Types
import qualified Network.HTTP.Types as Network.HTTP.Types.Status
import qualified Network.HTTP.Types as Network.HTTP.Types.URI
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe

-- | > POST /api/v2/integrations/{integrationKey}
--
-- Create an audit log subscription.
createSubscription ::
forall m.
LaunchdarklyAPI.Common.MonadHTTP m =>
-- | integrationKey: The integration key
Data.Text.Internal.Text ->
-- | The request body to send
SubscriptionPost ->
-- | Monadic computation which returns the result of the operation
LaunchdarklyAPI.Common.ClientT m (Network.HTTP.Client.Types.Response CreateSubscriptionResponse)
createSubscription
integrationKey
body =
GHC.Base.fmap
( \response_0 ->
GHC.Base.fmap
( Data.Either.either CreateSubscriptionResponseError GHC.Base.id
GHC.Base.. ( \response body ->
if
| (\status_1 -> Network.HTTP.Types.Status.statusCode status_1 GHC.Classes.== 201) (Network.HTTP.Client.Types.responseStatus response) ->
CreateSubscriptionResponse201
Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body ::
Data.Either.Either
GHC.Base.String
Integration
)
| (\status_2 -> Network.HTTP.Types.Status.statusCode status_2 GHC.Classes.== 400) (Network.HTTP.Client.Types.responseStatus response) ->
CreateSubscriptionResponse400
Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body ::
Data.Either.Either
GHC.Base.String
InvalidRequestErrorRep
)
| (\status_3 -> Network.HTTP.Types.Status.statusCode status_3 GHC.Classes.== 401) (Network.HTTP.Client.Types.responseStatus response) ->
CreateSubscriptionResponse401
Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body ::
Data.Either.Either
GHC.Base.String
UnauthorizedErrorRep
)
| (\status_4 -> Network.HTTP.Types.Status.statusCode status_4 GHC.Classes.== 403) (Network.HTTP.Client.Types.responseStatus response) ->
CreateSubscriptionResponse403
Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body ::
Data.Either.Either
GHC.Base.String
ForbiddenErrorRep
)
| (\status_5 -> Network.HTTP.Types.Status.statusCode status_5 GHC.Classes.== 404) (Network.HTTP.Client.Types.responseStatus response) ->
CreateSubscriptionResponse404
Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body ::
Data.Either.Either
GHC.Base.String
NotFoundErrorRep
)
| (\status_6 -> Network.HTTP.Types.Status.statusCode status_6 GHC.Classes.== 429) (Network.HTTP.Client.Types.responseStatus response) ->
CreateSubscriptionResponse429
Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body ::
Data.Either.Either
GHC.Base.String
RateLimitedErrorRep
)
| GHC.Base.otherwise -> Data.Either.Left "Missing default response type"
)
response_0
)
response_0
)
(LaunchdarklyAPI.Common.doBodyCallWithConfigurationM (Data.Text.toUpper GHC.Base.$ Data.Text.pack "POST") (Data.Text.pack ("/api/v2/integrations/" GHC.Base.++ (Data.ByteString.Char8.unpack (Network.HTTP.Types.URI.urlEncode GHC.Types.True GHC.Base.$ (Data.ByteString.Char8.pack GHC.Base.$ LaunchdarklyAPI.Common.stringifyModel integrationKey)) GHC.Base.++ ""))) GHC.Base.mempty (GHC.Maybe.Just body) LaunchdarklyAPI.Common.RequestBodyEncodingJSON)

-- | Represents a response of the operation 'createSubscription'.
--
-- The response constructor is chosen by the status code of the response. If no case matches (no specific case for the response code, no range case, no default case), 'CreateSubscriptionResponseError' is used.
data CreateSubscriptionResponse
= -- | Means either no matching case available or a parse error
CreateSubscriptionResponseError GHC.Base.String
| -- | Successful integration
CreateSubscriptionResponse201 Integration
| -- | Invalid request
CreateSubscriptionResponse400 InvalidRequestErrorRep
| -- | Invalid access token
CreateSubscriptionResponse401 UnauthorizedErrorRep
| -- | Forbidden
CreateSubscriptionResponse403 ForbiddenErrorRep
| -- | Invalid resource identifier
CreateSubscriptionResponse404 NotFoundErrorRep
| -- | Rate limited
CreateSubscriptionResponse429 RateLimitedErrorRep
deriving (GHC.Show.Show, GHC.Classes.Eq)

+ 182
- 0
src/LaunchdarklyAPI/Operations/CreateTriggerWorkflow.hs View File

@@ -0,0 +1,182 @@
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
-- CHANGE WITH CAUTION: This is a generated code file generated by https://github.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator.
{-# LANGUAGE OverloadedStrings #-}

-- | Contains the different functions to run the operation createTriggerWorkflow
module LaunchdarklyAPI.Operations.CreateTriggerWorkflow where

import qualified Control.Monad.Fail
import qualified Control.Monad.Trans.Reader
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
import qualified Data.Aeson as Data.Aeson.Types
import qualified Data.Aeson as Data.Aeson.Types.FromJSON
import qualified Data.Aeson as Data.Aeson.Types.Internal
import qualified Data.Aeson as Data.Aeson.Types.ToJSON
import qualified Data.ByteString.Char8
import qualified Data.ByteString.Char8 as Data.ByteString.Internal
import qualified Data.Either
import qualified Data.Functor
import qualified Data.Scientific
import qualified Data.Text
import qualified Data.Text.Internal
import qualified Data.Time.Calendar as Data.Time.Calendar.Days
import qualified Data.Time.LocalTime as Data.Time.LocalTime.Internal.ZonedTime
import qualified Data.Vector
import qualified GHC.Base
import qualified GHC.Classes
import qualified GHC.Int
import qualified GHC.Show
import qualified GHC.Types
import qualified LaunchdarklyAPI.Common
import LaunchdarklyAPI.Types
import qualified Network.HTTP.Client
import qualified Network.HTTP.Client as Network.HTTP.Client.Request
import qualified Network.HTTP.Client as Network.HTTP.Client.Types
import qualified Network.HTTP.Simple
import qualified Network.HTTP.Types
import qualified Network.HTTP.Types as Network.HTTP.Types.Status
import qualified Network.HTTP.Types as Network.HTTP.Types.URI
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe

-- | > POST /api/v2/flags/{projKey}/{flagKey}/triggers/{envKey}
--
-- Create a new flag trigger. Triggers let you initiate changes to flag targeting remotely using a unique webhook URL.
createTriggerWorkflow ::
forall m.
LaunchdarklyAPI.Common.MonadHTTP m =>
-- | Contains all available parameters of this operation (query and path parameters)
CreateTriggerWorkflowParameters ->
-- | The request body to send
TriggerPost ->
-- | Monadic computation which returns the result of the operation
LaunchdarklyAPI.Common.ClientT m (Network.HTTP.Client.Types.Response CreateTriggerWorkflowResponse)
createTriggerWorkflow
parameters
body =
GHC.Base.fmap
( \response_0 ->
GHC.Base.fmap
( Data.Either.either CreateTriggerWorkflowResponseError GHC.Base.id
GHC.Base.. ( \response body ->
if
| (\status_1 -> Network.HTTP.Types.Status.statusCode status_1 GHC.Classes.== 201) (Network.HTTP.Client.Types.responseStatus response) ->
CreateTriggerWorkflowResponse201
Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body ::
Data.Either.Either
GHC.Base.String
TriggerWorkflowRep
)
| (\status_2 -> Network.HTTP.Types.Status.statusCode status_2 GHC.Classes.== 400) (Network.HTTP.Client.Types.responseStatus response) ->
CreateTriggerWorkflowResponse400
Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body ::
Data.Either.Either
GHC.Base.String
InvalidRequestErrorRep
)
| (\status_3 -> Network.HTTP.Types.Status.statusCode status_3 GHC.Classes.== 401) (Network.HTTP.Client.Types.responseStatus response) ->
CreateTriggerWorkflowResponse401
Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body ::
Data.Either.Either
GHC.Base.String
UnauthorizedErrorRep
)
| (\status_4 -> Network.HTTP.Types.Status.statusCode status_4 GHC.Classes.== 403) (Network.HTTP.Client.Types.responseStatus response) ->
CreateTriggerWorkflowResponse403
Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body ::
Data.Either.Either
GHC.Base.String
ForbiddenErrorRep
)
| (\status_5 -> Network.HTTP.Types.Status.statusCode status_5 GHC.Classes.== 404) (Network.HTTP.Client.Types.responseStatus response) ->
CreateTriggerWorkflowResponse404
Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body ::
Data.Either.Either
GHC.Base.String
NotFoundErrorRep
)
| (\status_6 -> Network.HTTP.Types.Status.statusCode status_6 GHC.Classes.== 429) (Network.HTTP.Client.Types.responseStatus response) ->
CreateTriggerWorkflowResponse429
Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body ::
Data.Either.Either
GHC.Base.String
RateLimitedErrorRep
)
| GHC.Base.otherwise -> Data.Either.Left "Missing default response type"
)
response_0
)
response_0
)
(LaunchdarklyAPI.Common.doBodyCallWithConfigurationM (Data.Text.toUpper GHC.Base.$ Data.Text.pack "POST") (Data.Text.pack ("/api/v2/flags/" GHC.Base.++ (Data.ByteString.Char8.unpack (Network.HTTP.Types.URI.urlEncode GHC.Types.True GHC.Base.$ (Data.ByteString.Char8.pack GHC.Base.$ LaunchdarklyAPI.Common.stringifyModel (createTriggerWorkflowParametersPathProjKey parameters))) GHC.Base.++ (("/" GHC.Base.++ (Data.ByteString.Char8.unpack (Network.HTTP.Types.URI.urlEncode GHC.Types.True GHC.Base.$ (Data.ByteString.Char8.pack GHC.Base.$ LaunchdarklyAPI.Common.stringifyModel (createTriggerWorkflowParametersPathFlagKey parameters))) GHC.Base.++ "/triggers/")) GHC.Base.++ (Data.ByteString.Char8.unpack (Network.HTTP.Types.URI.urlEncode GHC.Types.True GHC.Base.$ (Data.ByteString.Char8.pack GHC.Base.$ LaunchdarklyAPI.Common.stringifyModel (createTriggerWorkflowParametersPathEnvKey parameters))) GHC.Base.++ ""))))) GHC.Base.mempty (GHC.Maybe.Just body) LaunchdarklyAPI.Common.RequestBodyEncodingJSON)

-- | Defines the object schema located at @paths.\/api\/v2\/flags\/{projKey}\/{flagKey}\/triggers\/{envKey}.POST.parameters@ in the specification.
data CreateTriggerWorkflowParameters = CreateTriggerWorkflowParameters
{ -- | pathEnvKey: Represents the parameter named \'envKey\'
--
-- The environment key
--
-- The environment key
createTriggerWorkflowParametersPathEnvKey :: Data.Text.Internal.Text,
-- | pathFlagKey: Represents the parameter named \'flagKey\'
--
-- The flag key
--
-- The flag key
createTriggerWorkflowParametersPathFlagKey :: Data.Text.Internal.Text,
-- | pathProjKey: Represents the parameter named \'projKey\'
--
-- The project key
--
-- The project key
createTriggerWorkflowParametersPathProjKey :: Data.Text.Internal.Text
}
deriving
( GHC.Show.Show,
GHC.Classes.Eq
)

instance Data.Aeson.Types.ToJSON.ToJSON CreateTriggerWorkflowParameters where
toJSON obj = Data.Aeson.Types.Internal.object ("pathEnvKey" Data.Aeson.Types.ToJSON..= createTriggerWorkflowParametersPathEnvKey obj : "pathFlagKey" Data.Aeson.Types.ToJSON..= createTriggerWorkflowParametersPathFlagKey obj : "pathProjKey" Data.Aeson.Types.ToJSON..= createTriggerWorkflowParametersPathProjKey obj : GHC.Base.mempty)
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("pathEnvKey" Data.Aeson.Types.ToJSON..= createTriggerWorkflowParametersPathEnvKey obj) GHC.Base.<> (("pathFlagKey" Data.Aeson.Types.ToJSON..= createTriggerWorkflowParametersPathFlagKey obj) GHC.Base.<> ("pathProjKey" Data.Aeson.Types.ToJSON..= createTriggerWorkflowParametersPathProjKey obj)))

instance Data.Aeson.Types.FromJSON.FromJSON CreateTriggerWorkflowParameters where
parseJSON = Data.Aeson.Types.FromJSON.withObject "CreateTriggerWorkflowParameters" (\obj -> ((GHC.Base.pure CreateTriggerWorkflowParameters GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "pathEnvKey")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "pathFlagKey")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "pathProjKey"))

-- | Create a new 'CreateTriggerWorkflowParameters' with all required fields.
mkCreateTriggerWorkflowParameters ::
-- | 'createTriggerWorkflowParametersPathEnvKey'
Data.Text.Internal.Text ->
-- | 'createTriggerWorkflowParametersPathFlagKey'
Data.Text.Internal.Text ->
-- | 'createTriggerWorkflowParametersPathProjKey'
Data.Text.Internal.Text ->
CreateTriggerWorkflowParameters
mkCreateTriggerWorkflowParameters createTriggerWorkflowParametersPathEnvKey createTriggerWorkflowParametersPathFlagKey createTriggerWorkflowParametersPathProjKey =
CreateTriggerWorkflowParameters
{ createTriggerWorkflowParametersPathEnvKey = createTriggerWorkflowParametersPathEnvKey,
createTriggerWorkflowParametersPathFlagKey = createTriggerWorkflowParametersPathFlagKey,
createTriggerWorkflowParametersPathProjKey = createTriggerWorkflowParametersPathProjKey
}

-- | Represents a response of the operation 'createTriggerWorkflow'.
--
-- The response constructor is chosen by the status code of the response. If no case matches (no specific case for the response code, no range case, no default case), 'CreateTriggerWorkflowResponseError' is used.
data CreateTriggerWorkflowResponse
= -- | Means either no matching case available or a parse error
CreateTriggerWorkflowResponseError GHC.Base.String
| -- | Successful flag trigger response
CreateTriggerWorkflowResponse201 TriggerWorkflowRep
| -- | Invalid request
CreateTriggerWorkflowResponse400 InvalidRequestErrorRep
| -- | Invalid access token
CreateTriggerWorkflowResponse401 UnauthorizedErrorRep
| -- | Forbidden
CreateTriggerWorkflowResponse403 ForbiddenErrorRep
| -- | Invalid resource identifier
CreateTriggerWorkflowResponse404 NotFoundErrorRep
| -- | Rate limited
CreateTriggerWorkflowResponse429 RateLimitedErrorRep
deriving (GHC.Show.Show, GHC.Classes.Eq)

+ 172
- 0
src/LaunchdarklyAPI/Operations/DeleteApprovalRequest.hs View File

@@ -0,0 +1,172 @@
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
-- CHANGE WITH CAUTION: This is a generated code file generated by https://github.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator.
{-# LANGUAGE OverloadedStrings #-}

-- | Contains the different functions to run the operation deleteApprovalRequest
module LaunchdarklyAPI.Operations.DeleteApprovalRequest where

import qualified Control.Monad.Fail
import qualified Control.Monad.Trans.Reader
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
import qualified Data.Aeson as Data.Aeson.Types