seatschart 0.2.0 → 0.4.0

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 (117) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +199 -19
  3. data/lib/seatschart/api/audit_api.rb +2 -2
  4. data/lib/seatschart/api/auth_api.rb +81 -4
  5. data/lib/seatschart/api/billing_api.rb +4 -0
  6. data/lib/seatschart/api/charts_api.rb +810 -77
  7. data/lib/seatschart/api/embed_api.rb +5 -5
  8. data/lib/seatschart/api/embed_origins_api.rb +63 -2
  9. data/lib/seatschart/api/event_log_api.rb +2 -2
  10. data/lib/seatschart/api/events_api.rb +1491 -175
  11. data/lib/seatschart/api/health_api.rb +244 -0
  12. data/lib/seatschart/api/map_designer_api.rb +11 -9
  13. data/lib/seatschart/api/public_api.rb +356 -6
  14. data/lib/seatschart/api/sandboxes_api.rb +672 -0
  15. data/lib/seatschart/api/seasons_api.rb +344 -36
  16. data/lib/seatschart/api/seats_api.rb +10 -10
  17. data/lib/seatschart/api/usage_api.rb +18 -15
  18. data/lib/seatschart/api/webhooks_api.rb +2 -2
  19. data/lib/seatschart/api/workspace_api.rb +1815 -363
  20. data/lib/seatschart/models/api_error.rb +4 -4
  21. data/lib/seatschart/models/delete_api_sandboxes_by_sandbox_id200_response.rb +255 -0
  22. data/lib/seatschart/models/delete_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +237 -0
  23. data/lib/seatschart/models/get_api_monitoring_requests200_response.rb +62 -4
  24. data/lib/seatschart/models/get_api_monitoring_requests200_response_points_inner.rb +21 -4
  25. data/lib/seatschart/models/get_api_sandboxes200_response.rb +239 -0
  26. data/lib/seatschart/models/get_api_sandboxes200_response_items_inner.rb +431 -0
  27. data/lib/seatschart/models/get_api_sandboxes200_response_items_inner_rate_limits.rb +270 -0
  28. data/lib/seatschart/models/get_api_sandboxes200_response_items_inner_usage.rb +287 -0
  29. data/lib/seatschart/models/get_api_status200_response.rb +387 -0
  30. data/lib/seatschart/models/get_api_status200_response_components_inner.rb +330 -0
  31. data/lib/seatschart/models/get_api_status200_response_components_inner_days_inner.rb +301 -0
  32. data/lib/seatschart/models/get_api_status200_response_incidents_inner.rb +374 -0
  33. data/lib/seatschart/models/get_api_status200_response_maintenance_inner.rb +350 -0
  34. data/lib/seatschart/models/get_api_status503_response.rb +271 -0
  35. data/lib/seatschart/models/get_api_workspace_buyer_extra_data200_response.rb +241 -0
  36. data/lib/seatschart/models/get_api_workspace_defaults200_response.rb +254 -0
  37. data/lib/seatschart/models/get_api_workspace_defaults200_response_renderer.rb +246 -0
  38. data/lib/seatschart/models/get_api_workspace_defaults200_response_renderer_built_in.rb +270 -0
  39. data/lib/seatschart/models/get_api_workspaces200_response_items_inner.rb +80 -5
  40. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response.rb +239 -0
  41. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response_api_keys_inner.rb +321 -0
  42. data/lib/seatschart/models/get_api_workspaces_created_by_api_parameter.rb +103 -0
  43. data/lib/seatschart/models/get_api_workspaces_overview_created_by_api_parameter.rb +103 -0
  44. data/lib/seatschart/models/patch_api_events_by_event_id_request.rb +12 -2
  45. data/lib/seatschart/models/patch_api_seasons_by_season_id_request.rb +15 -5
  46. data/lib/seatschart/models/patch_api_workspace_chart_validation_request_severities.rb +25 -4
  47. data/lib/seatschart/models/patch_api_workspace_defaults_request.rb +224 -0
  48. data/lib/seatschart/models/patch_api_workspace_defaults_request_renderer.rb +249 -0
  49. data/lib/seatschart/models/patch_api_workspace_settings_request.rb +6 -6
  50. data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +221 -0
  51. data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_keys_by_key_id_request.rb +292 -0
  52. data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_request.rb +288 -0
  53. data/lib/seatschart/models/post_api_auth_new_workspace_request.rb +294 -0
  54. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_copy_to_workspace_request.rb +39 -1
  55. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request.rb +1 -0
  56. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish422_response_issues_inner.rb +64 -6
  57. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish_request.rb +1 -1
  58. data/lib/seatschart/models/post_api_embed_tokens_request.rb +18 -15
  59. data/lib/seatschart/models/post_api_embed_tokens_request_safe_mode_options.rb +226 -0
  60. data/lib/seatschart/models/post_api_events_actions_edit_for_sale_config_request.rb +251 -0
  61. data/lib/seatschart/models/post_api_events_actions_edit_for_sale_config_request_events_inner.rb +322 -0
  62. data/lib/seatschart/models/post_api_events_bulk_request_events_inner.rb +42 -1
  63. data/lib/seatschart/models/post_api_events_by_event_id_actions_edit_for_sale_config_request.rb +277 -0
  64. data/lib/seatschart/models/post_api_events_by_event_id_actions_edit_for_sale_config_request_for_sale_inner.rb +319 -0
  65. data/lib/seatschart/models/post_api_events_by_event_id_map_publish_request.rb +215 -0
  66. data/lib/seatschart/models/post_api_events_request.rb +42 -1
  67. data/lib/seatschart/models/{patch_api_events_by_event_id_request_categories_inner.rb → post_api_events_request_categories_inner.rb} +3 -3
  68. data/lib/seatschart/models/post_api_extract_seats200_response.rb +459 -0
  69. data/lib/seatschart/models/post_api_extract_seats200_response_seats_inner.rb +323 -0
  70. data/lib/seatschart/models/post_api_extract_seats200_response_suggested_inner.rb +320 -0
  71. data/lib/seatschart/models/post_api_extract_seats_request.rb +124 -4
  72. data/lib/seatschart/models/post_api_extract_seats_request_examples.rb +105 -0
  73. data/lib/seatschart/models/post_api_extract_seats_request_examples_any_of_inner.rb +293 -0
  74. data/lib/seatschart/models/post_api_extract_seats_request_negatives.rb +105 -0
  75. data/lib/seatschart/models/post_api_extract_seats_request_region.rb +105 -0
  76. data/lib/seatschart/models/{put_api_charts_by_chart_id_map_draft_request.rb → post_api_extract_seats_request_region_any_of.rb} +111 -96
  77. data/lib/seatschart/models/post_api_sandboxes201_response.rb +245 -0
  78. data/lib/seatschart/models/post_api_sandboxes201_response_admin_key.rb +286 -0
  79. data/lib/seatschart/models/post_api_sandboxes201_response_copied.rb +313 -0
  80. data/lib/seatschart/models/post_api_sandboxes201_response_copied_charts_inner.rb +281 -0
  81. data/lib/seatschart/models/post_api_sandboxes201_response_copied_events_inner.rb +281 -0
  82. data/lib/seatschart/models/post_api_sandboxes201_response_copied_events_with_own_map_inner.rb +265 -0
  83. data/lib/seatschart/models/post_api_sandboxes201_response_copied_key_conflicts_inner.rb +287 -0
  84. data/lib/seatschart/models/post_api_sandboxes201_response_copied_seasons_inner.rb +312 -0
  85. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_copy_from_production200_response.rb +313 -0
  86. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_copy_from_production_request.rb +255 -0
  87. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_join200_response.rb +271 -0
  88. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_reset200_response.rb +268 -0
  89. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_reset_request.rb +225 -0
  90. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key201_response.rb +253 -0
  91. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key201_response_api_key.rb +286 -0
  92. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key_request.rb +252 -0
  93. data/lib/seatschart/models/post_api_sandboxes_request.rb +319 -0
  94. data/lib/seatschart/models/post_api_seasons_request.rb +14 -4
  95. data/lib/seatschart/models/post_api_seats_confirm_request.rb +5 -5
  96. data/lib/seatschart/models/post_api_seats_release_request.rb +5 -5
  97. data/lib/seatschart/models/post_api_seats_reserve_request.rb +5 -5
  98. data/lib/seatschart/models/post_api_workspaces200_response.rb +468 -0
  99. data/lib/seatschart/models/post_api_workspaces200_response_api_key.rb +332 -0
  100. data/lib/seatschart/models/post_api_workspaces200_response_template.rb +260 -0
  101. data/lib/seatschart/models/post_api_workspaces200_response_template_webhooks_inner.rb +284 -0
  102. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete200_response.rb +319 -0
  103. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete_request.rb +281 -0
  104. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_invitations_request.rb +300 -0
  105. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response.rb +237 -0
  106. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response_api_key.rb +338 -0
  107. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys_request.rb +299 -0
  108. data/lib/seatschart/models/post_api_workspaces_request.rb +101 -5
  109. data/lib/seatschart/models/post_api_workspaces_request_issue_key.rb +294 -0
  110. data/lib/seatschart/models/put_api_workspace_buyer_extra_data_request.rb +260 -0
  111. data/lib/seatschart/models/put_internal_status_notices_request.rb +242 -0
  112. data/lib/seatschart/models/put_internal_status_notices_request_notices_inner.rb +445 -0
  113. data/lib/seatschart/retry.rb +106 -7
  114. data/lib/seatschart/version.rb +1 -1
  115. data/lib/seatschart.rb +73 -3
  116. metadata +75 -5
  117. data/lib/seatschart/api/default_api.rb +0 -763
