templatefox 1.11.0 → 1.13.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 (118) hide show
  1. checksums.yaml +4 -4
  2. data/lib/templatefox/api/account_api.rb +1 -1
  3. data/lib/templatefox/api/agent_api.rb +227 -0
  4. data/lib/templatefox/api/image_api.rb +1 -1
  5. data/lib/templatefox/api/integrations_api.rb +1 -1
  6. data/lib/templatefox/api/pdf_api.rb +1 -1
  7. data/lib/templatefox/api/pdf_async_api.rb +3 -3
  8. data/lib/templatefox/api/pdf_tools_api.rb +1 -1
  9. data/lib/templatefox/api/templates_api.rb +64 -1
  10. data/lib/templatefox/api_client.rb +1 -1
  11. data/lib/templatefox/api_error.rb +1 -1
  12. data/lib/templatefox/api_model_base.rb +1 -1
  13. data/lib/templatefox/configuration.rb +1 -1
  14. data/lib/templatefox/models/account_info_response.rb +1 -1
  15. data/lib/templatefox/models/agent_job_created_response.rb +266 -0
  16. data/lib/templatefox/models/agent_job_status_response.rb +388 -0
  17. data/lib/templatefox/models/{job_status.rb → app_routers_v1_agent_job_status.rb} +4 -4
  18. data/lib/templatefox/models/app_routers_v1_delivery_export_type.rb +1 -1
  19. data/lib/templatefox/models/app_routers_v1_pdf_async_export_type.rb +1 -1
  20. data/lib/templatefox/models/app_routers_v1_pdf_async_job_status.rb +42 -0
  21. data/lib/templatefox/models/app_routers_v1_pdf_tools_export_type.rb +1 -1
  22. data/lib/templatefox/models/brand_inputs.rb +232 -0
  23. data/lib/templatefox/models/create_agent_template_request.rb +350 -0
  24. data/lib/templatefox/models/create_async_pdf_request.rb +1 -1
  25. data/lib/templatefox/models/create_async_pdf_response.rb +2 -2
  26. data/lib/templatefox/models/create_image_request.rb +1 -1
  27. data/lib/templatefox/models/create_image_response.rb +1 -1
  28. data/lib/templatefox/models/create_pdf_request.rb +1 -1
  29. data/lib/templatefox/models/create_pdf_response.rb +1 -1
  30. data/lib/templatefox/models/create_version_request.rb +1 -1
  31. data/lib/templatefox/models/extract_pdf_pages_request.rb +1 -1
  32. data/lib/templatefox/models/http_validation_error.rb +1 -1
  33. data/lib/templatefox/models/image_format.rb +1 -1
  34. data/lib/templatefox/models/job_list_response.rb +1 -1
  35. data/lib/templatefox/models/job_status_response.rb +2 -2
  36. data/lib/templatefox/models/location_inner.rb +1 -1
  37. data/lib/templatefox/models/merge_pdf_request.rb +1 -1
  38. data/lib/templatefox/models/modification.rb +1 -1
  39. data/lib/templatefox/models/pdf_input.rb +1 -1
  40. data/lib/templatefox/models/pdf_tools_response.rb +1 -1
  41. data/lib/templatefox/models/pdf_variant.rb +1 -1
  42. data/lib/templatefox/models/revise_agent_template_request.rb +193 -0
  43. data/lib/templatefox/models/rotate_pdf_request.rb +1 -1
  44. data/lib/templatefox/models/s3_config_request.rb +1 -1
  45. data/lib/templatefox/models/s3_config_response.rb +1 -1
  46. data/lib/templatefox/models/s3_success_response.rb +1 -1
  47. data/lib/templatefox/models/s3_test_response.rb +1 -1
  48. data/lib/templatefox/models/template_field.rb +1 -1
  49. data/lib/templatefox/models/template_field_spec.rb +1 -1
  50. data/lib/templatefox/models/template_layer.rb +259 -0
  51. data/lib/templatefox/models/template_layers_response.rb +179 -0
  52. data/lib/templatefox/models/template_list_item.rb +1 -1
  53. data/lib/templatefox/models/templates_list_response.rb +1 -1
  54. data/lib/templatefox/models/transaction.rb +1 -1
  55. data/lib/templatefox/models/transactions_response.rb +1 -1
  56. data/lib/templatefox/models/update_version_request.rb +1 -1
  57. data/lib/templatefox/models/validation_error.rb +1 -1
  58. data/lib/templatefox/models/version_item.rb +1 -1
  59. data/lib/templatefox/models/versions_list_response.rb +1 -1
  60. data/lib/templatefox/version.rb +2 -2
  61. data/lib/templatefox.rb +11 -2
  62. data/spec/api/account_api_spec.rb +1 -1
  63. data/spec/api/agent_api_spec.rb +72 -0
  64. data/spec/api/image_api_spec.rb +1 -1
  65. data/spec/api/integrations_api_spec.rb +1 -1
  66. data/spec/api/pdf_api_spec.rb +1 -1
  67. data/spec/api/pdf_async_api_spec.rb +2 -2
  68. data/spec/api/pdf_tools_api_spec.rb +1 -1
  69. data/spec/api/templates_api_spec.rb +13 -1
  70. data/spec/models/account_info_response_spec.rb +1 -1
  71. data/spec/models/agent_job_created_response_spec.rb +58 -0
  72. data/spec/models/agent_job_status_response_spec.rb +112 -0
  73. data/spec/models/{job_status_spec.rb → app_routers_v1_agent_job_status_spec.rb} +7 -7
  74. data/spec/models/app_routers_v1_delivery_export_type_spec.rb +1 -1
  75. data/spec/models/app_routers_v1_pdf_async_export_type_spec.rb +1 -1
  76. data/spec/models/app_routers_v1_pdf_async_job_status_spec.rb +30 -0
  77. data/spec/models/app_routers_v1_pdf_tools_export_type_spec.rb +1 -1
  78. data/spec/models/brand_inputs_spec.rb +48 -0
  79. data/spec/models/create_agent_template_request_spec.rb +70 -0
  80. data/spec/models/create_async_pdf_request_spec.rb +1 -1
  81. data/spec/models/create_async_pdf_response_spec.rb +1 -1
  82. data/spec/models/create_image_request_spec.rb +1 -1
  83. data/spec/models/create_image_response_spec.rb +1 -1
  84. data/spec/models/create_pdf_request_spec.rb +1 -1
  85. data/spec/models/create_pdf_response_spec.rb +1 -1
  86. data/spec/models/create_version_request_spec.rb +1 -1
  87. data/spec/models/extract_pdf_pages_request_spec.rb +1 -1
  88. data/spec/models/http_validation_error_spec.rb +1 -1
  89. data/spec/models/image_format_spec.rb +1 -1
  90. data/spec/models/job_list_response_spec.rb +1 -1
  91. data/spec/models/job_status_response_spec.rb +1 -1
  92. data/spec/models/location_inner_spec.rb +1 -1
  93. data/spec/models/merge_pdf_request_spec.rb +1 -1
  94. data/spec/models/modification_spec.rb +1 -1
  95. data/spec/models/pdf_input_spec.rb +1 -1
  96. data/spec/models/pdf_tools_response_spec.rb +1 -1
  97. data/spec/models/pdf_variant_spec.rb +1 -1
  98. data/spec/models/revise_agent_template_request_spec.rb +42 -0
  99. data/spec/models/rotate_pdf_request_spec.rb +1 -1
  100. data/spec/models/s3_config_request_spec.rb +1 -1
  101. data/spec/models/s3_config_response_spec.rb +1 -1
  102. data/spec/models/s3_success_response_spec.rb +1 -1
  103. data/spec/models/s3_test_response_spec.rb +1 -1
  104. data/spec/models/template_field_spec.rb +1 -1
  105. data/spec/models/template_field_spec_spec.rb +1 -1
  106. data/spec/models/template_layer_spec.rb +60 -0
  107. data/spec/models/template_layers_response_spec.rb +42 -0
  108. data/spec/models/template_list_item_spec.rb +1 -1
  109. data/spec/models/templates_list_response_spec.rb +1 -1
  110. data/spec/models/transaction_spec.rb +1 -1
  111. data/spec/models/transactions_response_spec.rb +1 -1
  112. data/spec/models/update_version_request_spec.rb +1 -1
  113. data/spec/models/validation_error_spec.rb +1 -1
  114. data/spec/models/version_item_spec.rb +1 -1
  115. data/spec/models/versions_list_response_spec.rb +1 -1
  116. data/spec/spec_helper.rb +1 -1
  117. data/templatefox.gemspec +1 -1
  118. metadata +61 -34
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 32e924b5c4d595bb2d6a01470815bf3f8265a35c4146ee69bd17292ed15515bc
4
- data.tar.gz: 137bcef6d27ef8752d43a5368af77e755e87d412bd60346f82663a150f6bcc7f
3
+ metadata.gz: fc47542a2310895261806bc35ca01fa7b64979e66102cd458daa25f032e5c9d7
4
+ data.tar.gz: f719747a2cc567d04191a92604054bab887fda22d05150955d0759bd1a96f09f
5
5
  SHA512:
