context.dev 1.7.0 → 1.9.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 +17 -0
- data/README.md +1 -1
- data/lib/context_dev/models/ai_extract_product_response.rb +9 -1
- data/lib/context_dev/models/ai_extract_products_response.rb +9 -1
- data/lib/context_dev/models/industry_retrieve_sic_params.rb +76 -0
- data/lib/context_dev/models/industry_retrieve_sic_response.rb +139 -0
- data/lib/context_dev/models.rb +2 -0
- data/lib/context_dev/resources/industry.rb +40 -0
- data/lib/context_dev/version.rb +1 -1
- data/lib/context_dev.rb +2 -0
- data/rbi/context_dev/models/ai_extract_product_response.rbi +8 -0
- data/rbi/context_dev/models/ai_extract_products_response.rbi +8 -0
- data/rbi/context_dev/models/industry_retrieve_sic_params.rbi +140 -0
- data/rbi/context_dev/models/industry_retrieve_sic_response.rbi +292 -0
- data/rbi/context_dev/models.rbi +2 -0
- data/rbi/context_dev/resources/industry.rbi +34 -0
- data/sig/context_dev/models/ai_extract_product_response.rbs +5 -0
- data/sig/context_dev/models/ai_extract_products_response.rbs +5 -0
- data/sig/context_dev/models/industry_retrieve_sic_params.rbs +67 -0
- data/sig/context_dev/models/industry_retrieve_sic_response.rbs +125 -0
- data/sig/context_dev/models.rbs +2 -0
- data/sig/context_dev/resources/industry.rbs +9 -0
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bc275c1c011dbedbe3bbdb3496fabd7cfe52ace449f9e8a1d5966b04944cfe93
|
|
4
|
+
data.tar.gz: 4277b8a2e2e1ce2f1f36e77cd3d34ab5e00decf16e8c4dab011036cc34b7cac5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cdb083597dc16824f95e3ea5a27e72c478c31ef89664e73928ead17f2db98b6d77db929ac6fcabac2922316ae4d2e32c76757ab538ef041f4e79061238ec3c9a
|
|
7
|
+
data.tar.gz: 810d3685eb4bc4a3cb112beadc9f0564ddcec92a39c507bd6104f98d9ddee3fab363d7081d999e0a9c830289a33e2ef15b3797e27afab3e7169772accf4dd5f5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.0 (2026-04-25)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.8.0...v1.9.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.8.0...v1.9.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([e1f12de](https://github.com/context-dot-dev/context-ruby-sdk/commit/e1f12de44bcadd047b5746fdddcd828a29107e1e))
|
|
10
|
+
|
|
11
|
+
## 1.8.0 (2026-04-24)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v1.7.0...v1.8.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.7.0...v1.8.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** api update ([84bfef2](https://github.com/context-dot-dev/context-ruby-sdk/commit/84bfef260d99a7a444c243edc4be1c72191929dd))
|
|
18
|
+
* **api:** api update ([5405b96](https://github.com/context-dot-dev/context-ruby-sdk/commit/5405b9676800e2004d92dd9f621dfc56972bacd2))
|
|
19
|
+
|
|
3
20
|
## 1.7.0 (2026-04-24)
|
|
4
21
|
|
|
5
22
|
Full Changelog: [v1.6.0...v1.7.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.6.0...v1.7.0)
|
data/README.md
CHANGED
|
@@ -70,6 +70,12 @@ module ContextDev
|
|
|
70
70
|
# @return [String]
|
|
71
71
|
required :name, String
|
|
72
72
|
|
|
73
|
+
# @!attribute sku
|
|
74
|
+
# Stock Keeping Unit (product identifier). Null if no identifier is found.
|
|
75
|
+
#
|
|
76
|
+
# @return [String, nil]
|
|
77
|
+
required :sku, String, nil?: true
|
|
78
|
+
|
|
73
79
|
# @!attribute tags
|
|
74
80
|
# Tags associated with the product
|
|
75
81
|
#
|
|
@@ -128,7 +134,7 @@ module ContextDev
|
|
|
128
134
|
# @return [String, nil]
|
|
129
135
|
optional :url, String, nil?: true
|
|
130
136
|
|
|
131
|
-
# @!method initialize(description:, features:, images:, name:, tags:, target_audience:, billing_frequency: nil, category: nil, currency: nil, image_url: nil, price: nil, pricing_model: nil, url: nil)
|
|
137
|
+
# @!method initialize(description:, features:, images:, name:, sku:, tags:, target_audience:, billing_frequency: nil, category: nil, currency: nil, image_url: nil, price: nil, pricing_model: nil, url: nil)
|
|
132
138
|
# The extracted product data, or null if not a product page
|
|
133
139
|
#
|
|
134
140
|
# @param description [String] Description of the product
|
|
@@ -139,6 +145,8 @@ module ContextDev
|
|
|
139
145
|
#
|
|
140
146
|
# @param name [String] Name of the product
|
|
141
147
|
#
|
|
148
|
+
# @param sku [String, nil] Stock Keeping Unit (product identifier). Null if no identifier is found.
|
|
149
|
+
#
|
|
142
150
|
# @param tags [Array<String>] Tags associated with the product
|
|
143
151
|
#
|
|
144
152
|
# @param target_audience [Array<String>] Target audience for the product (array of strings)
|
|
@@ -39,6 +39,12 @@ module ContextDev
|
|
|
39
39
|
# @return [String]
|
|
40
40
|
required :name, String
|
|
41
41
|
|
|
42
|
+
# @!attribute sku
|
|
43
|
+
# Stock Keeping Unit (product identifier). Null if no identifier is found.
|
|
44
|
+
#
|
|
45
|
+
# @return [String, nil]
|
|
46
|
+
required :sku, String, nil?: true
|
|
47
|
+
|
|
42
48
|
# @!attribute tags
|
|
43
49
|
# Tags associated with the product
|
|
44
50
|
#
|
|
@@ -97,7 +103,7 @@ module ContextDev
|
|
|
97
103
|
# @return [String, nil]
|
|
98
104
|
optional :url, String, nil?: true
|
|
99
105
|
|
|
100
|
-
# @!method initialize(description:, features:, images:, name:, tags:, target_audience:, billing_frequency: nil, category: nil, currency: nil, image_url: nil, price: nil, pricing_model: nil, url: nil)
|
|
106
|
+
# @!method initialize(description:, features:, images:, name:, sku:, tags:, target_audience:, billing_frequency: nil, category: nil, currency: nil, image_url: nil, price: nil, pricing_model: nil, url: nil)
|
|
101
107
|
# @param description [String] Description of the product
|
|
102
108
|
#
|
|
103
109
|
# @param features [Array<String>] List of product features
|
|
@@ -106,6 +112,8 @@ module ContextDev
|
|
|
106
112
|
#
|
|
107
113
|
# @param name [String] Name of the product
|
|
108
114
|
#
|
|
115
|
+
# @param sku [String, nil] Stock Keeping Unit (product identifier). Null if no identifier is found.
|
|
116
|
+
#
|
|
109
117
|
# @param tags [Array<String>] Tags associated with the product
|
|
110
118
|
#
|
|
111
119
|
# @param target_audience [Array<String>] Target audience for the product (array of strings)
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Models
|
|
5
|
+
# @see ContextDev::Resources::Industry#retrieve_sic
|
|
6
|
+
class IndustryRetrieveSicParams < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
extend ContextDev::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include ContextDev::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute input
|
|
11
|
+
# Brand domain or title to retrieve SIC code for. If a valid domain is provided,
|
|
12
|
+
# it will be used for classification, otherwise, we will search for the brand
|
|
13
|
+
# using the provided title.
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :input, String
|
|
17
|
+
|
|
18
|
+
# @!attribute max_results
|
|
19
|
+
# Maximum number of SIC codes to return. Must be between 1 and 10. Defaults to 5.
|
|
20
|
+
#
|
|
21
|
+
# @return [Integer, nil]
|
|
22
|
+
optional :max_results, Integer
|
|
23
|
+
|
|
24
|
+
# @!attribute min_results
|
|
25
|
+
# Minimum number of SIC codes to return. Must be at least 1. Defaults to 1.
|
|
26
|
+
#
|
|
27
|
+
# @return [Integer, nil]
|
|
28
|
+
optional :min_results, Integer
|
|
29
|
+
|
|
30
|
+
# @!attribute timeout_ms
|
|
31
|
+
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
32
|
+
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
33
|
+
# value is 300000ms (5 minutes).
|
|
34
|
+
#
|
|
35
|
+
# @return [Integer, nil]
|
|
36
|
+
optional :timeout_ms, Integer
|
|
37
|
+
|
|
38
|
+
# @!attribute type
|
|
39
|
+
# Which SIC dataset to classify against. `original_sic` uses the 1987 Standard
|
|
40
|
+
# Industrial Classification system; `latest_sec` uses the current SIC list as
|
|
41
|
+
# published by the SEC. Defaults to `original_sic`.
|
|
42
|
+
#
|
|
43
|
+
# @return [Symbol, ContextDev::Models::IndustryRetrieveSicParams::Type, nil]
|
|
44
|
+
optional :type, enum: -> { ContextDev::IndustryRetrieveSicParams::Type }
|
|
45
|
+
|
|
46
|
+
# @!method initialize(input:, max_results: nil, min_results: nil, timeout_ms: nil, type: nil, request_options: {})
|
|
47
|
+
# Some parameter documentations has been truncated, see
|
|
48
|
+
# {ContextDev::Models::IndustryRetrieveSicParams} for more details.
|
|
49
|
+
#
|
|
50
|
+
# @param input [String] Brand domain or title to retrieve SIC code for. If a valid domain is provided, i
|
|
51
|
+
#
|
|
52
|
+
# @param max_results [Integer] Maximum number of SIC codes to return. Must be between 1 and 10. Defaults to 5.
|
|
53
|
+
#
|
|
54
|
+
# @param min_results [Integer] Minimum number of SIC codes to return. Must be at least 1. Defaults to 1.
|
|
55
|
+
#
|
|
56
|
+
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
57
|
+
#
|
|
58
|
+
# @param type [Symbol, ContextDev::Models::IndustryRetrieveSicParams::Type] Which SIC dataset to classify against. `original_sic` uses the 1987 Standard Ind
|
|
59
|
+
#
|
|
60
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
61
|
+
|
|
62
|
+
# Which SIC dataset to classify against. `original_sic` uses the 1987 Standard
|
|
63
|
+
# Industrial Classification system; `latest_sec` uses the current SIC list as
|
|
64
|
+
# published by the SEC. Defaults to `original_sic`.
|
|
65
|
+
module Type
|
|
66
|
+
extend ContextDev::Internal::Type::Enum
|
|
67
|
+
|
|
68
|
+
ORIGINAL_SIC = :original_sic
|
|
69
|
+
LATEST_SEC = :latest_sec
|
|
70
|
+
|
|
71
|
+
# @!method self.values
|
|
72
|
+
# @return [Array<Symbol>]
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Models
|
|
5
|
+
# @see ContextDev::Resources::Industry#retrieve_sic
|
|
6
|
+
class IndustryRetrieveSicResponse < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute classification
|
|
8
|
+
# Echoes back which SIC dataset was used to classify the brand.
|
|
9
|
+
#
|
|
10
|
+
# @return [Symbol, ContextDev::Models::IndustryRetrieveSicResponse::Classification, nil]
|
|
11
|
+
optional :classification, enum: -> { ContextDev::Models::IndustryRetrieveSicResponse::Classification }
|
|
12
|
+
|
|
13
|
+
# @!attribute codes
|
|
14
|
+
# Array of SIC codes with confidence scores. Extra fields depend on the requested
|
|
15
|
+
# classification: `original_sic` results include `majorGroup` and
|
|
16
|
+
# `majorGroupName`; `latest_sec` results include `office`.
|
|
17
|
+
#
|
|
18
|
+
# @return [Array<ContextDev::Models::IndustryRetrieveSicResponse::Code>, nil]
|
|
19
|
+
optional :codes,
|
|
20
|
+
-> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::IndustryRetrieveSicResponse::Code] }
|
|
21
|
+
|
|
22
|
+
# @!attribute domain
|
|
23
|
+
# Domain found for the brand
|
|
24
|
+
#
|
|
25
|
+
# @return [String, nil]
|
|
26
|
+
optional :domain, String
|
|
27
|
+
|
|
28
|
+
# @!attribute status
|
|
29
|
+
# Status of the response, e.g., 'ok'
|
|
30
|
+
#
|
|
31
|
+
# @return [String, nil]
|
|
32
|
+
optional :status, String
|
|
33
|
+
|
|
34
|
+
# @!attribute type
|
|
35
|
+
# Industry classification type, for sic api it will be `sic`
|
|
36
|
+
#
|
|
37
|
+
# @return [String, nil]
|
|
38
|
+
optional :type, String
|
|
39
|
+
|
|
40
|
+
# @!method initialize(classification: nil, codes: nil, domain: nil, status: nil, type: nil)
|
|
41
|
+
# Some parameter documentations has been truncated, see
|
|
42
|
+
# {ContextDev::Models::IndustryRetrieveSicResponse} for more details.
|
|
43
|
+
#
|
|
44
|
+
# @param classification [Symbol, ContextDev::Models::IndustryRetrieveSicResponse::Classification] Echoes back which SIC dataset was used to classify the brand.
|
|
45
|
+
#
|
|
46
|
+
# @param codes [Array<ContextDev::Models::IndustryRetrieveSicResponse::Code>] Array of SIC codes with confidence scores. Extra fields depend on the requested
|
|
47
|
+
#
|
|
48
|
+
# @param domain [String] Domain found for the brand
|
|
49
|
+
#
|
|
50
|
+
# @param status [String] Status of the response, e.g., 'ok'
|
|
51
|
+
#
|
|
52
|
+
# @param type [String] Industry classification type, for sic api it will be `sic`
|
|
53
|
+
|
|
54
|
+
# Echoes back which SIC dataset was used to classify the brand.
|
|
55
|
+
#
|
|
56
|
+
# @see ContextDev::Models::IndustryRetrieveSicResponse#classification
|
|
57
|
+
module Classification
|
|
58
|
+
extend ContextDev::Internal::Type::Enum
|
|
59
|
+
|
|
60
|
+
ORIGINAL_SIC = :original_sic
|
|
61
|
+
LATEST_SEC = :latest_sec
|
|
62
|
+
|
|
63
|
+
# @!method self.values
|
|
64
|
+
# @return [Array<Symbol>]
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
class Code < ContextDev::Internal::Type::BaseModel
|
|
68
|
+
# @!attribute code
|
|
69
|
+
# SIC code (4-digit).
|
|
70
|
+
#
|
|
71
|
+
# @return [String]
|
|
72
|
+
required :code, String
|
|
73
|
+
|
|
74
|
+
# @!attribute confidence
|
|
75
|
+
# Confidence level for how well this SIC code matches the company description.
|
|
76
|
+
#
|
|
77
|
+
# @return [Symbol, ContextDev::Models::IndustryRetrieveSicResponse::Code::Confidence]
|
|
78
|
+
required :confidence, enum: -> { ContextDev::Models::IndustryRetrieveSicResponse::Code::Confidence }
|
|
79
|
+
|
|
80
|
+
# @!attribute name
|
|
81
|
+
# SIC industry title.
|
|
82
|
+
#
|
|
83
|
+
# @return [String]
|
|
84
|
+
required :name, String
|
|
85
|
+
|
|
86
|
+
# @!attribute major_group
|
|
87
|
+
# 2-digit major group identifier (the leading two digits of the code). Only
|
|
88
|
+
# present when `classification` is `original_sic`.
|
|
89
|
+
#
|
|
90
|
+
# @return [String, nil]
|
|
91
|
+
optional :major_group, String, api_name: :majorGroup
|
|
92
|
+
|
|
93
|
+
# @!attribute major_group_name
|
|
94
|
+
# Description of the 2-digit major group. Only present when `classification` is
|
|
95
|
+
# `original_sic`.
|
|
96
|
+
#
|
|
97
|
+
# @return [String, nil]
|
|
98
|
+
optional :major_group_name, String, api_name: :majorGroupName
|
|
99
|
+
|
|
100
|
+
# @!attribute office
|
|
101
|
+
# SEC review office responsible for filings under this code. Only present when
|
|
102
|
+
# `classification` is `latest_sec`.
|
|
103
|
+
#
|
|
104
|
+
# @return [String, nil]
|
|
105
|
+
optional :office, String
|
|
106
|
+
|
|
107
|
+
# @!method initialize(code:, confidence:, name:, major_group: nil, major_group_name: nil, office: nil)
|
|
108
|
+
# Some parameter documentations has been truncated, see
|
|
109
|
+
# {ContextDev::Models::IndustryRetrieveSicResponse::Code} for more details.
|
|
110
|
+
#
|
|
111
|
+
# @param code [String] SIC code (4-digit).
|
|
112
|
+
#
|
|
113
|
+
# @param confidence [Symbol, ContextDev::Models::IndustryRetrieveSicResponse::Code::Confidence] Confidence level for how well this SIC code matches the company description.
|
|
114
|
+
#
|
|
115
|
+
# @param name [String] SIC industry title.
|
|
116
|
+
#
|
|
117
|
+
# @param major_group [String] 2-digit major group identifier (the leading two digits of the code). Only presen
|
|
118
|
+
#
|
|
119
|
+
# @param major_group_name [String] Description of the 2-digit major group. Only present when `classification` is `o
|
|
120
|
+
#
|
|
121
|
+
# @param office [String] SEC review office responsible for filings under this code. Only present when `cl
|
|
122
|
+
|
|
123
|
+
# Confidence level for how well this SIC code matches the company description.
|
|
124
|
+
#
|
|
125
|
+
# @see ContextDev::Models::IndustryRetrieveSicResponse::Code#confidence
|
|
126
|
+
module Confidence
|
|
127
|
+
extend ContextDev::Internal::Type::Enum
|
|
128
|
+
|
|
129
|
+
HIGH = :high
|
|
130
|
+
MEDIUM = :medium
|
|
131
|
+
LOW = :low
|
|
132
|
+
|
|
133
|
+
# @!method self.values
|
|
134
|
+
# @return [Array<Symbol>]
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
end
|
data/lib/context_dev/models.rb
CHANGED
|
@@ -61,6 +61,8 @@ module ContextDev
|
|
|
61
61
|
|
|
62
62
|
IndustryRetrieveNaicsParams = ContextDev::Models::IndustryRetrieveNaicsParams
|
|
63
63
|
|
|
64
|
+
IndustryRetrieveSicParams = ContextDev::Models::IndustryRetrieveSicParams
|
|
65
|
+
|
|
64
66
|
UtilityPrefetchByEmailParams = ContextDev::Models::UtilityPrefetchByEmailParams
|
|
65
67
|
|
|
66
68
|
UtilityPrefetchParams = ContextDev::Models::UtilityPrefetchParams
|
|
@@ -39,6 +39,46 @@ module ContextDev
|
|
|
39
39
|
)
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
# Some parameter documentations has been truncated, see
|
|
43
|
+
# {ContextDev::Models::IndustryRetrieveSicParams} for more details.
|
|
44
|
+
#
|
|
45
|
+
# Classify any brand into Standard Industrial Classification (SIC) codes from its
|
|
46
|
+
# domain or name. Choose between the original 1987 SIC system (`original_sic`) or
|
|
47
|
+
# the latest SIC list maintained by the SEC (`latest_sec`).
|
|
48
|
+
#
|
|
49
|
+
# @overload retrieve_sic(input:, max_results: nil, min_results: nil, timeout_ms: nil, type: nil, request_options: {})
|
|
50
|
+
#
|
|
51
|
+
# @param input [String] Brand domain or title to retrieve SIC code for. If a valid domain is provided, i
|
|
52
|
+
#
|
|
53
|
+
# @param max_results [Integer] Maximum number of SIC codes to return. Must be between 1 and 10. Defaults to 5.
|
|
54
|
+
#
|
|
55
|
+
# @param min_results [Integer] Minimum number of SIC codes to return. Must be at least 1. Defaults to 1.
|
|
56
|
+
#
|
|
57
|
+
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
58
|
+
#
|
|
59
|
+
# @param type [Symbol, ContextDev::Models::IndustryRetrieveSicParams::Type] Which SIC dataset to classify against. `original_sic` uses the 1987 Standard Ind
|
|
60
|
+
#
|
|
61
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
62
|
+
#
|
|
63
|
+
# @return [ContextDev::Models::IndustryRetrieveSicResponse]
|
|
64
|
+
#
|
|
65
|
+
# @see ContextDev::Models::IndustryRetrieveSicParams
|
|
66
|
+
def retrieve_sic(params)
|
|
67
|
+
parsed, options = ContextDev::IndustryRetrieveSicParams.dump_request(params)
|
|
68
|
+
query = ContextDev::Internal::Util.encode_query_params(parsed)
|
|
69
|
+
@client.request(
|
|
70
|
+
method: :get,
|
|
71
|
+
path: "web/sic",
|
|
72
|
+
query: query.transform_keys(
|
|
73
|
+
max_results: "maxResults",
|
|
74
|
+
min_results: "minResults",
|
|
75
|
+
timeout_ms: "timeoutMS"
|
|
76
|
+
),
|
|
77
|
+
model: ContextDev::Models::IndustryRetrieveSicResponse,
|
|
78
|
+
options: options
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
|
|
42
82
|
# @api private
|
|
43
83
|
#
|
|
44
84
|
# @param client [ContextDev::Client]
|
data/lib/context_dev/version.rb
CHANGED
data/lib/context_dev.rb
CHANGED
|
@@ -74,6 +74,8 @@ require_relative "context_dev/models/brand_retrieve_simplified_params"
|
|
|
74
74
|
require_relative "context_dev/models/brand_retrieve_simplified_response"
|
|
75
75
|
require_relative "context_dev/models/industry_retrieve_naics_params"
|
|
76
76
|
require_relative "context_dev/models/industry_retrieve_naics_response"
|
|
77
|
+
require_relative "context_dev/models/industry_retrieve_sic_params"
|
|
78
|
+
require_relative "context_dev/models/industry_retrieve_sic_response"
|
|
77
79
|
require_relative "context_dev/models/utility_prefetch_by_email_params"
|
|
78
80
|
require_relative "context_dev/models/utility_prefetch_by_email_response"
|
|
79
81
|
require_relative "context_dev/models/utility_prefetch_params"
|
|
@@ -155,6 +155,10 @@ module ContextDev
|
|
|
155
155
|
sig { returns(String) }
|
|
156
156
|
attr_accessor :name
|
|
157
157
|
|
|
158
|
+
# Stock Keeping Unit (product identifier). Null if no identifier is found.
|
|
159
|
+
sig { returns(T.nilable(String)) }
|
|
160
|
+
attr_accessor :sku
|
|
161
|
+
|
|
158
162
|
# Tags associated with the product
|
|
159
163
|
sig { returns(T::Array[String]) }
|
|
160
164
|
attr_accessor :tags
|
|
@@ -210,6 +214,7 @@ module ContextDev
|
|
|
210
214
|
features: T::Array[String],
|
|
211
215
|
images: T::Array[String],
|
|
212
216
|
name: String,
|
|
217
|
+
sku: T.nilable(String),
|
|
213
218
|
tags: T::Array[String],
|
|
214
219
|
target_audience: T::Array[String],
|
|
215
220
|
billing_frequency:
|
|
@@ -236,6 +241,8 @@ module ContextDev
|
|
|
236
241
|
images:,
|
|
237
242
|
# Name of the product
|
|
238
243
|
name:,
|
|
244
|
+
# Stock Keeping Unit (product identifier). Null if no identifier is found.
|
|
245
|
+
sku:,
|
|
239
246
|
# Tags associated with the product
|
|
240
247
|
tags:,
|
|
241
248
|
# Target audience for the product (array of strings)
|
|
@@ -264,6 +271,7 @@ module ContextDev
|
|
|
264
271
|
features: T::Array[String],
|
|
265
272
|
images: T::Array[String],
|
|
266
273
|
name: String,
|
|
274
|
+
sku: T.nilable(String),
|
|
267
275
|
tags: T::Array[String],
|
|
268
276
|
target_audience: T::Array[String],
|
|
269
277
|
billing_frequency:
|
|
@@ -81,6 +81,10 @@ module ContextDev
|
|
|
81
81
|
sig { returns(String) }
|
|
82
82
|
attr_accessor :name
|
|
83
83
|
|
|
84
|
+
# Stock Keeping Unit (product identifier). Null if no identifier is found.
|
|
85
|
+
sig { returns(T.nilable(String)) }
|
|
86
|
+
attr_accessor :sku
|
|
87
|
+
|
|
84
88
|
# Tags associated with the product
|
|
85
89
|
sig { returns(T::Array[String]) }
|
|
86
90
|
attr_accessor :tags
|
|
@@ -135,6 +139,7 @@ module ContextDev
|
|
|
135
139
|
features: T::Array[String],
|
|
136
140
|
images: T::Array[String],
|
|
137
141
|
name: String,
|
|
142
|
+
sku: T.nilable(String),
|
|
138
143
|
tags: T::Array[String],
|
|
139
144
|
target_audience: T::Array[String],
|
|
140
145
|
billing_frequency:
|
|
@@ -161,6 +166,8 @@ module ContextDev
|
|
|
161
166
|
images:,
|
|
162
167
|
# Name of the product
|
|
163
168
|
name:,
|
|
169
|
+
# Stock Keeping Unit (product identifier). Null if no identifier is found.
|
|
170
|
+
sku:,
|
|
164
171
|
# Tags associated with the product
|
|
165
172
|
tags:,
|
|
166
173
|
# Target audience for the product (array of strings)
|
|
@@ -189,6 +196,7 @@ module ContextDev
|
|
|
189
196
|
features: T::Array[String],
|
|
190
197
|
images: T::Array[String],
|
|
191
198
|
name: String,
|
|
199
|
+
sku: T.nilable(String),
|
|
192
200
|
tags: T::Array[String],
|
|
193
201
|
target_audience: T::Array[String],
|
|
194
202
|
billing_frequency:
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Models
|
|
5
|
+
class IndustryRetrieveSicParams < ContextDev::Internal::Type::BaseModel
|
|
6
|
+
extend ContextDev::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include ContextDev::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
ContextDev::IndustryRetrieveSicParams,
|
|
13
|
+
ContextDev::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Brand domain or title to retrieve SIC code for. If a valid domain is provided,
|
|
18
|
+
# it will be used for classification, otherwise, we will search for the brand
|
|
19
|
+
# using the provided title.
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :input
|
|
22
|
+
|
|
23
|
+
# Maximum number of SIC codes to return. Must be between 1 and 10. Defaults to 5.
|
|
24
|
+
sig { returns(T.nilable(Integer)) }
|
|
25
|
+
attr_reader :max_results
|
|
26
|
+
|
|
27
|
+
sig { params(max_results: Integer).void }
|
|
28
|
+
attr_writer :max_results
|
|
29
|
+
|
|
30
|
+
# Minimum number of SIC codes to return. Must be at least 1. Defaults to 1.
|
|
31
|
+
sig { returns(T.nilable(Integer)) }
|
|
32
|
+
attr_reader :min_results
|
|
33
|
+
|
|
34
|
+
sig { params(min_results: Integer).void }
|
|
35
|
+
attr_writer :min_results
|
|
36
|
+
|
|
37
|
+
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
38
|
+
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
39
|
+
# value is 300000ms (5 minutes).
|
|
40
|
+
sig { returns(T.nilable(Integer)) }
|
|
41
|
+
attr_reader :timeout_ms
|
|
42
|
+
|
|
43
|
+
sig { params(timeout_ms: Integer).void }
|
|
44
|
+
attr_writer :timeout_ms
|
|
45
|
+
|
|
46
|
+
# Which SIC dataset to classify against. `original_sic` uses the 1987 Standard
|
|
47
|
+
# Industrial Classification system; `latest_sec` uses the current SIC list as
|
|
48
|
+
# published by the SEC. Defaults to `original_sic`.
|
|
49
|
+
sig do
|
|
50
|
+
returns(
|
|
51
|
+
T.nilable(ContextDev::IndustryRetrieveSicParams::Type::OrSymbol)
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
attr_reader :type
|
|
55
|
+
|
|
56
|
+
sig do
|
|
57
|
+
params(type: ContextDev::IndustryRetrieveSicParams::Type::OrSymbol).void
|
|
58
|
+
end
|
|
59
|
+
attr_writer :type
|
|
60
|
+
|
|
61
|
+
sig do
|
|
62
|
+
params(
|
|
63
|
+
input: String,
|
|
64
|
+
max_results: Integer,
|
|
65
|
+
min_results: Integer,
|
|
66
|
+
timeout_ms: Integer,
|
|
67
|
+
type: ContextDev::IndustryRetrieveSicParams::Type::OrSymbol,
|
|
68
|
+
request_options: ContextDev::RequestOptions::OrHash
|
|
69
|
+
).returns(T.attached_class)
|
|
70
|
+
end
|
|
71
|
+
def self.new(
|
|
72
|
+
# Brand domain or title to retrieve SIC code for. If a valid domain is provided,
|
|
73
|
+
# it will be used for classification, otherwise, we will search for the brand
|
|
74
|
+
# using the provided title.
|
|
75
|
+
input:,
|
|
76
|
+
# Maximum number of SIC codes to return. Must be between 1 and 10. Defaults to 5.
|
|
77
|
+
max_results: nil,
|
|
78
|
+
# Minimum number of SIC codes to return. Must be at least 1. Defaults to 1.
|
|
79
|
+
min_results: nil,
|
|
80
|
+
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
81
|
+
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
82
|
+
# value is 300000ms (5 minutes).
|
|
83
|
+
timeout_ms: nil,
|
|
84
|
+
# Which SIC dataset to classify against. `original_sic` uses the 1987 Standard
|
|
85
|
+
# Industrial Classification system; `latest_sec` uses the current SIC list as
|
|
86
|
+
# published by the SEC. Defaults to `original_sic`.
|
|
87
|
+
type: nil,
|
|
88
|
+
request_options: {}
|
|
89
|
+
)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
sig do
|
|
93
|
+
override.returns(
|
|
94
|
+
{
|
|
95
|
+
input: String,
|
|
96
|
+
max_results: Integer,
|
|
97
|
+
min_results: Integer,
|
|
98
|
+
timeout_ms: Integer,
|
|
99
|
+
type: ContextDev::IndustryRetrieveSicParams::Type::OrSymbol,
|
|
100
|
+
request_options: ContextDev::RequestOptions
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
end
|
|
104
|
+
def to_hash
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Which SIC dataset to classify against. `original_sic` uses the 1987 Standard
|
|
108
|
+
# Industrial Classification system; `latest_sec` uses the current SIC list as
|
|
109
|
+
# published by the SEC. Defaults to `original_sic`.
|
|
110
|
+
module Type
|
|
111
|
+
extend ContextDev::Internal::Type::Enum
|
|
112
|
+
|
|
113
|
+
TaggedSymbol =
|
|
114
|
+
T.type_alias do
|
|
115
|
+
T.all(Symbol, ContextDev::IndustryRetrieveSicParams::Type)
|
|
116
|
+
end
|
|
117
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
118
|
+
|
|
119
|
+
ORIGINAL_SIC =
|
|
120
|
+
T.let(
|
|
121
|
+
:original_sic,
|
|
122
|
+
ContextDev::IndustryRetrieveSicParams::Type::TaggedSymbol
|
|
123
|
+
)
|
|
124
|
+
LATEST_SEC =
|
|
125
|
+
T.let(
|
|
126
|
+
:latest_sec,
|
|
127
|
+
ContextDev::IndustryRetrieveSicParams::Type::TaggedSymbol
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
sig do
|
|
131
|
+
override.returns(
|
|
132
|
+
T::Array[ContextDev::IndustryRetrieveSicParams::Type::TaggedSymbol]
|
|
133
|
+
)
|
|
134
|
+
end
|
|
135
|
+
def self.values
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Models
|
|
5
|
+
class IndustryRetrieveSicResponse < ContextDev::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
ContextDev::Models::IndustryRetrieveSicResponse,
|
|
10
|
+
ContextDev::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Echoes back which SIC dataset was used to classify the brand.
|
|
15
|
+
sig do
|
|
16
|
+
returns(
|
|
17
|
+
T.nilable(
|
|
18
|
+
ContextDev::Models::IndustryRetrieveSicResponse::Classification::TaggedSymbol
|
|
19
|
+
)
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
attr_reader :classification
|
|
23
|
+
|
|
24
|
+
sig do
|
|
25
|
+
params(
|
|
26
|
+
classification:
|
|
27
|
+
ContextDev::Models::IndustryRetrieveSicResponse::Classification::OrSymbol
|
|
28
|
+
).void
|
|
29
|
+
end
|
|
30
|
+
attr_writer :classification
|
|
31
|
+
|
|
32
|
+
# Array of SIC codes with confidence scores. Extra fields depend on the requested
|
|
33
|
+
# classification: `original_sic` results include `majorGroup` and
|
|
34
|
+
# `majorGroupName`; `latest_sec` results include `office`.
|
|
35
|
+
sig do
|
|
36
|
+
returns(
|
|
37
|
+
T.nilable(
|
|
38
|
+
T::Array[ContextDev::Models::IndustryRetrieveSicResponse::Code]
|
|
39
|
+
)
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
attr_reader :codes
|
|
43
|
+
|
|
44
|
+
sig do
|
|
45
|
+
params(
|
|
46
|
+
codes:
|
|
47
|
+
T::Array[
|
|
48
|
+
ContextDev::Models::IndustryRetrieveSicResponse::Code::OrHash
|
|
49
|
+
]
|
|
50
|
+
).void
|
|
51
|
+
end
|
|
52
|
+
attr_writer :codes
|
|
53
|
+
|
|
54
|
+
# Domain found for the brand
|
|
55
|
+
sig { returns(T.nilable(String)) }
|
|
56
|
+
attr_reader :domain
|
|
57
|
+
|
|
58
|
+
sig { params(domain: String).void }
|
|
59
|
+
attr_writer :domain
|
|
60
|
+
|
|
61
|
+
# Status of the response, e.g., 'ok'
|
|
62
|
+
sig { returns(T.nilable(String)) }
|
|
63
|
+
attr_reader :status
|
|
64
|
+
|
|
65
|
+
sig { params(status: String).void }
|
|
66
|
+
attr_writer :status
|
|
67
|
+
|
|
68
|
+
# Industry classification type, for sic api it will be `sic`
|
|
69
|
+
sig { returns(T.nilable(String)) }
|
|
70
|
+
attr_reader :type
|
|
71
|
+
|
|
72
|
+
sig { params(type: String).void }
|
|
73
|
+
attr_writer :type
|
|
74
|
+
|
|
75
|
+
sig do
|
|
76
|
+
params(
|
|
77
|
+
classification:
|
|
78
|
+
ContextDev::Models::IndustryRetrieveSicResponse::Classification::OrSymbol,
|
|
79
|
+
codes:
|
|
80
|
+
T::Array[
|
|
81
|
+
ContextDev::Models::IndustryRetrieveSicResponse::Code::OrHash
|
|
82
|
+
],
|
|
83
|
+
domain: String,
|
|
84
|
+
status: String,
|
|
85
|
+
type: String
|
|
86
|
+
).returns(T.attached_class)
|
|
87
|
+
end
|
|
88
|
+
def self.new(
|
|
89
|
+
# Echoes back which SIC dataset was used to classify the brand.
|
|
90
|
+
classification: nil,
|
|
91
|
+
# Array of SIC codes with confidence scores. Extra fields depend on the requested
|
|
92
|
+
# classification: `original_sic` results include `majorGroup` and
|
|
93
|
+
# `majorGroupName`; `latest_sec` results include `office`.
|
|
94
|
+
codes: nil,
|
|
95
|
+
# Domain found for the brand
|
|
96
|
+
domain: nil,
|
|
97
|
+
# Status of the response, e.g., 'ok'
|
|
98
|
+
status: nil,
|
|
99
|
+
# Industry classification type, for sic api it will be `sic`
|
|
100
|
+
type: nil
|
|
101
|
+
)
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
sig do
|
|
105
|
+
override.returns(
|
|
106
|
+
{
|
|
107
|
+
classification:
|
|
108
|
+
ContextDev::Models::IndustryRetrieveSicResponse::Classification::TaggedSymbol,
|
|
109
|
+
codes:
|
|
110
|
+
T::Array[ContextDev::Models::IndustryRetrieveSicResponse::Code],
|
|
111
|
+
domain: String,
|
|
112
|
+
status: String,
|
|
113
|
+
type: String
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
end
|
|
117
|
+
def to_hash
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Echoes back which SIC dataset was used to classify the brand.
|
|
121
|
+
module Classification
|
|
122
|
+
extend ContextDev::Internal::Type::Enum
|
|
123
|
+
|
|
124
|
+
TaggedSymbol =
|
|
125
|
+
T.type_alias do
|
|
126
|
+
T.all(
|
|
127
|
+
Symbol,
|
|
128
|
+
ContextDev::Models::IndustryRetrieveSicResponse::Classification
|
|
129
|
+
)
|
|
130
|
+
end
|
|
131
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
132
|
+
|
|
133
|
+
ORIGINAL_SIC =
|
|
134
|
+
T.let(
|
|
135
|
+
:original_sic,
|
|
136
|
+
ContextDev::Models::IndustryRetrieveSicResponse::Classification::TaggedSymbol
|
|
137
|
+
)
|
|
138
|
+
LATEST_SEC =
|
|
139
|
+
T.let(
|
|
140
|
+
:latest_sec,
|
|
141
|
+
ContextDev::Models::IndustryRetrieveSicResponse::Classification::TaggedSymbol
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
sig do
|
|
145
|
+
override.returns(
|
|
146
|
+
T::Array[
|
|
147
|
+
ContextDev::Models::IndustryRetrieveSicResponse::Classification::TaggedSymbol
|
|
148
|
+
]
|
|
149
|
+
)
|
|
150
|
+
end
|
|
151
|
+
def self.values
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
class Code < ContextDev::Internal::Type::BaseModel
|
|
156
|
+
OrHash =
|
|
157
|
+
T.type_alias do
|
|
158
|
+
T.any(
|
|
159
|
+
ContextDev::Models::IndustryRetrieveSicResponse::Code,
|
|
160
|
+
ContextDev::Internal::AnyHash
|
|
161
|
+
)
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# SIC code (4-digit).
|
|
165
|
+
sig { returns(String) }
|
|
166
|
+
attr_accessor :code
|
|
167
|
+
|
|
168
|
+
# Confidence level for how well this SIC code matches the company description.
|
|
169
|
+
sig do
|
|
170
|
+
returns(
|
|
171
|
+
ContextDev::Models::IndustryRetrieveSicResponse::Code::Confidence::TaggedSymbol
|
|
172
|
+
)
|
|
173
|
+
end
|
|
174
|
+
attr_accessor :confidence
|
|
175
|
+
|
|
176
|
+
# SIC industry title.
|
|
177
|
+
sig { returns(String) }
|
|
178
|
+
attr_accessor :name
|
|
179
|
+
|
|
180
|
+
# 2-digit major group identifier (the leading two digits of the code). Only
|
|
181
|
+
# present when `classification` is `original_sic`.
|
|
182
|
+
sig { returns(T.nilable(String)) }
|
|
183
|
+
attr_reader :major_group
|
|
184
|
+
|
|
185
|
+
sig { params(major_group: String).void }
|
|
186
|
+
attr_writer :major_group
|
|
187
|
+
|
|
188
|
+
# Description of the 2-digit major group. Only present when `classification` is
|
|
189
|
+
# `original_sic`.
|
|
190
|
+
sig { returns(T.nilable(String)) }
|
|
191
|
+
attr_reader :major_group_name
|
|
192
|
+
|
|
193
|
+
sig { params(major_group_name: String).void }
|
|
194
|
+
attr_writer :major_group_name
|
|
195
|
+
|
|
196
|
+
# SEC review office responsible for filings under this code. Only present when
|
|
197
|
+
# `classification` is `latest_sec`.
|
|
198
|
+
sig { returns(T.nilable(String)) }
|
|
199
|
+
attr_reader :office
|
|
200
|
+
|
|
201
|
+
sig { params(office: String).void }
|
|
202
|
+
attr_writer :office
|
|
203
|
+
|
|
204
|
+
sig do
|
|
205
|
+
params(
|
|
206
|
+
code: String,
|
|
207
|
+
confidence:
|
|
208
|
+
ContextDev::Models::IndustryRetrieveSicResponse::Code::Confidence::OrSymbol,
|
|
209
|
+
name: String,
|
|
210
|
+
major_group: String,
|
|
211
|
+
major_group_name: String,
|
|
212
|
+
office: String
|
|
213
|
+
).returns(T.attached_class)
|
|
214
|
+
end
|
|
215
|
+
def self.new(
|
|
216
|
+
# SIC code (4-digit).
|
|
217
|
+
code:,
|
|
218
|
+
# Confidence level for how well this SIC code matches the company description.
|
|
219
|
+
confidence:,
|
|
220
|
+
# SIC industry title.
|
|
221
|
+
name:,
|
|
222
|
+
# 2-digit major group identifier (the leading two digits of the code). Only
|
|
223
|
+
# present when `classification` is `original_sic`.
|
|
224
|
+
major_group: nil,
|
|
225
|
+
# Description of the 2-digit major group. Only present when `classification` is
|
|
226
|
+
# `original_sic`.
|
|
227
|
+
major_group_name: nil,
|
|
228
|
+
# SEC review office responsible for filings under this code. Only present when
|
|
229
|
+
# `classification` is `latest_sec`.
|
|
230
|
+
office: nil
|
|
231
|
+
)
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
sig do
|
|
235
|
+
override.returns(
|
|
236
|
+
{
|
|
237
|
+
code: String,
|
|
238
|
+
confidence:
|
|
239
|
+
ContextDev::Models::IndustryRetrieveSicResponse::Code::Confidence::TaggedSymbol,
|
|
240
|
+
name: String,
|
|
241
|
+
major_group: String,
|
|
242
|
+
major_group_name: String,
|
|
243
|
+
office: String
|
|
244
|
+
}
|
|
245
|
+
)
|
|
246
|
+
end
|
|
247
|
+
def to_hash
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Confidence level for how well this SIC code matches the company description.
|
|
251
|
+
module Confidence
|
|
252
|
+
extend ContextDev::Internal::Type::Enum
|
|
253
|
+
|
|
254
|
+
TaggedSymbol =
|
|
255
|
+
T.type_alias do
|
|
256
|
+
T.all(
|
|
257
|
+
Symbol,
|
|
258
|
+
ContextDev::Models::IndustryRetrieveSicResponse::Code::Confidence
|
|
259
|
+
)
|
|
260
|
+
end
|
|
261
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
262
|
+
|
|
263
|
+
HIGH =
|
|
264
|
+
T.let(
|
|
265
|
+
:high,
|
|
266
|
+
ContextDev::Models::IndustryRetrieveSicResponse::Code::Confidence::TaggedSymbol
|
|
267
|
+
)
|
|
268
|
+
MEDIUM =
|
|
269
|
+
T.let(
|
|
270
|
+
:medium,
|
|
271
|
+
ContextDev::Models::IndustryRetrieveSicResponse::Code::Confidence::TaggedSymbol
|
|
272
|
+
)
|
|
273
|
+
LOW =
|
|
274
|
+
T.let(
|
|
275
|
+
:low,
|
|
276
|
+
ContextDev::Models::IndustryRetrieveSicResponse::Code::Confidence::TaggedSymbol
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
sig do
|
|
280
|
+
override.returns(
|
|
281
|
+
T::Array[
|
|
282
|
+
ContextDev::Models::IndustryRetrieveSicResponse::Code::Confidence::TaggedSymbol
|
|
283
|
+
]
|
|
284
|
+
)
|
|
285
|
+
end
|
|
286
|
+
def self.values
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
end
|
|
290
|
+
end
|
|
291
|
+
end
|
|
292
|
+
end
|
data/rbi/context_dev/models.rbi
CHANGED
|
@@ -25,6 +25,8 @@ module ContextDev
|
|
|
25
25
|
|
|
26
26
|
IndustryRetrieveNaicsParams = ContextDev::Models::IndustryRetrieveNaicsParams
|
|
27
27
|
|
|
28
|
+
IndustryRetrieveSicParams = ContextDev::Models::IndustryRetrieveSicParams
|
|
29
|
+
|
|
28
30
|
UtilityPrefetchByEmailParams =
|
|
29
31
|
ContextDev::Models::UtilityPrefetchByEmailParams
|
|
30
32
|
|
|
@@ -31,6 +31,40 @@ module ContextDev
|
|
|
31
31
|
)
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
+
# Classify any brand into Standard Industrial Classification (SIC) codes from its
|
|
35
|
+
# domain or name. Choose between the original 1987 SIC system (`original_sic`) or
|
|
36
|
+
# the latest SIC list maintained by the SEC (`latest_sec`).
|
|
37
|
+
sig do
|
|
38
|
+
params(
|
|
39
|
+
input: String,
|
|
40
|
+
max_results: Integer,
|
|
41
|
+
min_results: Integer,
|
|
42
|
+
timeout_ms: Integer,
|
|
43
|
+
type: ContextDev::IndustryRetrieveSicParams::Type::OrSymbol,
|
|
44
|
+
request_options: ContextDev::RequestOptions::OrHash
|
|
45
|
+
).returns(ContextDev::Models::IndustryRetrieveSicResponse)
|
|
46
|
+
end
|
|
47
|
+
def retrieve_sic(
|
|
48
|
+
# Brand domain or title to retrieve SIC code for. If a valid domain is provided,
|
|
49
|
+
# it will be used for classification, otherwise, we will search for the brand
|
|
50
|
+
# using the provided title.
|
|
51
|
+
input:,
|
|
52
|
+
# Maximum number of SIC codes to return. Must be between 1 and 10. Defaults to 5.
|
|
53
|
+
max_results: nil,
|
|
54
|
+
# Minimum number of SIC codes to return. Must be at least 1. Defaults to 1.
|
|
55
|
+
min_results: nil,
|
|
56
|
+
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
57
|
+
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
58
|
+
# value is 300000ms (5 minutes).
|
|
59
|
+
timeout_ms: nil,
|
|
60
|
+
# Which SIC dataset to classify against. `original_sic` uses the 1987 Standard
|
|
61
|
+
# Industrial Classification system; `latest_sec` uses the current SIC list as
|
|
62
|
+
# published by the SEC. Defaults to `original_sic`.
|
|
63
|
+
type: nil,
|
|
64
|
+
request_options: {}
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
|
|
34
68
|
# @api private
|
|
35
69
|
sig { params(client: ContextDev::Client).returns(T.attached_class) }
|
|
36
70
|
def self.new(client:)
|
|
@@ -47,6 +47,7 @@ module ContextDev
|
|
|
47
47
|
features: ::Array[String],
|
|
48
48
|
images: ::Array[String],
|
|
49
49
|
name: String,
|
|
50
|
+
sku: String?,
|
|
50
51
|
tags: ::Array[String],
|
|
51
52
|
target_audience: ::Array[String],
|
|
52
53
|
billing_frequency: ContextDev::Models::AIExtractProductResponse::Product::billing_frequency?,
|
|
@@ -67,6 +68,8 @@ module ContextDev
|
|
|
67
68
|
|
|
68
69
|
attr_accessor name: String
|
|
69
70
|
|
|
71
|
+
attr_accessor sku: String?
|
|
72
|
+
|
|
70
73
|
attr_accessor tags: ::Array[String]
|
|
71
74
|
|
|
72
75
|
attr_accessor target_audience: ::Array[String]
|
|
@@ -90,6 +93,7 @@ module ContextDev
|
|
|
90
93
|
features: ::Array[String],
|
|
91
94
|
images: ::Array[String],
|
|
92
95
|
name: String,
|
|
96
|
+
sku: String?,
|
|
93
97
|
tags: ::Array[String],
|
|
94
98
|
target_audience: ::Array[String],
|
|
95
99
|
?billing_frequency: ContextDev::Models::AIExtractProductResponse::Product::billing_frequency?,
|
|
@@ -106,6 +110,7 @@ module ContextDev
|
|
|
106
110
|
features: ::Array[String],
|
|
107
111
|
images: ::Array[String],
|
|
108
112
|
name: String,
|
|
113
|
+
sku: String?,
|
|
109
114
|
tags: ::Array[String],
|
|
110
115
|
target_audience: ::Array[String],
|
|
111
116
|
billing_frequency: ContextDev::Models::AIExtractProductResponse::Product::billing_frequency?,
|
|
@@ -26,6 +26,7 @@ module ContextDev
|
|
|
26
26
|
features: ::Array[String],
|
|
27
27
|
images: ::Array[String],
|
|
28
28
|
name: String,
|
|
29
|
+
sku: String?,
|
|
29
30
|
tags: ::Array[String],
|
|
30
31
|
target_audience: ::Array[String],
|
|
31
32
|
billing_frequency: ContextDev::Models::AIExtractProductsResponse::Product::billing_frequency?,
|
|
@@ -46,6 +47,8 @@ module ContextDev
|
|
|
46
47
|
|
|
47
48
|
attr_accessor name: String
|
|
48
49
|
|
|
50
|
+
attr_accessor sku: String?
|
|
51
|
+
|
|
49
52
|
attr_accessor tags: ::Array[String]
|
|
50
53
|
|
|
51
54
|
attr_accessor target_audience: ::Array[String]
|
|
@@ -69,6 +72,7 @@ module ContextDev
|
|
|
69
72
|
features: ::Array[String],
|
|
70
73
|
images: ::Array[String],
|
|
71
74
|
name: String,
|
|
75
|
+
sku: String?,
|
|
72
76
|
tags: ::Array[String],
|
|
73
77
|
target_audience: ::Array[String],
|
|
74
78
|
?billing_frequency: ContextDev::Models::AIExtractProductsResponse::Product::billing_frequency?,
|
|
@@ -85,6 +89,7 @@ module ContextDev
|
|
|
85
89
|
features: ::Array[String],
|
|
86
90
|
images: ::Array[String],
|
|
87
91
|
name: String,
|
|
92
|
+
sku: String?,
|
|
88
93
|
tags: ::Array[String],
|
|
89
94
|
target_audience: ::Array[String],
|
|
90
95
|
billing_frequency: ContextDev::Models::AIExtractProductsResponse::Product::billing_frequency?,
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
module ContextDev
|
|
2
|
+
module Models
|
|
3
|
+
type industry_retrieve_sic_params =
|
|
4
|
+
{
|
|
5
|
+
input: String,
|
|
6
|
+
max_results: Integer,
|
|
7
|
+
min_results: Integer,
|
|
8
|
+
timeout_ms: Integer,
|
|
9
|
+
type: ContextDev::Models::IndustryRetrieveSicParams::type_
|
|
10
|
+
}
|
|
11
|
+
& ContextDev::Internal::Type::request_parameters
|
|
12
|
+
|
|
13
|
+
class IndustryRetrieveSicParams < ContextDev::Internal::Type::BaseModel
|
|
14
|
+
extend ContextDev::Internal::Type::RequestParameters::Converter
|
|
15
|
+
include ContextDev::Internal::Type::RequestParameters
|
|
16
|
+
|
|
17
|
+
attr_accessor input: String
|
|
18
|
+
|
|
19
|
+
attr_reader max_results: Integer?
|
|
20
|
+
|
|
21
|
+
def max_results=: (Integer) -> Integer
|
|
22
|
+
|
|
23
|
+
attr_reader min_results: Integer?
|
|
24
|
+
|
|
25
|
+
def min_results=: (Integer) -> Integer
|
|
26
|
+
|
|
27
|
+
attr_reader timeout_ms: Integer?
|
|
28
|
+
|
|
29
|
+
def timeout_ms=: (Integer) -> Integer
|
|
30
|
+
|
|
31
|
+
attr_reader type: ContextDev::Models::IndustryRetrieveSicParams::type_?
|
|
32
|
+
|
|
33
|
+
def type=: (
|
|
34
|
+
ContextDev::Models::IndustryRetrieveSicParams::type_
|
|
35
|
+
) -> ContextDev::Models::IndustryRetrieveSicParams::type_
|
|
36
|
+
|
|
37
|
+
def initialize: (
|
|
38
|
+
input: String,
|
|
39
|
+
?max_results: Integer,
|
|
40
|
+
?min_results: Integer,
|
|
41
|
+
?timeout_ms: Integer,
|
|
42
|
+
?type: ContextDev::Models::IndustryRetrieveSicParams::type_,
|
|
43
|
+
?request_options: ContextDev::request_opts
|
|
44
|
+
) -> void
|
|
45
|
+
|
|
46
|
+
def to_hash: -> {
|
|
47
|
+
input: String,
|
|
48
|
+
max_results: Integer,
|
|
49
|
+
min_results: Integer,
|
|
50
|
+
timeout_ms: Integer,
|
|
51
|
+
type: ContextDev::Models::IndustryRetrieveSicParams::type_,
|
|
52
|
+
request_options: ContextDev::RequestOptions
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
type type_ = :original_sic | :latest_sec
|
|
56
|
+
|
|
57
|
+
module Type
|
|
58
|
+
extend ContextDev::Internal::Type::Enum
|
|
59
|
+
|
|
60
|
+
ORIGINAL_SIC: :original_sic
|
|
61
|
+
LATEST_SEC: :latest_sec
|
|
62
|
+
|
|
63
|
+
def self?.values: -> ::Array[ContextDev::Models::IndustryRetrieveSicParams::type_]
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
module ContextDev
|
|
2
|
+
module Models
|
|
3
|
+
type industry_retrieve_sic_response =
|
|
4
|
+
{
|
|
5
|
+
classification: ContextDev::Models::IndustryRetrieveSicResponse::classification,
|
|
6
|
+
codes: ::Array[ContextDev::Models::IndustryRetrieveSicResponse::Code],
|
|
7
|
+
domain: String,
|
|
8
|
+
status: String,
|
|
9
|
+
type: String
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
class IndustryRetrieveSicResponse < ContextDev::Internal::Type::BaseModel
|
|
13
|
+
attr_reader classification: ContextDev::Models::IndustryRetrieveSicResponse::classification?
|
|
14
|
+
|
|
15
|
+
def classification=: (
|
|
16
|
+
ContextDev::Models::IndustryRetrieveSicResponse::classification
|
|
17
|
+
) -> ContextDev::Models::IndustryRetrieveSicResponse::classification
|
|
18
|
+
|
|
19
|
+
attr_reader codes: ::Array[ContextDev::Models::IndustryRetrieveSicResponse::Code]?
|
|
20
|
+
|
|
21
|
+
def codes=: (
|
|
22
|
+
::Array[ContextDev::Models::IndustryRetrieveSicResponse::Code]
|
|
23
|
+
) -> ::Array[ContextDev::Models::IndustryRetrieveSicResponse::Code]
|
|
24
|
+
|
|
25
|
+
attr_reader domain: String?
|
|
26
|
+
|
|
27
|
+
def domain=: (String) -> String
|
|
28
|
+
|
|
29
|
+
attr_reader status: String?
|
|
30
|
+
|
|
31
|
+
def status=: (String) -> String
|
|
32
|
+
|
|
33
|
+
attr_reader type: String?
|
|
34
|
+
|
|
35
|
+
def type=: (String) -> String
|
|
36
|
+
|
|
37
|
+
def initialize: (
|
|
38
|
+
?classification: ContextDev::Models::IndustryRetrieveSicResponse::classification,
|
|
39
|
+
?codes: ::Array[ContextDev::Models::IndustryRetrieveSicResponse::Code],
|
|
40
|
+
?domain: String,
|
|
41
|
+
?status: String,
|
|
42
|
+
?type: String
|
|
43
|
+
) -> void
|
|
44
|
+
|
|
45
|
+
def to_hash: -> {
|
|
46
|
+
classification: ContextDev::Models::IndustryRetrieveSicResponse::classification,
|
|
47
|
+
codes: ::Array[ContextDev::Models::IndustryRetrieveSicResponse::Code],
|
|
48
|
+
domain: String,
|
|
49
|
+
status: String,
|
|
50
|
+
type: String
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
type classification = :original_sic | :latest_sec
|
|
54
|
+
|
|
55
|
+
module Classification
|
|
56
|
+
extend ContextDev::Internal::Type::Enum
|
|
57
|
+
|
|
58
|
+
ORIGINAL_SIC: :original_sic
|
|
59
|
+
LATEST_SEC: :latest_sec
|
|
60
|
+
|
|
61
|
+
def self?.values: -> ::Array[ContextDev::Models::IndustryRetrieveSicResponse::classification]
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
type code =
|
|
65
|
+
{
|
|
66
|
+
code: String,
|
|
67
|
+
confidence: ContextDev::Models::IndustryRetrieveSicResponse::Code::confidence,
|
|
68
|
+
name: String,
|
|
69
|
+
major_group: String,
|
|
70
|
+
major_group_name: String,
|
|
71
|
+
office: String
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
class Code < ContextDev::Internal::Type::BaseModel
|
|
75
|
+
attr_accessor code: String
|
|
76
|
+
|
|
77
|
+
attr_accessor confidence: ContextDev::Models::IndustryRetrieveSicResponse::Code::confidence
|
|
78
|
+
|
|
79
|
+
attr_accessor name: String
|
|
80
|
+
|
|
81
|
+
attr_reader major_group: String?
|
|
82
|
+
|
|
83
|
+
def major_group=: (String) -> String
|
|
84
|
+
|
|
85
|
+
attr_reader major_group_name: String?
|
|
86
|
+
|
|
87
|
+
def major_group_name=: (String) -> String
|
|
88
|
+
|
|
89
|
+
attr_reader office: String?
|
|
90
|
+
|
|
91
|
+
def office=: (String) -> String
|
|
92
|
+
|
|
93
|
+
def initialize: (
|
|
94
|
+
code: String,
|
|
95
|
+
confidence: ContextDev::Models::IndustryRetrieveSicResponse::Code::confidence,
|
|
96
|
+
name: String,
|
|
97
|
+
?major_group: String,
|
|
98
|
+
?major_group_name: String,
|
|
99
|
+
?office: String
|
|
100
|
+
) -> void
|
|
101
|
+
|
|
102
|
+
def to_hash: -> {
|
|
103
|
+
code: String,
|
|
104
|
+
confidence: ContextDev::Models::IndustryRetrieveSicResponse::Code::confidence,
|
|
105
|
+
name: String,
|
|
106
|
+
major_group: String,
|
|
107
|
+
major_group_name: String,
|
|
108
|
+
office: String
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
type confidence = :high | :medium | :low
|
|
112
|
+
|
|
113
|
+
module Confidence
|
|
114
|
+
extend ContextDev::Internal::Type::Enum
|
|
115
|
+
|
|
116
|
+
HIGH: :high
|
|
117
|
+
MEDIUM: :medium
|
|
118
|
+
LOW: :low
|
|
119
|
+
|
|
120
|
+
def self?.values: -> ::Array[ContextDev::Models::IndustryRetrieveSicResponse::Code::confidence]
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|
data/sig/context_dev/models.rbs
CHANGED
|
@@ -21,6 +21,8 @@ module ContextDev
|
|
|
21
21
|
|
|
22
22
|
class IndustryRetrieveNaicsParams = ContextDev::Models::IndustryRetrieveNaicsParams
|
|
23
23
|
|
|
24
|
+
class IndustryRetrieveSicParams = ContextDev::Models::IndustryRetrieveSicParams
|
|
25
|
+
|
|
24
26
|
class UtilityPrefetchByEmailParams = ContextDev::Models::UtilityPrefetchByEmailParams
|
|
25
27
|
|
|
26
28
|
class UtilityPrefetchParams = ContextDev::Models::UtilityPrefetchParams
|
|
@@ -9,6 +9,15 @@ module ContextDev
|
|
|
9
9
|
?request_options: ContextDev::request_opts
|
|
10
10
|
) -> ContextDev::Models::IndustryRetrieveNaicsResponse
|
|
11
11
|
|
|
12
|
+
def retrieve_sic: (
|
|
13
|
+
input: String,
|
|
14
|
+
?max_results: Integer,
|
|
15
|
+
?min_results: Integer,
|
|
16
|
+
?timeout_ms: Integer,
|
|
17
|
+
?type: ContextDev::Models::IndustryRetrieveSicParams::type_,
|
|
18
|
+
?request_options: ContextDev::request_opts
|
|
19
|
+
) -> ContextDev::Models::IndustryRetrieveSicResponse
|
|
20
|
+
|
|
12
21
|
def initialize: (client: ContextDev::Client) -> void
|
|
13
22
|
end
|
|
14
23
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: context.dev
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Context Dev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-04-
|
|
11
|
+
date: 2026-04-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|
|
@@ -91,6 +91,8 @@ files:
|
|
|
91
91
|
- lib/context_dev/models/brand_retrieve_simplified_response.rb
|
|
92
92
|
- lib/context_dev/models/industry_retrieve_naics_params.rb
|
|
93
93
|
- lib/context_dev/models/industry_retrieve_naics_response.rb
|
|
94
|
+
- lib/context_dev/models/industry_retrieve_sic_params.rb
|
|
95
|
+
- lib/context_dev/models/industry_retrieve_sic_response.rb
|
|
94
96
|
- lib/context_dev/models/utility_prefetch_by_email_params.rb
|
|
95
97
|
- lib/context_dev/models/utility_prefetch_by_email_response.rb
|
|
96
98
|
- lib/context_dev/models/utility_prefetch_params.rb
|
|
@@ -160,6 +162,8 @@ files:
|
|
|
160
162
|
- rbi/context_dev/models/brand_retrieve_simplified_response.rbi
|
|
161
163
|
- rbi/context_dev/models/industry_retrieve_naics_params.rbi
|
|
162
164
|
- rbi/context_dev/models/industry_retrieve_naics_response.rbi
|
|
165
|
+
- rbi/context_dev/models/industry_retrieve_sic_params.rbi
|
|
166
|
+
- rbi/context_dev/models/industry_retrieve_sic_response.rbi
|
|
163
167
|
- rbi/context_dev/models/utility_prefetch_by_email_params.rbi
|
|
164
168
|
- rbi/context_dev/models/utility_prefetch_by_email_response.rbi
|
|
165
169
|
- rbi/context_dev/models/utility_prefetch_params.rbi
|
|
@@ -228,6 +232,8 @@ files:
|
|
|
228
232
|
- sig/context_dev/models/brand_retrieve_simplified_response.rbs
|
|
229
233
|
- sig/context_dev/models/industry_retrieve_naics_params.rbs
|
|
230
234
|
- sig/context_dev/models/industry_retrieve_naics_response.rbs
|
|
235
|
+
- sig/context_dev/models/industry_retrieve_sic_params.rbs
|
|
236
|
+
- sig/context_dev/models/industry_retrieve_sic_response.rbs
|
|
231
237
|
- sig/context_dev/models/utility_prefetch_by_email_params.rbs
|
|
232
238
|
- sig/context_dev/models/utility_prefetch_by_email_response.rbs
|
|
233
239
|
- sig/context_dev/models/utility_prefetch_params.rbs
|