@@ -0,0 +1,294 @@
1
+ =begin
2
+ #SeatsChart API
3
+
4
+ #Seat inventory and locking API for B2B2C integrations. Authenticate using `x-api-key` (partners) or `Authorization: Bearer` with an HS256 JWT.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.11.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module SeatsChart
17
+ class PostApiAuthNewWorkspaceRequest
18
+ # Token of the 403 `ERR_NO_WORKSPACE` sign-in answer.
19
+ attr_accessor :new_workspace_token
20
+
21
+ attr_accessor :workspace_name
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'new_workspace_token' => :'newWorkspaceToken',
27
+ :'workspace_name' => :'workspaceName'
28
+ }
29
+ end
30
+
31
+ # Returns all the JSON keys this model knows about
32
+ def self.acceptable_attributes
33
+ attribute_map.values
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.openapi_types
38
+ {
39
+ :'new_workspace_token' => :'String',
40
+ :'workspace_name' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::PostApiAuthNewWorkspaceRequest` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h|
59
+ if (!self.class.attribute_map.key?(k.to_sym))
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::PostApiAuthNewWorkspaceRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ end
62
+ h[k.to_sym] = v
63
+ }
64
+
65
+ if attributes.key?(:'new_workspace_token')
66
+ self.new_workspace_token = attributes[:'new_workspace_token']
67
+ else
68
+ self.new_workspace_token = nil
69
+ end
70
+
71
+ if attributes.key?(:'workspace_name')
72
+ self.workspace_name = attributes[:'workspace_name']
73
+ else
74
+ self.workspace_name = nil
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
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
82
+ invalid_properties = Array.new
83
+ if @new_workspace_token.nil?
84
+ invalid_properties.push('invalid value for "new_workspace_token", new_workspace_token cannot be nil.')
85
+ end
86
+
87
+ if @new_workspace_token.to_s.length > 128
88
+ invalid_properties.push('invalid value for "new_workspace_token", the character length must be smaller than or equal to 128.')
89
+ end
90
+
91
+ if @new_workspace_token.to_s.length < 32
92
+ invalid_properties.push('invalid value for "new_workspace_token", the character length must be great than or equal to 32.')
93
+ end
94
+
95
+ if @workspace_name.nil?
96
+ invalid_properties.push('invalid value for "workspace_name", workspace_name cannot be nil.')
97
+ end
98
+
99
+ if @workspace_name.to_s.length > 512
100
+ invalid_properties.push('invalid value for "workspace_name", the character length must be smaller than or equal to 512.')
101
+ end
102
+
103
+ if @workspace_name.to_s.length < 1
104
+ invalid_properties.push('invalid value for "workspace_name", the character length must be great than or equal to 1.')
105
+ end
106
+
107
+ invalid_properties
108
+ end
109
+
110
+ # Check to see if the all the properties in the model are valid
111
+ # @return true if the model is valid
112
+ def valid?
113
+ warn '[DEPRECATED] the `valid?` method is obsolete'
114
+ return false if @new_workspace_token.nil?
115
+ return false if @new_workspace_token.to_s.length > 128
116
+ return false if @new_workspace_token.to_s.length < 32
117
+ return false if @workspace_name.nil?
118
+ return false if @workspace_name.to_s.length > 512
119
+ return false if @workspace_name.to_s.length < 1
120
+ true
121
+ end
122
+
123
+ # Custom attribute writer method with validation
124
+ # @param [Object] new_workspace_token Value to be assigned
125
+ def new_workspace_token=(new_workspace_token)
126
+ if new_workspace_token.nil?
127
+ fail ArgumentError, 'new_workspace_token cannot be nil'
128
+ end
129
+
130
+ if new_workspace_token.to_s.length > 128
131
+ fail ArgumentError, 'invalid value for "new_workspace_token", the character length must be smaller than or equal to 128.'
132
+ end
133
+
134
+ if new_workspace_token.to_s.length < 32
135
+ fail ArgumentError, 'invalid value for "new_workspace_token", the character length must be great than or equal to 32.'
136
+ end
137
+
138
+ @new_workspace_token = new_workspace_token
139
+ end
140
+
141
+ # Custom attribute writer method with validation
142
+ # @param [Object] workspace_name Value to be assigned
143
+ def workspace_name=(workspace_name)
144
+ if workspace_name.nil?
145
+ fail ArgumentError, 'workspace_name cannot be nil'
146
+ end
147
+
148
+ if workspace_name.to_s.length > 512
149
+ fail ArgumentError, 'invalid value for "workspace_name", the character length must be smaller than or equal to 512.'
150
+ end
151
+
152
+ if workspace_name.to_s.length < 1
153
+ fail ArgumentError, 'invalid value for "workspace_name", the character length must be great than or equal to 1.'
154
+ end
155
+
156
+ @workspace_name = workspace_name
157
+ end
158
+
159
+ # Checks equality by comparing each attribute.
160
+ # @param [Object] Object to be compared
161
+ def ==(o)
162
+ return true if self.equal?(o)
163
+ self.class == o.class &&
164
+ new_workspace_token == o.new_workspace_token &&
165
+ workspace_name == o.workspace_name
166
+ end
167
+
168
+ # @see the `==` method
169
+ # @param [Object] Object to be compared
170
+ def eql?(o)
171
+ self == o
172
+ end
173
+
174
+ # Calculates hash code according to all attributes.
175
+ # @return [Integer] Hash code
176
+ def hash
177
+ [new_workspace_token, workspace_name].hash
178
+ end
179
+
180
+ # Builds the object from hash
181
+ # @param [Hash] attributes Model attributes in the form of hash
182
+ # @return [Object] Returns the model itself
183
+ def self.build_from_hash(attributes)
184
+ return nil unless attributes.is_a?(Hash)
185
+ attributes = attributes.transform_keys(&:to_sym)
186
+ transformed_hash = {}
187
+ openapi_types.each_pair do |key, type|
188
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
189
+ transformed_hash["#{key}"] = nil
190
+ elsif type =~ /\AArray<(.*)>/i
191
+ # check to ensure the input is an array given that the attribute
192
+ # is documented as an array but the input is not
193
+ if attributes[attribute_map[key]].is_a?(Array)
194
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
195
+ end
196
+ elsif !attributes[attribute_map[key]].nil?
197
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
198
+ end
199
+ end
200
+ new(transformed_hash)
201
+ end
202
+
203
+ # Deserializes the data based on type
204
+ # @param string type Data type
205
+ # @param string value Value to be deserialized
206
+ # @return [Object] Deserialized data
207
+ def self._deserialize(type, value)
208
+ case type.to_sym
209
+ when :Time
210
+ Time.parse(value)
211
+ when :Date
212
+ Date.parse(value)
213
+ when :String
214
+ value.to_s
215
+ when :Integer
216
+ value.to_i
217
+ when :Float
218
+ value.to_f
219
+ when :Boolean
220
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
221
+ true
222
+ else
223
+ false
224
+ end
225
+ when :Object
226
+ # generic object (usually a Hash), return directly
227
+ value
228
+ when /\AArray<(?<inner_type>.+)>\z/
229
+ inner_type = Regexp.last_match[:inner_type]
230
+ value.map { |v| _deserialize(inner_type, v) }
231
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
232
+ k_type = Regexp.last_match[:k_type]
233
+ v_type = Regexp.last_match[:v_type]
234
+ {}.tap do |hash|
235
+ value.each do |k, v|
236
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
237
+ end
238
+ end
239
+ else # model
240
+ # models (e.g. Pet) or oneOf
241
+ klass = SeatsChart.const_get(type)
242
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
243
+ end
244
+ end
245
+
246
+ # Returns the string representation of the object
247
+ # @return [String] String presentation of the object
248
+ def to_s
249
+ to_hash.to_s
250
+ end
251
+
252
+ # to_body is an alias to to_hash (backward compatibility)
253
+ # @return [Hash] Returns the object in the form of hash
254
+ def to_body
255
+ to_hash
256
+ end
257
+
258
+ # Returns the object in the form of hash
259
+ # @return [Hash] Returns the object in the form of hash
260
+ def to_hash
261
+ hash = {}
262
+ self.class.attribute_map.each_pair do |attr, param|
263
+ value = self.send(attr)
264
+ if value.nil?
265
+ is_nullable = self.class.openapi_nullable.include?(attr)
266
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
267
+ end
268
+
269
+ hash[param] = _to_hash(value)
270
+ end
271
+ hash
272
+ end
273
+
274
+ # Outputs non-array value in the form of hash
275
+ # For object, use to_hash. Otherwise, just return the value
276
+ # @param [Object] value Any valid value
277
+ # @return [Hash] Returns the value in the form of hash
278
+ def _to_hash(value)
279
+ if value.is_a?(Array)
280
+ value.compact.map { |v| _to_hash(v) }
281
+ elsif value.is_a?(Hash)
282
+ {}.tap do |hash|
283
+ value.each { |k, v| hash[k] = _to_hash(v) }
284
+ end
285
+ elsif value.respond_to? :to_hash
286
+ value.to_hash
287
+ else
288
+ value
289
+ end
290
+ end
291
+
292
+ end
293
+
294
+ end
@@ -18,12 +18,16 @@ module SeatsChart
18
18
  # Target workspace id (see GET /workspaces).
19
19
  attr_accessor :workspace_id
20
20
 
21
+ # Source workspace id (default: the calling workspace). seats.io copyFromWorkspaceTo: copy a chart of another workspace the same admin administers; pass the chart id (UUID), keys resolve in the calling workspace only.
22
+ attr_accessor :from_workspace_id
23
+
21
24
  attr_accessor :name
22
25
 
23
26
  # Attribute mapping from ruby-style variable name to JSON key.
24
27
  def self.attribute_map
25
28
  {
26
29
  :'workspace_id' => :'workspaceId',
30
+ :'from_workspace_id' => :'fromWorkspaceId',
27
31
  :'name' => :'name'
28
32
  }
29
33
  end
@@ -37,6 +41,7 @@ module SeatsChart
37
41
  def self.openapi_types
38
42
  {
39
43
  :'workspace_id' => :'String',
44
+ :'from_workspace_id' => :'String',
40
45
  :'name' => :'String'
41
46
  }
42
47
  end
@@ -68,6 +73,10 @@ module SeatsChart
68
73
  self.workspace_id = nil
69
74
  end
70
75
 
76
+ if attributes.key?(:'from_workspace_id')
77
+ self.from_workspace_id = attributes[:'from_workspace_id']
78
+ end
79
+
71
80
  if attributes.key?(:'name')
72
81
  self.name = attributes[:'name']
73
82
  end
@@ -90,6 +99,14 @@ module SeatsChart
90
99
  invalid_properties.push('invalid value for "workspace_id", the character length must be great than or equal to 1.')
91
100
  end
92
101
 
102
+ if !@from_workspace_id.nil? && @from_workspace_id.to_s.length > 128
103
+ invalid_properties.push('invalid value for "from_workspace_id", the character length must be smaller than or equal to 128.')
104
+ end
105
+
106
+ if !@from_workspace_id.nil? && @from_workspace_id.to_s.length < 1
107
+ invalid_properties.push('invalid value for "from_workspace_id", the character length must be great than or equal to 1.')
108
+ end
109
+
93
110
  if !@name.nil? && @name.to_s.length > 512
94
111
  invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 512.')
95
112
  end
@@ -108,6 +125,8 @@ module SeatsChart
108
125
  return false if @workspace_id.nil?
109
126
  return false if @workspace_id.to_s.length > 128
110
127
  return false if @workspace_id.to_s.length < 1
128
+ return false if !@from_workspace_id.nil? && @from_workspace_id.to_s.length > 128
129
+ return false if !@from_workspace_id.nil? && @from_workspace_id.to_s.length < 1
111
130
  return false if !@name.nil? && @name.to_s.length > 512
112
131
  return false if !@name.nil? && @name.to_s.length < 1
113
132
  true
@@ -131,6 +150,24 @@ module SeatsChart
131
150
  @workspace_id = workspace_id
132
151
  end
133
152
 
153
+ # Custom attribute writer method with validation
154
+ # @param [Object] from_workspace_id Value to be assigned
155
+ def from_workspace_id=(from_workspace_id)
156
+ if from_workspace_id.nil?
157
+ fail ArgumentError, 'from_workspace_id cannot be nil'
158
+ end
159
+
160
+ if from_workspace_id.to_s.length > 128
161
+ fail ArgumentError, 'invalid value for "from_workspace_id", the character length must be smaller than or equal to 128.'
162
+ end
163
+
164
+ if from_workspace_id.to_s.length < 1
165
+ fail ArgumentError, 'invalid value for "from_workspace_id", the character length must be great than or equal to 1.'
166
+ end
167
+
168
+ @from_workspace_id = from_workspace_id
169
+ end
170
+
134
171
  # Custom attribute writer method with validation
135
172
  # @param [Object] name Value to be assigned
136
173
  def name=(name)
@@ -155,6 +192,7 @@ module SeatsChart
155
192
  return true if self.equal?(o)
156
193
  self.class == o.class &&
157
194
  workspace_id == o.workspace_id &&
195
+ from_workspace_id == o.from_workspace_id &&
158
196
  name == o.name
159
197
  end
160
198
 
@@ -167,7 +205,7 @@ module SeatsChart
167
205
  # Calculates hash code according to all attributes.
168
206
  # @return [Integer] Hash code
169
207
  def hash
170
- [workspace_id, name].hash
208
+ [workspace_id, from_workspace_id, name].hash
171
209
  end
172
210
 
173
211
  # Builds the object from hash
@@ -17,6 +17,7 @@ module SeatsChart
17
17
  class PostApiChartsByChartIdActionsValidateRequest
18
18
  attr_accessor :seats
19
19
 
20
+ # Layout shapes (sections, zones, GA areas, tables, icons…) and one `layoutMeta`. `layoutMeta.settings3d` holds the authored 3D (elevation / rake per section or zone, floors, light preset, spectator target) and the 3D billboards: `billboards` (at most 64 boards, each `{ id, points: [{x, y}] (2-64, map px), height?: m (0.2-20, default 1), elevation?: m (-20-100), scroll?: \"reverse\" | \"off\" }`) and `billboardImages` (at most 12 sponsor images shared by every board, in scroll order: base64 WebP / PNG / JPEG data URLs, stored to the map-asset CDN when configured, or map-asset URLs). Invalid values are refused with 400 `validation_error`, never clamped. `settings3d.seatPicking` (boolean) is the chart-level \"Allow 3D seat picking\" switch (absent: on for charts that author 3D). Optional fields published only when set: tables `oneSide` (rectangular, every guest on one long side) and `openSpaces` (1-20 empty chair positions); text `bold` / `italic`; decorative shapes `layer: \"foreground\"` (drawn above the seats for buyers, never interactive); `layoutMeta.floors[].abbreviation` (at most 6 characters) and `layoutMeta.displayTypes` (object id → displayed type, at most 64 characters, seats.io `displayObjectType`). Designer-only metadata (`bytes` on images, `layoutMeta.backgroundBytes`) feeds the `images_size` check and is never published.
20
21
  attr_accessor :shapes
21
22
 
22
23
  attr_accessor :background
@@ -38,6 +38,12 @@ module SeatsChart
38
38
 
39
39
  attr_accessor :floor_id
40
40
 
41
+ # `duplicate_label` across sections: how many sections sharing the label `sectionId` (or unlabeled sections) hold the object.
42
+ attr_accessor :sections
43
+
44
+ # `images_size`: known total download size of the chart images, in bytes.
45
+ attr_accessor :bytes
46
+
41
47
  class EnumAttributeValidator
42
48
  attr_reader :datatype
43
49
  attr_reader :allowable_values
@@ -72,7 +78,9 @@ module SeatsChart
72
78
  :'section_id' => :'sectionId',
73
79
  :'table_ids' => :'tableIds',
74
80
  :'scope' => :'scope',
75
- :'floor_id' => :'floorId'
81
+ :'floor_id' => :'floorId',
82
+ :'sections' => :'sections',
83
+ :'bytes' => :'bytes'
76
84
  }
77
85
  end
78
86
 
@@ -93,7 +101,9 @@ module SeatsChart
93
101
  :'section_id' => :'String',
94
102
  :'table_ids' => :'Array<String>',
95
103
  :'scope' => :'String',
96
- :'floor_id' => :'String'
104
+ :'floor_id' => :'String',
105
+ :'sections' => :'Integer',
106
+ :'bytes' => :'Integer'
97
107
  }
