templatefox 1.10.0 → 1.11.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.
- checksums.yaml +4 -4
- data/lib/templatefox/api/account_api.rb +1 -1
- data/lib/templatefox/api/image_api.rb +90 -0
- data/lib/templatefox/api/integrations_api.rb +1 -1
- data/lib/templatefox/api/pdf_api.rb +1 -1
- data/lib/templatefox/api/pdf_async_api.rb +1 -1
- data/lib/templatefox/api/pdf_tools_api.rb +1 -1
- data/lib/templatefox/api/templates_api.rb +9 -1
- data/lib/templatefox/api_client.rb +1 -1
- data/lib/templatefox/api_error.rb +1 -1
- data/lib/templatefox/api_model_base.rb +1 -1
- data/lib/templatefox/configuration.rb +1 -1
- data/lib/templatefox/models/account_info_response.rb +1 -1
- data/lib/templatefox/models/{app_routers_v1_pdf_export_type.rb → app_routers_v1_delivery_export_type.rb} +4 -4
- data/lib/templatefox/models/app_routers_v1_pdf_async_export_type.rb +1 -1
- data/lib/templatefox/models/app_routers_v1_pdf_tools_export_type.rb +1 -1
- data/lib/templatefox/models/create_async_pdf_request.rb +1 -1
- data/lib/templatefox/models/create_async_pdf_response.rb +1 -1
- data/lib/templatefox/models/create_image_request.rb +533 -0
- data/lib/templatefox/models/create_image_response.rb +259 -0
- data/lib/templatefox/models/create_pdf_request.rb +2 -2
- data/lib/templatefox/models/create_pdf_response.rb +1 -1
- data/lib/templatefox/models/create_version_request.rb +1 -1
- data/lib/templatefox/models/extract_pdf_pages_request.rb +1 -1
- data/lib/templatefox/models/http_validation_error.rb +1 -1
- data/lib/templatefox/models/image_format.rb +41 -0
- data/lib/templatefox/models/job_list_response.rb +1 -1
- data/lib/templatefox/models/job_status.rb +1 -1
- data/lib/templatefox/models/job_status_response.rb +1 -1
- data/lib/templatefox/models/location_inner.rb +1 -1
- data/lib/templatefox/models/merge_pdf_request.rb +1 -1
- data/lib/templatefox/models/modification.rb +305 -0
- data/lib/templatefox/models/pdf_input.rb +1 -1
- data/lib/templatefox/models/pdf_tools_response.rb +1 -1
- data/lib/templatefox/models/pdf_variant.rb +1 -1
- data/lib/templatefox/models/rotate_pdf_request.rb +1 -1
- data/lib/templatefox/models/s3_config_request.rb +1 -1
- data/lib/templatefox/models/s3_config_response.rb +1 -1
- data/lib/templatefox/models/s3_success_response.rb +1 -1
- data/lib/templatefox/models/s3_test_response.rb +1 -1
- data/lib/templatefox/models/template_field.rb +1 -1
- data/lib/templatefox/models/template_field_spec.rb +1 -1
- data/lib/templatefox/models/template_list_item.rb +14 -2
- data/lib/templatefox/models/templates_list_response.rb +1 -1
- data/lib/templatefox/models/transaction.rb +1 -1
- data/lib/templatefox/models/transactions_response.rb +1 -1
- data/lib/templatefox/models/update_version_request.rb +1 -1
- data/lib/templatefox/models/validation_error.rb +1 -1
- data/lib/templatefox/models/version_item.rb +1 -1
- data/lib/templatefox/models/versions_list_response.rb +1 -1
- data/lib/templatefox/version.rb +2 -2
- data/lib/templatefox.rb +7 -2
- data/spec/api/account_api_spec.rb +1 -1
- data/spec/api/image_api_spec.rb +47 -0
- data/spec/api/integrations_api_spec.rb +1 -1
- data/spec/api/pdf_api_spec.rb +1 -1
- data/spec/api/pdf_async_api_spec.rb +1 -1
- data/spec/api/pdf_tools_api_spec.rb +1 -1
- data/spec/api/templates_api_spec.rb +2 -1
- data/spec/models/account_info_response_spec.rb +1 -1
- data/spec/models/{app_routers_v1_pdf_export_type_spec.rb → app_routers_v1_delivery_export_type_spec.rb} +7 -7
- data/spec/models/app_routers_v1_pdf_async_export_type_spec.rb +1 -1
- data/spec/models/app_routers_v1_pdf_tools_export_type_spec.rb +1 -1
- data/spec/models/create_async_pdf_request_spec.rb +1 -1
- data/spec/models/create_async_pdf_response_spec.rb +1 -1
- data/spec/models/create_image_request_spec.rb +108 -0
- data/spec/models/create_image_response_spec.rb +60 -0
- data/spec/models/create_pdf_request_spec.rb +1 -1
- data/spec/models/create_pdf_response_spec.rb +1 -1
- data/spec/models/create_version_request_spec.rb +1 -1
- data/spec/models/extract_pdf_pages_request_spec.rb +1 -1
- data/spec/models/http_validation_error_spec.rb +1 -1
- data/spec/models/image_format_spec.rb +30 -0
- data/spec/models/job_list_response_spec.rb +1 -1
- data/spec/models/job_status_response_spec.rb +1 -1
- data/spec/models/job_status_spec.rb +1 -1
- data/spec/models/location_inner_spec.rb +1 -1
- data/spec/models/merge_pdf_request_spec.rb +1 -1
- data/spec/models/modification_spec.rb +66 -0
- data/spec/models/pdf_input_spec.rb +1 -1
- data/spec/models/pdf_tools_response_spec.rb +1 -1
- data/spec/models/pdf_variant_spec.rb +1 -1
- data/spec/models/rotate_pdf_request_spec.rb +1 -1
- data/spec/models/s3_config_request_spec.rb +1 -1
- data/spec/models/s3_config_response_spec.rb +1 -1
- data/spec/models/s3_success_response_spec.rb +1 -1
- data/spec/models/s3_test_response_spec.rb +1 -1
- data/spec/models/template_field_spec.rb +1 -1
- data/spec/models/template_field_spec_spec.rb +1 -1
- data/spec/models/template_list_item_spec.rb +7 -1
- data/spec/models/templates_list_response_spec.rb +1 -1
- data/spec/models/transaction_spec.rb +1 -1
- data/spec/models/transactions_response_spec.rb +1 -1
- data/spec/models/update_version_request_spec.rb +1 -1
- data/spec/models/validation_error_spec.rb +1 -1
- data/spec/models/version_item_spec.rb +1 -1
- data/spec/models/versions_list_response_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/templatefox.gemspec +1 -1
- metadata +46 -31
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#TemplateFox API
|
|
3
|
+
|
|
4
|
+
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module TemplateFox
|
|
17
|
+
# A single element modification, addressed by layer name.
|
|
18
|
+
class Modification < ApiModelBase
|
|
19
|
+
# Name of the layer to modify (set via the editor's Layers panel). Matched against the element's `data-layer-name`, falling back to its `id`.
|
|
20
|
+
attr_accessor :name
|
|
21
|
+
|
|
22
|
+
attr_accessor :text
|
|
23
|
+
|
|
24
|
+
attr_accessor :image_url
|
|
25
|
+
|
|
26
|
+
attr_accessor :color
|
|
27
|
+
|
|
28
|
+
attr_accessor :background
|
|
29
|
+
|
|
30
|
+
attr_accessor :hidden
|
|
31
|
+
|
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
|
+
def self.attribute_map
|
|
34
|
+
{
|
|
35
|
+
:'name' => :'name',
|
|
36
|
+
:'text' => :'text',
|
|
37
|
+
:'image_url' => :'image_url',
|
|
38
|
+
:'color' => :'color',
|
|
39
|
+
:'background' => :'background',
|
|
40
|
+
:'hidden' => :'hidden'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns attribute mapping this model knows about
|
|
45
|
+
def self.acceptable_attribute_map
|
|
46
|
+
attribute_map
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Returns all the JSON keys this model knows about
|
|
50
|
+
def self.acceptable_attributes
|
|
51
|
+
acceptable_attribute_map.values
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Attribute type mapping.
|
|
55
|
+
def self.openapi_types
|
|
56
|
+
{
|
|
57
|
+
:'name' => :'String',
|
|
58
|
+
:'text' => :'String',
|
|
59
|
+
:'image_url' => :'String',
|
|
60
|
+
:'color' => :'String',
|
|
61
|
+
:'background' => :'String',
|
|
62
|
+
:'hidden' => :'Boolean'
|
|
63
|
+
}
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# List of attributes with nullable: true
|
|
67
|
+
def self.openapi_nullable
|
|
68
|
+
Set.new([
|
|
69
|
+
:'text',
|
|
70
|
+
:'image_url',
|
|
71
|
+
:'color',
|
|
72
|
+
:'background',
|
|
73
|
+
:'hidden'
|
|
74
|
+
])
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Initializes the object
|
|
78
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
79
|
+
def initialize(attributes = {})
|
|
80
|
+
if (!attributes.is_a?(Hash))
|
|
81
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TemplateFox::Modification` initialize method"
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
85
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
86
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
87
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
88
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TemplateFox::Modification`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
89
|
+
end
|
|
90
|
+
h[k.to_sym] = v
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'name')
|
|
94
|
+
self.name = attributes[:'name']
|
|
95
|
+
else
|
|
96
|
+
self.name = nil
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'text')
|
|
100
|
+
self.text = attributes[:'text']
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'image_url')
|
|
104
|
+
self.image_url = attributes[:'image_url']
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'color')
|
|
108
|
+
self.color = attributes[:'color']
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'background')
|
|
112
|
+
self.background = attributes[:'background']
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'hidden')
|
|
116
|
+
self.hidden = attributes[:'hidden']
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
121
|
+
# @return Array for valid properties with the reasons
|
|
122
|
+
def list_invalid_properties
|
|
123
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
124
|
+
invalid_properties = Array.new
|
|
125
|
+
if @name.nil?
|
|
126
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if @name.to_s.length > 200
|
|
130
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 200.')
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if @name.to_s.length < 1
|
|
134
|
+
invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 1.')
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if !@text.nil? && @text.to_s.length > 10000
|
|
138
|
+
invalid_properties.push('invalid value for "text", the character length must be smaller than or equal to 10000.')
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if !@image_url.nil? && @image_url.to_s.length > 2000
|
|
142
|
+
invalid_properties.push('invalid value for "image_url", the character length must be smaller than or equal to 2000.')
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
pattern = Regexp.new(/^https?:\/\//)
|
|
146
|
+
if !@image_url.nil? && @image_url !~ pattern
|
|
147
|
+
invalid_properties.push("invalid value for \"image_url\", must conform to the pattern #{pattern}.")
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if !@color.nil? && @color.to_s.length > 100
|
|
151
|
+
invalid_properties.push('invalid value for "color", the character length must be smaller than or equal to 100.')
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if !@background.nil? && @background.to_s.length > 100
|
|
155
|
+
invalid_properties.push('invalid value for "background", the character length must be smaller than or equal to 100.')
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
invalid_properties
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Check to see if the all the properties in the model are valid
|
|
162
|
+
# @return true if the model is valid
|
|
163
|
+
def valid?
|
|
164
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
165
|
+
return false if @name.nil?
|
|
166
|
+
return false if @name.to_s.length > 200
|
|
167
|
+
return false if @name.to_s.length < 1
|
|
168
|
+
return false if !@text.nil? && @text.to_s.length > 10000
|
|
169
|
+
return false if !@image_url.nil? && @image_url.to_s.length > 2000
|
|
170
|
+
return false if !@image_url.nil? && @image_url !~ Regexp.new(/^https?:\/\//)
|
|
171
|
+
return false if !@color.nil? && @color.to_s.length > 100
|
|
172
|
+
return false if !@background.nil? && @background.to_s.length > 100
|
|
173
|
+
true
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Custom attribute writer method with validation
|
|
177
|
+
# @param [Object] name Value to be assigned
|
|
178
|
+
def name=(name)
|
|
179
|
+
if name.nil?
|
|
180
|
+
fail ArgumentError, 'name cannot be nil'
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if name.to_s.length > 200
|
|
184
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 200.'
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
if name.to_s.length < 1
|
|
188
|
+
fail ArgumentError, 'invalid value for "name", the character length must be greater than or equal to 1.'
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
@name = name
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Custom attribute writer method with validation
|
|
195
|
+
# @param [Object] text Value to be assigned
|
|
196
|
+
def text=(text)
|
|
197
|
+
if !text.nil? && text.to_s.length > 10000
|
|
198
|
+
fail ArgumentError, 'invalid value for "text", the character length must be smaller than or equal to 10000.'
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
@text = text
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Custom attribute writer method with validation
|
|
205
|
+
# @param [Object] image_url Value to be assigned
|
|
206
|
+
def image_url=(image_url)
|
|
207
|
+
if !image_url.nil? && image_url.to_s.length > 2000
|
|
208
|
+
fail ArgumentError, 'invalid value for "image_url", the character length must be smaller than or equal to 2000.'
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
pattern = Regexp.new(/^https?:\/\//)
|
|
212
|
+
if !image_url.nil? && image_url !~ pattern
|
|
213
|
+
fail ArgumentError, "invalid value for \"image_url\", must conform to the pattern #{pattern}."
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
@image_url = image_url
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Custom attribute writer method with validation
|
|
220
|
+
# @param [Object] color Value to be assigned
|
|
221
|
+
def color=(color)
|
|
222
|
+
if !color.nil? && color.to_s.length > 100
|
|
223
|
+
fail ArgumentError, 'invalid value for "color", the character length must be smaller than or equal to 100.'
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
@color = color
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Custom attribute writer method with validation
|
|
230
|
+
# @param [Object] background Value to be assigned
|
|
231
|
+
def background=(background)
|
|
232
|
+
if !background.nil? && background.to_s.length > 100
|
|
233
|
+
fail ArgumentError, 'invalid value for "background", the character length must be smaller than or equal to 100.'
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
@background = background
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Checks equality by comparing each attribute.
|
|
240
|
+
# @param [Object] Object to be compared
|
|
241
|
+
def ==(o)
|
|
242
|
+
return true if self.equal?(o)
|
|
243
|
+
self.class == o.class &&
|
|
244
|
+
name == o.name &&
|
|
245
|
+
text == o.text &&
|
|
246
|
+
image_url == o.image_url &&
|
|
247
|
+
color == o.color &&
|
|
248
|
+
background == o.background &&
|
|
249
|
+
hidden == o.hidden
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# @see the `==` method
|
|
253
|
+
# @param [Object] Object to be compared
|
|
254
|
+
def eql?(o)
|
|
255
|
+
self == o
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# Calculates hash code according to all attributes.
|
|
259
|
+
# @return [Integer] Hash code
|
|
260
|
+
def hash
|
|
261
|
+
[name, text, image_url, color, background, hidden].hash
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# Builds the object from hash
|
|
265
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
266
|
+
# @return [Object] Returns the model itself
|
|
267
|
+
def self.build_from_hash(attributes)
|
|
268
|
+
return nil unless attributes.is_a?(Hash)
|
|
269
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
270
|
+
transformed_hash = {}
|
|
271
|
+
openapi_types.each_pair do |key, type|
|
|
272
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
273
|
+
transformed_hash["#{key}"] = nil
|
|
274
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
275
|
+
# check to ensure the input is an array given that the attribute
|
|
276
|
+
# is documented as an array but the input is not
|
|
277
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
278
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
279
|
+
end
|
|
280
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
281
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
282
|
+
end
|
|
283
|
+
end
|
|
284
|
+
new(transformed_hash)
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# Returns the object in the form of hash
|
|
288
|
+
# @return [Hash] Returns the object in the form of hash
|
|
289
|
+
def to_hash
|
|
290
|
+
hash = {}
|
|
291
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
292
|
+
value = self.send(attr)
|
|
293
|
+
if value.nil?
|
|
294
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
295
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
hash[param] = _to_hash(value)
|
|
299
|
+
end
|
|
300
|
+
hash
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -22,6 +22,9 @@ module TemplateFox
|
|
|
22
22
|
# Template name
|
|
23
23
|
attr_accessor :name
|
|
24
24
|
|
|
25
|
+
# Template product kind: `pdf` or `image`
|
|
26
|
+
attr_accessor :kind
|
|
27
|
+
|
|
25
28
|
# ISO 8601 timestamp
|
|
26
29
|
attr_accessor :created_at
|
|
27
30
|
|
|
@@ -33,6 +36,7 @@ module TemplateFox
|
|
|
33
36
|
{
|
|
34
37
|
:'id' => :'id',
|
|
35
38
|
:'name' => :'name',
|
|
39
|
+
:'kind' => :'kind',
|
|
36
40
|
:'created_at' => :'created_at',
|
|
37
41
|
:'updated_at' => :'updated_at'
|
|
38
42
|
}
|
|
@@ -53,6 +57,7 @@ module TemplateFox
|
|
|
53
57
|
{
|
|
54
58
|
:'id' => :'String',
|
|
55
59
|
:'name' => :'String',
|
|
60
|
+
:'kind' => :'String',
|
|
56
61
|
:'created_at' => :'String',
|
|
57
62
|
:'updated_at' => :'String'
|
|
58
63
|
}
|
|
@@ -92,6 +97,12 @@ module TemplateFox
|
|
|
92
97
|
self.name = nil
|
|
93
98
|
end
|
|
94
99
|
|
|
100
|
+
if attributes.key?(:'kind')
|
|
101
|
+
self.kind = attributes[:'kind']
|
|
102
|
+
else
|
|
103
|
+
self.kind = 'pdf'
|
|
104
|
+
end
|
|
105
|
+
|
|
95
106
|
if attributes.key?(:'created_at')
|
|
96
107
|
self.created_at = attributes[:'created_at']
|
|
97
108
|
else
|
|
@@ -187,6 +198,7 @@ module TemplateFox
|
|
|
187
198
|
self.class == o.class &&
|
|
188
199
|
id == o.id &&
|
|
189
200
|
name == o.name &&
|
|
201
|
+
kind == o.kind &&
|
|
190
202
|
created_at == o.created_at &&
|
|
191
203
|
updated_at == o.updated_at
|
|
192
204
|
end
|
|
@@ -200,7 +212,7 @@ module TemplateFox
|
|
|
200
212
|
# Calculates hash code according to all attributes.
|
|
201
213
|
# @return [Integer] Hash code
|
|
202
214
|
def hash
|
|
203
|
-
[id, name, created_at, updated_at].hash
|
|
215
|
+
[id, name, kind, created_at, updated_at].hash
|
|
204
216
|
end
|
|
205
217
|
|
|
206
218
|
# Builds the object from hash
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
data/lib/templatefox/version.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -11,5 +11,5 @@ Generator version: 7.21.0
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
module TemplateFox
|
|
14
|
-
VERSION = '1.
|
|
14
|
+
VERSION = '1.11.0'
|
|
15
15
|
end
|
data/lib/templatefox.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -19,21 +19,25 @@ require 'templatefox/configuration'
|
|
|
19
19
|
|
|
20
20
|
# Models
|
|
21
21
|
require 'templatefox/models/account_info_response'
|
|
22
|
+
require 'templatefox/models/app_routers_v1_delivery_export_type'
|
|
22
23
|
require 'templatefox/models/app_routers_v1_pdf_async_export_type'
|
|
23
|
-
require 'templatefox/models/app_routers_v1_pdf_export_type'
|
|
24
24
|
require 'templatefox/models/app_routers_v1_pdf_tools_export_type'
|
|
25
25
|
require 'templatefox/models/create_async_pdf_request'
|
|
26
26
|
require 'templatefox/models/create_async_pdf_response'
|
|
27
|
+
require 'templatefox/models/create_image_request'
|
|
28
|
+
require 'templatefox/models/create_image_response'
|
|
27
29
|
require 'templatefox/models/create_pdf_request'
|
|
28
30
|
require 'templatefox/models/create_pdf_response'
|
|
29
31
|
require 'templatefox/models/create_version_request'
|
|
30
32
|
require 'templatefox/models/extract_pdf_pages_request'
|
|
31
33
|
require 'templatefox/models/http_validation_error'
|
|
34
|
+
require 'templatefox/models/image_format'
|
|
32
35
|
require 'templatefox/models/job_list_response'
|
|
33
36
|
require 'templatefox/models/job_status'
|
|
34
37
|
require 'templatefox/models/job_status_response'
|
|
35
38
|
require 'templatefox/models/location_inner'
|
|
36
39
|
require 'templatefox/models/merge_pdf_request'
|
|
40
|
+
require 'templatefox/models/modification'
|
|
37
41
|
require 'templatefox/models/pdf_input'
|
|
38
42
|
require 'templatefox/models/pdf_tools_response'
|
|
39
43
|
require 'templatefox/models/pdf_variant'
|
|
@@ -55,6 +59,7 @@ require 'templatefox/models/versions_list_response'
|
|
|
55
59
|
|
|
56
60
|
# APIs
|
|
57
61
|
require 'templatefox/api/account_api'
|
|
62
|
+
require 'templatefox/api/image_api'
|
|
58
63
|
require 'templatefox/api/integrations_api'
|
|
59
64
|
require 'templatefox/api/pdf_api'
|
|
60
65
|
require 'templatefox/api/pdf_async_api'
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#TemplateFox API
|
|
3
|
+
|
|
4
|
+
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for TemplateFox::ImageApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'ImageApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = TemplateFox::ImageApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of ImageApi' do
|
|
30
|
+
it 'should create an instance of ImageApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(TemplateFox::ImageApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for create_image
|
|
36
|
+
# Generate image from template
|
|
37
|
+
# Generate an image (PNG, JPEG or WebP) from an image template. **Authentication:** API Key required (`x-api-key` header) ## Request Body | Field | Type | Required | Description | |-------|------|----------|-------------| | `template_id` | string | ✅ Yes | Template short ID (12 characters) | | `modifications` | array | No | Modify elements by layer name (see below) | | `format` | string | No | `png` (default), `jpeg` or `webp` | | `width` | integer | No | Output width in pixels (defaults to the template's native width) | | `export_type` | string | No | `url` (default) or `binary` | ## Modifications Each modification targets a layer by the `name` you set in the editor's Layers panel: | Property | Description | |----------|-------------| | `name` | Layer name to modify (required) | | `text` | Replace the layer's text | | `image_url` | Set the layer's image (`src` for images, `background-image` otherwise) | | `color` | Text color | | `background` | Background color | | `hidden` | Hide (`true`) or show (`false`) the layer | Unknown layer names are skipped and listed in the response `warnings`. A name that matches several layers is applied to all of them. ## Export Types - `url` (default): image is uploaded to CDN, returns JSON with URL - `binary`: returns raw image bytes directly **Note:** This endpoint only accepts image templates. Use `/v1/pdf/create` for PDF templates. **Credits:** 1 credit deducted per successful generation. **Rate Limits:** 60 requests/min (free), 120 requests/min (paid). Headers included in response.
|
|
38
|
+
# @param create_image_request
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [CreateImageResponse]
|
|
41
|
+
describe 'create_image test' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.11.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|