context.dev 2.2.0 → 2.4.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 +22 -0
- data/README.md +9 -9
- data/lib/context_dev/client.rb +7 -2
- data/lib/context_dev/internal/type/base_model.rb +5 -5
- data/lib/context_dev/models/monitor_create_params.rb +28 -3
- data/lib/context_dev/models/monitor_create_response.rb +96 -4
- data/lib/context_dev/models/monitor_list_account_runs_response.rb +19 -98
- data/lib/context_dev/models/monitor_list_response.rb +100 -4
- data/lib/context_dev/models/monitor_list_runs_response.rb +19 -96
- data/lib/context_dev/models/monitor_retrieve_change_response.rb +10 -10
- data/lib/context_dev/models/monitor_retrieve_response.rb +97 -4
- data/lib/context_dev/models/monitor_update_params.rb +28 -3
- data/lib/context_dev/models/monitor_update_response.rb +96 -4
- data/lib/context_dev/models/parse_handle_params.rb +194 -0
- data/lib/context_dev/models/parse_handle_response.rb +132 -0
- data/lib/context_dev/models/web_web_crawl_md_params.rb +16 -6
- data/lib/context_dev/models/web_web_scrape_html_params.rb +16 -6
- data/lib/context_dev/models/web_web_scrape_md_params.rb +16 -6
- data/lib/context_dev/models/web_web_scrape_md_response.rb +11 -1
- data/lib/context_dev/models/webhook_delivery.rb +109 -0
- data/lib/context_dev/models.rb +4 -0
- data/lib/context_dev/resources/monitors.rb +3 -2
- data/lib/context_dev/resources/parse.rb +59 -0
- data/lib/context_dev/resources/web.rb +19 -4
- data/lib/context_dev/version.rb +1 -1
- data/lib/context_dev.rb +4 -0
- data/rbi/context_dev/client.rbi +6 -2
- data/rbi/context_dev/models/monitor_create_params.rbi +85 -5
- data/rbi/context_dev/models/monitor_create_response.rbi +234 -6
- data/rbi/context_dev/models/monitor_list_account_runs_response.rbi +27 -192
- data/rbi/context_dev/models/monitor_list_response.rbi +235 -5
- data/rbi/context_dev/models/monitor_list_runs_response.rbi +27 -192
- data/rbi/context_dev/models/monitor_retrieve_change_response.rbi +12 -15
- data/rbi/context_dev/models/monitor_retrieve_response.rbi +234 -6
- data/rbi/context_dev/models/monitor_update_params.rbi +85 -5
- data/rbi/context_dev/models/monitor_update_response.rbi +234 -6
- data/rbi/context_dev/models/parse_handle_params.rbi +339 -0
- data/rbi/context_dev/models/parse_handle_response.rbi +377 -0
- data/rbi/context_dev/models/web_web_crawl_md_params.rbi +26 -7
- data/rbi/context_dev/models/web_web_scrape_html_params.rbi +26 -7
- data/rbi/context_dev/models/web_web_scrape_md_params.rbi +26 -7
- data/rbi/context_dev/models/web_web_scrape_md_response.rbi +12 -0
- data/rbi/context_dev/models/webhook_delivery.rbi +172 -0
- data/rbi/context_dev/models.rbi +4 -0
- data/rbi/context_dev/resources/monitors.rbi +3 -2
- data/rbi/context_dev/resources/parse.rbi +58 -0
- data/rbi/context_dev/resources/web.rbi +22 -7
- data/sig/context_dev/client.rbs +2 -0
- data/sig/context_dev/models/monitor_create_params.rbs +32 -3
- data/sig/context_dev/models/monitor_create_response.rbs +85 -6
- data/sig/context_dev/models/monitor_list_account_runs_response.rbs +15 -68
- data/sig/context_dev/models/monitor_list_response.rbs +85 -6
- data/sig/context_dev/models/monitor_list_runs_response.rbs +15 -68
- data/sig/context_dev/models/monitor_retrieve_change_response.rbs +8 -10
- data/sig/context_dev/models/monitor_retrieve_response.rbs +85 -6
- data/sig/context_dev/models/monitor_update_params.rbs +32 -3
- data/sig/context_dev/models/monitor_update_response.rbs +85 -6
- data/sig/context_dev/models/parse_handle_params.rbs +244 -0
- data/sig/context_dev/models/parse_handle_response.rbs +159 -0
- data/sig/context_dev/models/web_web_crawl_md_params.rbs +13 -2
- data/sig/context_dev/models/web_web_scrape_html_params.rbs +13 -2
- data/sig/context_dev/models/web_web_scrape_md_params.rbs +13 -2
- data/sig/context_dev/models/web_web_scrape_md_response.rbs +5 -0
- data/sig/context_dev/models/webhook_delivery.rbs +81 -0
- data/sig/context_dev/models.rbs +4 -0
- data/sig/context_dev/resources/parse.rbs +19 -0
- metadata +14 -2
|
@@ -17,7 +17,8 @@ module ContextDev
|
|
|
17
17
|
last_run_at: Time?,
|
|
18
18
|
next_run_at: Time?,
|
|
19
19
|
tags: ::Array[String],
|
|
20
|
-
webhook: ContextDev::Models::MonitorRetrieveResponse::Webhook
|
|
20
|
+
webhook: ContextDev::Models::MonitorRetrieveResponse::Webhook?,
|
|
21
|
+
webhook_failure: ContextDev::Models::MonitorRetrieveResponse::WebhookFailure?
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
class MonitorRetrieveResponse < ContextDev::Internal::Type::BaseModel
|
|
@@ -55,6 +56,8 @@ module ContextDev
|
|
|
55
56
|
|
|
56
57
|
attr_accessor webhook: ContextDev::Models::MonitorRetrieveResponse::Webhook?
|
|
57
58
|
|
|
59
|
+
attr_accessor webhook_failure: ContextDev::Models::MonitorRetrieveResponse::WebhookFailure?
|
|
60
|
+
|
|
58
61
|
def initialize: (
|
|
59
62
|
id: String,
|
|
60
63
|
change_detection: ContextDev::Models::MonitorRetrieveResponse::change_detection,
|
|
@@ -71,7 +74,8 @@ module ContextDev
|
|
|
71
74
|
?last_run_at: Time?,
|
|
72
75
|
?next_run_at: Time?,
|
|
73
76
|
?tags: ::Array[String],
|
|
74
|
-
?webhook: ContextDev::Models::MonitorRetrieveResponse::Webhook
|
|
77
|
+
?webhook: ContextDev::Models::MonitorRetrieveResponse::Webhook?,
|
|
78
|
+
?webhook_failure: ContextDev::Models::MonitorRetrieveResponse::WebhookFailure?
|
|
75
79
|
) -> void
|
|
76
80
|
|
|
77
81
|
def to_hash: -> {
|
|
@@ -90,7 +94,8 @@ module ContextDev
|
|
|
90
94
|
last_run_at: Time?,
|
|
91
95
|
next_run_at: Time?,
|
|
92
96
|
tags: ::Array[String],
|
|
93
|
-
webhook: ContextDev::Models::MonitorRetrieveResponse::Webhook
|
|
97
|
+
webhook: ContextDev::Models::MonitorRetrieveResponse::Webhook?,
|
|
98
|
+
webhook_failure: ContextDev::Models::MonitorRetrieveResponse::WebhookFailure?
|
|
94
99
|
}
|
|
95
100
|
|
|
96
101
|
type change_detection =
|
|
@@ -415,18 +420,92 @@ module ContextDev
|
|
|
415
420
|
def to_hash: -> { code: String, message: String }
|
|
416
421
|
end
|
|
417
422
|
|
|
418
|
-
type webhook =
|
|
423
|
+
type webhook =
|
|
424
|
+
{
|
|
425
|
+
url: String,
|
|
426
|
+
events: ::Array[ContextDev::Models::MonitorRetrieveResponse::Webhook::event],
|
|
427
|
+
secret: String
|
|
428
|
+
}
|
|
419
429
|
|
|
420
430
|
class Webhook < ContextDev::Internal::Type::BaseModel
|
|
421
431
|
attr_accessor url: String
|
|
422
432
|
|
|
433
|
+
attr_reader events: ::Array[ContextDev::Models::MonitorRetrieveResponse::Webhook::event]?
|
|
434
|
+
|
|
435
|
+
def events=: (
|
|
436
|
+
::Array[ContextDev::Models::MonitorRetrieveResponse::Webhook::event]
|
|
437
|
+
) -> ::Array[ContextDev::Models::MonitorRetrieveResponse::Webhook::event]
|
|
438
|
+
|
|
423
439
|
attr_reader secret: String?
|
|
424
440
|
|
|
425
441
|
def secret=: (String) -> String
|
|
426
442
|
|
|
427
|
-
def initialize: (
|
|
443
|
+
def initialize: (
|
|
444
|
+
url: String,
|
|
445
|
+
?events: ::Array[ContextDev::Models::MonitorRetrieveResponse::Webhook::event],
|
|
446
|
+
?secret: String
|
|
447
|
+
) -> void
|
|
448
|
+
|
|
449
|
+
def to_hash: -> {
|
|
450
|
+
url: String,
|
|
451
|
+
events: ::Array[ContextDev::Models::MonitorRetrieveResponse::Webhook::event],
|
|
452
|
+
secret: String
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
type event = :"change.detected" | :"run.completed"
|
|
456
|
+
|
|
457
|
+
module Event
|
|
458
|
+
extend ContextDev::Internal::Type::Enum
|
|
459
|
+
|
|
460
|
+
CHANGE_DETECTED: :"change.detected"
|
|
461
|
+
RUN_COMPLETED: :"run.completed"
|
|
428
462
|
|
|
429
|
-
|
|
463
|
+
def self?.values: -> ::Array[ContextDev::Models::MonitorRetrieveResponse::Webhook::event]
|
|
464
|
+
end
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
type webhook_failure =
|
|
468
|
+
{
|
|
469
|
+
consecutive_failures: Integer,
|
|
470
|
+
last_failed_at: Time,
|
|
471
|
+
last_message: String,
|
|
472
|
+
last_status: ContextDev::Models::MonitorRetrieveResponse::WebhookFailure::last_status
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
class WebhookFailure < ContextDev::Internal::Type::BaseModel
|
|
476
|
+
attr_accessor consecutive_failures: Integer
|
|
477
|
+
|
|
478
|
+
attr_accessor last_failed_at: Time
|
|
479
|
+
|
|
480
|
+
attr_accessor last_message: String
|
|
481
|
+
|
|
482
|
+
attr_accessor last_status: ContextDev::Models::MonitorRetrieveResponse::WebhookFailure::last_status
|
|
483
|
+
|
|
484
|
+
def initialize: (
|
|
485
|
+
consecutive_failures: Integer,
|
|
486
|
+
last_failed_at: Time,
|
|
487
|
+
last_message: String,
|
|
488
|
+
last_status: ContextDev::Models::MonitorRetrieveResponse::WebhookFailure::last_status
|
|
489
|
+
) -> void
|
|
490
|
+
|
|
491
|
+
def to_hash: -> {
|
|
492
|
+
consecutive_failures: Integer,
|
|
493
|
+
last_failed_at: Time,
|
|
494
|
+
last_message: String,
|
|
495
|
+
last_status: ContextDev::Models::MonitorRetrieveResponse::WebhookFailure::last_status
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
type last_status = :rejected | :failed | :skipped_unsafe_url
|
|
499
|
+
|
|
500
|
+
module LastStatus
|
|
501
|
+
extend ContextDev::Internal::Type::Enum
|
|
502
|
+
|
|
503
|
+
REJECTED: :rejected
|
|
504
|
+
FAILED: :failed
|
|
505
|
+
SKIPPED_UNSAFE_URL: :skipped_unsafe_url
|
|
506
|
+
|
|
507
|
+
def self?.values: -> ::Array[ContextDev::Models::MonitorRetrieveResponse::WebhookFailure::last_status]
|
|
508
|
+
end
|
|
430
509
|
end
|
|
431
510
|
end
|
|
432
511
|
end
|
|
@@ -307,14 +307,43 @@ module ContextDev
|
|
|
307
307
|
def self?.variants: -> ::Array[ContextDev::Models::MonitorUpdateParams::target]
|
|
308
308
|
end
|
|
309
309
|
|
|
310
|
-
type webhook =
|
|
310
|
+
type webhook =
|
|
311
|
+
{
|
|
312
|
+
url: String,
|
|
313
|
+
events: ::Array[ContextDev::Models::MonitorUpdateParams::Webhook::event],
|
|
314
|
+
secret: String
|
|
315
|
+
}
|
|
311
316
|
|
|
312
317
|
class Webhook < ContextDev::Internal::Type::BaseModel
|
|
313
318
|
attr_accessor url: String
|
|
314
319
|
|
|
315
|
-
|
|
320
|
+
attr_reader events: ::Array[ContextDev::Models::MonitorUpdateParams::Webhook::event]?
|
|
321
|
+
|
|
322
|
+
def events=: (
|
|
323
|
+
::Array[ContextDev::Models::MonitorUpdateParams::Webhook::event]
|
|
324
|
+
) -> ::Array[ContextDev::Models::MonitorUpdateParams::Webhook::event]
|
|
325
|
+
|
|
326
|
+
def initialize: (
|
|
327
|
+
url: String,
|
|
328
|
+
?events: ::Array[ContextDev::Models::MonitorUpdateParams::Webhook::event]
|
|
329
|
+
) -> void
|
|
330
|
+
|
|
331
|
+
def to_hash: -> {
|
|
332
|
+
url: String,
|
|
333
|
+
events: ::Array[ContextDev::Models::MonitorUpdateParams::Webhook::event],
|
|
334
|
+
secret: String
|
|
335
|
+
}
|
|
316
336
|
|
|
317
|
-
|
|
337
|
+
type event = :"change.detected" | :"run.completed"
|
|
338
|
+
|
|
339
|
+
module Event
|
|
340
|
+
extend ContextDev::Internal::Type::Enum
|
|
341
|
+
|
|
342
|
+
CHANGE_DETECTED: :"change.detected"
|
|
343
|
+
RUN_COMPLETED: :"run.completed"
|
|
344
|
+
|
|
345
|
+
def self?.values: -> ::Array[ContextDev::Models::MonitorUpdateParams::Webhook::event]
|
|
346
|
+
end
|
|
318
347
|
end
|
|
319
348
|
end
|
|
320
349
|
end
|
|
@@ -17,7 +17,8 @@ module ContextDev
|
|
|
17
17
|
last_run_at: Time?,
|
|
18
18
|
next_run_at: Time?,
|
|
19
19
|
tags: ::Array[String],
|
|
20
|
-
webhook: ContextDev::Models::MonitorUpdateResponse::Webhook
|
|
20
|
+
webhook: ContextDev::Models::MonitorUpdateResponse::Webhook?,
|
|
21
|
+
webhook_failure: ContextDev::Models::MonitorUpdateResponse::WebhookFailure?
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
class MonitorUpdateResponse < ContextDev::Internal::Type::BaseModel
|
|
@@ -55,6 +56,8 @@ module ContextDev
|
|
|
55
56
|
|
|
56
57
|
attr_accessor webhook: ContextDev::Models::MonitorUpdateResponse::Webhook?
|
|
57
58
|
|
|
59
|
+
attr_accessor webhook_failure: ContextDev::Models::MonitorUpdateResponse::WebhookFailure?
|
|
60
|
+
|
|
58
61
|
def initialize: (
|
|
59
62
|
id: String,
|
|
60
63
|
change_detection: ContextDev::Models::MonitorUpdateResponse::change_detection,
|
|
@@ -71,7 +74,8 @@ module ContextDev
|
|
|
71
74
|
?last_run_at: Time?,
|
|
72
75
|
?next_run_at: Time?,
|
|
73
76
|
?tags: ::Array[String],
|
|
74
|
-
?webhook: ContextDev::Models::MonitorUpdateResponse::Webhook
|
|
77
|
+
?webhook: ContextDev::Models::MonitorUpdateResponse::Webhook?,
|
|
78
|
+
?webhook_failure: ContextDev::Models::MonitorUpdateResponse::WebhookFailure?
|
|
75
79
|
) -> void
|
|
76
80
|
|
|
77
81
|
def to_hash: -> {
|
|
@@ -90,7 +94,8 @@ module ContextDev
|
|
|
90
94
|
last_run_at: Time?,
|
|
91
95
|
next_run_at: Time?,
|
|
92
96
|
tags: ::Array[String],
|
|
93
|
-
webhook: ContextDev::Models::MonitorUpdateResponse::Webhook
|
|
97
|
+
webhook: ContextDev::Models::MonitorUpdateResponse::Webhook?,
|
|
98
|
+
webhook_failure: ContextDev::Models::MonitorUpdateResponse::WebhookFailure?
|
|
94
99
|
}
|
|
95
100
|
|
|
96
101
|
type change_detection =
|
|
@@ -415,18 +420,92 @@ module ContextDev
|
|
|
415
420
|
def to_hash: -> { code: String, message: String }
|
|
416
421
|
end
|
|
417
422
|
|
|
418
|
-
type webhook =
|
|
423
|
+
type webhook =
|
|
424
|
+
{
|
|
425
|
+
url: String,
|
|
426
|
+
events: ::Array[ContextDev::Models::MonitorUpdateResponse::Webhook::event],
|
|
427
|
+
secret: String
|
|
428
|
+
}
|
|
419
429
|
|
|
420
430
|
class Webhook < ContextDev::Internal::Type::BaseModel
|
|
421
431
|
attr_accessor url: String
|
|
422
432
|
|
|
433
|
+
attr_reader events: ::Array[ContextDev::Models::MonitorUpdateResponse::Webhook::event]?
|
|
434
|
+
|
|
435
|
+
def events=: (
|
|
436
|
+
::Array[ContextDev::Models::MonitorUpdateResponse::Webhook::event]
|
|
437
|
+
) -> ::Array[ContextDev::Models::MonitorUpdateResponse::Webhook::event]
|
|
438
|
+
|
|
423
439
|
attr_reader secret: String?
|
|
424
440
|
|
|
425
441
|
def secret=: (String) -> String
|
|
426
442
|
|
|
427
|
-
def initialize: (
|
|
443
|
+
def initialize: (
|
|
444
|
+
url: String,
|
|
445
|
+
?events: ::Array[ContextDev::Models::MonitorUpdateResponse::Webhook::event],
|
|
446
|
+
?secret: String
|
|
447
|
+
) -> void
|
|
448
|
+
|
|
449
|
+
def to_hash: -> {
|
|
450
|
+
url: String,
|
|
451
|
+
events: ::Array[ContextDev::Models::MonitorUpdateResponse::Webhook::event],
|
|
452
|
+
secret: String
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
type event = :"change.detected" | :"run.completed"
|
|
456
|
+
|
|
457
|
+
module Event
|
|
458
|
+
extend ContextDev::Internal::Type::Enum
|
|
459
|
+
|
|
460
|
+
CHANGE_DETECTED: :"change.detected"
|
|
461
|
+
RUN_COMPLETED: :"run.completed"
|
|
428
462
|
|
|
429
|
-
|
|
463
|
+
def self?.values: -> ::Array[ContextDev::Models::MonitorUpdateResponse::Webhook::event]
|
|
464
|
+
end
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
type webhook_failure =
|
|
468
|
+
{
|
|
469
|
+
consecutive_failures: Integer,
|
|
470
|
+
last_failed_at: Time,
|
|
471
|
+
last_message: String,
|
|
472
|
+
last_status: ContextDev::Models::MonitorUpdateResponse::WebhookFailure::last_status
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
class WebhookFailure < ContextDev::Internal::Type::BaseModel
|
|
476
|
+
attr_accessor consecutive_failures: Integer
|
|
477
|
+
|
|
478
|
+
attr_accessor last_failed_at: Time
|
|
479
|
+
|
|
480
|
+
attr_accessor last_message: String
|
|
481
|
+
|
|
482
|
+
attr_accessor last_status: ContextDev::Models::MonitorUpdateResponse::WebhookFailure::last_status
|
|
483
|
+
|
|
484
|
+
def initialize: (
|
|
485
|
+
consecutive_failures: Integer,
|
|
486
|
+
last_failed_at: Time,
|
|
487
|
+
last_message: String,
|
|
488
|
+
last_status: ContextDev::Models::MonitorUpdateResponse::WebhookFailure::last_status
|
|
489
|
+
) -> void
|
|
490
|
+
|
|
491
|
+
def to_hash: -> {
|
|
492
|
+
consecutive_failures: Integer,
|
|
493
|
+
last_failed_at: Time,
|
|
494
|
+
last_message: String,
|
|
495
|
+
last_status: ContextDev::Models::MonitorUpdateResponse::WebhookFailure::last_status
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
type last_status = :rejected | :failed | :skipped_unsafe_url
|
|
499
|
+
|
|
500
|
+
module LastStatus
|
|
501
|
+
extend ContextDev::Internal::Type::Enum
|
|
502
|
+
|
|
503
|
+
REJECTED: :rejected
|
|
504
|
+
FAILED: :failed
|
|
505
|
+
SKIPPED_UNSAFE_URL: :skipped_unsafe_url
|
|
506
|
+
|
|
507
|
+
def self?.values: -> ::Array[ContextDev::Models::MonitorUpdateResponse::WebhookFailure::last_status]
|
|
508
|
+
end
|
|
430
509
|
end
|
|
431
510
|
end
|
|
432
511
|
end
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
module ContextDev
|
|
2
|
+
module Models
|
|
3
|
+
type parse_handle_params =
|
|
4
|
+
{
|
|
5
|
+
body: ContextDev::Internal::file_input,
|
|
6
|
+
extension: ContextDev::Models::ParseHandleParams::extension,
|
|
7
|
+
include_images: bool,
|
|
8
|
+
include_links: bool,
|
|
9
|
+
ocr: bool,
|
|
10
|
+
pdf: ContextDev::ParseHandleParams::Pdf,
|
|
11
|
+
:shorten_base64_images => bool,
|
|
12
|
+
use_main_content_only: bool
|
|
13
|
+
}
|
|
14
|
+
& ContextDev::Internal::Type::request_parameters
|
|
15
|
+
|
|
16
|
+
class ParseHandleParams < ContextDev::Internal::Type::BaseModel
|
|
17
|
+
extend ContextDev::Internal::Type::RequestParameters::Converter
|
|
18
|
+
include ContextDev::Internal::Type::RequestParameters
|
|
19
|
+
|
|
20
|
+
attr_accessor body: ContextDev::Internal::file_input
|
|
21
|
+
|
|
22
|
+
attr_reader extension: ContextDev::Models::ParseHandleParams::extension?
|
|
23
|
+
|
|
24
|
+
def extension=: (
|
|
25
|
+
ContextDev::Models::ParseHandleParams::extension
|
|
26
|
+
) -> ContextDev::Models::ParseHandleParams::extension
|
|
27
|
+
|
|
28
|
+
attr_reader include_images: bool?
|
|
29
|
+
|
|
30
|
+
def include_images=: (bool) -> bool
|
|
31
|
+
|
|
32
|
+
attr_reader include_links: bool?
|
|
33
|
+
|
|
34
|
+
def include_links=: (bool) -> bool
|
|
35
|
+
|
|
36
|
+
attr_reader ocr: bool?
|
|
37
|
+
|
|
38
|
+
def ocr=: (bool) -> bool
|
|
39
|
+
|
|
40
|
+
attr_reader pdf: ContextDev::ParseHandleParams::Pdf?
|
|
41
|
+
|
|
42
|
+
def pdf=: (
|
|
43
|
+
ContextDev::ParseHandleParams::Pdf
|
|
44
|
+
) -> ContextDev::ParseHandleParams::Pdf
|
|
45
|
+
|
|
46
|
+
attr_reader shorten_base64_images: bool?
|
|
47
|
+
|
|
48
|
+
def shorten_base64_images=: (bool) -> bool
|
|
49
|
+
|
|
50
|
+
attr_reader use_main_content_only: bool?
|
|
51
|
+
|
|
52
|
+
def use_main_content_only=: (bool) -> bool
|
|
53
|
+
|
|
54
|
+
def initialize: (
|
|
55
|
+
body: ContextDev::Internal::file_input,
|
|
56
|
+
?extension: ContextDev::Models::ParseHandleParams::extension,
|
|
57
|
+
?include_images: bool,
|
|
58
|
+
?include_links: bool,
|
|
59
|
+
?ocr: bool,
|
|
60
|
+
?pdf: ContextDev::ParseHandleParams::Pdf,
|
|
61
|
+
?shorten_base64_images: bool,
|
|
62
|
+
?use_main_content_only: bool,
|
|
63
|
+
?request_options: ContextDev::request_opts
|
|
64
|
+
) -> void
|
|
65
|
+
|
|
66
|
+
def to_hash: -> {
|
|
67
|
+
body: ContextDev::Internal::file_input,
|
|
68
|
+
extension: ContextDev::Models::ParseHandleParams::extension,
|
|
69
|
+
include_images: bool,
|
|
70
|
+
include_links: bool,
|
|
71
|
+
ocr: bool,
|
|
72
|
+
pdf: ContextDev::ParseHandleParams::Pdf,
|
|
73
|
+
:shorten_base64_images => bool,
|
|
74
|
+
use_main_content_only: bool,
|
|
75
|
+
request_options: ContextDev::RequestOptions
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
type extension =
|
|
79
|
+
:txt
|
|
80
|
+
| :text
|
|
81
|
+
| :md
|
|
82
|
+
| :markdown
|
|
83
|
+
| :html
|
|
84
|
+
| :htm
|
|
85
|
+
| :xhtml
|
|
86
|
+
| :xml
|
|
87
|
+
| :rss
|
|
88
|
+
| :atom
|
|
89
|
+
| :csv
|
|
90
|
+
| :tsv
|
|
91
|
+
| :yaml
|
|
92
|
+
| :yml
|
|
93
|
+
| :py
|
|
94
|
+
| :java
|
|
95
|
+
| :js
|
|
96
|
+
| :jsx
|
|
97
|
+
| :mjs
|
|
98
|
+
| :cjs
|
|
99
|
+
| :json
|
|
100
|
+
| :jsonl
|
|
101
|
+
| :ndjson
|
|
102
|
+
| :php
|
|
103
|
+
| :sh
|
|
104
|
+
| :bash
|
|
105
|
+
| :zsh
|
|
106
|
+
| :fish
|
|
107
|
+
| :rb
|
|
108
|
+
| :ts
|
|
109
|
+
| :tsx
|
|
110
|
+
| :rtf
|
|
111
|
+
| :srt
|
|
112
|
+
| :css
|
|
113
|
+
| :scss
|
|
114
|
+
| :less
|
|
115
|
+
| :styl
|
|
116
|
+
| :sass
|
|
117
|
+
| :svg
|
|
118
|
+
| :pdf
|
|
119
|
+
| :docx
|
|
120
|
+
| :doc
|
|
121
|
+
| :xlsx
|
|
122
|
+
| :xlsm
|
|
123
|
+
| :xlsb
|
|
124
|
+
| :xltx
|
|
125
|
+
| :xltm
|
|
126
|
+
| :xls
|
|
127
|
+
| :pptx
|
|
128
|
+
| :pptm
|
|
129
|
+
| :ppsx
|
|
130
|
+
| :ppsm
|
|
131
|
+
| :potx
|
|
132
|
+
| :potm
|
|
133
|
+
| :ppt
|
|
134
|
+
| :pps
|
|
135
|
+
| :pot
|
|
136
|
+
| :jpg
|
|
137
|
+
| :jpeg
|
|
138
|
+
| :jpe
|
|
139
|
+
| :png
|
|
140
|
+
| :gif
|
|
141
|
+
| :bmp
|
|
142
|
+
| :tiff
|
|
143
|
+
| :tif
|
|
144
|
+
| :webp
|
|
145
|
+
| :ppm
|
|
146
|
+
| :pbm
|
|
147
|
+
| :pgm
|
|
148
|
+
| :pnm
|
|
149
|
+
|
|
150
|
+
module Extension
|
|
151
|
+
extend ContextDev::Internal::Type::Enum
|
|
152
|
+
|
|
153
|
+
TXT: :txt
|
|
154
|
+
TEXT: :text
|
|
155
|
+
MD: :md
|
|
156
|
+
MARKDOWN: :markdown
|
|
157
|
+
HTML: :html
|
|
158
|
+
HTM: :htm
|
|
159
|
+
XHTML: :xhtml
|
|
160
|
+
XML: :xml
|
|
161
|
+
RSS: :rss
|
|
162
|
+
ATOM: :atom
|
|
163
|
+
CSV: :csv
|
|
164
|
+
TSV: :tsv
|
|
165
|
+
YAML: :yaml
|
|
166
|
+
YML: :yml
|
|
167
|
+
PY: :py
|
|
168
|
+
JAVA: :java
|
|
169
|
+
JS: :js
|
|
170
|
+
JSX: :jsx
|
|
171
|
+
MJS: :mjs
|
|
172
|
+
CJS: :cjs
|
|
173
|
+
JSON: :json
|
|
174
|
+
JSONL: :jsonl
|
|
175
|
+
NDJSON: :ndjson
|
|
176
|
+
PHP: :php
|
|
177
|
+
SH: :sh
|
|
178
|
+
BASH: :bash
|
|
179
|
+
ZSH: :zsh
|
|
180
|
+
FISH: :fish
|
|
181
|
+
RB: :rb
|
|
182
|
+
TS: :ts
|
|
183
|
+
TSX: :tsx
|
|
184
|
+
RTF: :rtf
|
|
185
|
+
SRT: :srt
|
|
186
|
+
CSS: :css
|
|
187
|
+
SCSS: :scss
|
|
188
|
+
LESS: :less
|
|
189
|
+
STYL: :styl
|
|
190
|
+
SASS: :sass
|
|
191
|
+
SVG: :svg
|
|
192
|
+
PDF: :pdf
|
|
193
|
+
DOCX: :docx
|
|
194
|
+
DOC: :doc
|
|
195
|
+
XLSX: :xlsx
|
|
196
|
+
XLSM: :xlsm
|
|
197
|
+
XLSB: :xlsb
|
|
198
|
+
XLTX: :xltx
|
|
199
|
+
XLTM: :xltm
|
|
200
|
+
XLS: :xls
|
|
201
|
+
PPTX: :pptx
|
|
202
|
+
PPTM: :pptm
|
|
203
|
+
PPSX: :ppsx
|
|
204
|
+
PPSM: :ppsm
|
|
205
|
+
POTX: :potx
|
|
206
|
+
POTM: :potm
|
|
207
|
+
PPT: :ppt
|
|
208
|
+
PPS: :pps
|
|
209
|
+
POT: :pot
|
|
210
|
+
JPG: :jpg
|
|
211
|
+
JPEG: :jpeg
|
|
212
|
+
JPE: :jpe
|
|
213
|
+
PNG: :png
|
|
214
|
+
GIF: :gif
|
|
215
|
+
BMP: :bmp
|
|
216
|
+
TIFF: :tiff
|
|
217
|
+
TIF: :tif
|
|
218
|
+
WEBP: :webp
|
|
219
|
+
PPM: :ppm
|
|
220
|
+
PBM: :pbm
|
|
221
|
+
PGM: :pgm
|
|
222
|
+
PNM: :pnm
|
|
223
|
+
|
|
224
|
+
def self?.values: -> ::Array[ContextDev::Models::ParseHandleParams::extension]
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
type pdf = { end_: Integer, start: Integer }
|
|
228
|
+
|
|
229
|
+
class Pdf < ContextDev::Internal::Type::BaseModel
|
|
230
|
+
attr_reader end_: Integer?
|
|
231
|
+
|
|
232
|
+
def end_=: (Integer) -> Integer
|
|
233
|
+
|
|
234
|
+
attr_reader start: Integer?
|
|
235
|
+
|
|
236
|
+
def start=: (Integer) -> Integer
|
|
237
|
+
|
|
238
|
+
def initialize: (?end_: Integer, ?start: Integer) -> void
|
|
239
|
+
|
|
240
|
+
def to_hash: -> { end_: Integer, start: Integer }
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
end
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
module ContextDev
|
|
2
|
+
module Models
|
|
3
|
+
type parse_handle_response =
|
|
4
|
+
{
|
|
5
|
+
markdown: String,
|
|
6
|
+
success: ContextDev::Models::ParseHandleResponse::success,
|
|
7
|
+
type: ContextDev::Models::ParseHandleResponse::type_,
|
|
8
|
+
key_metadata: ContextDev::Models::ParseHandleResponse::KeyMetadata
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class ParseHandleResponse < ContextDev::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor markdown: String
|
|
13
|
+
|
|
14
|
+
attr_accessor success: ContextDev::Models::ParseHandleResponse::success
|
|
15
|
+
|
|
16
|
+
attr_accessor type: ContextDev::Models::ParseHandleResponse::type_
|
|
17
|
+
|
|
18
|
+
attr_reader key_metadata: ContextDev::Models::ParseHandleResponse::KeyMetadata?
|
|
19
|
+
|
|
20
|
+
def key_metadata=: (
|
|
21
|
+
ContextDev::Models::ParseHandleResponse::KeyMetadata
|
|
22
|
+
) -> ContextDev::Models::ParseHandleResponse::KeyMetadata
|
|
23
|
+
|
|
24
|
+
def initialize: (
|
|
25
|
+
markdown: String,
|
|
26
|
+
success: ContextDev::Models::ParseHandleResponse::success,
|
|
27
|
+
type: ContextDev::Models::ParseHandleResponse::type_,
|
|
28
|
+
?key_metadata: ContextDev::Models::ParseHandleResponse::KeyMetadata
|
|
29
|
+
) -> void
|
|
30
|
+
|
|
31
|
+
def to_hash: -> {
|
|
32
|
+
markdown: String,
|
|
33
|
+
success: ContextDev::Models::ParseHandleResponse::success,
|
|
34
|
+
type: ContextDev::Models::ParseHandleResponse::type_,
|
|
35
|
+
key_metadata: ContextDev::Models::ParseHandleResponse::KeyMetadata
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
type success = true
|
|
39
|
+
|
|
40
|
+
module Success
|
|
41
|
+
extend ContextDev::Internal::Type::Enum
|
|
42
|
+
|
|
43
|
+
TRUE: true
|
|
44
|
+
|
|
45
|
+
def self?.values: -> ::Array[ContextDev::Models::ParseHandleResponse::success]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
type type_ =
|
|
49
|
+
:html
|
|
50
|
+
| :xml
|
|
51
|
+
| :json
|
|
52
|
+
| :jsonl
|
|
53
|
+
| :text
|
|
54
|
+
| :csv
|
|
55
|
+
| :tsv
|
|
56
|
+
| :markdown
|
|
57
|
+
| :yaml
|
|
58
|
+
| :python
|
|
59
|
+
| :java
|
|
60
|
+
| :javascript
|
|
61
|
+
| :php
|
|
62
|
+
| :shell
|
|
63
|
+
| :ruby
|
|
64
|
+
| :typescript
|
|
65
|
+
| :rtf
|
|
66
|
+
| :srt
|
|
67
|
+
| :css
|
|
68
|
+
| :scss
|
|
69
|
+
| :less
|
|
70
|
+
| :stylus
|
|
71
|
+
| :sass
|
|
72
|
+
| :svg
|
|
73
|
+
| :pdf
|
|
74
|
+
| :docx
|
|
75
|
+
| :doc
|
|
76
|
+
| :xlsx
|
|
77
|
+
| :xls
|
|
78
|
+
| :pptx
|
|
79
|
+
| :ppt
|
|
80
|
+
| :jpg
|
|
81
|
+
| :png
|
|
82
|
+
| :gif
|
|
83
|
+
| :bmp
|
|
84
|
+
| :tiff
|
|
85
|
+
| :webp
|
|
86
|
+
| :ppm
|
|
87
|
+
| :pbm
|
|
88
|
+
| :pgm
|
|
89
|
+
| :pnm
|
|
90
|
+
|
|
91
|
+
module Type
|
|
92
|
+
extend ContextDev::Internal::Type::Enum
|
|
93
|
+
|
|
94
|
+
HTML: :html
|
|
95
|
+
XML: :xml
|
|
96
|
+
JSON: :json
|
|
97
|
+
JSONL: :jsonl
|
|
98
|
+
TEXT: :text
|
|
99
|
+
CSV: :csv
|
|
100
|
+
TSV: :tsv
|
|
101
|
+
MARKDOWN: :markdown
|
|
102
|
+
YAML: :yaml
|
|
103
|
+
PYTHON: :python
|
|
104
|
+
JAVA: :java
|
|
105
|
+
JAVASCRIPT: :javascript
|
|
106
|
+
PHP: :php
|
|
107
|
+
SHELL: :shell
|
|
108
|
+
RUBY: :ruby
|
|
109
|
+
TYPESCRIPT: :typescript
|
|
110
|
+
RTF: :rtf
|
|
111
|
+
SRT: :srt
|
|
112
|
+
CSS: :css
|
|
113
|
+
SCSS: :scss
|
|
114
|
+
LESS: :less
|
|
115
|
+
STYLUS: :stylus
|
|
116
|
+
SASS: :sass
|
|
117
|
+
SVG: :svg
|
|
118
|
+
PDF: :pdf
|
|
119
|
+
DOCX: :docx
|
|
120
|
+
DOC: :doc
|
|
121
|
+
XLSX: :xlsx
|
|
122
|
+
XLS: :xls
|
|
123
|
+
PPTX: :pptx
|
|
124
|
+
PPT: :ppt
|
|
125
|
+
JPG: :jpg
|
|
126
|
+
PNG: :png
|
|
127
|
+
GIF: :gif
|
|
128
|
+
BMP: :bmp
|
|
129
|
+
TIFF: :tiff
|
|
130
|
+
WEBP: :webp
|
|
131
|
+
PPM: :ppm
|
|
132
|
+
PBM: :pbm
|
|
133
|
+
PGM: :pgm
|
|
134
|
+
PNM: :pnm
|
|
135
|
+
|
|
136
|
+
def self?.values: -> ::Array[ContextDev::Models::ParseHandleResponse::type_]
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
type key_metadata =
|
|
140
|
+
{ credits_consumed: Integer, credits_remaining: Integer }
|
|
141
|
+
|
|
142
|
+
class KeyMetadata < ContextDev::Internal::Type::BaseModel
|
|
143
|
+
attr_accessor credits_consumed: Integer
|
|
144
|
+
|
|
145
|
+
attr_accessor credits_remaining: Integer
|
|
146
|
+
|
|
147
|
+
def initialize: (
|
|
148
|
+
credits_consumed: Integer,
|
|
149
|
+
credits_remaining: Integer
|
|
150
|
+
) -> void
|
|
151
|
+
|
|
152
|
+
def to_hash: -> {
|
|
153
|
+
credits_consumed: Integer,
|
|
154
|
+
credits_remaining: Integer
|
|
155
|
+
}
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
end
|