98
108
  end
99
109
 
@@ -171,6 +181,14 @@ module SeatsChart
171
181
  if attributes.key?(:'floor_id')
172
182
  self.floor_id = attributes[:'floor_id']
173
183
  end
184
+
185
+ if attributes.key?(:'sections')
186
+ self.sections = attributes[:'sections']
187
+ end
188
+
189
+ if attributes.key?(:'bytes')
190
+ self.bytes = attributes[:'bytes']
191
+ end
174
192
  end
175
193
 
176
194
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -202,6 +220,14 @@ module SeatsChart
202
220
  invalid_properties.push('invalid value for "count", must be greater than or equal to 0.')
203
221
  end
204
222
 
223
+ if !@sections.nil? && @sections < 2
224
+ invalid_properties.push('invalid value for "sections", must be greater than or equal to 2.')
225
+ end
226
+
227
+ if !@bytes.nil? && @bytes < 0
228
+ invalid_properties.push('invalid value for "bytes", must be greater than or equal to 0.')
229
+ end
230
+
205
231
  invalid_properties
206
232
  end
207
233
 
@@ -210,7 +236,7 @@ module SeatsChart
210
236
  def valid?
211
237
  warn '[DEPRECATED] the `valid?` method is obsolete'
212
238
  return false if @code.nil?