6
- metadata.gz: e2aee76a65f43feffbd88668e3c7843f5984d2bc8a860c5b925444fe9c60ee301286777d9652b94ea1312b822b3547bc8c9c7b8b8a152f0fca0354ffd6efced0
7
- data.tar.gz: 4eaad36edc36ae5f64da2c67758c6034ceeddbac1d9cfdec0a2cbab1d71e8d98a8fe355bdec11be4114488225fd444d00532c6e3c9c57ea6a374836d7ac41f9f
6
+ metadata.gz: 542a2e8dd8eba7baf68630854da0fd85dbd57aede360c794a3b71035cdc128fdfe8f3eefb14b15c61ad44f1bdd378491a9889552d67212ad0b68da8127174066
7
+ data.tar.gz: 0eb54f9a0bb497315b4d2ccd9df4021ebd69c601bb1c3720f8fdc884a4c9d9e9fbe604ee86f78e306cd2e599ce0cdf4e37a719310b5d4e1f95dbd442be4e8260
@@ -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.11.0
6
+ The version of the OpenAPI document: 1.13.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.21.0
@@ -0,0 +1,227 @@
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.13.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module TemplateFox
16
+ class AgentApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a template with the authoring agent
23
+ # Describe the image template you want; the TemplateFox agent authors it for you — valid HTML that renders deterministically AND stays editable in the visual editor, with every layer named and drivable through `/v1/image/create` modifications. The job is asynchronous: poll `GET /v1/agent/jobs/{job_id}`. When completed, the response always includes a **preview_url** (rendered PNG) plus the `template_id`. Iterate with `POST /v1/agent/templates/{template_id}/revise`. **Authentication:** API Key required (`x-api-key` header) ## Credits Creation costs **25 credits**, deducted when the job is queued and fully refunded if the job fails. ## Canvas Pass a `preset` (instagram-square, instagram-story, og-image, twitter-card, pinterest-pin, square-512) or explicit `width` + `height` in px. ## Rate Limits Standard rate limits apply (60 req/min free, 120 req/min paid).
24
+ # @param create_agent_template_request [CreateAgentTemplateRequest]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [AgentJobCreatedResponse]
27
+ def create_agent_template(create_agent_template_request, opts = {})
28
+ data, _status_code, _headers = create_agent_template_with_http_info(create_agent_template_request, opts)
29
+ data
30
+ end
31
+
32
+ # Create a template with the authoring agent
33
+ # Describe the image template you want; the TemplateFox agent authors it for you — valid HTML that renders deterministically AND stays editable in the visual editor, with every layer named and drivable through `/v1/image/create` modifications. The job is asynchronous: poll `GET /v1/agent/jobs/{job_id}`. When completed, the response always includes a **preview_url** (rendered PNG) plus the `template_id`. Iterate with `POST /v1/agent/templates/{template_id}/revise`. **Authentication:** API Key required (`x-api-key` header) ## Credits Creation costs **25 credits**, deducted when the job is queued and fully refunded if the job fails. ## Canvas Pass a `preset` (instagram-square, instagram-story, og-image, twitter-card, pinterest-pin, square-512) or explicit `width` + `height` in px. ## Rate Limits Standard rate limits apply (60 req/min free, 120 req/min paid).
34
+ # @param create_agent_template_request [CreateAgentTemplateRequest]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(AgentJobCreatedResponse, Integer, Hash)>] AgentJobCreatedResponse data, response status code and response headers
37
+ def create_agent_template_with_http_info(create_agent_template_request, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: AgentApi.create_agent_template ...'
40
+ end
41
+ # verify the required parameter 'create_agent_template_request' is set
42
+ if @api_client.config.client_side_validation && create_agent_template_request.nil?
43
+ fail ArgumentError, "Missing the required parameter 'create_agent_template_request' when calling AgentApi.create_agent_template"
44
+ end
45
+ # resource path
46
+ local_var_path = '/v1/agent/templates'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
+ # HTTP header 'Content-Type'
56
+ content_type = @api_client.select_header_content_type(['application/json'])
57
+ if !content_type.nil?
58
+ header_params['Content-Type'] = content_type
59
+ end
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_agent_template_request)
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type] || 'AgentJobCreatedResponse'
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"AgentApi.create_agent_template",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: AgentApi#create_agent_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Get authoring-agent job status
91
+ # Poll the status of an authoring-agent job. **Authentication:** API Key required (`x-api-key` header) ## Status Values | Status | Description | |--------|-------------| | `pending` | Job is queued | | `processing` | The agent is authoring (typically 30s-3min) | | `completed` | Done — `template_id` and `preview_url` are set | | `failed` | Job failed (see error_message); credits were refunded | Poll every 2-5 seconds. A job stuck in `processing` for more than 10 minutes is failed automatically and its credits refunded.
92
+ # @param job_id [String] Job UUID
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [AgentJobStatusResponse]
95
+ def get_agent_job(job_id, opts = {})
96
+ data, _status_code, _headers = get_agent_job_with_http_info(job_id, opts)
97
+ data
98
+ end
99
+
100
+ # Get authoring-agent job status
101
+ # Poll the status of an authoring-agent job. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) ## Status Values | Status | Description | |--------|-------------| | &#x60;pending&#x60; | Job is queued | | &#x60;processing&#x60; | The agent is authoring (typically 30s-3min) | | &#x60;completed&#x60; | Done — &#x60;template_id&#x60; and &#x60;preview_url&#x60; are set | | &#x60;failed&#x60; | Job failed (see error_message); credits were refunded | Poll every 2-5 seconds. A job stuck in &#x60;processing&#x60; for more than 10 minutes is failed automatically and its credits refunded.
102
+ # @param job_id [String] Job UUID
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(AgentJobStatusResponse, Integer, Hash)>] AgentJobStatusResponse data, response status code and response headers
105
+ def get_agent_job_with_http_info(job_id, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: AgentApi.get_agent_job ...'
108
+ end
109
+ # verify the required parameter 'job_id' is set
110
+ if @api_client.config.client_side_validation && job_id.nil?
111
+ fail ArgumentError, "Missing the required parameter 'job_id' when calling AgentApi.get_agent_job"
112
+ end
113
+ # resource path
114
+ local_var_path = '/v1/agent/jobs/{job_id}'.sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s))
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+
119
+ # header parameters
120
+ header_params = opts[:header_params] || {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
123
+
124
+ # form parameters
125
+ form_params = opts[:form_params] || {}
126
+
127
+ # http body (model)
128
+ post_body = opts[:debug_body]
129
+
130
+ # return_type
131
+ return_type = opts[:debug_return_type] || 'AgentJobStatusResponse'
132
+
133
+ # auth_names
134
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
135
+
136
+ new_options = opts.merge(
137
+ :operation => :"AgentApi.get_agent_job",
138
+ :header_params => header_params,
139
+ :query_params => query_params,
140
+ :form_params => form_params,
141
+ :body => post_body,
142
+ :auth_names => auth_names,
143
+ :return_type => return_type
144
+ )
145
+
146
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
147
+ if @api_client.config.debugging
148
+ @api_client.config.logger.debug "API called: AgentApi#get_agent_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
149
+ end
150
+ return data, status_code, headers
151
+ end
152
+
153
+ # Revise a template with the authoring agent
154
+ # Send natural-language feedback on an existing image template; the agent revises the draft while keeping layer names stable. Asynchronous — poll `GET /v1/agent/jobs/{job_id}`; the completed job always includes a fresh **preview_url**. **Authentication:** API Key required (`x-api-key` header) ## Credits A revision costs **10 credits**, deducted when the job is queued and fully refunded if the job fails.
155
+ # @param template_id [String] Template short ID (12 characters)
156
+ # @param revise_agent_template_request [ReviseAgentTemplateRequest]
157
+ # @param [Hash] opts the optional parameters
158
+ # @return [AgentJobCreatedResponse]
159
+ def revise_agent_template(template_id, revise_agent_template_request, opts = {})
160
+ data, _status_code, _headers = revise_agent_template_with_http_info(template_id, revise_agent_template_request, opts)
161
+ data
162
+ end
163
+
164
+ # Revise a template with the authoring agent
165
+ # Send natural-language feedback on an existing image template; the agent revises the draft while keeping layer names stable. Asynchronous — poll &#x60;GET /v1/agent/jobs/{job_id}&#x60;; the completed job always includes a fresh **preview_url**. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) ## Credits A revision costs **10 credits**, deducted when the job is queued and fully refunded if the job fails.
166
+ # @param template_id [String] Template short ID (12 characters)
167
+ # @param revise_agent_template_request [ReviseAgentTemplateRequest]
168
+ # @param [Hash] opts the optional parameters
169
+ # @return [Array<(AgentJobCreatedResponse, Integer, Hash)>] AgentJobCreatedResponse data, response status code and response headers
170
+ def revise_agent_template_with_http_info(template_id, revise_agent_template_request, opts = {})
171
+ if @api_client.config.debugging
172
+ @api_client.config.logger.debug 'Calling API: AgentApi.revise_agent_template ...'
173
+ end
174
+ # verify the required parameter 'template_id' is set
175
+ if @api_client.config.client_side_validation && template_id.nil?
176
+ fail ArgumentError, "Missing the required parameter 'template_id' when calling AgentApi.revise_agent_template"
177
+ end
178
+ # verify the required parameter 'revise_agent_template_request' is set
179
+ if @api_client.config.client_side_validation && revise_agent_template_request.nil?
180
+ fail ArgumentError, "Missing the required parameter 'revise_agent_template_request' when calling AgentApi.revise_agent_template"
181
+ end
182
+ # resource path
183
+ local_var_path = '/v1/agent/templates/{template_id}/revise'.sub('{' + 'template_id' + '}', CGI.escape(template_id.to_s))
184
+
185
+ # query parameters
186
+ query_params = opts[:query_params] || {}
187
+
188
+ # header parameters
189
+ header_params = opts[:header_params] || {}
190
+ # HTTP header 'Accept' (if needed)
191
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
192
+ # HTTP header 'Content-Type'
193
+ content_type = @api_client.select_header_content_type(['application/json'])
194
+ if !content_type.nil?
195
+ header_params['Content-Type'] = content_type
196
+ end
197
+
198
+ # form parameters
199
+ form_params = opts[:form_params] || {}
200
+
201
+ # http body (model)
202
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(revise_agent_template_request)
203
+
204
+ # return_type
205
+ return_type = opts[:debug_return_type] || 'AgentJobCreatedResponse'
206
+
207
+ # auth_names
208
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
209
+
210
+ new_options = opts.merge(
211
+ :operation => :"AgentApi.revise_agent_template",
212
+ :header_params => header_params,
213
+ :query_params => query_params,
214
+ :form_params => form_params,
215
+ :body => post_body,
216
+ :auth_names => auth_names,
217
+ :return_type => return_type
218
+ )
219
+
220
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
221
+ if @api_client.config.debugging
222
+ @api_client.config.logger.debug "API called: AgentApi#revise_agent_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
223
+ end
224
+ return data, status_code, headers
225
+ end
226
+ end
227
+ 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.11.0
6
+ The version of the OpenAPI document: 1.13.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.11.0
6
+ The version of the OpenAPI document: 1.13.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.11.0
6
+ The version of the OpenAPI document: 1.13.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.11.0
6
+ The version of the OpenAPI document: 1.13.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.21.0
@@ -155,7 +155,7 @@ module TemplateFox
155
155
  # @param [Hash] opts the optional parameters
156
156
  # @option opts [Integer] :limit Maximum number of results to return (default to 20)
157
157
  # @option opts [Integer] :offset Number of results to skip (for pagination) (default to 0)
158
- # @option opts [JobStatus] :status Filter jobs by status
158
+ # @option opts [AppRoutersV1PdfAsyncJobStatus] :status Filter jobs by status
159
159
  # @return [JobListResponse]
160
160
  def list_pdf_jobs(opts = {})
161
161
  data, _status_code, _headers = list_pdf_jobs_with_http_info(opts)
@@ -167,7 +167,7 @@ module TemplateFox
167
167
  # @param [Hash] opts the optional parameters
168
168
  # @option opts [Integer] :limit Maximum number of results to return (default to 20)
169
169
  # @option opts [Integer] :offset Number of results to skip (for pagination) (default to 0)
170
- # @option opts [JobStatus] :status Filter jobs by status
170
+ # @option opts [AppRoutersV1PdfAsyncJobStatus] :status Filter jobs by status
171
171
  # @return [Array<(JobListResponse, Integer, Hash)>] JobListResponse data, response status code and response headers
172
172
  def list_pdf_jobs_with_http_info(opts = {})
173
173
  if @api_client.config.debugging
@@ -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.11.0
6
+ The version of the OpenAPI document: 1.13.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.11.0
6
+ The version of the OpenAPI document: 1.13.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.21.0
@@ -225,6 +225,69 @@ module TemplateFox
225
225
  return data, status_code, headers
226
226
  end
227
227
 
228
+ # Get template layers
229
+ # List the addressable layers of a template. **Authentication:** API Key required (`x-api-key` header) or JWT token **Usage:** The image API (`/v1/image/create`) targets elements by layer name via its `modifications` array. This endpoint returns every named layer of the template — the counterpart of `/fields` for `{{ }}` variables — so a caller (or an agent) can discover what is modifiable without opening the editor. **The reserved `background` layer** is always present: every image template has a background slot, whether it is an explicit element or the page itself. **No credits consumed:** This is a read-only endpoint. **Rate Limits:** 60 requests/min (free), 120 requests/min (paid). Headers included in response.
230
+ # @param template_id [String] Template short ID (12 characters)
231
+ # @param [Hash] opts the optional parameters
232
+ # @return [TemplateLayersResponse]
233
+ def get_template_layers(template_id, opts = {})
234
+ data, _status_code, _headers = get_template_layers_with_http_info(template_id, opts)
235
+ data
236
+ end
237
+
238
+ # Get template layers
239
+ # List the addressable layers of a template. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) or JWT token **Usage:** The image API (&#x60;/v1/image/create&#x60;) targets elements by layer name via its &#x60;modifications&#x60; array. This endpoint returns every named layer of the template — the counterpart of &#x60;/fields&#x60; for &#x60;{{ }}&#x60; variables — so a caller (or an agent) can discover what is modifiable without opening the editor. **The reserved &#x60;background&#x60; layer** is always present: every image template has a background slot, whether it is an explicit element or the page itself. **No credits consumed:** This is a read-only endpoint. **Rate Limits:** 60 requests/min (free), 120 requests/min (paid). Headers included in response.
240
+ # @param template_id [String] Template short ID (12 characters)
241
+ # @param [Hash] opts the optional parameters
242
+ # @return [Array<(TemplateLayersResponse, Integer, Hash)>] TemplateLayersResponse data, response status code and response headers
243
+ def get_template_layers_with_http_info(template_id, opts = {})
244
+ if @api_client.config.debugging
245
+ @api_client.config.logger.debug 'Calling API: TemplatesApi.get_template_layers ...'
246
+ end
247
+ # verify the required parameter 'template_id' is set
248
+ if @api_client.config.client_side_validation && template_id.nil?
249
+ fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.get_template_layers"
250
+ end
251
+ # resource path
252
+ local_var_path = '/v1/templates/{template_id}/layers'.sub('{' + 'template_id' + '}', CGI.escape(template_id.to_s))
253
+
254
+ # query parameters
255
+ query_params = opts[:query_params] || {}
256
+
257
+ # header parameters
258
+ header_params = opts[:header_params] || {}
259
+ # HTTP header 'Accept' (if needed)
260
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
261
+
262
+ # form parameters
263
+ form_params = opts[:form_params] || {}
264
+
265
+ # http body (model)
266
+ post_body = opts[:debug_body]
267
+
268
+ # return_type
269
+ return_type = opts[:debug_return_type] || 'TemplateLayersResponse'
270
+
271
+ # auth_names
272
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
273
+
274
+ new_options = opts.merge(
275
+ :operation => :"TemplatesApi.get_template_layers",
276
+ :header_params => header_params,
277
+ :query_params => query_params,
278
+ :form_params => form_params,
279
+ :body => post_body,
280
+ :auth_names => auth_names,
281
+ :return_type => return_type
282
+ )
283
+
284
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
285
+ if @api_client.config.debugging
286
+ @api_client.config.logger.debug "API called: TemplatesApi#get_template_layers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
287
+ end
288
+ return data, status_code, headers
289
+ end
290
+
228
291
  # List template versions
229
292
  # List all snapshot versions for a template (excludes the working draft).
230
293
  # @param template_id [String] Template short ID (12 characters)
@@ -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.11.0
6
+ The version of the OpenAPI document: 1.13.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.11.0
6
+ The version of the OpenAPI document: 1.13.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.11.0
6
+ The version of the OpenAPI document: 1.13.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.11.0
6
+ The version of the OpenAPI document: 1.13.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.11.0
6
+ The version of the OpenAPI document: 1.13.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.21.0