templatefox 1.0.1 → 1.6.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 (67) hide show
  1. checksums.yaml +4 -4
  2. data/lib/templatefox/api/account_api.rb +6 -6
  3. data/lib/templatefox/api/integrations_api.rb +10 -10
  4. data/lib/templatefox/api/pdf_api.rb +4 -4
  5. data/lib/templatefox/api/pdf_async_api.rb +219 -0
  6. data/lib/templatefox/api/templates_api.rb +6 -6
  7. data/lib/templatefox/api_client.rb +2 -2
  8. data/lib/templatefox/api_error.rb +2 -2
  9. data/lib/templatefox/api_model_base.rb +2 -2
  10. data/lib/templatefox/configuration.rb +2 -2
  11. data/lib/templatefox/models/account_info_response.rb +2 -2
  12. data/lib/templatefox/models/app_routers_v1_pdf_async_export_type.rb +39 -0
  13. data/lib/templatefox/models/{export_type.rb → app_routers_v1_pdf_export_type.rb} +5 -5
  14. data/lib/templatefox/models/create_async_pdf_request.rb +482 -0
  15. data/lib/templatefox/models/create_async_pdf_response.rb +242 -0
  16. data/lib/templatefox/models/create_pdf_request.rb +3 -3
  17. data/lib/templatefox/models/create_pdf_response.rb +2 -2
  18. data/lib/templatefox/models/http_validation_error.rb +2 -2
  19. data/lib/templatefox/models/job_list_response.rb +249 -0
  20. data/lib/templatefox/models/job_status.rb +42 -0
  21. data/lib/templatefox/models/job_status_response.rb +440 -0
  22. data/lib/templatefox/models/location_inner.rb +2 -2
  23. data/lib/templatefox/models/s3_config_request.rb +2 -2
  24. data/lib/templatefox/models/s3_config_response.rb +2 -2
  25. data/lib/templatefox/models/s3_success_response.rb +2 -2
  26. data/lib/templatefox/models/s3_test_response.rb +2 -2
  27. data/lib/templatefox/models/template_field.rb +21 -9
  28. data/lib/templatefox/models/template_field_spec.rb +205 -0
  29. data/lib/templatefox/models/template_list_item.rb +2 -2
  30. data/lib/templatefox/models/templates_list_response.rb +2 -2
  31. data/lib/templatefox/models/transaction.rb +2 -2
  32. data/lib/templatefox/models/transactions_response.rb +2 -2
  33. data/lib/templatefox/models/validation_error.rb +2 -2
  34. data/lib/templatefox/version.rb +3 -3
  35. data/lib/templatefox.rb +11 -3
  36. data/spec/api/account_api_spec.rb +4 -4
  37. data/spec/api/integrations_api_spec.rb +6 -6
  38. data/spec/api/pdf_api_spec.rb +3 -3
  39. data/spec/api/pdf_async_api_spec.rb +73 -0
  40. data/spec/api/templates_api_spec.rb +4 -4
  41. data/spec/models/account_info_response_spec.rb +2 -2
  42. data/spec/models/app_routers_v1_pdf_async_export_type_spec.rb +30 -0
  43. data/spec/models/app_routers_v1_pdf_export_type_spec.rb +30 -0
  44. data/spec/models/create_async_pdf_request_spec.rb +90 -0
  45. data/spec/models/create_async_pdf_response_spec.rb +48 -0
  46. data/spec/models/create_pdf_request_spec.rb +2 -2
  47. data/spec/models/create_pdf_response_spec.rb +2 -2
  48. data/spec/models/http_validation_error_spec.rb +2 -2
  49. data/spec/models/job_list_response_spec.rb +54 -0
  50. data/spec/models/job_status_response_spec.rb +126 -0
  51. data/spec/models/job_status_spec.rb +30 -0
  52. data/spec/models/location_inner_spec.rb +2 -2
  53. data/spec/models/s3_config_request_spec.rb +2 -2
  54. data/spec/models/s3_config_response_spec.rb +2 -2
  55. data/spec/models/s3_success_response_spec.rb +2 -2
  56. data/spec/models/s3_test_response_spec.rb +2 -2
  57. data/spec/models/template_field_spec.rb +8 -2
  58. data/spec/models/template_field_spec_spec.rb +48 -0
  59. data/spec/models/template_list_item_spec.rb +2 -2
  60. data/spec/models/templates_list_response_spec.rb +2 -2
  61. data/spec/models/transaction_spec.rb +2 -2
  62. data/spec/models/transactions_response_spec.rb +2 -2
  63. data/spec/models/validation_error_spec.rb +2 -2
  64. data/spec/spec_helper.rb +2 -2
  65. data/templatefox.gemspec +2 -2
  66. metadata +39 -15
  67. data/spec/models/export_type_spec.rb +0 -30