213
- code_validator = EnumAttributeValidator.new('String', ["no_objects", "empty_label", "duplicate_label", "uncategorized", "overlap", "table_too_small", "ga_invalid_capacity", "ga_table_capacity", "empty_floor", "empty_section", "outside_section", "multiple_object_types", "missing_focal_point", "zone_missing_focal_point", "orphan_gap"])
239
+ code_validator = EnumAttributeValidator.new('String', ["no_objects", "empty_label", "duplicate_label", "uncategorized", "overlap", "table_too_small", "ga_invalid_capacity", "ga_table_capacity", "empty_floor", "empty_section", "outside_section", "multiple_object_types", "missing_focal_point", "zone_missing_focal_point", "orphan_gap", "images_size"])
214
240
  return false unless code_validator.valid?(@code)
215
241
  return false if @severity.nil?
216
242
  severity_validator = EnumAttributeValidator.new('String', ["error", "warning"])
@@ -219,13 +245,15 @@ module SeatsChart
219
245
  return false if @message.nil?
220
246
  return false if @count.nil?
221
247
  return false if @count < 0
248
+ return false if !@sections.nil? && @sections < 2
249
+ return false if !@bytes.nil? && @bytes < 0
222
250
  true
223
251
  end
224
252
 
225
253
  # Custom attribute writer method checking allowed values (enum).
