brand.dev 0.1.0.pre.alpha.8 → 0.1.0.pre.alpha.10
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 +33 -0
- data/README.md +1 -1
- data/lib/brand_dev/errors.rb +22 -0
- data/lib/brand_dev/internal/type/array_of.rb +6 -1
- data/lib/brand_dev/internal/type/base_model.rb +77 -25
- data/lib/brand_dev/internal/type/boolean.rb +7 -1
- data/lib/brand_dev/internal/type/converter.rb +42 -34
- data/lib/brand_dev/internal/type/enum.rb +10 -2
- data/lib/brand_dev/internal/type/file_input.rb +6 -1
- data/lib/brand_dev/internal/type/hash_of.rb +6 -1
- data/lib/brand_dev/internal/type/union.rb +12 -7
- data/lib/brand_dev/internal/type/unknown.rb +7 -1
- data/lib/brand_dev/models/brand_retrieve_simplified_params.rb +35 -0
- data/lib/brand_dev/models/brand_retrieve_simplified_response.rb +280 -0
- data/lib/brand_dev/models/brand_screenshot_params.rb +49 -0
- data/lib/brand_dev/models/brand_screenshot_response.rb +64 -0
- data/lib/brand_dev/models/brand_styleguide_params.rb +36 -0
- data/lib/brand_dev/models/brand_styleguide_response.rb +769 -0
- data/lib/brand_dev/models.rb +6 -0
- data/lib/brand_dev/resources/brand.rb +87 -0
- data/lib/brand_dev/version.rb +1 -1
- data/lib/brand_dev.rb +6 -0
- data/rbi/brand_dev/errors.rbi +16 -0
- data/rbi/brand_dev/internal/type/boolean.rbi +2 -0
- data/rbi/brand_dev/internal/type/converter.rbi +15 -15
- data/rbi/brand_dev/internal/type/union.rbi +5 -0
- data/rbi/brand_dev/internal/type/unknown.rbi +2 -0
- data/rbi/brand_dev/models/brand_retrieve_simplified_params.rbi +61 -0
- data/rbi/brand_dev/models/brand_retrieve_simplified_response.rbi +667 -0
- data/rbi/brand_dev/models/brand_screenshot_params.rbi +105 -0
- data/rbi/brand_dev/models/brand_screenshot_response.rbi +135 -0
- data/rbi/brand_dev/models/brand_styleguide_params.rbi +60 -0
- data/rbi/brand_dev/models/brand_styleguide_response.rbi +1648 -0
- data/rbi/brand_dev/models.rbi +7 -0
- data/rbi/brand_dev/resources/brand.rbi +66 -0
- data/sig/brand_dev/errors.rbs +9 -0
- data/sig/brand_dev/internal/type/converter.rbs +7 -1
- data/sig/brand_dev/models/brand_retrieve_simplified_params.rbs +30 -0
- data/sig/brand_dev/models/brand_retrieve_simplified_response.rbs +292 -0
- data/sig/brand_dev/models/brand_screenshot_params.rbs +46 -0
- data/sig/brand_dev/models/brand_screenshot_response.rbs +63 -0
- data/sig/brand_dev/models/brand_styleguide_params.rbs +30 -0
- data/sig/brand_dev/models/brand_styleguide_response.rbs +925 -0
- data/sig/brand_dev/models.rbs +6 -0
- data/sig/brand_dev/resources/brand.rbs +18 -0
- metadata +20 -2
@@ -0,0 +1,105 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module BrandDev
|
4
|
+
module Models
|
5
|
+
class BrandScreenshotParams < BrandDev::Internal::Type::BaseModel
|
6
|
+
extend BrandDev::Internal::Type::RequestParameters::Converter
|
7
|
+
include BrandDev::Internal::Type::RequestParameters
|
8
|
+
|
9
|
+
OrHash =
|
10
|
+
T.type_alias do
|
11
|
+
T.any(BrandDev::BrandScreenshotParams, BrandDev::Internal::AnyHash)
|
12
|
+
end
|
13
|
+
|
14
|
+
# Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The
|
15
|
+
# domain will be automatically normalized and validated.
|
16
|
+
sig { returns(String) }
|
17
|
+
attr_accessor :domain
|
18
|
+
|
19
|
+
# Optional parameter to determine screenshot type. If 'true', takes a full page
|
20
|
+
# screenshot capturing all content. If 'false' or not provided, takes a viewport
|
21
|
+
# screenshot (standard browser view).
|
22
|
+
sig do
|
23
|
+
returns(
|
24
|
+
T.nilable(BrandDev::BrandScreenshotParams::FullScreenshot::OrSymbol)
|
25
|
+
)
|
26
|
+
end
|
27
|
+
attr_reader :full_screenshot
|
28
|
+
|
29
|
+
sig do
|
30
|
+
params(
|
31
|
+
full_screenshot:
|
32
|
+
BrandDev::BrandScreenshotParams::FullScreenshot::OrSymbol
|
33
|
+
).void
|
34
|
+
end
|
35
|
+
attr_writer :full_screenshot
|
36
|
+
|
37
|
+
sig do
|
38
|
+
params(
|
39
|
+
domain: String,
|
40
|
+
full_screenshot:
|
41
|
+
BrandDev::BrandScreenshotParams::FullScreenshot::OrSymbol,
|
42
|
+
request_options: BrandDev::RequestOptions::OrHash
|
43
|
+
).returns(T.attached_class)
|
44
|
+
end
|
45
|
+
def self.new(
|
46
|
+
# Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The
|
47
|
+
# domain will be automatically normalized and validated.
|
48
|
+
domain:,
|
49
|
+
# Optional parameter to determine screenshot type. If 'true', takes a full page
|
50
|
+
# screenshot capturing all content. If 'false' or not provided, takes a viewport
|
51
|
+
# screenshot (standard browser view).
|
52
|
+
full_screenshot: nil,
|
53
|
+
request_options: {}
|
54
|
+
)
|
55
|
+
end
|
56
|
+
|
57
|
+
sig do
|
58
|
+
override.returns(
|
59
|
+
{
|
60
|
+
domain: String,
|
61
|
+
full_screenshot:
|
62
|
+
BrandDev::BrandScreenshotParams::FullScreenshot::OrSymbol,
|
63
|
+
request_options: BrandDev::RequestOptions
|
64
|
+
}
|
65
|
+
)
|
66
|
+
end
|
67
|
+
def to_hash
|
68
|
+
end
|
69
|
+
|
70
|
+
# Optional parameter to determine screenshot type. If 'true', takes a full page
|
71
|
+
# screenshot capturing all content. If 'false' or not provided, takes a viewport
|
72
|
+
# screenshot (standard browser view).
|
73
|
+
module FullScreenshot
|
74
|
+
extend BrandDev::Internal::Type::Enum
|
75
|
+
|
76
|
+
TaggedSymbol =
|
77
|
+
T.type_alias do
|
78
|
+
T.all(Symbol, BrandDev::BrandScreenshotParams::FullScreenshot)
|
79
|
+
end
|
80
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
81
|
+
|
82
|
+
TRUE =
|
83
|
+
T.let(
|
84
|
+
:true,
|
85
|
+
BrandDev::BrandScreenshotParams::FullScreenshot::TaggedSymbol
|
86
|
+
)
|
87
|
+
FALSE =
|
88
|
+
T.let(
|
89
|
+
:false,
|
90
|
+
BrandDev::BrandScreenshotParams::FullScreenshot::TaggedSymbol
|
91
|
+
)
|
92
|
+
|
93
|
+
sig do
|
94
|
+
override.returns(
|
95
|
+
T::Array[
|
96
|
+
BrandDev::BrandScreenshotParams::FullScreenshot::TaggedSymbol
|
97
|
+
]
|
98
|
+
)
|
99
|
+
end
|
100
|
+
def self.values
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
@@ -0,0 +1,135 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module BrandDev
|
4
|
+
module Models
|
5
|
+
class BrandScreenshotResponse < BrandDev::Internal::Type::BaseModel
|
6
|
+
OrHash =
|
7
|
+
T.type_alias do
|
8
|
+
T.any(
|
9
|
+
BrandDev::Models::BrandScreenshotResponse,
|
10
|
+
BrandDev::Internal::AnyHash
|
11
|
+
)
|
12
|
+
end
|
13
|
+
|
14
|
+
# HTTP status code
|
15
|
+
sig { returns(T.nilable(Integer)) }
|
16
|
+
attr_reader :code
|
17
|
+
|
18
|
+
sig { params(code: Integer).void }
|
19
|
+
attr_writer :code
|
20
|
+
|
21
|
+
# The normalized domain that was processed
|
22
|
+
sig { returns(T.nilable(String)) }
|
23
|
+
attr_reader :domain
|
24
|
+
|
25
|
+
sig { params(domain: String).void }
|
26
|
+
attr_writer :domain
|
27
|
+
|
28
|
+
# Public URL of the uploaded screenshot image
|
29
|
+
sig { returns(T.nilable(String)) }
|
30
|
+
attr_reader :screenshot
|
31
|
+
|
32
|
+
sig { params(screenshot: String).void }
|
33
|
+
attr_writer :screenshot
|
34
|
+
|
35
|
+
# Type of screenshot that was captured
|
36
|
+
sig do
|
37
|
+
returns(
|
38
|
+
T.nilable(
|
39
|
+
BrandDev::Models::BrandScreenshotResponse::ScreenshotType::TaggedSymbol
|
40
|
+
)
|
41
|
+
)
|
42
|
+
end
|
43
|
+
attr_reader :screenshot_type
|
44
|
+
|
45
|
+
sig do
|
46
|
+
params(
|
47
|
+
screenshot_type:
|
48
|
+
BrandDev::Models::BrandScreenshotResponse::ScreenshotType::OrSymbol
|
49
|
+
).void
|
50
|
+
end
|
51
|
+
attr_writer :screenshot_type
|
52
|
+
|
53
|
+
# Status of the response, e.g., 'ok'
|
54
|
+
sig { returns(T.nilable(String)) }
|
55
|
+
attr_reader :status
|
56
|
+
|
57
|
+
sig { params(status: String).void }
|
58
|
+
attr_writer :status
|
59
|
+
|
60
|
+
sig do
|
61
|
+
params(
|
62
|
+
code: Integer,
|
63
|
+
domain: String,
|
64
|
+
screenshot: String,
|
65
|
+
screenshot_type:
|
66
|
+
BrandDev::Models::BrandScreenshotResponse::ScreenshotType::OrSymbol,
|
67
|
+
status: String
|
68
|
+
).returns(T.attached_class)
|
69
|
+
end
|
70
|
+
def self.new(
|
71
|
+
# HTTP status code
|
72
|
+
code: nil,
|
73
|
+
# The normalized domain that was processed
|
74
|
+
domain: nil,
|
75
|
+
# Public URL of the uploaded screenshot image
|
76
|
+
screenshot: nil,
|
77
|
+
# Type of screenshot that was captured
|
78
|
+
screenshot_type: nil,
|
79
|
+
# Status of the response, e.g., 'ok'
|
80
|
+
status: nil
|
81
|
+
)
|
82
|
+
end
|
83
|
+
|
84
|
+
sig do
|
85
|
+
override.returns(
|
86
|
+
{
|
87
|
+
code: Integer,
|
88
|
+
domain: String,
|
89
|
+
screenshot: String,
|
90
|
+
screenshot_type:
|
91
|
+
BrandDev::Models::BrandScreenshotResponse::ScreenshotType::TaggedSymbol,
|
92
|
+
status: String
|
93
|
+
}
|
94
|
+
)
|
95
|
+
end
|
96
|
+
def to_hash
|
97
|
+
end
|
98
|
+
|
99
|
+
# Type of screenshot that was captured
|
100
|
+
module ScreenshotType
|
101
|
+
extend BrandDev::Internal::Type::Enum
|
102
|
+
|
103
|
+
TaggedSymbol =
|
104
|
+
T.type_alias do
|
105
|
+
T.all(
|
106
|
+
Symbol,
|
107
|
+
BrandDev::Models::BrandScreenshotResponse::ScreenshotType
|
108
|
+
)
|
109
|
+
end
|
110
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
111
|
+
|
112
|
+
VIEWPORT =
|
113
|
+
T.let(
|
114
|
+
:viewport,
|
115
|
+
BrandDev::Models::BrandScreenshotResponse::ScreenshotType::TaggedSymbol
|
116
|
+
)
|
117
|
+
FULL_PAGE =
|
118
|
+
T.let(
|
119
|
+
:fullPage,
|
120
|
+
BrandDev::Models::BrandScreenshotResponse::ScreenshotType::TaggedSymbol
|
121
|
+
)
|
122
|
+
|
123
|
+
sig do
|
124
|
+
override.returns(
|
125
|
+
T::Array[
|
126
|
+
BrandDev::Models::BrandScreenshotResponse::ScreenshotType::TaggedSymbol
|
127
|
+
]
|
128
|
+
)
|
129
|
+
end
|
130
|
+
def self.values
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module BrandDev
|
4
|
+
module Models
|
5
|
+
class BrandStyleguideParams < BrandDev::Internal::Type::BaseModel
|
6
|
+
extend BrandDev::Internal::Type::RequestParameters::Converter
|
7
|
+
include BrandDev::Internal::Type::RequestParameters
|
8
|
+
|
9
|
+
OrHash =
|
10
|
+
T.type_alias do
|
11
|
+
T.any(BrandDev::BrandStyleguideParams, BrandDev::Internal::AnyHash)
|
12
|
+
end
|
13
|
+
|
14
|
+
# Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
|
15
|
+
# domain will be automatically normalized and validated.
|
16
|
+
sig { returns(String) }
|
17
|
+
attr_accessor :domain
|
18
|
+
|
19
|
+
# Optional timeout in milliseconds for the request. If the request takes longer
|
20
|
+
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
21
|
+
# value is 300000ms (5 minutes).
|
22
|
+
sig { returns(T.nilable(Integer)) }
|
23
|
+
attr_reader :timeout_ms
|
24
|
+
|
25
|
+
sig { params(timeout_ms: Integer).void }
|
26
|
+
attr_writer :timeout_ms
|
27
|
+
|
28
|
+
sig do
|
29
|
+
params(
|
30
|
+
domain: String,
|
31
|
+
timeout_ms: Integer,
|
32
|
+
request_options: BrandDev::RequestOptions::OrHash
|
33
|
+
).returns(T.attached_class)
|
34
|
+
end
|
35
|
+
def self.new(
|
36
|
+
# Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
|
37
|
+
# domain will be automatically normalized and validated.
|
38
|
+
domain:,
|
39
|
+
# Optional timeout in milliseconds for the request. If the request takes longer
|
40
|
+
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
41
|
+
# value is 300000ms (5 minutes).
|
42
|
+
timeout_ms: nil,
|
43
|
+
request_options: {}
|
44
|
+
)
|
45
|
+
end
|
46
|
+
|
47
|
+
sig do
|
48
|
+
override.returns(
|
49
|
+
{
|
50
|
+
domain: String,
|
51
|
+
timeout_ms: Integer,
|
52
|
+
request_options: BrandDev::RequestOptions
|
53
|
+
}
|
54
|
+
)
|
55
|
+
end
|
56
|
+
def to_hash
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|