scalar_api_ruby 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +71 -0
- data/README.md +5 -3
- data/SKILL.md +3 -1
- data/api.md +20 -181
- data/lib/scalar_api_ruby/client.rb +14 -5
- data/lib/scalar_api_ruby/errors.rb +22 -0
- data/lib/scalar_api_ruby/file_part.rb +13 -1
- data/lib/scalar_api_ruby/internal/transport/base_client.rb +187 -42
- data/lib/scalar_api_ruby/internal/transport/connection_pool.rb +160 -0
- data/lib/scalar_api_ruby/internal/transport/pooled_net_requester.rb +77 -10
- data/lib/scalar_api_ruby/internal/type/base_model.rb +70 -18
- data/lib/scalar_api_ruby/internal/type/boolean.rb +3 -1
- data/lib/scalar_api_ruby/internal/type/converter.rb +13 -3
- data/lib/scalar_api_ruby/internal/type/enum.rb +9 -4
- data/lib/scalar_api_ruby/internal/type/file_input.rb +8 -2
- data/lib/scalar_api_ruby/internal/type/hash_of.rb +3 -1
- data/lib/scalar_api_ruby/internal/type/union.rb +21 -7
- data/lib/scalar_api_ruby/internal/type/unknown.rb +3 -1
- data/lib/scalar_api_ruby/internal/util.rb +277 -17
- data/lib/scalar_api_ruby/internal.rb +5 -1
- data/lib/scalar_api_ruby/models/access_group_create_params.rb +3 -3
- data/lib/scalar_api_ruby/models/access_group_create_response.rb +6 -6
- data/lib/scalar_api_ruby/models/access_group_retrieve_response.rb +6 -6
- data/lib/scalar_api_ruby/models/api_document.rb +3 -3
- data/lib/scalar_api_ruby/models/docs_project.rb +3 -3
- data/lib/scalar_api_ruby/models/github_project.rb +16 -4
- data/lib/scalar_api_ruby/models/mcp/mcp_server.rb +23 -18
- data/lib/scalar_api_ruby/models/mcp/server_create_response.rb +1 -7
- data/lib/scalar_api_ruby/models/mcp/server_list_response.rb +72 -1
- data/lib/scalar_api_ruby/models/sdk.rb +13 -7
- data/lib/scalar_api_ruby/models/sdk_build_params.rb +7 -1
- data/lib/scalar_api_ruby/models/sdk_create_params.rb +14 -7
- data/lib/scalar_api_ruby/models/sdk_update_params.rb +13 -3
- data/lib/scalar_api_ruby/models/sdk_version.rb +5 -34
- data/lib/scalar_api_ruby/models/sdks/repository_link_params.rb +33 -2
- data/lib/scalar_api_ruby/models/sdks/repository_update_publishing_params.rb +31 -1
- data/lib/scalar_api_ruby/models/sdks/version_create_params.rb +13 -7
- data/lib/scalar_api_ruby/models.rb +28 -31
- data/lib/scalar_api_ruby/request_options.rb +13 -5
- data/lib/scalar_api_ruby/resources/access_groups.rb +1 -1
- data/lib/scalar_api_ruby/resources/mcp/servers.rb +7 -74
- data/lib/scalar_api_ruby/resources/registry.rb +44 -16
- data/lib/scalar_api_ruby/resources/rules.rb +16 -8
- data/lib/scalar_api_ruby/resources/schemas/access_group.rb +6 -2
- data/lib/scalar_api_ruby/resources/schemas/version.rb +18 -8
- data/lib/scalar_api_ruby/resources/schemas.rb +6 -2
- data/lib/scalar_api_ruby/resources/sdks/repositories.rb +38 -6
- data/lib/scalar_api_ruby/resources/sdks/versions.rb +22 -5
- data/lib/scalar_api_ruby/resources/sdks.rb +45 -10
- data/lib/scalar_api_ruby/resources/themes.rb +1 -3
- data/lib/scalar_api_ruby/version.rb +1 -1
- data/lib/scalar_api_ruby.rb +4 -19
- data/rbi/scalar_api_ruby/client.rbi +5 -0
- data/rbi/scalar_api_ruby/errors.rbi +15 -27
- data/rbi/scalar_api_ruby/internal/transport/base_client.rbi +45 -54
- data/rbi/scalar_api_ruby/internal/transport/connection_pool.rbi +44 -0
- data/rbi/scalar_api_ruby/internal/transport/pooled_net_requester.rbi +14 -14
- data/rbi/scalar_api_ruby/internal/type/base_model.rbi +28 -35
- data/rbi/scalar_api_ruby/internal/type/converter.rbi +9 -30
- data/rbi/scalar_api_ruby/internal/type/enum.rbi +1 -5
- data/rbi/scalar_api_ruby/internal/type/request_parameters.rbi +1 -3
- data/rbi/scalar_api_ruby/internal/type/union.rbi +2 -9
- data/rbi/scalar_api_ruby/internal/util.rbi +101 -112
- data/rbi/scalar_api_ruby/internal.rbi +1 -2
- data/rbi/scalar_api_ruby/models/access_group_create_params.rbi +4 -4
- data/rbi/scalar_api_ruby/models/access_group_create_response.rbi +6 -6
- data/rbi/scalar_api_ruby/models/access_group_retrieve_response.rbi +6 -6
- data/rbi/scalar_api_ruby/models/api_document.rbi +3 -3
- data/rbi/scalar_api_ruby/models/docs_project.rbi +3 -3
- data/rbi/scalar_api_ruby/models/github_project.rbi +18 -6
- data/rbi/scalar_api_ruby/models/mcp/mcp_server.rbi +22 -16
- data/rbi/scalar_api_ruby/models/mcp/server_create_response.rbi +5 -19
- data/rbi/scalar_api_ruby/models/mcp/server_list_response.rbi +116 -1
- data/rbi/scalar_api_ruby/models/sdk.rbi +15 -9
- data/rbi/scalar_api_ruby/models/sdk_build_params.rbi +15 -1
- data/rbi/scalar_api_ruby/models/sdk_create_params.rbi +19 -6
- data/rbi/scalar_api_ruby/models/sdk_update_params.rbi +9 -4
- data/rbi/scalar_api_ruby/models/sdk_version.rbi +7 -52
- data/rbi/scalar_api_ruby/models/sdks/repository_link_params.rbi +59 -0
- data/rbi/scalar_api_ruby/models/sdks/repository_update_publishing_params.rbi +45 -0
- data/rbi/scalar_api_ruby/models/sdks/version_create_params.rbi +16 -6
- data/rbi/scalar_api_ruby/request_options.rbi +6 -8
- data/rbi/scalar_api_ruby/resources/access_groups.rbi +1 -1
- data/rbi/scalar_api_ruby/resources/mcp/servers.rbi +6 -51
- data/rbi/scalar_api_ruby/resources/sdks/repositories.rbi +28 -1
- data/rbi/scalar_api_ruby/resources/sdks/versions.rbi +21 -4
- data/rbi/scalar_api_ruby/resources/sdks.rbi +40 -10
- data/sig/scalar_api_ruby/client.rbs +2 -0
- data/sig/scalar_api_ruby/errors.rbs +6 -0
- data/sig/scalar_api_ruby/internal/transport/base_client.rbs +19 -1
- data/sig/scalar_api_ruby/internal/transport/connection_pool.rbs +19 -0
- data/sig/scalar_api_ruby/internal/transport/pooled_net_requester.rbs +11 -1
- data/sig/scalar_api_ruby/internal/type/base_model.rbs +4 -0
- data/sig/scalar_api_ruby/internal/util.rbs +29 -1
- data/sig/scalar_api_ruby/models/access_group_create_params.rbs +5 -5
- data/sig/scalar_api_ruby/models/access_group_create_response.rbs +8 -8
- data/sig/scalar_api_ruby/models/access_group_retrieve_response.rbs +8 -8
- data/sig/scalar_api_ruby/models/api_document.rbs +4 -4
- data/sig/scalar_api_ruby/models/docs_project.rbs +4 -4
- data/sig/scalar_api_ruby/models/github_project.rbs +17 -7
- data/sig/scalar_api_ruby/models/mcp/mcp_server.rbs +22 -17
- data/sig/scalar_api_ruby/models/mcp/server_create_response.rbs +3 -15
- data/sig/scalar_api_ruby/models/mcp/server_list_response.rbs +66 -1
- data/sig/scalar_api_ruby/models/sdk.rbs +13 -8
- data/sig/scalar_api_ruby/models/sdk_build_params.rbs +7 -0
- data/sig/scalar_api_ruby/models/sdk_create_params.rbs +9 -5
- data/sig/scalar_api_ruby/models/sdk_update_params.rbs +6 -4
- data/sig/scalar_api_ruby/models/sdk_version.rbs +7 -37
- data/sig/scalar_api_ruby/models/sdks/repository_link_params.rbs +21 -1
- data/sig/scalar_api_ruby/models/sdks/repository_update_publishing_params.rbs +36 -1
- data/sig/scalar_api_ruby/models/sdks/version_create_params.rbs +7 -5
- data/sig/scalar_api_ruby/resources/access_groups.rbs +1 -1
- data/sig/scalar_api_ruby/resources/mcp/servers.rbs +1 -20
- data/sig/scalar_api_ruby/resources/sdks/repositories.rbs +6 -0
- data/sig/scalar_api_ruby/resources/sdks/versions.rbs +1 -1
- data/sig/scalar_api_ruby/resources/sdks.rbs +3 -2
- metadata +8 -73
- data/lib/scalar_api_ruby/models/mcp/mcp_installation.rb +0 -75
- data/lib/scalar_api_ruby/models/mcp/server_delete_params.rb +0 -22
- data/lib/scalar_api_ruby/models/mcp/server_retrieve_params.rb +0 -22
- data/lib/scalar_api_ruby/models/mcp/server_update_params.rb +0 -52
- data/lib/scalar_api_ruby/models/mcp/servers/installation_create_access_group_params.rb +0 -36
- data/lib/scalar_api_ruby/models/mcp/servers/installation_create_params.rb +0 -44
- data/lib/scalar_api_ruby/models/mcp/servers/installation_delete_access_group_params.rb +0 -36
- data/lib/scalar_api_ruby/models/mcp/servers/installation_delete_params.rb +0 -30
- data/lib/scalar_api_ruby/models/mcp/servers/installation_list_params.rb +0 -24
- data/lib/scalar_api_ruby/models/mcp/servers/installation_list_response.rb +0 -13
- data/lib/scalar_api_ruby/models/mcp/servers/installation_retrieve_params.rb +0 -30
- data/lib/scalar_api_ruby/models/mcp/servers/installation_update_params.rb +0 -68
- data/lib/scalar_api_ruby/models/mcp/servers/mcp_installation_list_item.rb +0 -43
- data/lib/scalar_api_ruby/resources/mcp/servers/installations.rb +0 -200
- data/rbi/scalar_api_ruby/models/mcp/mcp_installation.rbi +0 -93
- data/rbi/scalar_api_ruby/models/mcp/server_delete_params.rbi +0 -37
- data/rbi/scalar_api_ruby/models/mcp/server_retrieve_params.rbi +0 -37
- data/rbi/scalar_api_ruby/models/mcp/server_update_params.rbi +0 -88
- data/rbi/scalar_api_ruby/models/mcp/servers/installation_create_access_group_params.rbi +0 -60
- data/rbi/scalar_api_ruby/models/mcp/servers/installation_create_params.rbi +0 -69
- data/rbi/scalar_api_ruby/models/mcp/servers/installation_delete_access_group_params.rbi +0 -60
- data/rbi/scalar_api_ruby/models/mcp/servers/installation_delete_params.rbi +0 -50
- data/rbi/scalar_api_ruby/models/mcp/servers/installation_list_params.rbi +0 -42
- data/rbi/scalar_api_ruby/models/mcp/servers/installation_list_response.rbi +0 -17
- data/rbi/scalar_api_ruby/models/mcp/servers/installation_retrieve_params.rbi +0 -50
- data/rbi/scalar_api_ruby/models/mcp/servers/installation_update_params.rbi +0 -102
- data/rbi/scalar_api_ruby/models/mcp/servers/mcp_installation_list_item.rbi +0 -60
- data/rbi/scalar_api_ruby/resources/mcp/servers/installations.rbi +0 -140
- data/sig/scalar_api_ruby/models/mcp/mcp_installation.rbs +0 -69
- data/sig/scalar_api_ruby/models/mcp/server_delete_params.rbs +0 -22
- data/sig/scalar_api_ruby/models/mcp/server_retrieve_params.rbs +0 -22
- data/sig/scalar_api_ruby/models/mcp/server_update_params.rbs +0 -63
- data/sig/scalar_api_ruby/models/mcp/servers/installation_create_access_group_params.rbs +0 -36
- data/sig/scalar_api_ruby/models/mcp/servers/installation_create_params.rbs +0 -47
- data/sig/scalar_api_ruby/models/mcp/servers/installation_delete_access_group_params.rbs +0 -36
- data/sig/scalar_api_ruby/models/mcp/servers/installation_delete_params.rbs +0 -32
- data/sig/scalar_api_ruby/models/mcp/servers/installation_list_params.rbs +0 -27
- data/sig/scalar_api_ruby/models/mcp/servers/installation_list_response.rbs +0 -12
- data/sig/scalar_api_ruby/models/mcp/servers/installation_retrieve_params.rbs +0 -32
- data/sig/scalar_api_ruby/models/mcp/servers/installation_update_params.rbs +0 -73
- data/sig/scalar_api_ruby/models/mcp/servers/mcp_installation_list_item.rbs +0 -44
- data/sig/scalar_api_ruby/resources/mcp/servers/installations.rbs +0 -62
|
@@ -160,7 +160,8 @@ module Scalar
|
|
|
160
160
|
in Hash | nil => coerced
|
|
161
161
|
coerced
|
|
162
162
|
else
|
|
163
|
-
message =
|
|
163
|
+
message =
|
|
164
|
+
"Expected a #{Hash} or #{Scalar::Internal::Type::BaseModel}, got #{input.inspect}"
|
|
164
165
|
raise ArgumentError.new(message)
|
|
165
166
|
end
|
|
166
167
|
end
|
|
@@ -250,7 +251,12 @@ module Scalar
|
|
|
250
251
|
#
|
|
251
252
|
# @return [String]
|
|
252
253
|
def uri_origin(uri)
|
|
253
|
-
|
|
254
|
+
# Re-parsed because `unparse_uri` and `join_parsed_uri` build a plain `URI::Generic`, which
|
|
255
|
+
# knows no default port, and the host downcased because hosts are case-insensitive. Without
|
|
256
|
+
# both, `https://API.example.com:443` and `https://api.example.com` read as two origins, and
|
|
257
|
+
# a same-origin redirect loses its credentials.
|
|
258
|
+
uri = URI(uri.to_s)
|
|
259
|
+
"#{uri.scheme}://#{uri.host&.downcase}#{":#{uri.port}" unless uri.port == uri.default_port}"
|
|
254
260
|
end
|
|
255
261
|
|
|
256
262
|
# @api private
|
|
@@ -259,13 +265,28 @@ module Scalar
|
|
|
259
265
|
#
|
|
260
266
|
# @return [String]
|
|
261
267
|
def encode_path(path)
|
|
262
|
-
path
|
|
268
|
+
path
|
|
269
|
+
.to_s
|
|
270
|
+
.gsub(Scalar::Internal::Util::RFC_3986_NOT_PCHARS) do
|
|
271
|
+
ERB::Util.url_encode(_1)
|
|
272
|
+
end
|
|
263
273
|
end
|
|
264
274
|
|
|
265
275
|
# @api private
|
|
266
276
|
#
|
|
277
|
+
# Fills a path template with its encoded parameters, refusing a value that would address a
|
|
278
|
+
# different endpoint than the one the method names.
|
|
279
|
+
#
|
|
280
|
+
# Encoding stops a value from adding `/`, `?` or `#`, but not from being a whole segment of its
|
|
281
|
+
# own: `URI.join` resolves a `.` or `..` segment away, so a `..` id would send the request, with
|
|
282
|
+
# the client's credentials, to the parent resource, and an empty value silently addresses the
|
|
283
|
+
# parent collection. Both are refused before any request is built. The assembled path is
|
|
284
|
+
# checked as well as each value, because values that pass alone can combine (`{a}{b}` with two
|
|
285
|
+
# `.`s). A `%2e` spelling is not a dot segment here: `encode_path` escapes its `%`.
|
|
286
|
+
#
|
|
267
287
|
# @param path [String, Array<String>]
|
|
268
288
|
#
|
|
289
|
+
# @raise [ArgumentError]
|
|
269
290
|
# @return [String]
|
|
270
291
|
def interpolate_path(path)
|
|
271
292
|
case path
|
|
@@ -275,7 +296,21 @@ module Scalar
|
|
|
275
296
|
""
|
|
276
297
|
in [String => p, *interpolations]
|
|
277
298
|
encoded = interpolations.map { encode_path(_1) }
|
|
278
|
-
|
|
299
|
+
if encoded.any?(&:empty?)
|
|
300
|
+
raise ArgumentError.new(
|
|
301
|
+
"A path parameter in `#{p}` is empty, which would address a different endpoint."
|
|
302
|
+
)
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
assembled = format(p, *encoded)
|
|
306
|
+
# Only the path takes part in dot-segment removal, not a query the template carries.
|
|
307
|
+
segment = assembled.split(/[?#]/, 2).first.to_s.split("/").find { %w[. ..].include?(_1) }
|
|
308
|
+
unless segment.nil?
|
|
309
|
+
message =
|
|
310
|
+
"The request path `#{assembled}` contains a #{segment.inspect} segment, which would address a different endpoint."
|
|
311
|
+
raise ArgumentError.new(message)
|
|
312
|
+
end
|
|
313
|
+
assembled
|
|
279
314
|
end
|
|
280
315
|
end
|
|
281
316
|
end
|
|
@@ -287,7 +322,43 @@ module Scalar
|
|
|
287
322
|
#
|
|
288
323
|
# @return [Hash{String=>Array<String>}]
|
|
289
324
|
def decode_query(query)
|
|
290
|
-
|
|
325
|
+
# Pairs split on `;` as well as `&`, empty pairs are skipped, and a key with no `=` maps to
|
|
326
|
+
# `[]` rather than `[""]`, so a bare flag survives as a key without gaining a value.
|
|
327
|
+
# `URI.decode_www_form` does none of those, and on Ruby 3.2 it also swaps bytes that are not
|
|
328
|
+
# UTF-8 for U+FFFD, which would rewrite a query value the client re-sends.
|
|
329
|
+
pairs = query.to_s.split(/[&;]/)
|
|
330
|
+
decoded = {}
|
|
331
|
+
pairs.each do |pair|
|
|
332
|
+
key, value = pair.split("=", 2).map { unescape_query_component(_1) }
|
|
333
|
+
next if key.nil?
|
|
334
|
+
|
|
335
|
+
values = (decoded[key] ||= [])
|
|
336
|
+
values << value unless value.nil?
|
|
337
|
+
end
|
|
338
|
+
# Callers read absent keys as "no values" (`decoded[key].empty?`), so a miss is `[]`. Frozen,
|
|
339
|
+
# so an `<<` on a miss raises instead of writing into the one array every miss shares.
|
|
340
|
+
decoded.default = [].freeze
|
|
341
|
+
decoded
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# @api private
|
|
345
|
+
#
|
|
346
|
+
# `+` is a space, and each run of `%XX` escapes becomes the bytes it encodes. A `%` that starts
|
|
347
|
+
# no valid escape is kept as written rather than raising. The result is UTF-8 when its bytes
|
|
348
|
+
# are, else it keeps the input's encoding.
|
|
349
|
+
#
|
|
350
|
+
# `CGI.unescape` stops decoding at a `%` in a component's last two bytes, which leaves a
|
|
351
|
+
# trailing `%+` as written; that one case is kept, so no decoded value changes.
|
|
352
|
+
#
|
|
353
|
+
# @param component [String]
|
|
354
|
+
#
|
|
355
|
+
# @return [String]
|
|
356
|
+
private def unescape_query_component(component)
|
|
357
|
+
bytes = component.b
|
|
358
|
+
kept = bytes.end_with?("%+") ? bytes.slice!(-1..) : ""
|
|
359
|
+
unescaped = bytes.tr("+", " ").gsub(/(?:%\h\h)+/) { [_1.delete("%")].pack("H*") } << kept
|
|
360
|
+
unescaped.force_encoding(Encoding::UTF_8)
|
|
361
|
+
unescaped.valid_encoding? ? unescaped : unescaped.force_encoding(component.encoding)
|
|
291
362
|
end
|
|
292
363
|
|
|
293
364
|
# @api private
|
|
@@ -398,6 +469,48 @@ module Scalar
|
|
|
398
469
|
[key.downcase, value]
|
|
399
470
|
end
|
|
400
471
|
end
|
|
472
|
+
|
|
473
|
+
# @api private
|
|
474
|
+
#
|
|
475
|
+
# A cookie value percent-encoded the way `encodeURIComponent` encodes one, byte by byte.
|
|
476
|
+
#
|
|
477
|
+
# A cookie parameter is caller input, often end-user input, and the `Cookie` header gives `;`,
|
|
478
|
+
# `,`, whitespace, `"` and `\` meaning: left raw, `x; sid=evil` would add a cookie of its own and
|
|
479
|
+
# could stand in for the client's credential cookie.
|
|
480
|
+
#
|
|
481
|
+
# @param value [Object]
|
|
482
|
+
#
|
|
483
|
+
# @return [String]
|
|
484
|
+
def encode_cookie_value(value)
|
|
485
|
+
value.to_s.b.gsub(/[^A-Za-z0-9\-_.!~*'()]/n) { format("%%%02X", _1.ord) }
|
|
486
|
+
end
|
|
487
|
+
|
|
488
|
+
# @api private
|
|
489
|
+
#
|
|
490
|
+
# Joins `Cookie` header values into one, by cookie name: a later value replaces an earlier
|
|
491
|
+
# cookie of the same name and adds the rest, in the order they first appeared.
|
|
492
|
+
#
|
|
493
|
+
# The client's credential cookie and an operation's cookie parameters arrive as separate
|
|
494
|
+
# `cookie` headers, and a plain header merge would let the operation's replace the credential's
|
|
495
|
+
# outright. Merging by name keeps both, while an operation parameter that shares the
|
|
496
|
+
# credential's name still replaces that one cookie.
|
|
497
|
+
#
|
|
498
|
+
# @param values [Array<String, nil>]
|
|
499
|
+
#
|
|
500
|
+
# @return [String, nil]
|
|
501
|
+
def merge_cookies(*values)
|
|
502
|
+
merged = {}
|
|
503
|
+
values.each do |value|
|
|
504
|
+
value
|
|
505
|
+
.to_s
|
|
506
|
+
.split(";")
|
|
507
|
+
.each do |pair|
|
|
508
|
+
name = pair.split("=", 2).first.to_s.strip
|
|
509
|
+
merged[name] = pair.strip unless name.empty?
|
|
510
|
+
end
|
|
511
|
+
end
|
|
512
|
+
merged.empty? ? nil : merged.values.join("; ")
|
|
513
|
+
end
|
|
401
514
|
end
|
|
402
515
|
|
|
403
516
|
# @api private
|
|
@@ -501,10 +614,23 @@ module Scalar
|
|
|
501
614
|
end
|
|
502
615
|
|
|
503
616
|
# @type [Regexp]
|
|
504
|
-
JSON_CONTENT = %r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}
|
|
617
|
+
JSON_CONTENT = %r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}i
|
|
505
618
|
# @type [Regexp]
|
|
506
619
|
JSONL_CONTENT = %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}
|
|
507
620
|
|
|
621
|
+
# Most bytes of a response body the SDK holds to decode it, counted after decompression.
|
|
622
|
+
# @type [Integer]
|
|
623
|
+
MAX_BUFFERED_BODY_BYTES = 64 * 1024 * 1024
|
|
624
|
+
|
|
625
|
+
# Most bytes of an error response read for the error's `body`; the rest is never read.
|
|
626
|
+
# @type [Integer]
|
|
627
|
+
MAX_ERROR_BODY_BYTES = 64 * 1024
|
|
628
|
+
|
|
629
|
+
# Most bytes one pending stream line or server-sent event may hold before the stream fails, so
|
|
630
|
+
# a server that never ends one cannot grow the buffer without bound.
|
|
631
|
+
# @type [Integer]
|
|
632
|
+
MAX_PENDING_STREAM_BYTES = 64 * 1024 * 1024
|
|
633
|
+
|
|
508
634
|
class << self
|
|
509
635
|
# @api private
|
|
510
636
|
#
|
|
@@ -529,7 +655,9 @@ module Scalar
|
|
|
529
655
|
in Hash
|
|
530
656
|
element.each { |name, value| write_query_param_element!(collection, "#{key}[#{name}]", value) }
|
|
531
657
|
in Array
|
|
532
|
-
collection[key] = element.map(
|
|
658
|
+
collection[key] = element.map { _1.is_a?(Time) ? _1.iso8601 : _1.to_s }.join(",")
|
|
659
|
+
in Time
|
|
660
|
+
collection[key] = element.iso8601
|
|
533
661
|
else
|
|
534
662
|
collection[key] = element.to_s
|
|
535
663
|
end
|
|
@@ -570,6 +698,20 @@ module Scalar
|
|
|
570
698
|
y << "\r\n"
|
|
571
699
|
end
|
|
572
700
|
|
|
701
|
+
# @api private
|
|
702
|
+
#
|
|
703
|
+
# A multipart field name escaped for its quoted `name` parameter: `"` as `%22`, a backslash
|
|
704
|
+
# doubled, and every C0 control but ESC as `%XX`. A body hash can carry a caller's keys, and
|
|
705
|
+
# left raw a `"` would end the quoted name early and a CR or LF would start a part header of
|
|
706
|
+
# its own.
|
|
707
|
+
#
|
|
708
|
+
# @param name [Symbol, String]
|
|
709
|
+
#
|
|
710
|
+
# @return [String]
|
|
711
|
+
def encode_form_name(name)
|
|
712
|
+
name.to_s.gsub(/["\\\x00-\x1A\x1C-\x1F]/) { _1 == "\\" ? "\\\\" : format("%%%02X", _1.ord) }
|
|
713
|
+
end
|
|
714
|
+
|
|
573
715
|
# @api private
|
|
574
716
|
#
|
|
575
717
|
# @param y [Enumerator::Yielder]
|
|
@@ -581,13 +723,13 @@ module Scalar
|
|
|
581
723
|
y << "--#{boundary}\r\n"
|
|
582
724
|
y << "Content-Disposition: form-data"
|
|
583
725
|
|
|
584
|
-
y << "; name=\"#{key}\"" unless key.nil?
|
|
726
|
+
y << "; name=\"#{encode_form_name(key)}\"" unless key.nil?
|
|
585
727
|
|
|
586
728
|
case val
|
|
587
729
|
in Scalar::FilePart unless val.filename.nil?
|
|
588
730
|
filename = encode_path(val.filename)
|
|
589
731
|
y << "; filename=\"#{filename}\""
|
|
590
|
-
in Pathname | IO
|
|
732
|
+
in Pathname | IO if val.respond_to?(:to_path)
|
|
591
733
|
filename = encode_path(::File.basename(val.to_path))
|
|
592
734
|
y << "; filename=\"#{filename}\""
|
|
593
735
|
else
|
|
@@ -610,13 +752,14 @@ module Scalar
|
|
|
610
752
|
boundary = SecureRandom.urlsafe_base64(46)
|
|
611
753
|
|
|
612
754
|
closing = []
|
|
755
|
+
file_input = Scalar::Internal::Type::FileInput
|
|
613
756
|
strio =
|
|
614
757
|
writable_enum do |y|
|
|
615
758
|
case body
|
|
616
759
|
in Hash
|
|
617
760
|
body.each do |key, val|
|
|
618
761
|
case val
|
|
619
|
-
in Array if val.all? { primitive?(_1) ||
|
|
762
|
+
in Array if val.all? { primitive?(_1) || file_input === _1 }
|
|
620
763
|
val.each do |v|
|
|
621
764
|
write_multipart_chunk(y, boundary: boundary, key: key, val: v, closing: closing)
|
|
622
765
|
end
|
|
@@ -635,6 +778,41 @@ module Scalar
|
|
|
635
778
|
# rubocop:enable Style/CaseEquality
|
|
636
779
|
end
|
|
637
780
|
|
|
781
|
+
# @api private
|
|
782
|
+
#
|
|
783
|
+
# A form body is encoded the way the query string is, through `encode_query_params`, so a list
|
|
784
|
+
# follows the configured array format and an object nests as `key[name]`. A form has no file
|
|
785
|
+
# parts, so a file value goes out as its contents, the way a string field would.
|
|
786
|
+
#
|
|
787
|
+
# @param body [Hash{Symbol=>Object}]
|
|
788
|
+
#
|
|
789
|
+
# @return [String]
|
|
790
|
+
def encode_form(body)
|
|
791
|
+
URI.encode_www_form(encode_query_params(form_field_value(body)))
|
|
792
|
+
end
|
|
793
|
+
|
|
794
|
+
# @api private
|
|
795
|
+
#
|
|
796
|
+
# @param value [Object]
|
|
797
|
+
#
|
|
798
|
+
# @return [Object]
|
|
799
|
+
private def form_field_value(value)
|
|
800
|
+
case value
|
|
801
|
+
in Hash
|
|
802
|
+
value.transform_values { form_field_value(_1) }
|
|
803
|
+
in Array
|
|
804
|
+
value.map { form_field_value(_1) }
|
|
805
|
+
in Scalar::FilePart
|
|
806
|
+
form_field_value(value.content)
|
|
807
|
+
in StringIO
|
|
808
|
+
value.string
|
|
809
|
+
in IO | Pathname
|
|
810
|
+
value.read
|
|
811
|
+
else
|
|
812
|
+
value
|
|
813
|
+
end
|
|
814
|
+
end
|
|
815
|
+
|
|
638
816
|
# @api private
|
|
639
817
|
#
|
|
640
818
|
# @param headers [Hash{String=>String}]
|
|
@@ -647,9 +825,13 @@ module Scalar
|
|
|
647
825
|
case [content_type, body]
|
|
648
826
|
in [Scalar::Internal::Util::JSON_CONTENT, Hash | Array | -> { primitive?(_1) }]
|
|
649
827
|
[headers, JSON.generate(body)]
|
|
650
|
-
in [
|
|
651
|
-
|
|
828
|
+
in [
|
|
829
|
+
Scalar::Internal::Util::JSONL_CONTENT,
|
|
830
|
+
Enumerable
|
|
831
|
+
] unless Scalar::Internal::Type::FileInput === body
|
|
652
832
|
[headers, body.lazy.map { JSON.generate(_1) }]
|
|
833
|
+
in [%r{^application/x-www-form-urlencoded}i, Hash]
|
|
834
|
+
[headers, encode_form(body)]
|
|
653
835
|
in [%r{^multipart/form-data}, Hash | Scalar::Internal::Type::FileInput]
|
|
654
836
|
boundary, strio = encode_multipart_streaming(body)
|
|
655
837
|
headers = {**headers, "content-type" => "#{content_type}; boundary=#{boundary}"}
|
|
@@ -685,20 +867,68 @@ module Scalar
|
|
|
685
867
|
end
|
|
686
868
|
end
|
|
687
869
|
|
|
870
|
+
# @api private
|
|
871
|
+
#
|
|
872
|
+
# Reads a body into one string, holding at most `limit` bytes of it.
|
|
873
|
+
#
|
|
874
|
+
# The chunks are counted as they arrive, after `Net::HTTP` has inflated a `gzip` or `deflate`
|
|
875
|
+
# body, so a small compressed response cannot inflate past the limit in memory. Over the limit
|
|
876
|
+
# a body is either refused or, with `truncate`, cut at the limit and the rest left unread;
|
|
877
|
+
# leaving the iteration early closes the connection rather than draining it.
|
|
878
|
+
#
|
|
879
|
+
# @param stream [Enumerable<String>]
|
|
880
|
+
# @param limit [Integer]
|
|
881
|
+
# @param truncate [Boolean]
|
|
882
|
+
#
|
|
883
|
+
# @raise [Scalar::Errors::Error] when the body is over `limit` and `truncate` is false
|
|
884
|
+
# @return [String]
|
|
885
|
+
def read_body(stream, limit:, truncate: false)
|
|
886
|
+
body = String.new
|
|
887
|
+
stream.each do |chunk|
|
|
888
|
+
room = limit - body.bytesize
|
|
889
|
+
if chunk.bytesize > room
|
|
890
|
+
unless truncate
|
|
891
|
+
message = "The response body is larger than the #{limit}-byte limit for a buffered response."
|
|
892
|
+
raise Scalar::Errors::Error.new(message)
|
|
893
|
+
end
|
|
894
|
+
|
|
895
|
+
body << chunk.byteslice(0, room)
|
|
896
|
+
break
|
|
897
|
+
end
|
|
898
|
+
body << chunk
|
|
899
|
+
end
|
|
900
|
+
body
|
|
901
|
+
end
|
|
902
|
+
|
|
688
903
|
# @api private
|
|
689
904
|
#
|
|
690
905
|
# Assumes each chunk in stream has `Encoding::BINARY`.
|
|
691
906
|
#
|
|
907
|
+
# A buffered body is held to {MAX_BUFFERED_BODY_BYTES}, whatever its type: the type is the
|
|
908
|
+
# server's word, so a JSON answer labelled `text/plain` (or not labelled) must not escape the
|
|
909
|
+
# limit. Only `download` lifts it, and the caller sets that from the operation's declared
|
|
910
|
+
# binary model, never from the response. With `truncate_at` (an error response, read only for
|
|
911
|
+
# its message) every buffered type keeps at most that many bytes.
|
|
912
|
+
#
|
|
692
913
|
# @param headers [Hash{String=>String}]
|
|
693
914
|
# @param stream [Enumerable<String>]
|
|
694
915
|
# @param suppress_error [Boolean]
|
|
916
|
+
# @param truncate_at [Integer, nil]
|
|
917
|
+
# @param download [Boolean] the operation returns raw bytes the caller asked for
|
|
695
918
|
#
|
|
696
919
|
# @raise [JSON::ParserError]
|
|
920
|
+
# @raise [Scalar::Errors::Error] when a buffered body is over the buffered-body limit
|
|
697
921
|
# @return [Object]
|
|
698
|
-
def decode_content(headers, stream:, suppress_error: false)
|
|
922
|
+
def decode_content(headers, stream:, suppress_error: false, truncate_at: nil, download: false)
|
|
699
923
|
case (content_type = headers["content-type"])
|
|
700
924
|
in Scalar::Internal::Util::JSON_CONTENT
|
|
701
|
-
|
|
925
|
+
json =
|
|
926
|
+
if truncate_at.nil?
|
|
927
|
+
read_body(stream, limit: Scalar::Internal::Util::MAX_BUFFERED_BODY_BYTES)
|
|
928
|
+
else
|
|
929
|
+
read_body(stream, limit: truncate_at, truncate: true)
|
|
930
|
+
end
|
|
931
|
+
return nil if json.empty?
|
|
702
932
|
|
|
703
933
|
begin
|
|
704
934
|
JSON.parse(json, symbolize_names: true)
|
|
@@ -719,7 +949,14 @@ module Scalar
|
|
|
719
949
|
lines = decode_lines(stream)
|
|
720
950
|
decode_sse(lines)
|
|
721
951
|
else
|
|
722
|
-
text =
|
|
952
|
+
text =
|
|
953
|
+
if !truncate_at.nil?
|
|
954
|
+
read_body(stream, limit: truncate_at, truncate: true)
|
|
955
|
+
elsif download
|
|
956
|
+
stream.to_a.join
|
|
957
|
+
else
|
|
958
|
+
read_body(stream, limit: Scalar::Internal::Util::MAX_BUFFERED_BODY_BYTES)
|
|
959
|
+
end
|
|
723
960
|
force_charset!(content_type, text: text)
|
|
724
961
|
StringIO.new(text)
|
|
725
962
|
end
|
|
@@ -762,9 +999,8 @@ module Scalar
|
|
|
762
999
|
def close_fused!(enum)
|
|
763
1000
|
return unless enum.is_a?(Enumerator)
|
|
764
1001
|
|
|
765
|
-
# rubocop:disable Lint/UnreachableLoop
|
|
1002
|
+
# rubocop:disable-next Lint/UnreachableLoop
|
|
766
1003
|
enum.rewind.each { break }
|
|
767
|
-
# rubocop:enable Lint/UnreachableLoop
|
|
768
1004
|
end
|
|
769
1005
|
|
|
770
1006
|
# @api private
|
|
@@ -788,8 +1024,12 @@ module Scalar
|
|
|
788
1024
|
# This decoder is responsible for reassembling lines split across multiple
|
|
789
1025
|
# fragments.
|
|
790
1026
|
#
|
|
1027
|
+
# A line still pending past {MAX_PENDING_STREAM_BYTES} fails the stream: the server controls
|
|
1028
|
+
# where lines end, and one that never ends would otherwise be buffered without bound.
|
|
1029
|
+
#
|
|
791
1030
|
# @param enum [Enumerable<String>]
|
|
792
1031
|
#
|
|
1032
|
+
# @raise [Scalar::Errors::Error] when one line outgrows the pending-line limit
|
|
793
1033
|
# @return [Enumerable<String>]
|
|
794
1034
|
def decode_lines(enum)
|
|
795
1035
|
re = /(\r\n|\r|\n)/
|
|
@@ -813,6 +1053,7 @@ module Scalar
|
|
|
813
1053
|
offset = 0
|
|
814
1054
|
cr_seen = nil
|
|
815
1055
|
end
|
|
1056
|
+
check_pending_stream!(buffer.bytesize)
|
|
816
1057
|
end
|
|
817
1058
|
|
|
818
1059
|
y << buffer.slice!(..(cr_seen.pred)) unless cr_seen.nil?
|
|
@@ -820,6 +1061,22 @@ module Scalar
|
|
|
820
1061
|
end
|
|
821
1062
|
end
|
|
822
1063
|
|
|
1064
|
+
# @api private
|
|
1065
|
+
#
|
|
1066
|
+
# Fails a stream whose pending line or event has outgrown {MAX_PENDING_STREAM_BYTES}.
|
|
1067
|
+
#
|
|
1068
|
+
# @param bytesize [Integer]
|
|
1069
|
+
#
|
|
1070
|
+
# @raise [Scalar::Errors::Error]
|
|
1071
|
+
private def check_pending_stream!(bytesize)
|
|
1072
|
+
limit = Scalar::Internal::Util::MAX_PENDING_STREAM_BYTES
|
|
1073
|
+
return if bytesize <= limit
|
|
1074
|
+
|
|
1075
|
+
raise Scalar::Errors::Error.new(
|
|
1076
|
+
"A stream line or event is larger than the #{limit}-byte limit."
|
|
1077
|
+
)
|
|
1078
|
+
end
|
|
1079
|
+
|
|
823
1080
|
# @api private
|
|
824
1081
|
#
|
|
825
1082
|
# https://html.spec.whatwg.org/multipage/server-sent-events.html#parsing-an-event-stream
|
|
@@ -849,7 +1106,10 @@ module Scalar
|
|
|
849
1106
|
in "event"
|
|
850
1107
|
current.merge!(event: value)
|
|
851
1108
|
in "data"
|
|
1109
|
+
# An event's `data` lines accumulate until a blank line, which the server may
|
|
1110
|
+
# never send, so the event is held to the same limit as one line.
|
|
852
1111
|
(current[:data] ||= String.new) << (value << "\n")
|
|
1112
|
+
check_pending_stream!(current[:data].bytesize)
|
|
853
1113
|
in "id" unless value.include?("\0")
|
|
854
1114
|
current.merge!(id: value)
|
|
855
1115
|
in "retry" if /^\d+$/ =~ value
|
|
@@ -4,7 +4,11 @@ module Scalar
|
|
|
4
4
|
module Internal
|
|
5
5
|
extend Scalar::Internal::Util::SorbetRuntimeSupport
|
|
6
6
|
|
|
7
|
-
OMIT =
|
|
7
|
+
OMIT =
|
|
8
|
+
Object
|
|
9
|
+
.new
|
|
10
|
+
.tap { _1.define_singleton_method(:inspect) { "#<#{Scalar::Internal}::OMIT>" } }
|
|
11
|
+
.freeze
|
|
8
12
|
|
|
9
13
|
define_sorbet_constant!(:AnyHash) { T.type_alias { T::Hash[Symbol, T.anything] } }
|
|
10
14
|
define_sorbet_constant!(:FileInput) do
|
|
@@ -9,8 +9,8 @@ module Scalar
|
|
|
9
9
|
|
|
10
10
|
# @!attribute allowed_domains
|
|
11
11
|
#
|
|
12
|
-
# @return [
|
|
13
|
-
optional :allowed_domains,
|
|
12
|
+
# @return [Object, nil]
|
|
13
|
+
optional :allowed_domains, Scalar::Internal::Type::Unknown, api_name: :allowedDomains
|
|
14
14
|
|
|
15
15
|
# @!attribute name
|
|
16
16
|
#
|
|
@@ -23,7 +23,7 @@ module Scalar
|
|
|
23
23
|
optional :slug, String
|
|
24
24
|
|
|
25
25
|
# @!method initialize(allowed_domains: nil, name: nil, slug: nil, request_options: {})
|
|
26
|
-
# @param allowed_domains [
|
|
26
|
+
# @param allowed_domains [Object]
|
|
27
27
|
# @param name [String]
|
|
28
28
|
# @param slug [String]
|
|
29
29
|
# @param request_options [Scalar::RequestOptions, Hash{Symbol=>Object}]
|
|
@@ -6,13 +6,13 @@ module Scalar
|
|
|
6
6
|
class AccessGroupCreateResponse < Scalar::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute allowed_domains
|
|
8
8
|
#
|
|
9
|
-
# @return [
|
|
10
|
-
required :allowed_domains,
|
|
9
|
+
# @return [Object]
|
|
10
|
+
required :allowed_domains, Scalar::Internal::Type::Unknown, api_name: :allowedDomains
|
|
11
11
|
|
|
12
12
|
# @!attribute allowed_emails
|
|
13
13
|
#
|
|
14
|
-
# @return [
|
|
15
|
-
required :allowed_emails,
|
|
14
|
+
# @return [Object]
|
|
15
|
+
required :allowed_emails, Scalar::Internal::Type::Unknown, api_name: :allowedEmails
|
|
16
16
|
|
|
17
17
|
# @!attribute name
|
|
18
18
|
#
|
|
@@ -30,8 +30,8 @@ module Scalar
|
|
|
30
30
|
required :uid, String
|
|
31
31
|
|
|
32
32
|
# @!method initialize(allowed_domains:, allowed_emails:, name:, slug:, uid:)
|
|
33
|
-
# @param allowed_domains [
|
|
34
|
-
# @param allowed_emails [
|
|
33
|
+
# @param allowed_domains [Object]
|
|
34
|
+
# @param allowed_emails [Object]
|
|
35
35
|
# @param name [String]
|
|
36
36
|
# @param slug [String]
|
|
37
37
|
# @param uid [String]
|
|
@@ -6,13 +6,13 @@ module Scalar
|
|
|
6
6
|
class AccessGroupRetrieveResponse < Scalar::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute allowed_domains
|
|
8
8
|
#
|
|
9
|
-
# @return [
|
|
10
|
-
required :allowed_domains,
|
|
9
|
+
# @return [Object]
|
|
10
|
+
required :allowed_domains, Scalar::Internal::Type::Unknown, api_name: :allowedDomains
|
|
11
11
|
|
|
12
12
|
# @!attribute allowed_emails
|
|
13
13
|
#
|
|
14
|
-
# @return [
|
|
15
|
-
required :allowed_emails,
|
|
14
|
+
# @return [Object]
|
|
15
|
+
required :allowed_emails, Scalar::Internal::Type::Unknown, api_name: :allowedEmails
|
|
16
16
|
|
|
17
17
|
# @!attribute name
|
|
18
18
|
#
|
|
@@ -30,8 +30,8 @@ module Scalar
|
|
|
30
30
|
required :uid, String
|
|
31
31
|
|
|
32
32
|
# @!method initialize(allowed_domains:, allowed_emails:, name:, slug:, uid:)
|
|
33
|
-
# @param allowed_domains [
|
|
34
|
-
# @param allowed_emails [
|
|
33
|
+
# @param allowed_domains [Object]
|
|
34
|
+
# @param allowed_emails [Object]
|
|
35
35
|
# @param name [String]
|
|
36
36
|
# @param slug [String]
|
|
37
37
|
# @param uid [String]
|
|
@@ -25,8 +25,8 @@ module Scalar
|
|
|
25
25
|
|
|
26
26
|
# @!attribute tags
|
|
27
27
|
#
|
|
28
|
-
# @return [
|
|
29
|
-
required :tags,
|
|
28
|
+
# @return [Object]
|
|
29
|
+
required :tags, Scalar::Internal::Type::Unknown
|
|
30
30
|
|
|
31
31
|
# @!attribute title
|
|
32
32
|
#
|
|
@@ -53,7 +53,7 @@ module Scalar
|
|
|
53
53
|
# @param is_private [Boolean]
|
|
54
54
|
# @param namespace [String]
|
|
55
55
|
# @param slug [String]
|
|
56
|
-
# @param tags [
|
|
56
|
+
# @param tags [Object]
|
|
57
57
|
# @param title [String]
|
|
58
58
|
# @param uid [String]
|
|
59
59
|
# @param version [String]
|
|
@@ -6,8 +6,8 @@ module Scalar
|
|
|
6
6
|
class DocsProject < Scalar::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute access_groups
|
|
8
8
|
#
|
|
9
|
-
# @return [
|
|
10
|
-
required :access_groups,
|
|
9
|
+
# @return [Object]
|
|
10
|
+
required :access_groups, Scalar::Internal::Type::Unknown, api_name: :accessGroups
|
|
11
11
|
|
|
12
12
|
# @!attribute active_theme_id
|
|
13
13
|
#
|
|
@@ -60,7 +60,7 @@ module Scalar
|
|
|
60
60
|
required :uid, String
|
|
61
61
|
|
|
62
62
|
# @!method initialize(access_groups:, active_theme_id:, agent_enabled:, analytics_enabled:, is_private:, last_published:, login_portal_uid:, name:, publish_status:, slug:, uid:)
|
|
63
|
-
# @param access_groups [
|
|
63
|
+
# @param access_groups [Object]
|
|
64
64
|
# @param active_theme_id [String]
|
|
65
65
|
# @param agent_enabled [Boolean]
|
|
66
66
|
# @param analytics_enabled [Boolean]
|
|
@@ -5,8 +5,8 @@ module Scalar
|
|
|
5
5
|
class GithubProject < Scalar::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute access_groups
|
|
7
7
|
#
|
|
8
|
-
# @return [
|
|
9
|
-
required :access_groups,
|
|
8
|
+
# @return [Object]
|
|
9
|
+
required :access_groups, Scalar::Internal::Type::Unknown, api_name: :accessGroups
|
|
10
10
|
|
|
11
11
|
# @!attribute active_deployment
|
|
12
12
|
#
|
|
@@ -28,6 +28,11 @@ module Scalar
|
|
|
28
28
|
# @return [Boolean]
|
|
29
29
|
required :analytics_enabled, Scalar::Internal::Type::Boolean, api_name: :analyticsEnabled
|
|
30
30
|
|
|
31
|
+
# @!attribute chat_insights_enabled
|
|
32
|
+
#
|
|
33
|
+
# @return [Boolean]
|
|
34
|
+
required :chat_insights_enabled, Scalar::Internal::Type::Boolean, api_name: :chatInsightsEnabled
|
|
35
|
+
|
|
31
36
|
# @!attribute created_at
|
|
32
37
|
#
|
|
33
38
|
# @return [Integer]
|
|
@@ -98,12 +103,18 @@ module Scalar
|
|
|
98
103
|
# @return [Float, nil]
|
|
99
104
|
optional :typesense_id, Float, api_name: :typesenseId
|
|
100
105
|
|
|
101
|
-
# @!
|
|
102
|
-
#
|
|
106
|
+
# @!attribute user_info_hook_secret_uid
|
|
107
|
+
#
|
|
108
|
+
# @return [String, nil]
|
|
109
|
+
optional :user_info_hook_secret_uid, String, api_name: :userInfoHookSecretUid, nil?: true
|
|
110
|
+
|
|
111
|
+
# @!method initialize(access_groups:, active_deployment:, active_theme_id:, agent_enabled:, analytics_enabled:, chat_insights_enabled:, created_at:, is_private:, last_published:, last_published_uid:, login_portal_uid:, name:, publish_message:, publish_status:, slug:, uid:, updated_at:, user_info_hook_url:, repository: nil, typesense_id: nil, user_info_hook_secret_uid: nil)
|
|
112
|
+
# @param access_groups [Object]
|
|
103
113
|
# @param active_deployment [Scalar::Models::ActiveDeployment, nil]
|
|
104
114
|
# @param active_theme_id [String]
|
|
105
115
|
# @param agent_enabled [Boolean]
|
|
106
116
|
# @param analytics_enabled [Boolean]
|
|
117
|
+
# @param chat_insights_enabled [Boolean]
|
|
107
118
|
# @param created_at [Integer]
|
|
108
119
|
# @param is_private [Boolean]
|
|
109
120
|
# @param last_published [Integer, nil]
|
|
@@ -118,6 +129,7 @@ module Scalar
|
|
|
118
129
|
# @param user_info_hook_url [String]
|
|
119
130
|
# @param repository [Scalar::Models::GithubProjectRepository, nil]
|
|
120
131
|
# @param typesense_id [Float]
|
|
132
|
+
# @param user_info_hook_secret_uid [String, nil]
|
|
121
133
|
end
|
|
122
134
|
end
|
|
123
135
|
end
|