226
254
  # @param [Object] code Object to be assigned
227
255
  def code=(code)
228
- validator = EnumAttributeValidator.new('String', ["no_objects", "empty_label", "duplicate_label", "uncategorized", "overlap", "table_too_small", "ga_invalid_capacity", "ga_table_capacity", "empty_floor", "empty_section", "outside_section", "multiple_object_types", "missing_focal_point", "zone_missing_focal_point", "orphan_gap"])
256
+ validator = EnumAttributeValidator.new('String', ["no_objects", "empty_label", "duplicate_label", "uncategorized", "overlap", "table_too_small", "ga_invalid_capacity", "ga_table_capacity", "empty_floor", "empty_section", "outside_section", "multiple_object_types", "missing_focal_point", "zone_missing_focal_point", "orphan_gap", "images_size"])
229
257
  unless validator.valid?(code)
230
258
  fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}."
231
259
  end
@@ -256,6 +284,34 @@ module SeatsChart
256
284
  @count = count
257
285
  end
258
286
 
287
+ # Custom attribute writer method with validation
288
+ # @param [Object] sections Value to be assigned
289
+ def sections=(sections)
290
+ if sections.nil?
291
+ fail ArgumentError, 'sections cannot be nil'
292
+ end
293
+
294
+ if sections < 2
295
+ fail ArgumentError, 'invalid value for "sections", must be greater than or equal to 2.'
296
+ end
297
+
298
+ @sections = sections
299
+ end
300
+
301
+ # Custom attribute writer method with validation
302
+ # @param [Object] bytes Value to be assigned
303
+ def bytes=(bytes)
304
+ if bytes.nil?
305
+ fail ArgumentError, 'bytes cannot be nil'
306
+ end
307
+
308
+ if bytes < 0
309
+ fail ArgumentError, 'invalid value for "bytes", must be greater than or equal to 0.'
310
+ end
311
+
312
+ @bytes = bytes
313
+ end
314
+
259
315
  # Checks equality by comparing each attribute.