@@ -0,0 +1,205 @@
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.6.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TemplateFox
17
+ # Spec for array item fields
18
+ class TemplateFieldSpec < ApiModelBase
19
+ # Field name
20
+ attr_accessor :name
21
+
22
+ # Field label
23
+ attr_accessor :label
24
+
25
+ # Field type: text, number
26
+ attr_accessor :type
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'name' => :'name',
32
+ :'label' => :'label',
33
+ :'type' => :'type'
34
+ }
35
+ end
36
+
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ acceptable_attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'name' => :'String',
51
+ :'label' => :'String',
52
+ :'type' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TemplateFox::TemplateFieldSpec` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TemplateFox::TemplateFieldSpec`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'name')
79
+ self.name = attributes[:'name']
80
+ else
81
+ self.name = nil
82
+ end
83
+
84
+ if attributes.key?(:'label')
85
+ self.label = attributes[:'label']
86
+ else
87
+ self.label = nil
88
+ end
89
+
90
+ if attributes.key?(:'type')
91
+ self.type = attributes[:'type']
92
+ else
93
+ self.type = 'text'
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
+ invalid_properties = Array.new
102
+ if @name.nil?
103
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
104
+ end
105
+
106
+ if @label.nil?
107
+ invalid_properties.push('invalid value for "label", label cannot be nil.')
108
+ end
109
+
110
+ invalid_properties
111
+ end
112
+
113
+ # Check to see if the all the properties in the model are valid
114
+ # @return true if the model is valid
115
+ def valid?
116
+ warn '[DEPRECATED] the `valid?` method is obsolete'
117
+ return false if @name.nil?
118
+ return false if @label.nil?
119
+ true
120
+ end
121
+
122
+ # Custom attribute writer method with validation
123
+ # @param [Object] name Value to be assigned
124
+ def name=(name)
125
+ if name.nil?
126
+ fail ArgumentError, 'name cannot be nil'
127
+ end
128
+
129
+ @name = name
130
+ end
131
+
132
+ # Custom attribute writer method with validation
133
+ # @param [Object] label Value to be assigned
134
+ def label=(label)
135
+ if label.nil?
136
+ fail ArgumentError, 'label cannot be nil'
137
+ end
138
+
139
+ @label = label
140
+ end
141
+
142
+ # Checks equality by comparing each attribute.
143
+ # @param [Object] Object to be compared
144
+ def ==(o)
145
+ return true if self.equal?(o)
146
+ self.class == o.class &&
147
+ name == o.name &&
148
+ label == o.label &&
149
+ type == o.type
150
+ end
151
+
152
+ # @see the `==` method
153
+ # @param [Object] Object to be compared
154
+ def eql?(o)
155
+ self == o
156
+ end
157
+
158
+ # Calculates hash code according to all attributes.
159
+ # @return [Integer] Hash code
160
+ def hash
161
+ [name, label, type].hash
162
+ end
163
+
164
+ # Builds the object from hash
165
+ # @param [Hash] attributes Model attributes in the form of hash
166
+ # @return [Object] Returns the model itself
167
+ def self.build_from_hash(attributes)
168
+ return nil unless attributes.is_a?(Hash)
169
+ attributes = attributes.transform_keys(&:to_sym)
170
+ transformed_hash = {}
171
+ openapi_types.each_pair do |key, type|
172
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
173
+ transformed_hash["#{key}"] = nil
174
+ elsif type =~ /\AArray<(.*)>/i
175
+ # check to ensure the input is an array given that the attribute
176
+ # is documented as an array but the input is not
177
+ if attributes[attribute_map[key]].is_a?(Array)
178
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
179
+ end
180
+ elsif !attributes[attribute_map[key]].nil?
181
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
182
+ end
183
+ end
184
+ new(transformed_hash)
185
+ end
186
+
187
+ # Returns the object in the form of hash
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_hash
190
+ hash = {}
191
+ self.class.attribute_map.each_pair do |attr, param|
192
+ value = self.send(attr)
193
+ if value.nil?
194
+ is_nullable = self.class.openapi_nullable.include?(attr)
195
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
196
+ end
197
+
198
+ hash[param] = _to_hash(value)
199
+ end
200
+ hash
201
+ end
202
+
203
+ end
204
+
205
+ end
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #TemplateFox API
3
3
 
