templatefox 1.7.0 → 1.8.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/README.md +6 -6
- data/lib/templatefox/api/account_api.rb +1 -1
- 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 +9 -9
- data/lib/templatefox/api/templates_api.rb +426 -3
- 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 +3 -3
- data/lib/templatefox/models/account_info_response.rb +1 -1
- data/lib/templatefox/models/app_routers_v1_pdf_async_export_type.rb +1 -1
- data/lib/templatefox/models/app_routers_v1_pdf_export_type.rb +1 -1
- data/lib/templatefox/models/create_async_pdf_request.rb +33 -8
- data/lib/templatefox/models/create_async_pdf_response.rb +1 -1
- data/lib/templatefox/models/create_pdf_request.rb +33 -8
- data/lib/templatefox/models/create_pdf_response.rb +1 -1
- data/lib/templatefox/models/create_version_request.rb +200 -0
- data/lib/templatefox/models/http_validation_error.rb +1 -1
- 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/pdf_variant.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/set_default_version_request.rb +166 -0
- 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 +1 -1
- 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 +200 -0
- data/lib/templatefox/models/validation_error.rb +1 -1
- data/lib/templatefox/models/version_item.rb +225 -0
- data/lib/templatefox/models/versions_list_response.rb +167 -0
- data/lib/templatefox/version.rb +2 -2
- data/lib/templatefox.rb +6 -1
- data/spec/api/account_api_spec.rb +1 -1
- 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 +5 -5
- data/spec/api/templates_api_spec.rb +79 -2
- data/spec/models/account_info_response_spec.rb +1 -1
- data/spec/models/app_routers_v1_pdf_async_export_type_spec.rb +1 -1
- data/spec/models/app_routers_v1_pdf_export_type_spec.rb +1 -1
- data/spec/models/create_async_pdf_request_spec.rb +7 -1
- data/spec/models/create_async_pdf_response_spec.rb +1 -1
- data/spec/models/create_pdf_request_spec.rb +7 -1
- data/spec/models/create_pdf_response_spec.rb +1 -1
- data/spec/models/create_version_request_spec.rb +42 -0
- data/spec/models/http_validation_error_spec.rb +1 -1
- 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/pdf_variant_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/set_default_version_request_spec.rb +36 -0
- 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 +1 -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 +42 -0
- data/spec/models/validation_error_spec.rb +1 -1
- data/spec/models/version_item_spec.rb +60 -0
- data/spec/models/versions_list_response_spec.rb +36 -0
- data/spec/spec_helper.rb +1 -1
- data/templatefox.gemspec +5 -5
- metadata +38 -23
|
@@ -0,0 +1,167 @@
|
|
|
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.8.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
|
+
# Response for versions list
|
|
18
|
+
class VersionsListResponse < ApiModelBase
|
|
19
|
+
attr_accessor :versions
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'versions' => :'versions'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'versions' => :'Array<VersionItem>'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TemplateFox::VersionsListResponse` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TemplateFox::VersionsListResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'versions')
|
|
68
|
+
if (value = attributes[:'versions']).is_a?(Array)
|
|
69
|
+
self.versions = value
|
|
70
|
+
end
|
|
71
|
+
else
|
|
72
|
+
self.versions = nil
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
77
|
+
# @return Array for valid properties with the reasons
|
|
78
|
+
def list_invalid_properties
|
|
79
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
80
|
+
invalid_properties = Array.new
|
|
81
|
+
if @versions.nil?
|
|
82
|
+
invalid_properties.push('invalid value for "versions", versions cannot be nil.')
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
invalid_properties
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Check to see if the all the properties in the model are valid
|
|
89
|
+
# @return true if the model is valid
|
|
90
|
+
def valid?
|
|
91
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
92
|
+
return false if @versions.nil?
|
|
93
|
+
true
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Custom attribute writer method with validation
|
|
97
|
+
# @param [Object] versions Value to be assigned
|
|
98
|
+
def versions=(versions)
|
|
99
|
+
if versions.nil?
|
|
100
|
+
fail ArgumentError, 'versions cannot be nil'
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
@versions = versions
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Checks equality by comparing each attribute.
|
|
107
|
+
# @param [Object] Object to be compared
|
|
108
|
+
def ==(o)
|
|
109
|
+
return true if self.equal?(o)
|
|
110
|
+
self.class == o.class &&
|
|
111
|
+
versions == o.versions
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# @see the `==` method
|
|
115
|
+
# @param [Object] Object to be compared
|
|
116
|
+
def eql?(o)
|
|
117
|
+
self == o
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Calculates hash code according to all attributes.
|
|
121
|
+
# @return [Integer] Hash code
|
|
122
|
+
def hash
|
|
123
|
+
[versions].hash
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Builds the object from hash
|
|
127
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
128
|
+
# @return [Object] Returns the model itself
|
|
129
|
+
def self.build_from_hash(attributes)
|
|
130
|
+
return nil unless attributes.is_a?(Hash)
|
|
131
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
132
|
+
transformed_hash = {}
|
|
133
|
+
openapi_types.each_pair do |key, type|
|
|
134
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
135
|
+
transformed_hash["#{key}"] = nil
|
|
136
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
137
|
+
# check to ensure the input is an array given that the attribute
|
|
138
|
+
# is documented as an array but the input is not
|
|
139
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
140
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
141
|
+
end
|
|
142
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
143
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
new(transformed_hash)
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Returns the object in the form of hash
|
|
150
|
+
# @return [Hash] Returns the object in the form of hash
|
|
151
|
+
def to_hash
|
|
152
|
+
hash = {}
|
|
153
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
154
|
+
value = self.send(attr)
|
|
155
|
+
if value.nil?
|
|
156
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
157
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
hash[param] = _to_hash(value)
|
|
161
|
+
end
|
|
162
|
+
hash
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
end
|
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.8.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.8.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.8.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -25,6 +25,7 @@ require 'templatefox/models/create_async_pdf_request'
|
|
|
25
25
|
require 'templatefox/models/create_async_pdf_response'
|
|
26
26
|
require 'templatefox/models/create_pdf_request'
|
|
27
27
|
require 'templatefox/models/create_pdf_response'
|
|
28
|
+
require 'templatefox/models/create_version_request'
|
|
28
29
|
require 'templatefox/models/http_validation_error'
|
|
29
30
|
require 'templatefox/models/job_list_response'
|
|
30
31
|
require 'templatefox/models/job_status'
|
|
@@ -35,13 +36,17 @@ require 'templatefox/models/s3_config_request'
|
|
|
35
36
|
require 'templatefox/models/s3_config_response'
|
|
36
37
|
require 'templatefox/models/s3_success_response'
|
|
37
38
|
require 'templatefox/models/s3_test_response'
|
|
39
|
+
require 'templatefox/models/set_default_version_request'
|
|
38
40
|
require 'templatefox/models/template_field'
|
|
39
41
|
require 'templatefox/models/template_field_spec'
|
|
40
42
|
require 'templatefox/models/template_list_item'
|
|
41
43
|
require 'templatefox/models/templates_list_response'
|
|
42
44
|
require 'templatefox/models/transaction'
|
|
43
45
|
require 'templatefox/models/transactions_response'
|
|
46
|
+
require 'templatefox/models/update_version_request'
|
|
44
47
|
require 'templatefox/models/validation_error'
|
|
48
|
+
require 'templatefox/models/version_item'
|
|
49
|
+
require 'templatefox/models/versions_list_response'
|
|
45
50
|
|
|
46
51
|
# APIs
|
|
47
52
|
require 'templatefox/api/account_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.8.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.8.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
data/spec/api/pdf_api_spec.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.8.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.8.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -47,7 +47,7 @@ describe 'PDFAsyncApi' do
|
|
|
47
47
|
# unit tests for get_pdf_job
|
|
48
48
|
# Get PDF job status
|
|
49
49
|
# Get the current status of an async PDF generation job. **Authentication:** API Key required (`x-api-key` header) ## Status Values | Status | Description | |--------|-------------| | `pending` | Job is queued, waiting to be processed | | `processing` | Job is being processed | | `completed` | PDF generated successfully | | `failed` | Job failed (check error_message) | ## Polling Recommendations - Poll every 1-2 seconds for small documents - Poll every 5-10 seconds for large documents - Consider using webhooks instead of polling
|
|
50
|
-
# @param job_id
|
|
50
|
+
# @param job_id Async job ID (UUID returned by the create-async endpoint)
|
|
51
51
|
# @param [Hash] opts the optional parameters
|
|
52
52
|
# @return [JobStatusResponse]
|
|
53
53
|
describe 'get_pdf_job test' do
|
|
@@ -60,9 +60,9 @@ describe 'PDFAsyncApi' do
|
|
|
60
60
|
# List PDF jobs
|
|
61
61
|
# List async PDF generation jobs for your team. **Authentication:** API Key required (`x-api-key` header) Supports pagination and filtering by status.
|
|
62
62
|
# @param [Hash] opts the optional parameters
|
|
63
|
-
# @option opts [Integer] :limit
|
|
64
|
-
# @option opts [Integer] :offset
|
|
65
|
-
# @option opts [JobStatus] :status
|
|
63
|
+
# @option opts [Integer] :limit Maximum number of results to return
|
|
64
|
+
# @option opts [Integer] :offset Number of results to skip (for pagination)
|
|
65
|
+
# @option opts [JobStatus] :status Filter jobs by status
|
|
66
66
|
# @return [JobListResponse]
|
|
67
67
|
describe 'list_pdf_jobs test' do
|
|
68
68
|
it 'should work' do
|
|
@@ -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.8.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -32,10 +32,36 @@ describe 'TemplatesApi' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
# unit tests for create_template_version
|
|
36
|
+
# Create a version snapshot
|
|
37
|
+
# Create an immutable snapshot of the current template draft.
|
|
38
|
+
# @param template_id Template short ID (12 characters)
|
|
39
|
+
# @param create_version_request
|
|
40
|
+
# @param [Hash] opts the optional parameters
|
|
41
|
+
# @return [VersionItem]
|
|
42
|
+
describe 'create_template_version test' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# unit tests for delete_template_version
|
|
49
|
+
# Delete a version
|
|
50
|
+
# Delete a specific version snapshot.
|
|
51
|
+
# @param template_id Template short ID
|
|
52
|
+
# @param version_number Version number to delete
|
|
53
|
+
# @param [Hash] opts the optional parameters
|
|
54
|
+
# @return [Object]
|
|
55
|
+
describe 'delete_template_version test' do
|
|
56
|
+
it 'should work' do
|
|
57
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
35
61
|
# unit tests for get_template_fields
|
|
36
62
|
# Get template fields
|
|
37
63
|
# Get the dynamic fields for a template. **Authentication:** API Key required (`x-api-key` header) or JWT token **Usage:** This endpoint is designed for no-code tool integrations (Zapier, Make.com). It returns an array of field definitions used to dynamically generate input forms. **Response format:** Array of field objects with: `key`, `label`, `type`, `required`, optional `helpText`, and optional `spec` (for array fields). **Field types:** - `string`: Text input - `integer`: Integer number - `number`: Decimal number - `boolean`: True/False checkbox - `array`: Array of items with nested `spec` defining item structure **Array fields:** When a field is an array of objects, the response includes a `spec` array defining the structure of each item (name, label, type for each nested field). **No credits consumed:** This is a read-only endpoint. **Rate Limits:** 60 requests/min (free), 120 requests/min (paid). Headers included in response.
|
|
38
|
-
# @param template_id
|
|
64
|
+
# @param template_id Template short ID (12 characters)
|
|
39
65
|
# @param [Hash] opts the optional parameters
|
|
40
66
|
# @return [Array<TemplateField>]
|
|
41
67
|
describe 'get_template_fields test' do
|
|
@@ -44,6 +70,18 @@ describe 'TemplatesApi' do
|
|
|
44
70
|
end
|
|
45
71
|
end
|
|
46
72
|
|
|
73
|
+
# unit tests for list_template_versions
|
|
74
|
+
# List template versions
|
|
75
|
+
# List all snapshot versions for a template (excludes the working draft).
|
|
76
|
+
# @param template_id Template short ID (12 characters)
|
|
77
|
+
# @param [Hash] opts the optional parameters
|
|
78
|
+
# @return [VersionsListResponse]
|
|
79
|
+
describe 'list_template_versions test' do
|
|
80
|
+
it 'should work' do
|
|
81
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
47
85
|
# unit tests for list_templates
|
|
48
86
|
# List templates
|
|
49
87
|
# List all templates for the authenticated user. **Authentication:** API Key required (`x-api-key` header) or JWT token **Usage:** This endpoint is designed for no-code tools (Zapier, Make, n8n) to populate template selection dropdowns. **No credits consumed:** This is a read-only endpoint. **Rate Limits:** 60 requests/min (free), 120 requests/min (paid). Headers included in response.
|
|
@@ -55,4 +93,43 @@ describe 'TemplatesApi' do
|
|
|
55
93
|
end
|
|
56
94
|
end
|
|
57
95
|
|
|
96
|
+
# unit tests for remove_default_version
|
|
97
|
+
# Remove default version
|
|
98
|
+
# Remove the default version setting. API will use the working draft.
|
|
99
|
+
# @param template_id Template short ID
|
|
100
|
+
# @param [Hash] opts the optional parameters
|
|
101
|
+
# @return [Object]
|
|
102
|
+
describe 'remove_default_version test' do
|
|
103
|
+
it 'should work' do
|
|
104
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# unit tests for set_default_version
|
|
109
|
+
# Set default version
|
|
110
|
+
# Set which version the API uses by default when no version param is provided.
|
|
111
|
+
# @param template_id Template short ID
|
|
112
|
+
# @param set_default_version_request
|
|
113
|
+
# @param [Hash] opts the optional parameters
|
|
114
|
+
# @return [Object]
|
|
115
|
+
describe 'set_default_version test' do
|
|
116
|
+
it 'should work' do
|
|
117
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# unit tests for update_template_version
|
|
122
|
+
# Update a version
|
|
123
|
+
# Update a version's tag or description.
|
|
124
|
+
# @param template_id Template short ID
|
|
125
|
+
# @param version_number Version number to update
|
|
126
|
+
# @param update_version_request
|
|
127
|
+
# @param [Hash] opts the optional parameters
|
|
128
|
+
# @return [VersionItem]
|
|
129
|
+
describe 'update_template_version test' do
|
|
130
|
+
it 'should work' do
|
|
131
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
58
135
|
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.8.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.8.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.8.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.8.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -93,4 +93,10 @@ describe TemplateFox::CreateAsyncPdfRequest do
|
|
|
93
93
|
end
|
|
94
94
|
end
|
|
95
95
|
|
|
96
|
+
describe 'test attribute "version"' do
|
|
97
|
+
it 'should work' do
|
|
98
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
96
102
|
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.8.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.8.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -81,4 +81,10 @@ describe TemplateFox::CreatePdfRequest do
|
|
|
81
81
|
end
|
|
82
82
|
end
|
|
83
83
|
|
|
84
|
+
describe 'test attribute "version"' do
|
|
85
|
+
it 'should work' do
|
|
86
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
84
90
|
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.8.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -0,0 +1,42 @@
|
|
|
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.8.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
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for TemplateFox::CreateVersionRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe TemplateFox::CreateVersionRequest do
|
|
21
|
+
#let(:instance) { TemplateFox::CreateVersionRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CreateVersionRequest' do
|
|
24
|
+
it 'should create an instance of CreateVersionRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(TemplateFox::CreateVersionRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "tag"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "description"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
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.8.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.8.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.8.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.8.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.8.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.8.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.8.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.8.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.8.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.8.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -0,0 +1,36 @@
|
|
|
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.8.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
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for TemplateFox::SetDefaultVersionRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe TemplateFox::SetDefaultVersionRequest do
|
|
21
|
+
#let(:instance) { TemplateFox::SetDefaultVersionRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of SetDefaultVersionRequest' do
|
|
24
|
+
it 'should create an instance of SetDefaultVersionRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(TemplateFox::SetDefaultVersionRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "version_number"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|