260
316
  # @param [Object] Object to be compared
261
317
  def ==(o)
@@ -270,7 +326,9 @@ module SeatsChart
270
326
  section_id == o.section_id &&
271
327
  table_ids == o.table_ids &&
272
328
  scope == o.scope &&
273
- floor_id == o.floor_id
329
+ floor_id == o.floor_id &&
330
+ sections == o.sections &&
331
+ bytes == o.bytes
274
332
  end
275
333
 
276
334
  # @see the `==` method
@@ -282,7 +340,7 @@ module SeatsChart
282
340
  # Calculates hash code according to all attributes.
283
341
  # @return [Integer] Hash code
284
342
  def hash
285
- [code, severity, object_ids, message, count, label, section_id, table_ids, scope, floor_id].hash
343
+ [code, severity, object_ids, message, count, label, section_id, table_ids, scope, floor_id, sections, bytes].hash
286
344
  end
287
345
 
288
346
  # Builds the object from hash
@@ -18,7 +18,7 @@ module SeatsChart
18
18
  # Optional release note stored on the version record (shown in version history).
19
19
  attr_accessor :note
20
20
 
21
- # Set by the designer auto-publish option. The publish is refused with 409 `ERR_AUTO_PUBLISH_CHART_HAS_EVENTS` (params.eventCount) when any event uses the chart.
21
+ # Set by the designer auto-publish option. The publish is refused with 409 `ERR_AUTO_PUBLISH_CHART_HAS_EVENTS` (params.eventCount) when any event uses the chart, unless the workspace publishes designer changes directly (`draftChartDrawingsEnabled: false`, see GET /api/workspace/defaults).
22
22
  attr_accessor :auto_publish