4
- #Generate PDFs from HTML templates via API. Design once, generate thousands.
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.0.0
6
+ The version of the OpenAPI document: 1.6.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #TemplateFox API
3
3
 
4
- #Generate PDFs from HTML templates via API. Design once, generate thousands.
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.0.0
6
+ The version of the OpenAPI document: 1.6.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #TemplateFox API
3
3
 
4
- #Generate PDFs from HTML templates via API. Design once, generate thousands.
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.0.0
6
+ The version of the OpenAPI document: 1.6.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #TemplateFox API
3
3
 
4
- #Generate PDFs from HTML templates via API. Design once, generate thousands.
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.0.0
6
+ The version of the OpenAPI document: 1.6.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #TemplateFox API
3
3
 
4
- #Generate PDFs from HTML templates via API. Design once, generate thousands.
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.0.0
6
+ The version of the OpenAPI document: 1.6.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #TemplateFox API
3
3
 
4
- #Generate PDFs from HTML templates via API. Design once, generate thousands.
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.0.0
6
+ The version of the OpenAPI document: 1.6.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module TemplateFox
14
- VERSION = '1.0.1'
14
+ VERSION = '1.6.0'
15
15
  end
data/lib/templatefox.rb CHANGED
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #TemplateFox API
3
3
 
4
- #Generate PDFs from HTML templates via API. Design once, generate thousands.
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.0.0
6
+ The version of the OpenAPI document: 1.6.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -19,16 +19,23 @@ require 'templatefox/configuration'
19
19
 
20
20
  # Models
21
21
  require 'templatefox/models/account_info_response'
22
+ require 'templatefox/models/app_routers_v1_pdf_async_export_type'
23
+ require 'templatefox/models/app_routers_v1_pdf_export_type'
24
+ require 'templatefox/models/create_async_pdf_request'
25
+ require 'templatefox/models/create_async_pdf_response'
22
26
  require 'templatefox/models/create_pdf_request'
23
27
  require 'templatefox/models/create_pdf_response'
24
- require 'templatefox/models/export_type'
25
28
  require 'templatefox/models/http_validation_error'
29
+ require 'templatefox/models/job_list_response'
30
+ require 'templatefox/models/job_status'
31
+ require 'templatefox/models/job_status_response'
26
32
  require 'templatefox/models/location_inner'
27
33
  require 'templatefox/models/s3_config_request'
28
34
  require 'templatefox/models/s3_config_response'
29
35
  require 'templatefox/models/s3_success_response'
30
36
  require 'templatefox/models/s3_test_response'
31
37
  require 'templatefox/models/template_field'
38
+ require 'templatefox/models/template_field_spec'
32
39
  require 'templatefox/models/template_list_item'
33
40
  require 'templatefox/models/templates_list_response'
34
41
  require 'templatefox/models/transaction'
@@ -39,6 +46,7 @@ require 'templatefox/models/validation_error'
39
46
  require 'templatefox/api/account_api'
40
47
  require 'templatefox/api/integrations_api'
41
48
  require 'templatefox/api/pdf_api'
49
+ require 'templatefox/api/pdf_async_api'
42
50
  require 'templatefox/api/templates_api'
