vectali 0.4.1
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 +7 -0
- data/LICENSE +202 -0
- data/NOTICE +3 -0
- data/README.md +60 -0
- data/lib/vectali/binary_response.rb +16 -0
- data/lib/vectali/client.rb +37 -0
- data/lib/vectali/codec.rb +280 -0
- data/lib/vectali/errors.rb +22 -0
- data/lib/vectali/file_upload.rb +78 -0
- data/lib/vectali/forge_client.rb +37 -0
- data/lib/vectali/models/billing_summary.rb +52 -0
- data/lib/vectali/models/billing_summary_api_credits.rb +24 -0
- data/lib/vectali/models/billing_summary_api_starter.rb +52 -0
- data/lib/vectali/models/billing_summary_api_starter_plan.rb +25 -0
- data/lib/vectali/models/billing_summary_available_plans_item.rb +27 -0
- data/lib/vectali/models/billing_summary_free_api_conversions.rb +28 -0
- data/lib/vectali/models/billing_summary_free_exports.rb +28 -0
- data/lib/vectali/models/billing_summary_mode.rb +17 -0
- data/lib/vectali/models/billing_summary_web_credits.rb +20 -0
- data/lib/vectali/models/billing_summary_web_pro.rb +32 -0
- data/lib/vectali/models/conversion.rb +49 -0
- data/lib/vectali/models/conversion_allowance_used_this_call.rb +17 -0
- data/lib/vectali/models/conversion_format.rb +16 -0
- data/lib/vectali/models/error.rb +24 -0
- data/lib/vectali/models/get_vector_format.rb +19 -0
- data/lib/vectali/models/health.rb +20 -0
- data/lib/vectali/requests/convert_image_request.rb +56 -0
- data/lib/vectali/requests/get_allowance_request.rb +23 -0
- data/lib/vectali/requests/get_vector_request.rb +43 -0
- data/lib/vectali/requests/health_request.rb +19 -0
- data/lib/vectali/transport.rb +296 -0
- data/lib/vectali/version.rb +3 -0
- data/lib/vectali.rb +29 -0
- data/provenance.json +71 -0
- metadata +78 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Code generated by forge. DO NOT EDIT.
|
|
3
|
+
|
|
4
|
+
module Vectali
|
|
5
|
+
class GetVectorRequest < Codec::Record
|
|
6
|
+
OPERATION = Codec.immutable({
|
|
7
|
+
method: "GET",
|
|
8
|
+
path: "/api/v1/files/{conversion_id}/{format}",
|
|
9
|
+
path_params: { "conversion_id" => :conversion_id, "format" => :format },
|
|
10
|
+
responses: {
|
|
11
|
+
"200" => { "application/pdf" => :binary_response, "application/postscript" => :binary_response, "image/svg+xml" => :binary_response, "image/vnd.dxf" => :binary_response },
|
|
12
|
+
},
|
|
13
|
+
errors: {
|
|
14
|
+
"400" => { "application/json" => -> { ::Vectali::Error } },
|
|
15
|
+
"401" => { "application/json" => -> { ::Vectali::Error } },
|
|
16
|
+
"403" => { "application/json" => -> { ::Vectali::Error } },
|
|
17
|
+
"404" => { "application/json" => -> { ::Vectali::Error } },
|
|
18
|
+
"429" => { "application/json" => -> { ::Vectali::Error } },
|
|
19
|
+
"500" => { "application/json" => -> { ::Vectali::Error } },
|
|
20
|
+
"502" => { "application/json" => -> { ::Vectali::Error } },
|
|
21
|
+
"503" => { "application/json" => -> { ::Vectali::Error } },
|
|
22
|
+
},
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
FIELDS = Codec.immutable({
|
|
26
|
+
conversion_id: ["conversion_id", :string, true, false, false],
|
|
27
|
+
format: ["format", -> { ::Vectali::GetVectorFormat }, true, false, false],
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
attr_reader :conversion_id
|
|
31
|
+
attr_reader :format
|
|
32
|
+
|
|
33
|
+
def initialize(
|
|
34
|
+
conversion_id:,
|
|
35
|
+
format:
|
|
36
|
+
)
|
|
37
|
+
super(
|
|
38
|
+
conversion_id: conversion_id,
|
|
39
|
+
format: format
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Code generated by forge. DO NOT EDIT.
|
|
3
|
+
|
|
4
|
+
module Vectali
|
|
5
|
+
class HealthRequest < Codec::Record
|
|
6
|
+
OPERATION = Codec.immutable({
|
|
7
|
+
method: "GET",
|
|
8
|
+
path: "/health",
|
|
9
|
+
responses: {
|
|
10
|
+
"200" => { "application/json" => -> { ::Vectali::Health } },
|
|
11
|
+
},
|
|
12
|
+
errors: {
|
|
13
|
+
"403" => { "application/json" => -> { ::Vectali::Error } },
|
|
14
|
+
},
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
FIELDS = {}.freeze
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Code generated by forge. DO NOT EDIT.
|
|
3
|
+
|
|
4
|
+
require "json"
|
|
5
|
+
require "net/http"
|
|
6
|
+
require "uri"
|
|
7
|
+
|
|
8
|
+
module Vectali
|
|
9
|
+
class Transport
|
|
10
|
+
REDIRECT_CODES = [301, 302, 303, 307, 308].freeze
|
|
11
|
+
MAX_REDIRECTS = 5
|
|
12
|
+
HEADER_NAME = /\A[!#$%&'*+.^_`|~0-9A-Za-z-]+\z/
|
|
13
|
+
UNSAFE_HEADER_VALUE = /[\x00-\x08\x0a-\x1f\x7f]/n
|
|
14
|
+
|
|
15
|
+
def initialize(base_url:, bearer_token:, api_key:, api_key_header:, default_headers:, timeout:, allow_redirects:)
|
|
16
|
+
@base_url = URI.parse(base_url.to_s)
|
|
17
|
+
unless http_uri?(@base_url) && !@base_url.query && !@base_url.fragment
|
|
18
|
+
raise ArgumentError, "base_url must be an absolute HTTP or HTTPS URL without credentials, query or fragment"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
validate_path(@base_url.path)
|
|
22
|
+
@headers = {}
|
|
23
|
+
default_headers.each { |name, value| set_header(@headers, name, value) }
|
|
24
|
+
if bearer_token || (api_key && !api_key_header)
|
|
25
|
+
set_header(@headers, "Authorization", "Bearer #{bearer_token || api_key}")
|
|
26
|
+
end
|
|
27
|
+
set_header(@headers, api_key_header, api_key) if api_key && api_key_header
|
|
28
|
+
@headers = Codec.immutable(@headers)
|
|
29
|
+
@timeout = timeout
|
|
30
|
+
@allow_redirects = allow_redirects
|
|
31
|
+
rescue URI::InvalidURIError
|
|
32
|
+
raise ArgumentError, "Invalid base_url", cause: nil
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def call(request_class, request, kwargs)
|
|
36
|
+
operation = request_class::OPERATION
|
|
37
|
+
if request.nil?
|
|
38
|
+
request = request_class.new(**kwargs)
|
|
39
|
+
elsif !request.is_a?(request_class) || !kwargs.empty?
|
|
40
|
+
raise ArgumentError, "Pass a #{request_class.name} or keyword arguments"
|
|
41
|
+
end
|
|
42
|
+
values = request.__values
|
|
43
|
+
fields = request_class::FIELDS
|
|
44
|
+
uri = request_uri(operation, values, fields)
|
|
45
|
+
headers = @headers.dup
|
|
46
|
+
operation.fetch(:headers, {}).each do |name, wire|
|
|
47
|
+
value = values[name]
|
|
48
|
+
set_header(headers, wire, simple(Codec.encode(value, fields.fetch(name)[1]))) unless value.nil?
|
|
49
|
+
end
|
|
50
|
+
accept = operation.fetch(:responses, {}).values.flat_map(&:keys).uniq.sort
|
|
51
|
+
headers["accept"] ||= accept.join(", ") unless accept.empty?
|
|
52
|
+
headers["accept-encoding"] ||= "identity"
|
|
53
|
+
body = body_for(operation[:body], values, headers)
|
|
54
|
+
response = exchange(uri, operation.fetch(:method), headers, body)
|
|
55
|
+
result(response, operation)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def inspect
|
|
59
|
+
"#<#{self.class.name}>"
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
private
|
|
63
|
+
|
|
64
|
+
def http_uri?(uri)
|
|
65
|
+
uri.is_a?(URI::HTTP) && uri.hostname && !uri.hostname.empty? && !uri.userinfo
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def request_uri(operation, values, fields)
|
|
69
|
+
path_params = operation.fetch(:path_params, {})
|
|
70
|
+
path = operation.fetch(:path).gsub(/\{([^{}]+)\}/) do
|
|
71
|
+
name = path_params.fetch(Regexp.last_match(1))
|
|
72
|
+
value = values[name]
|
|
73
|
+
raise ArgumentError, "Path parameters must have a value" if value.nil?
|
|
74
|
+
|
|
75
|
+
simple(Codec.encode(value, fields.fetch(name)[1])) { |item| path_component(item) }
|
|
76
|
+
end
|
|
77
|
+
uri = @base_url.dup
|
|
78
|
+
uri.path = @base_url.path.sub(%r{/+\z}, "") + "/" + path.sub(%r{\A/}, "")
|
|
79
|
+
validate_path(uri.path)
|
|
80
|
+
query = operation.fetch(:query, {}).flat_map do |name, (wire, exploded)|
|
|
81
|
+
value = values[name]
|
|
82
|
+
value.nil? ? [] : form_pairs(wire, Codec.encode(value, fields.fetch(name)[1]), exploded)
|
|
83
|
+
end
|
|
84
|
+
uri.query = URI.encode_www_form(query) unless query.empty?
|
|
85
|
+
uri
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Check each decoded layer as intermediaries can interpret escaped slashes,
|
|
89
|
+
# backslashes and dots differently.
|
|
90
|
+
def validate_path(path)
|
|
91
|
+
path = path.b
|
|
92
|
+
16.times do
|
|
93
|
+
if path.match?(/[\x00-\x1f\x7f\\]/n) || path.split("/").any? { |part| part == "." || part == ".." }
|
|
94
|
+
raise ArgumentError, "Unsafe URL path"
|
|
95
|
+
end
|
|
96
|
+
decoded = path.gsub(/%([a-f0-9]{2})/in) { Regexp.last_match(1).to_i(16).chr(Encoding::BINARY) }
|
|
97
|
+
return if decoded == path
|
|
98
|
+
|
|
99
|
+
path = decoded
|
|
100
|
+
end
|
|
101
|
+
raise ArgumentError, "Too many escape layers in URL path"
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
def path_component(value)
|
|
105
|
+
value = value.to_s
|
|
106
|
+
raise ArgumentError, "Path parameters must not be empty" if value.empty?
|
|
107
|
+
|
|
108
|
+
validate_path(value)
|
|
109
|
+
value.b.gsub(/[^a-zA-Z0-9_.~-]/n) { |char| format("%%%02X", char.ord) }
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
def simple(value, &encode)
|
|
113
|
+
encode ||= ->(item) { item.to_s }
|
|
114
|
+
case value
|
|
115
|
+
when Array then value.map(&encode).join(",")
|
|
116
|
+
when Hash then value.flat_map { |key, item| [encode.call(key), encode.call(item)] }.join(",")
|
|
117
|
+
else encode.call(value)
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
def form_pairs(name, value, exploded)
|
|
122
|
+
if exploded && value.is_a?(Array)
|
|
123
|
+
value.map { |item| [name, item.to_s] }
|
|
124
|
+
elsif exploded && value.is_a?(Hash)
|
|
125
|
+
value.map { |key, item| [key.to_s, item.to_s] }
|
|
126
|
+
else
|
|
127
|
+
[[name, simple(value)]]
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
def set_header(headers, name, value)
|
|
132
|
+
name = name.to_s
|
|
133
|
+
value = value.to_s
|
|
134
|
+
unless HEADER_NAME.match?(name) && !UNSAFE_HEADER_VALUE.match?(value.b)
|
|
135
|
+
raise ArgumentError, "Invalid HTTP header"
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
headers[name.downcase] = value
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
def body_for(body, values, headers)
|
|
142
|
+
return unless body
|
|
143
|
+
|
|
144
|
+
selected = values[body[:content_type]]
|
|
145
|
+
type = selected || body.fetch(:default)
|
|
146
|
+
media = body.fetch(:media)
|
|
147
|
+
kind, schema = media[type] || find_media(media, type)
|
|
148
|
+
raise ArgumentError, "Unsupported request content type" unless kind
|
|
149
|
+
|
|
150
|
+
if body[:fields]
|
|
151
|
+
value = body[:fields].each_with_object({}) do |(name, (wire, field_schema)), object|
|
|
152
|
+
object[wire] = Codec.encode(values[name], field_schema) if values.key?(name)
|
|
153
|
+
end
|
|
154
|
+
else
|
|
155
|
+
return unless values.key?(body[:parameter])
|
|
156
|
+
|
|
157
|
+
value = Codec.encode(values[body[:parameter]], schema)
|
|
158
|
+
end
|
|
159
|
+
case kind
|
|
160
|
+
when :json
|
|
161
|
+
set_header(headers, "Content-Type", type)
|
|
162
|
+
JSON.generate(value)
|
|
163
|
+
when :multipart
|
|
164
|
+
bytes, content_type = Multipart.encode(value)
|
|
165
|
+
set_header(headers, "Content-Type", content_type)
|
|
166
|
+
bytes
|
|
167
|
+
when :form
|
|
168
|
+
raise ArgumentError, "Expected an object for a form request" unless value.is_a?(Hash)
|
|
169
|
+
|
|
170
|
+
set_header(headers, "Content-Type", type)
|
|
171
|
+
URI.encode_www_form(value.flat_map { |name, item| form_pairs(name, item, true) })
|
|
172
|
+
when :raw
|
|
173
|
+
if value.is_a?(FileUpload)
|
|
174
|
+
headers["content-type"] ||= type == "*/*" ? value.content_type : type
|
|
175
|
+
value.data
|
|
176
|
+
else
|
|
177
|
+
raise ArgumentError, "Expected bytes for a raw request" unless value.is_a?(String)
|
|
178
|
+
|
|
179
|
+
headers["content-type"] ||= type
|
|
180
|
+
value
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
def exchange(uri, method, headers, body)
|
|
186
|
+
(MAX_REDIRECTS + 1).times do |redirects|
|
|
187
|
+
request = Net::HTTPGenericRequest.new(method, !body.nil?, method != "HEAD", uri, headers)
|
|
188
|
+
request.body = body unless body.nil?
|
|
189
|
+
http = Net::HTTP.new(uri.hostname, uri.port, nil)
|
|
190
|
+
http.use_ssl = uri.scheme == "https"
|
|
191
|
+
http.open_timeout = http.read_timeout = http.write_timeout = @timeout
|
|
192
|
+
http.max_retries = 0
|
|
193
|
+
response = http.start { |connection| connection.request(request) }
|
|
194
|
+
|
|
195
|
+
status = response.code.to_i
|
|
196
|
+
return response unless @allow_redirects && REDIRECT_CODES.include?(status) && redirects < MAX_REDIRECTS
|
|
197
|
+
|
|
198
|
+
next_uri = redirect_uri(uri, response["location"])
|
|
199
|
+
return response unless next_uri
|
|
200
|
+
|
|
201
|
+
if method != "HEAD" && (status == 303 || ([301, 302].include?(status) && method == "POST"))
|
|
202
|
+
method = "GET"
|
|
203
|
+
body = nil
|
|
204
|
+
headers = headers.reject { |name, _| ["content-type", "content-length", "transfer-encoding"].include?(name) }
|
|
205
|
+
end
|
|
206
|
+
uri = next_uri
|
|
207
|
+
end
|
|
208
|
+
rescue IOError, SystemCallError, SocketError, Timeout::Error, Net::HTTPBadResponse, OpenSSL::SSL::SSLError => error
|
|
209
|
+
raise TransportError, "HTTP transport failed (#{error.class})"
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
def redirect_uri(current, location)
|
|
213
|
+
return unless location && !location.empty?
|
|
214
|
+
|
|
215
|
+
reference = URI.parse(location)
|
|
216
|
+
validate_path(reference.path || "")
|
|
217
|
+
target = current.merge(reference)
|
|
218
|
+
return unless http_uri?(target)
|
|
219
|
+
|
|
220
|
+
# Keep every header and request body on the original origin.
|
|
221
|
+
return unless target.scheme == current.scheme && target.hostname.casecmp?(current.hostname) && target.port == current.port
|
|
222
|
+
|
|
223
|
+
target.fragment = nil
|
|
224
|
+
target
|
|
225
|
+
rescue URI::Error, ArgumentError
|
|
226
|
+
nil
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
def result(response, operation)
|
|
230
|
+
status = response.code.to_i
|
|
231
|
+
body = response.body || "".b
|
|
232
|
+
content_type = response["content-type"]
|
|
233
|
+
headers = response.to_hash
|
|
234
|
+
if (200..299).cover?(status)
|
|
235
|
+
media = status_entry(operation.fetch(:responses, {}), status)
|
|
236
|
+
return nil if response.body.nil? || status == 205 || media == {}
|
|
237
|
+
|
|
238
|
+
schema = response_schema(media, content_type)
|
|
239
|
+
if schema && schema != :binary_response
|
|
240
|
+
Codec.decode(JSON.parse(body), schema)
|
|
241
|
+
elsif media.nil? && json_media?(content_type)
|
|
242
|
+
Codec.immutable(JSON.parse(body))
|
|
243
|
+
else
|
|
244
|
+
BinaryResponse.new(body: body, status_code: status, content_type: content_type, headers: headers)
|
|
245
|
+
end
|
|
246
|
+
else
|
|
247
|
+
media = status_entry(operation.fetch(:errors, {}), status)
|
|
248
|
+
schema = response_schema(media, content_type)
|
|
249
|
+
details = error_details(body, schema)
|
|
250
|
+
error = status == 429 ? RateLimitError : ApiError
|
|
251
|
+
raise error.new(status_code: status, body: body, headers: headers, details: details)
|
|
252
|
+
end
|
|
253
|
+
rescue JSON::ParserError
|
|
254
|
+
raise DecodeError, "Invalid JSON response", cause: nil
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
def status_entry(entries, status)
|
|
258
|
+
entries[status.to_s] || entries["#{status / 100}XX"] || entries["default"]
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
def response_schema(media, content_type)
|
|
262
|
+
return if media.nil? || media.empty?
|
|
263
|
+
return media.values.first if content_type.nil? && media.size == 1
|
|
264
|
+
|
|
265
|
+
find_media(media, content_type)
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
def find_media(media, content_type)
|
|
269
|
+
return unless content_type
|
|
270
|
+
|
|
271
|
+
exact = media.find { |name, _| name.strip.casecmp?(content_type.strip) }
|
|
272
|
+
return exact.last if exact
|
|
273
|
+
|
|
274
|
+
type = content_type.split(";", 2).first.to_s.strip.downcase
|
|
275
|
+
candidates = [type, "#{type.split('/', 2).first}/*", "*/*"]
|
|
276
|
+
candidates.each do |candidate|
|
|
277
|
+
entry = media.find { |name, _| name.split(";", 2).first.to_s.strip.casecmp?(candidate) }
|
|
278
|
+
return entry.last if entry
|
|
279
|
+
end
|
|
280
|
+
nil
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
def json_media?(content_type)
|
|
284
|
+
type = content_type.to_s.split(";", 2).first.to_s.strip.downcase
|
|
285
|
+
type == "application/json" || type.end_with?("+json")
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
def error_details(body, schema)
|
|
289
|
+
return if schema.nil? || schema == :binary_response || body.empty?
|
|
290
|
+
|
|
291
|
+
Codec.decode(JSON.parse(body), schema)
|
|
292
|
+
rescue DecodeError, JSON::ParserError
|
|
293
|
+
nil
|
|
294
|
+
end
|
|
295
|
+
end
|
|
296
|
+
end
|
data/lib/vectali.rb
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Code generated by forge. DO NOT EDIT.
|
|
3
|
+
|
|
4
|
+
require_relative "vectali/binary_response"
|
|
5
|
+
require_relative "vectali/client"
|
|
6
|
+
require_relative "vectali/codec"
|
|
7
|
+
require_relative "vectali/errors"
|
|
8
|
+
require_relative "vectali/file_upload"
|
|
9
|
+
require_relative "vectali/models/billing_summary"
|
|
10
|
+
require_relative "vectali/models/billing_summary_api_credits"
|
|
11
|
+
require_relative "vectali/models/billing_summary_api_starter"
|
|
12
|
+
require_relative "vectali/models/billing_summary_api_starter_plan"
|
|
13
|
+
require_relative "vectali/models/billing_summary_available_plans_item"
|
|
14
|
+
require_relative "vectali/models/billing_summary_free_api_conversions"
|
|
15
|
+
require_relative "vectali/models/billing_summary_free_exports"
|
|
16
|
+
require_relative "vectali/models/billing_summary_mode"
|
|
17
|
+
require_relative "vectali/models/billing_summary_web_credits"
|
|
18
|
+
require_relative "vectali/models/billing_summary_web_pro"
|
|
19
|
+
require_relative "vectali/models/conversion"
|
|
20
|
+
require_relative "vectali/models/conversion_allowance_used_this_call"
|
|
21
|
+
require_relative "vectali/models/conversion_format"
|
|
22
|
+
require_relative "vectali/models/error"
|
|
23
|
+
require_relative "vectali/models/get_vector_format"
|
|
24
|
+
require_relative "vectali/models/health"
|
|
25
|
+
require_relative "vectali/requests/convert_image_request"
|
|
26
|
+
require_relative "vectali/requests/get_allowance_request"
|
|
27
|
+
require_relative "vectali/requests/get_vector_request"
|
|
28
|
+
require_relative "vectali/requests/health_request"
|
|
29
|
+
require_relative "vectali/transport"
|
data/provenance.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pipeline_sha256": "cc4d1049558b86842155b8e2c2c76c6400e22e0d3060d05256912878f89be94b",
|
|
3
|
+
"license_sha256": "a3079476c950413bc44b09219fe14c2ed9e6bb2f57c206168be01aa02f422941",
|
|
4
|
+
"schema_sha256": "8207a092d091533edb0a699309eccde9757b6b72d8026659ed9b7ea66e95eddc",
|
|
5
|
+
"forge": {
|
|
6
|
+
"repository": "https://github.com/vectali/forge.git",
|
|
7
|
+
"revision": "843e54d20f94c905f5f9d3f8aabe643afd7d570e",
|
|
8
|
+
"version": "0.4.0",
|
|
9
|
+
"rust": "1.99.0",
|
|
10
|
+
"targets": [
|
|
11
|
+
"ts",
|
|
12
|
+
"mcp",
|
|
13
|
+
"go",
|
|
14
|
+
"python",
|
|
15
|
+
"csharp",
|
|
16
|
+
"php",
|
|
17
|
+
"ruby",
|
|
18
|
+
"java"
|
|
19
|
+
],
|
|
20
|
+
"upstream_repository": "https://github.com/cloudflare/forge.git",
|
|
21
|
+
"upstream_revision": "c2239b537f776976153ed7d4fd7214be00c504bd"
|
|
22
|
+
},
|
|
23
|
+
"registry_sha256": "a808fb293ab625357c336b22d489dc916d84ff65094b01be61bd2c41c45f9d03",
|
|
24
|
+
"examples_sha256": "a36619f28717de46e22767a03721a227dcd350b07b6b8d637e46b06020331fec",
|
|
25
|
+
"readmes_sha256": "f42f5f4227ad8e6dff4d789f7613d3dfc1d006fa2f338d7968b56461d82b8075",
|
|
26
|
+
"package_metadata_sha256": "ccbc6e94388faa4e0ab351deb236cd9c4a4dc0ab8d86f057554031ca1e0cfca0",
|
|
27
|
+
"additional_generator_sha256": "bbe20b046b5b7a303e763a7554dba51691ff3fc4b1b63d5ff6b05755cf96b52f",
|
|
28
|
+
"release_version": "0.4.1",
|
|
29
|
+
"release": {
|
|
30
|
+
"format": 1,
|
|
31
|
+
"version": "0.4.1",
|
|
32
|
+
"schema_version": "1.0.0",
|
|
33
|
+
"schema_sha256": "8207a092d091533edb0a699309eccde9757b6b72d8026659ed9b7ea66e95eddc",
|
|
34
|
+
"source_commit": "a6032ab463e4f42e523c866f1355118e564bd178",
|
|
35
|
+
"generator_revision": "947e00c5c8dcb523f923802001de0c4dbcb553a8"
|
|
36
|
+
},
|
|
37
|
+
"templates": {
|
|
38
|
+
"templates/cli/cli.ts": "78b857176084fb918503073192c4205cc35be3db91f734dc61c1ab79173df89a",
|
|
39
|
+
"templates/cli/integration.test.mjs": "f34ab25a430cfc54bbcb35bef8682d8649f04d9a7d7e5d14e67362bdb0dc0033",
|
|
40
|
+
"templates/cli/package-lock.json": "a1d7c1233806bf2f0515ff0e8056c15edb5e69e74ae8f3a0794faffac4ab4398",
|
|
41
|
+
"templates/csharp/Vectali.Client.sln": "d2ac087774bc4e58268f7c10cc002f23747b6ba6e5f4c881aad097d4b50f83cc",
|
|
42
|
+
"templates/csharp/src/Vectali.Client/VectaliClient.cs": "635959e0013eff7505dace5b0a80f132bb252fd657713c161315805b17d703a7",
|
|
43
|
+
"templates/csharp/verification/Program.cs": "4a20144e88daa4b09239e3ad3eaa4f799c56ce136294c4fd39fc9561cd3ad2fd",
|
|
44
|
+
"templates/csharp/verification/Verify.csproj": "8b848c78045a8bcc0d2148908dd4c03a0f524a273953760b89c781618acc8fda",
|
|
45
|
+
"templates/go/vectali.go": "a13a0f12e9735f2e1c54f2ea8e8ab6767ddbaa90f42fc2741b83867b75b6a081",
|
|
46
|
+
"templates/go/vectali_test.go": "b1fc14eeb8694207a452129224b68bb11410a926244748e7be9b2f50c317bb59",
|
|
47
|
+
"templates/go/verification/main.go": "150287c9c7531e7c5138fdf2d42f30deeb1dc98f4828038986c7786c45df129d",
|
|
48
|
+
"templates/java-central-profile.xml": "886f4fedd6d514235fbd5466a4f22dac672732cc497356ddca3d223a9b324aa8",
|
|
49
|
+
"templates/java/src/main/java/com/vectali/client/VectaliClient.java": "a17bdc29ffe59bd9f0eb4423711665cc43f3977d4c39a77c1860918c869e8cca",
|
|
50
|
+
"templates/java/verification/Verify.java": "838b338bf4b19d26ee90df07b9760a62969a2eff0d4f4803ef558cbde8960dd0",
|
|
51
|
+
"templates/mcp/input.ts": "c78f5a2a535e23021046854bcd6ee510121666704089d9322baebc08ffc30516",
|
|
52
|
+
"templates/mcp/integration.test.mjs": "ea38c8e8d2d7224484caa5fc336a6d5a0d49f9ff5f395a0b58d2825b99aabe5b",
|
|
53
|
+
"templates/mcp/package-lock.json": "242e9a2a6b0f002de88fe02f45ca5ada61da29901803278f1d3abf13bb0384f9",
|
|
54
|
+
"templates/mcp/server.ts": "4e205dbdb9a4e10d376f8a255ff3f4ab7d424d5cb1eb8a3b24b7ee5e6ee487f0",
|
|
55
|
+
"templates/mcp/stdio.ts": "142537102139824efd5344e63721e47c4a7c787417e0a48d355e9e592faf71fd",
|
|
56
|
+
"templates/openapi/schema-published.yml": "f55cf93383d77f165aa940591c64f8149531b9b7d560b0507244a1a915f7f222",
|
|
57
|
+
"templates/php/src/Client.php": "e192b1baaad0f77be4ea7e116b2b79153f52c28b8c58fec489761ff0b9ffccad",
|
|
58
|
+
"templates/php/verification/verify.php": "231bbd16a7d62842d58594d920126a48e2822f89908716db17463e0c51cb092d",
|
|
59
|
+
"templates/python/client.py": "28d85a7a58f93a67199545bf3e97324c463ebac6cb39a2728a725cb38f29cc72",
|
|
60
|
+
"templates/python/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
61
|
+
"templates/python/pyproject.toml": "0e6408d19b5de2bc487be2f08993479c59b0695e005aeb9995c8c59d39230de4",
|
|
62
|
+
"templates/python/test_client.py": "93faef412ca7927d993bd6c0aa77d5020c3e12d739e04c2ce3d333aa637fee8f",
|
|
63
|
+
"templates/ruby/lib/vectali/client.rb": "4b6d115ab8175af4e434a9c7ae2d189d8d7b6881515cc8d063c67d12cc8d607a",
|
|
64
|
+
"templates/ruby/verification/verify.rb": "f91531d01a5e55200f6b25da9bd9f749d9b95ec150f285af58b5cb6e725c9442",
|
|
65
|
+
"templates/typescript/client.test.mjs": "d1aad1696d7ccf894a5eb19a5418d70029dcf5a92ac59894b3ab038aa0bd9bec",
|
|
66
|
+
"templates/typescript/index.ts": "2b7860535e6cc9df9652aba9d9ae3f91b62a86b24baafb6edb77d439eb5dcbe6",
|
|
67
|
+
"templates/typescript/package-lock.json": "cc88af7b862f988ef39b198f69536d4fd150fdc08efa3bab5d733f446fa6f788"
|
|
68
|
+
},
|
|
69
|
+
"target": "ruby",
|
|
70
|
+
"generator": "forge"
|
|
71
|
+
}
|
metadata
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: vectali
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.4.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Vectali
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies: []
|
|
12
|
+
description: Vectali API client for image vectorization and vector downloads
|
|
13
|
+
email:
|
|
14
|
+
- sacha.arbonel@gmail.com
|
|
15
|
+
executables: []
|
|
16
|
+
extensions: []
|
|
17
|
+
extra_rdoc_files: []
|
|
18
|
+
files:
|
|
19
|
+
- LICENSE
|
|
20
|
+
- NOTICE
|
|
21
|
+
- README.md
|
|
22
|
+
- lib/vectali.rb
|
|
23
|
+
- lib/vectali/binary_response.rb
|
|
24
|
+
- lib/vectali/client.rb
|
|
25
|
+
- lib/vectali/codec.rb
|
|
26
|
+
- lib/vectali/errors.rb
|
|
27
|
+
- lib/vectali/file_upload.rb
|
|
28
|
+
- lib/vectali/forge_client.rb
|
|
29
|
+
- lib/vectali/models/billing_summary.rb
|
|
30
|
+
- lib/vectali/models/billing_summary_api_credits.rb
|
|
31
|
+
- lib/vectali/models/billing_summary_api_starter.rb
|
|
32
|
+
- lib/vectali/models/billing_summary_api_starter_plan.rb
|
|
33
|
+
- lib/vectali/models/billing_summary_available_plans_item.rb
|
|
34
|
+
- lib/vectali/models/billing_summary_free_api_conversions.rb
|
|
35
|
+
- lib/vectali/models/billing_summary_free_exports.rb
|
|
36
|
+
- lib/vectali/models/billing_summary_mode.rb
|
|
37
|
+
- lib/vectali/models/billing_summary_web_credits.rb
|
|
38
|
+
- lib/vectali/models/billing_summary_web_pro.rb
|
|
39
|
+
- lib/vectali/models/conversion.rb
|
|
40
|
+
- lib/vectali/models/conversion_allowance_used_this_call.rb
|
|
41
|
+
- lib/vectali/models/conversion_format.rb
|
|
42
|
+
- lib/vectali/models/error.rb
|
|
43
|
+
- lib/vectali/models/get_vector_format.rb
|
|
44
|
+
- lib/vectali/models/health.rb
|
|
45
|
+
- lib/vectali/requests/convert_image_request.rb
|
|
46
|
+
- lib/vectali/requests/get_allowance_request.rb
|
|
47
|
+
- lib/vectali/requests/get_vector_request.rb
|
|
48
|
+
- lib/vectali/requests/health_request.rb
|
|
49
|
+
- lib/vectali/transport.rb
|
|
50
|
+
- lib/vectali/version.rb
|
|
51
|
+
- provenance.json
|
|
52
|
+
homepage: https://vectali.com
|
|
53
|
+
licenses:
|
|
54
|
+
- Apache-2.0
|
|
55
|
+
metadata:
|
|
56
|
+
homepage_uri: https://vectali.com
|
|
57
|
+
source_code_uri: https://github.com/vectali/vectali-ruby
|
|
58
|
+
documentation_uri: https://vectali.com/docs/
|
|
59
|
+
bug_tracker_uri: https://github.com/vectali/vectali-ruby/issues
|
|
60
|
+
allowed_push_host: https://rubygems.org
|
|
61
|
+
rdoc_options: []
|
|
62
|
+
require_paths:
|
|
63
|
+
- lib
|
|
64
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '3.1'
|
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
|
+
requirements:
|
|
71
|
+
- - ">="
|
|
72
|
+
- !ruby/object:Gem::Version
|
|
73
|
+
version: '0'
|
|
74
|
+
requirements: []
|
|
75
|
+
rubygems_version: 4.0.20
|
|
76
|
+
specification_version: 4
|
|
77
|
+
summary: Vectali SDK
|
|
78
|
+
test_files: []
|