launchdarkly_api 2.0.33 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +168 -154
  3. data/docs/Clause.md +1 -0
  4. data/docs/FeatureFlags.md +1 -0
  5. data/docs/FeatureFlagsApi.md +133 -4
  6. data/docs/Member.md +1 -0
  7. data/docs/Members.md +1 -0
  8. data/docs/SemanticPatchOperation.md +9 -0
  9. data/docs/SemanticPatchOperationInstructions.md +8 -0
  10. data/docs/TeamMembersApi.md +63 -3
  11. data/docs/UserSegmentsApi.md +121 -0
  12. data/docs/UserSettingsApi.md +121 -0
  13. data/docs/UserTargetingExpirationForFlag.md +14 -0
  14. data/docs/UserTargetingExpirationForFlags.md +9 -0
  15. data/docs/UserTargetingExpirationForSegment.md +14 -0
  16. data/docs/UserTargetingExpirationOnFlagsForUser.md +9 -0
  17. data/docs/UserTargetingExpirationResourceIdForFlag.md +12 -0
  18. data/docs/Variation.md +1 -0
  19. data/launchdarkly_api.gemspec +1 -1
  20. data/lib/launchdarkly_api.rb +8 -1
  21. data/lib/launchdarkly_api/api/audit_log_api.rb +1 -1
  22. data/lib/launchdarkly_api/api/custom_roles_api.rb +1 -1
  23. data/lib/launchdarkly_api/api/customer_metrics_api.rb +1 -1
  24. data/lib/launchdarkly_api/api/data_export_destinations_api.rb +1 -1
  25. data/lib/launchdarkly_api/api/environments_api.rb +1 -1
  26. data/lib/launchdarkly_api/api/feature_flags_api.rb +153 -7
  27. data/lib/launchdarkly_api/api/projects_api.rb +1 -1
  28. data/lib/launchdarkly_api/api/root_api.rb +1 -1
  29. data/lib/launchdarkly_api/api/team_members_api.rb +59 -1
  30. data/lib/launchdarkly_api/api/user_segments_api.rb +135 -1
  31. data/lib/launchdarkly_api/api/user_settings_api.rb +135 -1
  32. data/lib/launchdarkly_api/api/users_api.rb +1 -1
  33. data/lib/launchdarkly_api/api/webhooks_api.rb +1 -1
  34. data/lib/launchdarkly_api/api_client.rb +1 -1
  35. data/lib/launchdarkly_api/api_error.rb +1 -1
  36. data/lib/launchdarkly_api/configuration.rb +1 -1
  37. data/lib/launchdarkly_api/models/audit_log_entries.rb +1 -1
  38. data/lib/launchdarkly_api/models/audit_log_entry.rb +1 -1
  39. data/lib/launchdarkly_api/models/audit_log_entry_target.rb +1 -1
  40. data/lib/launchdarkly_api/models/clause.rb +11 -2
  41. data/lib/launchdarkly_api/models/copy_actions.rb +1 -1
  42. data/lib/launchdarkly_api/models/custom_property.rb +1 -1
  43. data/lib/launchdarkly_api/models/custom_property_values.rb +1 -1
  44. data/lib/launchdarkly_api/models/custom_role.rb +1 -1
  45. data/lib/launchdarkly_api/models/custom_role_body.rb +1 -1
  46. data/lib/launchdarkly_api/models/custom_roles.rb +1 -1
  47. data/lib/launchdarkly_api/models/defaults.rb +1 -1
  48. data/lib/launchdarkly_api/models/destination.rb +1 -1
  49. data/lib/launchdarkly_api/models/destination_amazon_kinesis.rb +1 -1
  50. data/lib/launchdarkly_api/models/destination_body.rb +1 -1
  51. data/lib/launchdarkly_api/models/destination_google_pub_sub.rb +1 -1
  52. data/lib/launchdarkly_api/models/destination_m_particle.rb +1 -1
  53. data/lib/launchdarkly_api/models/destination_segment.rb +1 -1
  54. data/lib/launchdarkly_api/models/destinations.rb +1 -1
  55. data/lib/launchdarkly_api/models/environment.rb +1 -1
  56. data/lib/launchdarkly_api/models/environment_post.rb +1 -1
  57. data/lib/launchdarkly_api/models/evaluation_usage_error.rb +1 -1
  58. data/lib/launchdarkly_api/models/events.rb +1 -1
  59. data/lib/launchdarkly_api/models/fallthrough.rb +1 -1
  60. data/lib/launchdarkly_api/models/feature_flag.rb +1 -1
  61. data/lib/launchdarkly_api/models/feature_flag_body.rb +1 -1
  62. data/lib/launchdarkly_api/models/feature_flag_config.rb +1 -1
  63. data/lib/launchdarkly_api/models/feature_flag_copy_body.rb +1 -1
  64. data/lib/launchdarkly_api/models/feature_flag_copy_object.rb +1 -1
  65. data/lib/launchdarkly_api/models/feature_flag_status.rb +1 -1
  66. data/lib/launchdarkly_api/models/feature_flag_status_across_environments.rb +1 -1
  67. data/lib/launchdarkly_api/models/feature_flag_status_for_queried_environment.rb +1 -1
  68. data/lib/launchdarkly_api/models/feature_flag_statuses.rb +1 -1
  69. data/lib/launchdarkly_api/models/feature_flags.rb +14 -5
  70. data/lib/launchdarkly_api/models/flag_list_item.rb +1 -1
  71. data/lib/launchdarkly_api/models/id.rb +1 -1
  72. data/lib/launchdarkly_api/models/link.rb +1 -1
  73. data/lib/launchdarkly_api/models/links.rb +1 -1
  74. data/lib/launchdarkly_api/models/ma_uby_category.rb +1 -1
  75. data/lib/launchdarkly_api/models/mau.rb +1 -1
  76. data/lib/launchdarkly_api/models/mau_metadata.rb +1 -1
  77. data/lib/launchdarkly_api/models/member.rb +11 -2
  78. data/lib/launchdarkly_api/models/members.rb +14 -5
  79. data/lib/launchdarkly_api/models/members_body.rb +1 -1
  80. data/lib/launchdarkly_api/models/patch_comment.rb +1 -1
  81. data/lib/launchdarkly_api/models/patch_operation.rb +1 -1
  82. data/lib/launchdarkly_api/models/policy.rb +1 -1
  83. data/lib/launchdarkly_api/models/prerequisite.rb +1 -1
  84. data/lib/launchdarkly_api/models/project.rb +1 -1
  85. data/lib/launchdarkly_api/models/project_body.rb +1 -1
  86. data/lib/launchdarkly_api/models/projects.rb +1 -1
  87. data/lib/launchdarkly_api/models/role.rb +1 -1
  88. data/lib/launchdarkly_api/models/rollout.rb +1 -1
  89. data/lib/launchdarkly_api/models/rule.rb +1 -1
  90. data/lib/launchdarkly_api/models/semantic_patch_operation.rb +199 -0
  91. data/lib/launchdarkly_api/models/semantic_patch_operation_instructions.rb +184 -0
  92. data/lib/launchdarkly_api/models/site.rb +1 -1
  93. data/lib/launchdarkly_api/models/statement.rb +1 -1
  94. data/lib/launchdarkly_api/models/stream.rb +1 -1
  95. data/lib/launchdarkly_api/models/stream_by_sdk.rb +1 -1
  96. data/lib/launchdarkly_api/models/stream_by_sdk_links.rb +1 -1
  97. data/lib/launchdarkly_api/models/stream_by_sdk_links_metadata.rb +1 -1
  98. data/lib/launchdarkly_api/models/stream_links.rb +1 -1
  99. data/lib/launchdarkly_api/models/stream_sdk_version.rb +1 -1
  100. data/lib/launchdarkly_api/models/stream_sdk_version_data.rb +1 -1
  101. data/lib/launchdarkly_api/models/stream_usage_error.rb +1 -1
  102. data/lib/launchdarkly_api/models/stream_usage_links.rb +1 -1
  103. data/lib/launchdarkly_api/models/stream_usage_metadata.rb +1 -1
  104. data/lib/launchdarkly_api/models/stream_usage_series.rb +1 -1
  105. data/lib/launchdarkly_api/models/streams.rb +1 -1
  106. data/lib/launchdarkly_api/models/target.rb +1 -1
  107. data/lib/launchdarkly_api/models/usage.rb +1 -1
  108. data/lib/launchdarkly_api/models/usage_error.rb +1 -1
  109. data/lib/launchdarkly_api/models/usage_links.rb +1 -1
  110. data/lib/launchdarkly_api/models/user.rb +1 -1
  111. data/lib/launchdarkly_api/models/user_flag_setting.rb +1 -1
  112. data/lib/launchdarkly_api/models/user_flag_settings.rb +1 -1
  113. data/lib/launchdarkly_api/models/user_record.rb +1 -1
  114. data/lib/launchdarkly_api/models/user_segment.rb +1 -1
  115. data/lib/launchdarkly_api/models/user_segment_body.rb +1 -1
  116. data/lib/launchdarkly_api/models/user_segment_rule.rb +1 -1
  117. data/lib/launchdarkly_api/models/user_segments.rb +1 -1
  118. data/lib/launchdarkly_api/models/user_settings_body.rb +1 -1
  119. data/lib/launchdarkly_api/models/user_targeting_expiration_for_flag.rb +240 -0
  120. data/lib/launchdarkly_api/models/user_targeting_expiration_for_flags.rb +194 -0
  121. data/lib/launchdarkly_api/models/user_targeting_expiration_for_segment.rb +240 -0
  122. data/lib/launchdarkly_api/models/user_targeting_expiration_on_flags_for_user.rb +194 -0
  123. data/lib/launchdarkly_api/models/user_targeting_expiration_resource_id_for_flag.rb +219 -0
  124. data/lib/launchdarkly_api/models/users.rb +1 -1
  125. data/lib/launchdarkly_api/models/variation.rb +11 -2
  126. data/lib/launchdarkly_api/models/webhook.rb +1 -1
  127. data/lib/launchdarkly_api/models/webhook_body.rb +1 -1
  128. data/lib/launchdarkly_api/models/webhooks.rb +1 -1
  129. data/lib/launchdarkly_api/models/weighted_variation.rb +1 -1
  130. data/lib/launchdarkly_api/version.rb +2 -2
  131. data/openapi.yml +301 -4
  132. data/spec/api/audit_log_api_spec.rb +1 -1
  133. data/spec/api/custom_roles_api_spec.rb +1 -1
  134. data/spec/api/customer_metrics_api_spec.rb +1 -1
  135. data/spec/api/data_export_destinations_api_spec.rb +1 -1
  136. data/spec/api/environments_api_spec.rb +1 -1
  137. data/spec/api/feature_flags_api_spec.rb +34 -3
  138. data/spec/api/projects_api_spec.rb +1 -1
  139. data/spec/api/root_api_spec.rb +1 -1
  140. data/spec/api/team_members_api_spec.rb +15 -1
  141. data/spec/api/user_segments_api_spec.rb +28 -1
  142. data/spec/api/user_settings_api_spec.rb +28 -1
  143. data/spec/api/users_api_spec.rb +1 -1
  144. data/spec/api/webhooks_api_spec.rb +1 -1
  145. data/spec/api_client_spec.rb +1 -1
  146. data/spec/configuration_spec.rb +1 -1
  147. data/spec/models/audit_log_entries_spec.rb +1 -1
  148. data/spec/models/audit_log_entry_spec.rb +1 -1
  149. data/spec/models/audit_log_entry_target_spec.rb +1 -1
  150. data/spec/models/clause_spec.rb +7 -1
  151. data/spec/models/copy_actions_spec.rb +1 -1
  152. data/spec/models/custom_property_spec.rb +1 -1
  153. data/spec/models/custom_property_values_spec.rb +1 -1
  154. data/spec/models/custom_role_body_spec.rb +1 -1
  155. data/spec/models/custom_role_spec.rb +1 -1
  156. data/spec/models/custom_roles_spec.rb +1 -1
  157. data/spec/models/defaults_spec.rb +1 -1
  158. data/spec/models/destination_amazon_kinesis_spec.rb +1 -1
  159. data/spec/models/destination_body_spec.rb +1 -1
  160. data/spec/models/destination_google_pub_sub_spec.rb +1 -1
  161. data/spec/models/destination_m_particle_spec.rb +1 -1
  162. data/spec/models/destination_segment_spec.rb +1 -1
  163. data/spec/models/destination_spec.rb +1 -1
  164. data/spec/models/destinations_spec.rb +1 -1
  165. data/spec/models/environment_post_spec.rb +1 -1
  166. data/spec/models/environment_spec.rb +1 -1
  167. data/spec/models/evaluation_usage_error_spec.rb +1 -1
  168. data/spec/models/events_spec.rb +1 -1
  169. data/spec/models/fallthrough_spec.rb +1 -1
  170. data/spec/models/feature_flag_body_spec.rb +1 -1
  171. data/spec/models/feature_flag_config_spec.rb +1 -1
  172. data/spec/models/feature_flag_copy_body_spec.rb +1 -1
  173. data/spec/models/feature_flag_copy_object_spec.rb +1 -1
  174. data/spec/models/feature_flag_spec.rb +1 -1
  175. data/spec/models/feature_flag_status_across_environments_spec.rb +1 -1
  176. data/spec/models/feature_flag_status_for_queried_environment_spec.rb +1 -1
  177. data/spec/models/feature_flag_status_spec.rb +1 -1
  178. data/spec/models/feature_flag_statuses_spec.rb +1 -1
  179. data/spec/models/feature_flags_spec.rb +7 -1
  180. data/spec/models/flag_list_item_spec.rb +1 -1
  181. data/spec/models/id_spec.rb +1 -1
  182. data/spec/models/link_spec.rb +1 -1
  183. data/spec/models/links_spec.rb +1 -1
  184. data/spec/models/ma_uby_category_spec.rb +1 -1
  185. data/spec/models/mau_metadata_spec.rb +1 -1
  186. data/spec/models/mau_spec.rb +1 -1
  187. data/spec/models/member_spec.rb +7 -1
  188. data/spec/models/members_body_spec.rb +1 -1
  189. data/spec/models/members_spec.rb +7 -1
  190. data/spec/models/patch_comment_spec.rb +1 -1
  191. data/spec/models/patch_operation_spec.rb +1 -1
  192. data/spec/models/policy_spec.rb +1 -1
  193. data/spec/models/prerequisite_spec.rb +1 -1
  194. data/spec/models/project_body_spec.rb +1 -1
  195. data/spec/models/project_spec.rb +1 -1
  196. data/spec/models/projects_spec.rb +1 -1
  197. data/spec/models/role_spec.rb +1 -1
  198. data/spec/models/rollout_spec.rb +1 -1
  199. data/spec/models/rule_spec.rb +1 -1
  200. data/spec/models/semantic_patch_operation_instructions_spec.rb +41 -0
  201. data/spec/models/semantic_patch_operation_spec.rb +47 -0
  202. data/spec/models/site_spec.rb +1 -1
  203. data/spec/models/statement_spec.rb +1 -1
  204. data/spec/models/stream_by_sdk_links_metadata_spec.rb +1 -1
  205. data/spec/models/stream_by_sdk_links_spec.rb +1 -1
  206. data/spec/models/stream_by_sdk_spec.rb +1 -1
  207. data/spec/models/stream_links_spec.rb +1 -1
  208. data/spec/models/stream_sdk_version_data_spec.rb +1 -1
  209. data/spec/models/stream_sdk_version_spec.rb +1 -1
  210. data/spec/models/stream_spec.rb +1 -1
  211. data/spec/models/stream_usage_error_spec.rb +1 -1
  212. data/spec/models/stream_usage_links_spec.rb +1 -1
  213. data/spec/models/stream_usage_metadata_spec.rb +1 -1
  214. data/spec/models/stream_usage_series_spec.rb +1 -1
  215. data/spec/models/streams_spec.rb +1 -1
  216. data/spec/models/target_spec.rb +1 -1
  217. data/spec/models/usage_error_spec.rb +1 -1
  218. data/spec/models/usage_links_spec.rb +1 -1
  219. data/spec/models/usage_spec.rb +1 -1
  220. data/spec/models/user_flag_setting_spec.rb +1 -1
  221. data/spec/models/user_flag_settings_spec.rb +1 -1
  222. data/spec/models/user_record_spec.rb +1 -1
  223. data/spec/models/user_segment_body_spec.rb +1 -1
  224. data/spec/models/user_segment_rule_spec.rb +1 -1
  225. data/spec/models/user_segment_spec.rb +1 -1
  226. data/spec/models/user_segments_spec.rb +1 -1
  227. data/spec/models/user_settings_body_spec.rb +1 -1
  228. data/spec/models/user_spec.rb +1 -1
  229. data/spec/models/user_targeting_expiration_for_flag_spec.rb +77 -0
  230. data/spec/models/user_targeting_expiration_for_flags_spec.rb +47 -0
  231. data/spec/models/user_targeting_expiration_for_segment_spec.rb +77 -0
  232. data/spec/models/user_targeting_expiration_on_flags_for_user_spec.rb +47 -0
  233. data/spec/models/user_targeting_expiration_resource_id_for_flag_spec.rb +65 -0
  234. data/spec/models/users_spec.rb +1 -1
  235. data/spec/models/variation_spec.rb +7 -1
  236. data/spec/models/webhook_body_spec.rb +1 -1
  237. data/spec/models/webhook_spec.rb +1 -1
  238. data/spec/models/webhooks_spec.rb +1 -1
  239. data/spec/models/weighted_variation_spec.rb +1 -1
  240. data/spec/spec_helper.rb +1 -1
  241. metadata +111 -83