23
23
 
24
24
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -21,8 +21,11 @@ module SeatsChart
21
21
 
22
22
  attr_accessor :event_id
23
23
 
24
+ # Designer tokens only, enforced by the API (default `normal`, full edit). `safe`: saves, publishes and version restores that would delete or relabel published objects, change the booking type of a published table or area, or change the capacity of a published area are refused with 403 `forbidden` / `ERR_DESIGNER_SAFE_MODE` (`reason`, `objectIds`). `readOnly`: every write is refused with 403 `forbidden` / `ERR_DESIGNER_READ_ONLY`.
24
25
  attr_accessor :mode
25
26
 
27
+ attr_accessor :safe_mode_options
28
+
26
29
  attr_accessor :ttl_seconds
27
30
 
28
31
  class EnumAttributeValidator
@@ -54,6 +57,7 @@ module SeatsChart
54
57
  :'chart_id' => :'chartId',
55
58
  :'event_id' => :'eventId',
56
59
  :'mode' => :'mode',
60
+ :'safe_mode_options' => :'safeModeOptions',
57
61
  :'ttl_seconds' => :'ttlSeconds'
58
62
  }
59
63
  end
@@ -70,6 +74,7 @@ module SeatsChart
70
74
  :'chart_id' => :'String',
71
75
  :'event_id' => :'String',
