-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): add more path mappings (#2153)
- Loading branch information
1 parent
0075dd0
commit f95f175
Showing
44 changed files
with
3,335 additions
and
381 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
configured_endpoints: 1411 | ||
configured_endpoints: 1435 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-829ade7062fed63a30accc2a5e1a14c6c26fd4dc003d300d1b25a5416b8b8727.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,53 @@ | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
import { APIResource } from '../../resource'; | ||
import * as InvestigateAPI from './investigate'; | ||
import * as SubmissionsAPI from './submissions'; | ||
import { | ||
SubmissionListParams, | ||
SubmissionListResponse, | ||
SubmissionListResponsesV4PagePaginationArray, | ||
Submissions, | ||
} from './submissions'; | ||
import * as InvestigateAPI from './investigate/investigate'; | ||
import { | ||
Investigate, | ||
InvestigateDetectionsParams, | ||
InvestigateDetectionsResponse, | ||
InvestigateGetParams, | ||
InvestigateGetResponse, | ||
InvestigateListParams, | ||
InvestigateListResponse, | ||
InvestigateListResponsesV4PagePaginationArray, | ||
InvestigatePreviewParams, | ||
InvestigatePreviewResponse, | ||
InvestigateRawParams, | ||
InvestigateRawResponse, | ||
InvestigateTraceParams, | ||
InvestigateTraceResponse, | ||
} from './investigate'; | ||
import * as PhishguardAPI from './phishguard'; | ||
import { Phishguard } from './phishguard'; | ||
} from './investigate/investigate'; | ||
import * as SettingsAPI from './settings/settings'; | ||
import { Settings } from './settings/settings'; | ||
|
||
export class EmailSecurity extends APIResource { | ||
investigate: InvestigateAPI.Investigate = new InvestigateAPI.Investigate(this._client); | ||
phishguard: PhishguardAPI.Phishguard = new PhishguardAPI.Phishguard(this._client); | ||
settings: SettingsAPI.Settings = new SettingsAPI.Settings(this._client); | ||
submissions: SubmissionsAPI.Submissions = new SubmissionsAPI.Submissions(this._client); | ||
} | ||
|
||
EmailSecurity.Investigate = Investigate; | ||
EmailSecurity.InvestigateListResponsesV4PagePaginationArray = InvestigateListResponsesV4PagePaginationArray; | ||
EmailSecurity.Phishguard = Phishguard; | ||
EmailSecurity.Settings = Settings; | ||
EmailSecurity.Submissions = Submissions; | ||
EmailSecurity.SubmissionListResponsesV4PagePaginationArray = SubmissionListResponsesV4PagePaginationArray; | ||
|
||
export declare namespace EmailSecurity { | ||
export { | ||
Investigate as Investigate, | ||
type InvestigateListResponse as InvestigateListResponse, | ||
type InvestigateDetectionsResponse as InvestigateDetectionsResponse, | ||
type InvestigateGetResponse as InvestigateGetResponse, | ||
type InvestigatePreviewResponse as InvestigatePreviewResponse, | ||
type InvestigateRawResponse as InvestigateRawResponse, | ||
type InvestigateTraceResponse as InvestigateTraceResponse, | ||
InvestigateListResponsesV4PagePaginationArray as InvestigateListResponsesV4PagePaginationArray, | ||
type InvestigateListParams as InvestigateListParams, | ||
type InvestigateDetectionsParams as InvestigateDetectionsParams, | ||
type InvestigateGetParams as InvestigateGetParams, | ||
type InvestigatePreviewParams as InvestigatePreviewParams, | ||
type InvestigateRawParams as InvestigateRawParams, | ||
type InvestigateTraceParams as InvestigateTraceParams, | ||
}; | ||
|
||
export { Phishguard as Phishguard }; | ||
|
||
export { Settings as Settings }; | ||
|
||
export { | ||
Submissions as Submissions, | ||
type SubmissionListResponse as SubmissionListResponse, | ||
SubmissionListResponsesV4PagePaginationArray as SubmissionListResponsesV4PagePaginationArray, | ||
type SubmissionListParams as SubmissionListParams, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
import { APIResource } from '../../../resource'; | ||
import * as Core from '../../../core'; | ||
|
||
export class Detections extends APIResource { | ||
/** | ||
* Returns detection details such as threat categories and sender information for | ||
* non-benign messages. | ||
*/ | ||
get( | ||
postfixId: string, | ||
params: DetectionGetParams, | ||
options?: Core.RequestOptions, | ||
): Core.APIPromise<DetectionGetResponse> { | ||
const { account_id } = params; | ||
return ( | ||
this._client.get( | ||
`/accounts/${account_id}/email-security/investigate/${postfixId}/detections`, | ||
options, | ||
) as Core.APIPromise<{ result: DetectionGetResponse }> | ||
)._thenUnwrap((obj) => obj.result); | ||
} | ||
} | ||
|
||
export interface DetectionGetResponse { | ||
action: string; | ||
|
||
attachments: Array<DetectionGetResponse.Attachment>; | ||
|
||
headers: Array<DetectionGetResponse.Header>; | ||
|
||
links: Array<DetectionGetResponse.Link>; | ||
|
||
sender_info: DetectionGetResponse.SenderInfo; | ||
|
||
threat_categories: Array<DetectionGetResponse.ThreatCategory>; | ||
|
||
validation: DetectionGetResponse.Validation; | ||
|
||
final_disposition?: | ||
| 'MALICIOUS' | ||
| 'MALICIOUS-BEC' | ||
| 'SUSPICIOUS' | ||
| 'SPOOF' | ||
| 'SPAM' | ||
| 'BULK' | ||
| 'ENCRYPTED' | ||
| 'EXTERNAL' | ||
| 'UNKNOWN' | ||
| 'NONE' | ||
| null; | ||
} | ||
|
||
export namespace DetectionGetResponse { | ||
export interface Attachment { | ||
size: number; | ||
|
||
content_type?: string | null; | ||
|
||
detection?: | ||
| 'MALICIOUS' | ||
| 'MALICIOUS-BEC' | ||
| 'SUSPICIOUS' | ||
| 'SPOOF' | ||
| 'SPAM' | ||
| 'BULK' | ||
| 'ENCRYPTED' | ||
| 'EXTERNAL' | ||
| 'UNKNOWN' | ||
| 'NONE' | ||
| null; | ||
|
||
encrypted?: boolean | null; | ||
|
||
name?: string | null; | ||
} | ||
|
||
export interface Header { | ||
name: string; | ||
|
||
value: string; | ||
} | ||
|
||
export interface Link { | ||
href: string; | ||
|
||
text?: string | null; | ||
} | ||
|
||
export interface SenderInfo { | ||
/** | ||
* The name of the autonomous system. | ||
*/ | ||
as_name?: string | null; | ||
|
||
/** | ||
* The number of the autonomous system. | ||
*/ | ||
as_number?: number | null; | ||
|
||
geo?: string | null; | ||
|
||
ip?: string | null; | ||
|
||
pld?: string | null; | ||
} | ||
|
||
export interface ThreatCategory { | ||
id: number; | ||
|
||
description?: string | null; | ||
|
||
name?: string | null; | ||
} | ||
|
||
export interface Validation { | ||
comment?: string | null; | ||
|
||
dkim?: 'pass' | 'neutral' | 'fail' | 'error' | 'none' | null; | ||
|
||
dmarc?: 'pass' | 'neutral' | 'fail' | 'error' | 'none' | null; | ||
|
||
spf?: 'pass' | 'neutral' | 'fail' | 'error' | 'none' | null; | ||
} | ||
} | ||
|
||
export interface DetectionGetParams { | ||
/** | ||
* Account Identifier | ||
*/ | ||
account_id: string; | ||
} | ||
|
||
export declare namespace Detections { | ||
export { type DetectionGetResponse as DetectionGetResponse, type DetectionGetParams as DetectionGetParams }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
export { Detections, type DetectionGetResponse, type DetectionGetParams } from './detections'; | ||
export { | ||
InvestigateListResponsesV4PagePaginationArray, | ||
Investigate, | ||
type InvestigateListResponse, | ||
type InvestigateGetResponse, | ||
type InvestigateListParams, | ||
type InvestigateGetParams, | ||
} from './investigate'; | ||
export { | ||
Move, | ||
type MoveCreateResponse, | ||
type MoveBulkResponse, | ||
type MoveCreateParams, | ||
type MoveBulkParams, | ||
} from './move'; | ||
export { | ||
Preview, | ||
type PreviewCreateResponse, | ||
type PreviewGetResponse, | ||
type PreviewCreateParams, | ||
type PreviewGetParams, | ||
} from './preview'; | ||
export { Raw, type RawGetResponse, type RawGetParams } from './raw'; | ||
export { Reclassify, type ReclassifyCreateResponse, type ReclassifyCreateParams } from './reclassify'; | ||
export { Release, type ReleaseBulkResponse, type ReleaseBulkParams } from './release'; | ||
export { Trace, type TraceGetResponse, type TraceGetParams } from './trace'; |
Oops, something went wrong.