@@ -0,0 +1,219 @@
1
+ =begin
2
+ #LaunchDarkly REST API
3
+
4
+ #Build custom integrations with the LaunchDarkly REST API
5
+
6
+ OpenAPI spec version: 3.3.1
7
+ Contact: support@launchdarkly.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.8
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module LaunchDarklyApi
16
+ class UserTargetingExpirationResourceIdForFlag
17
+ attr_accessor :kind
18
+
19
+ attr_accessor :project_key
20
+
21
+ attr_accessor :environment_key
22
+
23
+ attr_accessor :flag_key
24
+
25
+ attr_accessor :key
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'kind' => :'kind',
31
+ :'project_key' => :'projectKey',
32
+ :'environment_key' => :'environmentKey',
33
+ :'flag_key' => :'flagKey',
34
+ :'key' => :'key'
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.swagger_types
40
+ {
41
+ :'kind' => :'String',
42
+ :'project_key' => :'String',
43
+ :'environment_key' => :'String',
44
+ :'flag_key' => :'String',
45
+ :'key' => :'String'
46
+ }
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ return unless attributes.is_a?(Hash)
53
+
54
+ # convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
56
+
57
+ if attributes.has_key?(:'kind')
58
+ self.kind = attributes[:'kind']
59
+ end
60
+
61
+ if attributes.has_key?(:'projectKey')
62
+ self.project_key = attributes[:'projectKey']
63
+ end
64
+
65
+ if attributes.has_key?(:'environmentKey')
66
+ self.environment_key = attributes[:'environmentKey']
67
+ end
68
+
69
+ if attributes.has_key?(:'flagKey')
70
+ self.flag_key = attributes[:'flagKey']
71
+ end
72
+
73
+ if attributes.has_key?(:'key')
74
+ self.key = attributes[:'key']
75
+ end
76
+ end
77
+
78
+ # Show invalid properties with the reasons. Usually used together with valid?
79
+ # @return Array for valid properties with the reasons
80
+ def list_invalid_properties
81
+ invalid_properties = Array.new
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ true
89
+ end
90
+
91
+ # Checks equality by comparing each attribute.
92
+ # @param [Object] Object to be compared
93
+ def ==(o)
94
+ return true if self.equal?(o)
95
+ self.class == o.class &&
96
+ kind == o.kind &&
97
+ project_key == o.project_key &&
98
+ environment_key == o.environment_key &&
99
+ flag_key == o.flag_key &&
100
+ key == o.key
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] Object to be compared
105
+ def eql?(o)
106
+ self == o
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Fixnum] Hash code
111
+ def hash
112
+ [kind, project_key, environment_key, flag_key, key].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ self.class.swagger_types.each_pair do |key, type|
121
+ if type =~ /\AArray<(.*)>/i
122
+ # check to ensure the input is an array given that the the attribute
123
+ # is documented as an array but the input is not
124
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
125
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
126
+ end
127
+ elsif !attributes[self.class.attribute_map[key]].nil?
128
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
129
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
130
+ end
131
+
132
+ self
133
+ end
134
+
135
+ # Deserializes the data based on type
136
+ # @param string type Data type
137
+ # @param string value Value to be deserialized
138
+ # @return [Object] Deserialized data
139
+ def _deserialize(type, value)
140
+ case type.to_sym
141
+ when :DateTime
142
+ DateTime.parse(value)
143
+ when :Date
144
+ Date.parse(value)
145
+ when :String
146
+ value.to_s
147
+ when :Integer
148
+ value.to_i
149
+ when :Float
150
+ value.to_f
151
+ when :BOOLEAN
152
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
153
+ true
154
+ else
155
+ false
156
+ end
157
+ when :Object
158
+ # generic object (usually a Hash), return directly
159
+ value
160
+ when /\AArray<(?<inner_type>.+)>\z/
161
+ inner_type = Regexp.last_match[:inner_type]
162
+ value.map { |v| _deserialize(inner_type, v) }
163
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
164
+ k_type = Regexp.last_match[:k_type]
165
+ v_type = Regexp.last_match[:v_type]
166
+ {}.tap do |hash|
167
+ value.each do |k, v|
168
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
169
+ end
170
+ end
171
+ else # model
172
+ temp_model = LaunchDarklyApi.const_get(type).new
173
+ temp_model.build_from_hash(value)
174
+ end
175
+ end
176
+
177
+ # Returns the string representation of the object
178
+ # @return [String] String presentation of the object
179
+ def to_s
180
+ to_hash.to_s
181
+ end
182
+
183
+ # to_body is an alias to to_hash (backward compatibility)
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_body
186
+ to_hash
187
+ end
188
+
189
+ # Returns the object in the form of hash
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_hash
192
+ hash = {}
193
+ self.class.attribute_map.each_pair do |attr, param|
194
+ value = self.send(attr)
195
+ next if value.nil?
196
+ hash[param] = _to_hash(value)
197
+ end
198
+ hash
199
+ end
200
+
201
+ # Outputs non-array value in the form of hash
202
+ # For object, use to_hash. Otherwise, just return the value
203
+ # @param [Object] value Any valid value
204
+ # @return [Hash] Returns the value in the form of hash
205
+ def _to_hash(value)
206
+ if value.is_a?(Array)
207
+ value.compact.map { |v| _to_hash(v) }
208
+ elsif value.is_a?(Hash)
209
+ {}.tap do |hash|
210
+ value.each { |k, v| hash[k] = _to_hash(v) }
211
+ end
212
+ elsif value.respond_to? :to_hash
213
+ value.to_hash
214
+ else
215
+ value
216
+ end
217
+ end
218
+ end
219
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Build custom integrations with the LaunchDarkly REST API
5
5
 