43
51
 
44
52
  module TemplateFox
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #TemplateFox API
3
3
 
4
- #Generate PDFs from HTML templates via API. Design once, generate thousands.
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.0.0
6
+ The version of the OpenAPI document: 1.6.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -34,7 +34,7 @@ describe 'AccountApi' do
34
34
 
35
35
  # unit tests for get_account
36
36
  # Get account info
37
- # Get account information including remaining credits. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) or JWT token **Usage:** Check credit balance before performing operations. **No credits consumed:** This is a read-only endpoint.
37
+ # Get account information including remaining credits. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) or JWT token **Usage:** Check credit balance before performing operations. **No credits consumed:** This is a read-only endpoint. **Rate Limits:** 60 requests/min (free), 120 requests/min (paid). Headers included in response.
38
38
  # @param [Hash] opts the optional parameters
39
39
  # @return [AccountInfoResponse]
40
40
  describe 'get_account test' do
@@ -45,7 +45,7 @@ describe 'AccountApi' do
45
45
 
46
46
  # unit tests for list_transactions
47
47
  # List transactions
48
- # List transaction history for the authenticated user. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) or JWT token **Pagination:** Use &#x60;limit&#x60; and &#x60;offset&#x60; query parameters. **Transaction types:** - &#x60;PDFGEN&#x60;: PDF generation (consumes credits) - &#x60;REFUND&#x60;: Credit refund (on failed generation) - &#x60;PURCHASE&#x60;: Credit purchase - &#x60;BONUS&#x60;: Bonus credits **Credits field:** - Positive value &#x3D; credits consumed - Negative value &#x3D; credits added **No credits consumed:** This is a read-only endpoint.
48
+ # List transaction history for the authenticated user. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) or JWT token **Pagination:** Use &#x60;limit&#x60; and &#x60;offset&#x60; query parameters. **Transaction types:** - &#x60;PDFGEN&#x60;: PDF generation (consumes credits) - &#x60;REFUND&#x60;: Credit refund (on failed generation) - &#x60;PURCHASE&#x60;: Credit purchase - &#x60;BONUS&#x60;: Bonus credits **Credits field:** - Positive value &#x3D; credits consumed - Negative value &#x3D; credits added **No credits consumed:** This is a read-only endpoint. **Rate Limits:** 60 requests/min (free), 120 requests/min (paid). Headers included in response.
49
49
  # @param [Hash] opts the optional parameters
50
50
  # @option opts [Integer] :limit Number of records to return
51
51
  # @option opts [Integer] :offset Number of records to skip
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #TemplateFox API
3
3
 
4
- #Generate PDFs from HTML templates via API. Design once, generate thousands.
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.0.0
6
+ The version of the OpenAPI document: 1.6.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -34,7 +34,7 @@ describe 'IntegrationsApi' do
34
34
 
35
35
  # unit tests for delete_s3_config
36
36
  # Delete S3 configuration
37
- # Delete S3 storage configuration. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) with admin privileges **Usage:** Remove your S3 integration. Generated PDFs will use the default CDN storage after deletion. **Warning:** This action is irreversible. You&#39;ll need to reconfigure S3 to use it again. **No credits consumed:** This is a configuration endpoint.
37
+ # Delete S3 storage configuration. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) **Usage:** Remove your S3 integration. Generated PDFs will use the default CDN storage after deletion. **Warning:** This action is irreversible. You&#39;ll need to reconfigure S3 to use it again. **No credits consumed:** This is a configuration endpoint. **Rate Limits:** 60 requests/min (free), 120 requests/min (paid). Headers included in response.
38
38
  # @param [Hash] opts the optional parameters
39
39
  # @return [S3SuccessResponse]
40
40
  describe 'delete_s3_config test' do
@@ -45,7 +45,7 @@ describe 'IntegrationsApi' do
45
45
 
46
46
  # unit tests for get_s3_config
47
47
  # Get S3 configuration