72
76
  :'mode' => :'String',
77
+ :'safe_mode_options' => :'PostApiEmbedTokensRequestSafeModeOptions',
73
78
  :'ttl_seconds' => :'Integer'
74
79
  }
75
80
  end
@@ -113,6 +118,10 @@ module SeatsChart
113
118
  self.mode = attributes[:'mode']
114
119
  end
115
120
 
121
+ if attributes.key?(:'safe_mode_options')
122
+ self.safe_mode_options = attributes[:'safe_mode_options']
123
+ end
124
+
116
125
  if attributes.key?(:'ttl_seconds')
117
126
  self.ttl_seconds = attributes[:'ttl_seconds']
118
127
  end
@@ -143,10 +152,6 @@ module SeatsChart
143
152
  invalid_properties.push('invalid value for "event_id", the character length must be great than or equal to 36.')
144
153
  end
145
154
 
146
- if !@mode.nil? && @mode.to_s.length > 64
147
- invalid_properties.push('invalid value for "mode", the character length must be smaller than or equal to 64.')
148
- end
149
-
150
155
  if !@ttl_seconds.nil? && @ttl_seconds > 1800
151
156
  invalid_properties.push('invalid value for "ttl_seconds", must be smaller than or equal to 1800.')
152
157
  end
@@ -169,7 +174,8 @@ module SeatsChart
169
174
  return false if !@chart_id.nil? && @chart_id.to_s.length < 36
170
175
  return false if !@event_id.nil? && @event_id.to_s.length > 36
171
176
  return false if !@event_id.nil? && @event_id.to_s.length < 36
172
- return false if !@mode.nil? && @mode.to_s.length > 64
177
+ mode_validator = EnumAttributeValidator.new('String', ["normal", "safe", "readOnly"])
178
+ return false unless mode_validator.valid?(@mode)
173
179
  return false if !@ttl_seconds.nil? && @ttl_seconds > 1800
174
180
  return false if !@ttl_seconds.nil? && @ttl_seconds < 60
175
181
  true
@@ -221,17 +227,13 @@ module SeatsChart
221
227
  @event_id = event_id
222
228
  end
223
229
 
224
- # Custom attribute writer method with validation
225
- # @param [Object] mode Value to be assigned
230
+ # Custom attribute writer method checking allowed values (enum).
231
+ # @param [Object] mode Object to be assigned
226
232
  def mode=(mode)
227
- if mode.nil?
228
- fail ArgumentError, 'mode cannot be nil'
233
+ validator = EnumAttributeValidator.new('String', ["normal", "safe", "readOnly"])
234
+ unless validator.valid?(mode)
235
+ fail ArgumentError, "invalid value for \"mode\", must be one of #{validator.allowable_values}."
229
236
  end
230
-
231
- if mode.to_s.length > 64
232
- fail ArgumentError, 'invalid value for "mode", the character length must be smaller than or equal to 64.'
233
- end
234
-
235
237
  @mode = mode
236
238
  end
237
239
 
@@ -262,6 +264,7 @@ module SeatsChart
262
264
  chart_id == o.chart_id &&
263
265
  event_id == o.event_id &&
264
266
  mode == o.mode &&
267
+ safe_mode_options == o.safe_mode_options &&
265
268
  ttl_seconds == o.ttl_seconds
266
269
  end
267
270
 
@@ -274,7 +277,7 @@ module SeatsChart
274
277
  # Calculates hash code according to all attributes.
275
278
  # @return [Integer] Hash code
276
279
  def hash
277
- [purpose, chart_id, event_id, mode, ttl_seconds].hash
280
+ [purpose, chart_id, event_id, mode, safe_mode_options, ttl_seconds].hash
278
281
  end
279
282
 
280
283
  # Builds the object from hash