-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindustry.ts
More file actions
92 lines (78 loc) · 2.21 KB
/
industry.ts
File metadata and controls
92 lines (78 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../core/resource';
import { APIPromise } from '../core/api-promise';
import { RequestOptions } from '../internal/request-options';
export class Industry extends APIResource {
/**
* Endpoint to classify any brand into a 2022 NAICS code.
*/
retrieveNaics(
query: IndustryRetrieveNaicsParams,
options?: RequestOptions,
): APIPromise<IndustryRetrieveNaicsResponse> {
return this._client.get('/brand/naics', { query, ...options });
}
}
export interface IndustryRetrieveNaicsResponse {
/**
* Array of NAICS codes and titles.
*/
codes?: Array<IndustryRetrieveNaicsResponse.Code>;
/**
* Domain found for the brand
*/
domain?: string;
/**
* Status of the response, e.g., 'ok'
*/
status?: string;
/**
* Industry classification type, for naics api it will be `naics`
*/
type?: string;
}
export namespace IndustryRetrieveNaicsResponse {
export interface Code {
/**
* NAICS code
*/
code: string;
/**
* Confidence level for how well this NAICS code matches the company description
*/
confidence: 'high' | 'medium' | 'low';
/**
* NAICS title
*/
name: string;
}
}
export interface IndustryRetrieveNaicsParams {
/**
* Brand domain or title to retrieve NAICS code for. If a valid domain is provided
* in `input`, it will be used for classification, otherwise, we will search for
* the brand using the provided title.
*/
input: string;
/**
* Maximum number of NAICS codes to return. Must be between 1 and 10. Defaults
* to 5.
*/
maxResults?: number;
/**
* Minimum number of NAICS codes to return. Must be at least 1. Defaults to 1.
*/
minResults?: number;
/**
* Optional timeout in milliseconds for the request. If the request takes longer
* than this value, it will be aborted with a 408 status code. Maximum allowed
* value is 300000ms (5 minutes).
*/
timeoutMS?: number;
}
export declare namespace Industry {
export {
type IndustryRetrieveNaicsResponse as IndustryRetrieveNaicsResponse,
type IndustryRetrieveNaicsParams as IndustryRetrieveNaicsParams,
};
}