48
- # Get current S3 storage configuration. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) with admin privileges **Usage:** Retrieve your S3 integration settings. Secret access key is masked for security. **Returns 404** if S3 is not configured. **No credits consumed:** This is a read-only endpoint.
48
+ # Get current S3 storage configuration. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) **Usage:** Retrieve your S3 integration settings. Secret access key is masked for security. **Returns 404** if S3 is not configured. **No credits consumed:** This is a read-only endpoint. **Rate Limits:** 60 requests/min (free), 120 requests/min (paid). Headers included in response.
49
49
  # @param [Hash] opts the optional parameters
50
50
  # @return [S3ConfigResponse]
51
51
  describe 'get_s3_config test' do
@@ -56,7 +56,7 @@ describe 'IntegrationsApi' do
56
56
 
57
57
  # unit tests for save_s3_config
58
58
  # Save S3 configuration
59
- # Save or update S3-compatible storage configuration. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) with admin privileges **Usage:** Configure your S3-compatible storage to receive generated PDFs directly in your own bucket instead of the default CDN. **Supported providers:** - Amazon S3 - DigitalOcean Spaces - Cloudflare R2 - MinIO - Any S3-compatible storage **Secret key behavior:** - For new configuration: &#x60;secret_access_key&#x60; is required - For updates: Omit &#x60;secret_access_key&#x60; to keep existing value **No credits consumed:** This is a configuration endpoint.
59
+ # Save or update S3-compatible storage configuration. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) **Usage:** Configure your S3-compatible storage to receive generated PDFs directly in your own bucket instead of the default CDN. **Supported providers:** - Amazon S3 - DigitalOcean Spaces - Cloudflare R2 - MinIO - Any S3-compatible storage **Secret key behavior:** - For new configuration: &#x60;secret_access_key&#x60; is required - For updates: Omit &#x60;secret_access_key&#x60; to keep existing value **No credits consumed:** This is a configuration endpoint. **Rate Limits:** 60 requests/min (free), 120 requests/min (paid). Headers included in response.
60
60
  # @param s3_config_request
61
61
  # @param [Hash] opts the optional parameters
62
62
  # @return [S3SuccessResponse]
@@ -68,7 +68,7 @@ describe 'IntegrationsApi' do
68
68
 
69
69
  # unit tests for test_s3_connection
70
70
  # Test S3 connection
71
- # Test S3 connection with stored credentials. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) with admin privileges **Usage:** Verify your S3 configuration is working correctly. The test will: 1. Connect to the endpoint 2. Verify bucket access 3. Check write permissions by uploading a small test file **Prerequisite:** S3 must be configured first using &#x60;POST /v1/integrations/s3&#x60; **No credits consumed:** This is a diagnostic endpoint.
71
+ # Test S3 connection with stored credentials. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) **Usage:** Verify your S3 configuration is working correctly. The test will: 1. Connect to the endpoint 2. Verify bucket access 3. Check write permissions by uploading a small test file **Prerequisite:** S3 must be configured first using &#x60;POST /v1/integrations/s3&#x60; **No credits consumed:** This is a diagnostic endpoint. **Rate Limits:** 60 requests/min (free), 120 requests/min (paid). Headers included in response.
72
72
  # @param [Hash] opts the optional parameters
73
73
  # @return [S3TestResponse]
74
74
  describe 'test_s3_connection test' do
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #TemplateFox API
3
3
 
4
- #Generate PDFs from HTML templates via API. Design once, generate thousands.
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.0.0
6
+ The version of the OpenAPI document: 1.6.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -34,7 +34,7 @@ describe 'PDFApi' do
34
34
 
35
35
  # unit tests for create_pdf
36
36
  # Generate PDF from template