6
- OpenAPI spec version: 2.0.33
6
+ OpenAPI spec version: 3.3.1
7
7
  Contact: support@launchdarkly.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.8
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Build custom integrations with the LaunchDarkly REST API
5
5
 
6
- OpenAPI spec version: 2.0.33
6
+ OpenAPI spec version: 3.3.1
7
7
  Contact: support@launchdarkly.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.8
@@ -14,6 +14,8 @@ require 'date'
14
14
 
15
15
  module LaunchDarklyApi
16
16
  class Variation
17
+ attr_accessor :_id
18
+
17
19
  attr_accessor :name
18
20
 
19
21
  attr_accessor :description
@@ -23,6 +25,7 @@ module LaunchDarklyApi
23
25
  # Attribute mapping from ruby-style variable name to JSON key.
24
26
  def self.attribute_map
25
27
  {
28
+ :'_id' => :'_id',
26
29
  :'name' => :'name',
27
30
  :'description' => :'description',
28
31
  :'value' => :'value'
@@ -32,6 +35,7 @@ module LaunchDarklyApi
32
35
  # Attribute type mapping.
33
36
  def self.swagger_types
34
37
  {
38
+ :'_id' => :'String',
35
39
  :'name' => :'String',
36
40
  :'description' => :'String',
37
41
  :'value' => :'Object'
@@ -46,6 +50,10 @@ module LaunchDarklyApi
46
50
  # convert string to symbol for hash key
47
51
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
48
52
 
53
+ if attributes.has_key?(:'_id')
54
+ self._id = attributes[:'_id']
55
+ end
56
+
49
57
  if attributes.has_key?(:'name')
50
58
  self.name = attributes[:'name']
51
59
  end
@@ -82,6 +90,7 @@ module LaunchDarklyApi
82
90
  def ==(o)
83
91
  return true if self.equal?(o)
84
92
  self.class == o.class &&
93
+ _id == o._id &&
85
94
  name == o.name &&
86
95
  description == o.description &&
87
96
  value == o.value
@@ -96,7 +105,7 @@ module LaunchDarklyApi
96
105
  # Calculates hash code according to all attributes.
97
106
  # @return [Fixnum] Hash code
98
107
  def hash
99
- [name, description, value].hash
108
+ [_id, name, description, value].hash
100
109
  end
101
110
 
102
111
  # Builds the object from hash
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Build custom integrations with the LaunchDarkly REST API
5
5
 
6
- OpenAPI spec version: 2.0.33
6
+ OpenAPI spec version: 3.3.1
7
7
  Contact: support@launchdarkly.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.8
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Build custom integrations with the LaunchDarkly REST API
5
5
 
6
- OpenAPI spec version: 2.0.33
6
+ OpenAPI spec version: 3.3.1
7
7
  Contact: support@launchdarkly.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.8
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Build custom integrations with the LaunchDarkly REST API
5
5
 
6
- OpenAPI spec version: 2.0.33
6
+ OpenAPI spec version: 3.3.1
7
7
  Contact: support@launchdarkly.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.8
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Build custom integrations with the LaunchDarkly REST API
5
5
 
6
- OpenAPI spec version: 2.0.33
6
+ OpenAPI spec version: 3.3.1
7
7
  Contact: support@launchdarkly.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.8
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Build custom integrations with the LaunchDarkly REST API
5
5
 
6
- OpenAPI spec version: 2.0.33
6
+ OpenAPI spec version: 3.3.1
7
7
  Contact: support@launchdarkly.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.8
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.8
11
11
  =end
12
12
 
13
13
  module LaunchDarklyApi
14
- VERSION = '2.0.33'
14
+ VERSION = '3.3.1'
15
15
  end
@@ -10,7 +10,7 @@ info:
10
10
  license:
11
11
  name: Apache 2.0
12
12
  url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
13
- version: 2.0.33
13
+ version: 3.3.1
14
14
  host: app.launchdarkly.com
15
15
  basePath: /api/v2
16
16
  schemes:
@@ -188,6 +188,10 @@ paths:
188
188
  - $ref: '#/parameters/EnvironmentKeyQuery'
189
189
  - $ref: '#/parameters/SummaryQuery'
190
190
  - $ref: '#/parameters/ArchivedQuery'
191
+ - $ref: '#/parameters/LimitQuery'
192
+ - $ref: '#/parameters/OffsetQuery'
193
+ - $ref: '#/parameters/FilterQuery'
194
+ - $ref: '#/parameters/SortQuery'
191
195
  - $ref: '#/parameters/Tag'
192
196
  responses:
193
197
  '200':
@@ -353,6 +357,46 @@ paths:
353
357
  $ref: '#/responses/BetaApi403'
354
358
  tags:
355
359
  - Feature flags
360
+ '/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey}':
361
+ get:
362
+ summary: Get expiring user targets for feature flag
363
+ operationId: getExpiringUserTargets
364
+ parameters:
365
+ - $ref: '#/parameters/ProjectKey'
366
+ - $ref: '#/parameters/EnvironmentKey'
367
+ - $ref: '#/parameters/FeatureFlagKey'
368
+ responses:
369
+ '200':
370
+ description: User targets of the requested feature flag.
371
+ schema:
372
+ $ref: '#/definitions/UserTargetingExpirationForFlags'
373
+ '401':
374
+ $ref: '#/responses/Standard401'
375
+ tags:
376
+ - Feature flags
377
+ patch:
378
+ summary: 'Update, add, or delete expiring user targets on feature flag'
379
+ operationId: patchExpiringUserTargets
380
+ parameters:
381
+ - $ref: '#/parameters/ProjectKey'
382
+ - $ref: '#/parameters/EnvironmentKey'
383
+ - $ref: '#/parameters/FeatureFlagKey'
384
+ - $ref: '#/parameters/SemanticPatchWithComment'
385
+ responses:
386
+ '200':
387
+ description: User targeting expirations on feature flag response.
388
+ schema:
389
+ $ref: '#/definitions/UserTargetingExpirationForFlags'
390
+ '400':
391
+ $ref: '#/responses/Standard400'
392
+ '401':
393
+ $ref: '#/responses/Standard401'
394
+ '404':
395
+ $ref: '#/responses/Standard404'
396
+ '409':
397
+ $ref: '#/responses/Standard409'
398
+ tags:
399
+ - Feature flags
356
400
  '/segments/{projectKey}/{environmentKey}':
357
401
  get:
358
402
  summary: Get a list of all user segments in the given project.
@@ -442,6 +486,48 @@ paths:
442
486
  $ref: '#/responses/Standard404'
443
487
  tags:
444
488
  - User segments
489
+ '/segments/{projectKey}/{userSegmentKey}/expiring-user-targets/{environmentKey}':
490
+ get:
491
+ summary: Get expiring user targets for user segment
492
+ operationId: getExpiringUserTargetsOnSegment
493
+ parameters:
494
+ - $ref: '#/parameters/ProjectKey'
495
+ - $ref: '#/parameters/EnvironmentKey'
496
+ - $ref: '#/parameters/UserSegmentKey'
497
+ responses:
498
+ '200':
499
+ description: User targeting expirations on user segment response.
500
+ schema:
501
+ $ref: '#/definitions/UserTargetingExpirationForSegment'
502
+ '401':
503
+ $ref: '#/responses/Standard401'
504
+ '404':
505
+ $ref: '#/responses/Standard404'
506
+ tags:
507
+ - User segments
508
+ patch:
509
+ summary: 'Update, add, or delete expiring user targets on user segment'
510
+ operationId: patchExpiringUserTargetsOnSegment
511
+ parameters:
512
+ - $ref: '#/parameters/ProjectKey'
513
+ - $ref: '#/parameters/EnvironmentKey'
514
+ - $ref: '#/parameters/UserSegmentKey'
515
+ - $ref: '#/parameters/SemanticPatchWithComment'
516
+ responses:
517
+ '200':
518
+ description: User targeting expirations on user segment response.
519
+ schema:
520
+ $ref: '#/definitions/UserTargetingExpirationForSegment'
521
+ '400':
522
+ $ref: '#/responses/Standard400'
523
+ '401':
524
+ $ref: '#/responses/Standard401'
525
+ '404':
526
+ $ref: '#/responses/Standard404'
527
+ '409':
528
+ $ref: '#/responses/Standard409'
529
+ tags:
530
+ - User segments
445
531
  '/users/{projectKey}/{environmentKey}':
446
532
  get:
447
533
  summary: >-
@@ -585,6 +671,48 @@ paths:
585
671
  $ref: '#/responses/Standard404'
586
672
  tags:
587
673
  - User settings
674
+ '/users/{projectKey}/{userKey}/expiring-user-targets/{environmentKey}':
675
+ get:
676
+ summary: Get expiring dates on flags for user
677
+ operationId: getExpiringUserTargetsForUser
678
+ parameters:
679
+ - $ref: '#/parameters/ProjectKey'
680
+ - $ref: '#/parameters/EnvironmentKey'
681
+ - $ref: '#/parameters/UserKey'
682
+ responses:
683
+ '200':
684
+ description: User targets of the requested feature flag.
685
+ schema:
686
+ $ref: '#/definitions/UserTargetingExpirationOnFlagsForUser'
687
+ '401':
688
+ $ref: '#/responses/Standard401'
689
+ tags:
690
+ - User settings
691
+ patch:
692
+ summary: >-
693
+ Update, add, or delete expiring user targets for a single user on all
694
+ flags
695
+ operationId: patchExpiringUserTargetsForFlags
696
+ parameters:
697
+ - $ref: '#/parameters/ProjectKey'
698
+ - $ref: '#/parameters/EnvironmentKey'
699
+ - $ref: '#/parameters/UserKey'
700
+ - $ref: '#/parameters/SemanticPatchWithComment'
701
+ responses:
702
+ '200':
703
+ description: User Targeting expiration for single user on all flags response.
704
+ schema:
705
+ $ref: '#/definitions/UserTargetingExpirationOnFlagsForUser'
706
+ '400':
707
+ $ref: '#/responses/Standard400'
708
+ '401':
709
+ $ref: '#/responses/Standard401'
710
+ '404':
711
+ $ref: '#/responses/Standard404'
712
+ '409':
713
+ $ref: '#/responses/Standard409'
714
+ tags:
715
+ - User settings
588
716
  /auditlog:
589
717
  get:
590
718
  summary: >-
@@ -782,6 +910,11 @@ paths:
782
910
  get:
783
911
  summary: Returns a list of all members in the account.
784
912
  operationId: getMembers
913
+ parameters:
914
+ - $ref: '#/parameters/LimitQuery'
915
+ - $ref: '#/parameters/OffsetQuery'
916
+ - $ref: '#/parameters/FilterQuery'
917
+ - $ref: '#/parameters/SortQuery'
785
918
  responses:
786
919
  '200':
787
920
  description: Members response.
@@ -809,6 +942,19 @@ paths:
809
942
  $ref: '#/responses/Standard409'
810
943
  tags:
811
944
  - Team members
945
+ /members/me:
946
+ get:
947
+ summary: Get the current team member associated with the token
948
+ operationId: getMe
949
+ responses:
950
+ '200':
951
+ $ref: '#/responses/Member2xx'
952
+ '400':
953
+ $ref: '#/responses/Standard400'
954
+ '401':
955
+ $ref: '#/responses/Standard401'
956
+ tags:
957
+ - Team members
812
958
  '/members/{memberId}':
813
959
  get:
814
960
  summary: Get a single team member by ID.
@@ -1285,6 +1431,8 @@ definitions:
1285
1431
  type: array
1286
1432
  items:
1287
1433
  $ref: '#/definitions/FeatureFlag'
1434
+ totalCount:
1435
+ type: number
1288
1436
  Member:
1289
1437
  type: object
1290
1438
  properties:
@@ -1303,6 +1451,8 @@ definitions:
1303
1451
  lastName:
1304
1452
  type: string
1305
1453
  example: Turing
1454
+ _verified:
1455
+ type: boolean
1306
1456
  _pendingInvite:
1307
1457
  type: boolean
1308
1458
  isBeta:
@@ -1320,6 +1470,8 @@ definitions:
1320
1470
  type: array
1321
1471
  items:
1322
1472
  $ref: '#/definitions/Member'
1473
+ totalCount:
1474
+ type: number
1323
1475
  FeatureFlagConfig:
1324
1476
  type: object
1325
1477
  properties:
@@ -1417,6 +1569,8 @@ definitions:
1417
1569
  Clause:
1418
1570
  type: object
1419
1571
  properties:
1572
+ _id:
1573
+ type: string
1420
1574
  attribute:
1421
1575
  type: string
1422
1576
  example: groups
@@ -1435,6 +1589,9 @@ definitions:
1435
1589
  required:
1436
1590
  - value
1437
1591
  properties:
1592
+ _id:
1593
+ type: string
1594
+ example: 24b32dd3-0ba6-46ee-86af-230eebf3c7cb
1438
1595
  name:
1439
1596
  type: string
1440
1597
  example: 'True'
@@ -1551,6 +1708,83 @@ definitions:
1551
1708
  type: object
1552
1709
  additionalProperties:
1553
1710
  $ref: '#/definitions/FeatureFlagStatusForQueriedEnvironment'
1711
+ UserTargetingExpirationForFlags:
1712
+ type: object
1713
+ properties:
1714
+ _links:
1715
+ $ref: '#/definitions/Links'
1716
+ items:
1717
+ type: array
1718
+ items:
1719
+ $ref: '#/definitions/UserTargetingExpirationForFlag'
1720
+ UserTargetingExpirationOnFlagsForUser:
1721
+ type: object
1722
+ properties:
1723
+ _links:
1724
+ $ref: '#/definitions/Links'
1725
+ items:
1726
+ type: array
1727
+ items:
1728
+ $ref: '#/definitions/UserTargetingExpirationForFlag'
1729
+ UserTargetingExpirationForFlag:
1730
+ type: object
1731
+ properties:
1732
+ expirationDate:
1733
+ type: number
1734
+ format: int64
1735
+ description: Unix epoch time in milliseconds specifying the expiration date
1736
+ example: 1735689600000
1737
+ variationId:
1738
+ type: string
1739
+ description: the ID of the variation that the user is targeted on a flag
1740
+ userKey:
1741
+ type: string
1742
+ description: Unique identifier for the user
1743
+ _id:
1744
+ type: string
1745
+ _resourceId:
1746
+ $ref: '#/definitions/UserTargetingExpirationResourceIdForFlag'
1747
+ _links:
1748
+ $ref: '#/definitions/Links'
1749
+ _version:
1750
+ type: integer
1751
+ UserTargetingExpirationForSegment:
1752
+ type: object
1753
+ properties:
1754
+ expirationDate:
1755
+ type: number
1756
+ format: int64
1757
+ description: Unix epoch time in milliseconds specifying the expiration date
1758
+ example: 1735689600000
1759
+ targetType:
1760
+ type: string
1761
+ description: >-
1762
+ either the included or excluded variation that the user is targeted on
1763
+ a segment
1764
+ userKey:
1765
+ type: string
1766
+ description: Unique identifier for the user
1767
+ _id:
1768
+ type: string
1769
+ _resourceId:
1770
+ $ref: '#/definitions/UserTargetingExpirationResourceIdForFlag'
1771
+ _links:
1772
+ $ref: '#/definitions/Links'
1773
+ _version:
1774
+ type: integer
1775
+ UserTargetingExpirationResourceIdForFlag:
1776
+ type: object
1777
+ properties:
1778
+ kind:
1779
+ type: string
1780
+ projectKey:
1781
+ type: string
1782
+ environmentKey:
1783
+ type: string
1784
+ flagKey:
1785
+ type: string
1786
+ key:
1787
+ type: string
1554
1788
  UserSegment:
1555
1789
  type: object
1556
1790
  required:
@@ -2159,6 +2393,24 @@ definitions:
2159
2393
  - op
2160
2394
  - path
2161
2395
  - value
2396
+ SemanticPatchOperation:
2397
+ type: object
2398
+ properties:
2399
+ comment:
2400
+ type: string
2401
+ example: This is a comment string
2402
+ instructions:
2403
+ type: array
2404
+ items:
2405
+ properties:
2406
+ kind:
2407
+ type: string
2408
+ example: removeUserTargets
2409
+ description: >-
2410
+ The name of the modification you would like to perform on a
2411
+ resource.
2412
+ required:
2413
+ - instructions
2162
2414
  CustomProperty:
2163
2415
  type: object
2164
2416
  description: A name and value describing a custom property.
@@ -2738,9 +2990,12 @@ parameters:
2738
2990
  description: >-
2739
2991
  By default, each feature will include configurations for each environment.
2740
2992
  You can filter environments with the env query parameter. For example,
2741
- setting env=production will restrict the returned configurations to just
2742
- your production environment.
2743
- type: string
2993
+ setting env=["production"] will restrict the returned configurations to
2994
+ just your production environment.
2995
+ type: array
2996
+ items:
2997
+ type: string
2998
+ collectionFormat: multi
2744
2999
  SummaryQuery:
2745
3000
  name: summary
2746
3001
  in: query
@@ -2759,6 +3014,35 @@ parameters:
2759
3014
  returned. By default, archived flags are not included in the list of
2760
3015
  flags.
2761
3016
  type: boolean
3017
+ LimitQuery:
3018
+ name: limit
3019
+ in: query
3020
+ required: false
3021
+ description: 'The number of objects to return. Defaults to -1, which returns everything.'
3022
+ type: number
3023
+ OffsetQuery:
3024
+ name: offset
3025
+ in: query
3026
+ required: false
3027
+ description: >-
3028
+ Where to start in the list. This is for use with pagination. For example,
3029
+ an offset of 10 would skip the first 10 items and then return the next
3030
+ limit items.
3031
+ type: number
3032
+ FilterQuery:
3033
+ name: filter
3034
+ in: query
3035
+ required: false
3036
+ description: 'A comma-separated list of filters. Each filter is of the form field:value.'
3037
+ type: string
3038
+ SortQuery:
3039
+ name: sort
3040
+ in: query
3041
+ required: false
3042
+ description: >-
3043
+ A comma-separated list of fields to sort by. A field prefixed by a - will
3044
+ be sorted in descending order.
3045
+ type: string
2762
3046
  FeatureFlagKey:
2763
3047
  name: featureFlagKey
2764
3048
  in: path
@@ -3001,6 +3285,19 @@ parameters:
3001
3285
  type: array
3002
3286
  items:
3003
3287
  $ref: '#/definitions/PatchOperation'
3288
+ SemanticPatchWithComment:
3289
+ name: SemanticPatchWithComment
3290
+ in: body
3291
+ required: true
3292
+ description: >-
3293
+ Requires a Semantic Patch representation of the desired changes to the
3294
+ resource.
3295
+ 'https://apidocs.launchdarkly.com/reference#updates-via-semantic-patches'.
3296
+ The addition of comments is also supported.
3297
+ schema:
3298
+ type: object
3299
+ items:
3300
+ $ref: '#/definitions/SemanticPatchOperation'
3004
3301
  StreamSource:
3005
3302
  name: source
3006
3303
  in: path