37
- # Generate a PDF from a saved template with dynamic data. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) ## Request Body | Field | Type | Required | Description | |-------|------|----------|-------------| | &#x60;template_id&#x60; | string | ✅ Yes | Template short ID (12 characters) | | &#x60;data&#x60; | object | ✅ Yes | Key-value data to render in template | | &#x60;export_type&#x60; | string | No | &#x60;url&#x60; (default) or &#x60;binary&#x60; | | &#x60;expiration&#x60; | integer | No | URL expiration in seconds (60-604800, default: 86400) | ## Export Types - &#x60;url&#x60; (default): PDF is uploaded to CDN, returns JSON with URL - &#x60;binary&#x60;: Returns raw PDF bytes directly **Credits:** 1 credit deducted per successful generation.
37
+ # Generate a PDF from a saved template with dynamic data. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) ## Request Body | Field | Type | Required | Description | |-------|------|----------|-------------| | &#x60;template_id&#x60; | string | ✅ Yes | Template short ID (12 characters) | | &#x60;data&#x60; | object | ✅ Yes | Key-value data to render in template | | &#x60;export_type&#x60; | string | No | &#x60;url&#x60; (default) or &#x60;binary&#x60; | | &#x60;expiration&#x60; | integer | No | URL expiration in seconds (60-604800, default: 86400) | ## Export Types - &#x60;url&#x60; (default): PDF is uploaded to CDN, returns JSON with URL - &#x60;binary&#x60;: Returns raw PDF bytes directly **Credits:** 1 credit deducted per successful generation. **Rate Limits:** 60 requests/min (free), 120 requests/min (paid). Headers included in response.
38
38
  # @param create_pdf_request
39
39
  # @param [Hash] opts the optional parameters
40
40
  # @return [CreatePdfResponse]
@@ -0,0 +1,73 @@
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.6.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for TemplateFox::PDFAsyncApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'PDFAsyncApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = TemplateFox::PDFAsyncApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of PDFAsyncApi' do
30
+ it 'should create an instance of PDFAsyncApi' do
31
+ expect(@api_instance).to be_instance_of(TemplateFox::PDFAsyncApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for create_pdf_async
36
+ # Generate PDF asynchronously
37
+ # Queue a PDF generation job for async processing. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) ## How It Works 1. Submit a job with template and data 2. Receive a &#x60;job_id&#x60; immediately 3. Poll &#x60;/v1/pdf/status/{job_id}&#x60; for completion 4. Optionally receive a webhook notification ## When to Use Async Use async generation when: - Processing large documents or batches - You can&#39;t wait for synchronous response - You want webhook notifications ## Webhooks If &#x60;webhook_url&#x60; is provided, we&#39;ll POST to it when the job completes or fails: &#x60;&#x60;&#x60;json { \&quot;event\&quot;: \&quot;pdf.completed\&quot;, \&quot;job_id\&quot;: \&quot;...\&quot;, \&quot;status\&quot;: \&quot;completed\&quot;, \&quot;result\&quot;: { \&quot;url\&quot;: \&quot;https://...\&quot;, \&quot;filename\&quot;: \&quot;invoice.pdf\&quot; } } &#x60;&#x60;&#x60; Webhooks include HMAC-SHA256 signature in &#x60;X-TemplateFox-Signature&#x60; header if you provide a &#x60;webhook_secret&#x60;. **Credits:** 1 credit deducted immediately (refunded if job fails permanently).
38
+ # @param create_async_pdf_request
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [CreateAsyncPdfResponse]
41
+ describe 'create_pdf_async 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
+ # unit tests for get_pdf_job
48
+ # Get PDF job status
49
+ # Get the current status of an async PDF generation job. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) ## Status Values | Status | Description | |--------|-------------| | &#x60;pending&#x60; | Job is queued, waiting to be processed | | &#x60;processing&#x60; | Job is being processed | | &#x60;completed&#x60; | PDF generated successfully | | &#x60;failed&#x60; | 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
51
+ # @param [Hash] opts the optional parameters
52
+ # @return [JobStatusResponse]
53
+ describe 'get_pdf_job test' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
56
+ end
57
+ end
58
+
59
+ # unit tests for list_pdf_jobs
60
+ # List PDF jobs
61
+ # List async PDF generation jobs for your team. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) Supports pagination and filtering by status.
62
+ # @param [Hash] opts the optional parameters
63
+ # @option opts [Integer] :limit
64
+ # @option opts [Integer] :offset
65
+ # @option opts [JobStatus] :status
66
+ # @return [JobListResponse]
67
+ describe 'list_pdf_jobs test' do
68
+ it 'should work' do
69
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
70
+ end
71
+ end
72
+
73
+ end
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #TemplateFox API
3
3
 
4
- #Generate PDFs from HTML templates via API. Design once, generate thousands.
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.0.0
6
+ The version of the OpenAPI document: 1.6.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -34,7 +34,7 @@ describe 'TemplatesApi' do
34
34
 
35
35
  # unit tests for get_template_fields
36
36
  # Get template fields
37
- # Get the dynamic fields for a template. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) or JWT token **Usage:** This endpoint is designed for Zapier Dynamic Fields integration. It returns an array of field definitions that Zapier uses to dynamically generate input forms. **Response format:** Array of objects compatible with Zapier InputFieldsSchema. Each field has: &#x60;key&#x60;, &#x60;label&#x60;, &#x60;type&#x60;, &#x60;required&#x60;, and optional &#x60;helpText&#x60;. **Field types:** - &#x60;string&#x60;: Text input (also used for JSON arrays/objects) - &#x60;integer&#x60;: Integer number - &#x60;number&#x60;: Decimal number - &#x60;boolean&#x60;: True/False checkbox **Arrays and objects:** Complex types are returned as &#x60;string&#x60; type with a &#x60;helpText&#x60; showing the expected JSON format. **No credits consumed:** This is a read-only endpoint.
37
+ # Get the dynamic fields for a template. **Authentication:** API Key required (&#x60;x-api-key&#x60; 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: &#x60;key&#x60;, &#x60;label&#x60;, &#x60;type&#x60;, &#x60;required&#x60;, optional &#x60;helpText&#x60;, and optional &#x60;spec&#x60; (for array fields). **Field types:** - &#x60;string&#x60;: Text input - &#x60;integer&#x60;: Integer number - &#x60;number&#x60;: Decimal number - &#x60;boolean&#x60;: True/False checkbox - &#x60;array&#x60;: Array of items with nested &#x60;spec&#x60; defining item structure **Array fields:** When a field is an array of objects, the response includes a &#x60;spec&#x60; 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
38
  # @param template_id
39
39
  # @param [Hash] opts the optional parameters
40
40
  # @return [Array<TemplateField>]
@@ -46,7 +46,7 @@ describe 'TemplatesApi' do
46
46
 
47
47
  # unit tests for list_templates
48
48
  # List templates
49
- # List all templates for the authenticated user. **Authentication:** API Key required (&#x60;x-api-key&#x60; 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.
49
+ # List all templates for the authenticated user. **Authentication:** API Key required (&#x60;x-api-key&#x60; 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.
50
50
  # @param [Hash] opts the optional parameters
51
51
  # @return [TemplatesListResponse]
52
52
  describe 'list_templates test' do
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #TemplateFox API
3
3
 
4
- #Generate PDFs from HTML templates via API. Design once, generate thousands.
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.0.0
6
+ The version of the OpenAPI document: 1.6.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -0,0 +1,30 @@
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.6.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for TemplateFox::AppRoutersV1PdfAsyncExportType
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe TemplateFox::AppRoutersV1PdfAsyncExportType do
21
+ #let(:instance) { TemplateFox::AppRoutersV1PdfAsyncExportType.new }
22
+
23
+ describe 'test an instance of AppRoutersV1PdfAsyncExportType' do
24
+ it 'should create an instance of AppRoutersV1PdfAsyncExportType' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(TemplateFox::AppRoutersV1PdfAsyncExportType)
27
+ end
28
+ end
29
+
30
+ end
@@ -0,0 +1,30 @@
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.6.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for TemplateFox::AppRoutersV1PdfExportType
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe TemplateFox::AppRoutersV1PdfExportType do
21
+ #let(:instance) { TemplateFox::AppRoutersV1PdfExportType.new }
22
+
23
+ describe 'test an instance of AppRoutersV1PdfExportType' do
24
+ it 'should create an instance of AppRoutersV1PdfExportType' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(TemplateFox::AppRoutersV1PdfExportType)
27
+ end
28
+ end
29
+
30
+ end