Skip to content

Commit d6ae39e

Browse files
feat: feat(r2_data_catalog): Configure SDKs/Terraform to use R2 Data Catalog routes
* feat(r2_data_catalog): Configure SDKs/Terraform to use R2 Data Catalog routes
1 parent 3e7fcce commit d6ae39e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+6663
-60
lines changed

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 1875
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e425e4abe3f3161feed50a8cd861dd25c6ec32ee162b4eb4d225c4e5cb7b3ca9.yml
3-
openapi_spec_hash: 955676955a801dbe5084d8ffe2730791
4-
config_hash: 11d91f2aa4a7f5ff6a0d863f572946ad
1+
configured_endpoints: 1923
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d01829c5ff74f82c372d7c132f3c9adcef9a7ac392e1dc7ff431f3397c94b6fb.yml
3+
openapi_spec_hash: 36f226c48f0fda588903ef75a766ccb1
4+
config_hash: bfa05f973c1b1797df33a05f942d5fac

api.md

Lines changed: 227 additions & 0 deletions
Large diffs are not rendered by default.

scripts/detect-breaking-changes

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,22 @@ TEST_PATHS=(
102102
tests/api-resources/dns/zone-transfers/acls.test.ts
103103
tests/api-resources/dns/zone-transfers/peers.test.ts
104104
tests/api-resources/dns/zone-transfers/tsigs.test.ts
105+
tests/api-resources/email-security/email-security.test.ts
106+
tests/api-resources/email-security/investigate/investigate.test.ts
107+
tests/api-resources/email-security/investigate/detections.test.ts
108+
tests/api-resources/email-security/investigate/preview.test.ts
109+
tests/api-resources/email-security/investigate/raw.test.ts
110+
tests/api-resources/email-security/investigate/trace.test.ts
111+
tests/api-resources/email-security/investigate/move.test.ts
112+
tests/api-resources/email-security/investigate/reclassify.test.ts
113+
tests/api-resources/email-security/investigate/release.test.ts
114+
tests/api-resources/email-security/settings/settings.test.ts
115+
tests/api-resources/email-security/settings/allow-policies.test.ts
116+
tests/api-resources/email-security/settings/block-senders.test.ts
117+
tests/api-resources/email-security/settings/domains.test.ts
118+
tests/api-resources/email-security/settings/impersonation-registry.test.ts
119+
tests/api-resources/email-security/settings/trusted-domains.test.ts
120+
tests/api-resources/email-security/submissions.test.ts
105121
tests/api-resources/email-routing/email-routing.test.ts
106122
tests/api-resources/email-routing/dns.test.ts
107123
tests/api-resources/email-routing/rules/rules.test.ts
@@ -374,6 +390,12 @@ TEST_PATHS=(
374390
tests/api-resources/r2/super-slurper/jobs/jobs.test.ts
375391
tests/api-resources/r2/super-slurper/jobs/logs.test.ts
376392
tests/api-resources/r2/super-slurper/connectivity-precheck.test.ts
393+
tests/api-resources/r2-data-catalog/r2-data-catalog.test.ts
394+
tests/api-resources/r2-data-catalog/maintenance-configs.test.ts
395+
tests/api-resources/r2-data-catalog/credentials.test.ts
396+
tests/api-resources/r2-data-catalog/namespaces/namespaces.test.ts
397+
tests/api-resources/r2-data-catalog/namespaces/tables/tables.test.ts
398+
tests/api-resources/r2-data-catalog/namespaces/tables/maintenance-configs.test.ts
377399
tests/api-resources/workers-for-platforms/workers-for-platforms.test.ts
378400
tests/api-resources/workers-for-platforms/dispatch/dispatch.test.ts
379401
tests/api-resources/workers-for-platforms/dispatch/namespaces/namespaces.test.ts

src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ import { PageShield } from './resources/page-shield/page-shield';
9090
import { Pages } from './resources/pages/pages';
9191
import { Pipelines } from './resources/pipelines/pipelines';
9292
import { Queues } from './resources/queues/queues';
93+
import { R2DataCatalog } from './resources/r2-data-catalog/r2-data-catalog';
9394
import { R2 } from './resources/r2/r2';
9495
import { Radar } from './resources/radar/radar';
9596
import { Registrar } from './resources/registrar/registrar';
@@ -331,6 +332,7 @@ export class Cloudflare extends Core.APIClient {
331332
alerting: API.Alerting = new API.Alerting(this);
332333
d1: API.D1Resource = new API.D1Resource(this);
333334
r2: API.R2 = new API.R2(this);
335+
r2DataCatalog: API.R2DataCatalog = new API.R2DataCatalog(this);
334336
workersForPlatforms: API.WorkersForPlatforms = new API.WorkersForPlatforms(this);
335337
zeroTrust: API.ZeroTrust = new API.ZeroTrust(this);
336338
turnstile: API.Turnstile = new API.Turnstile(this);
@@ -572,6 +574,7 @@ Cloudflare.Stream = Stream;
572574
Cloudflare.Alerting = Alerting;
573575
Cloudflare.D1Resource = D1Resource;
574576
Cloudflare.R2 = R2;
577+
Cloudflare.R2DataCatalog = R2DataCatalog;
575578
Cloudflare.WorkersForPlatforms = WorkersForPlatforms;
576579
Cloudflare.ZeroTrust = ZeroTrust;
577580
Cloudflare.Turnstile = Turnstile;
@@ -770,6 +773,8 @@ export declare namespace Cloudflare {
770773

771774
export { R2 as R2 };
772775

776+
export { R2DataCatalog as R2DataCatalog };
777+
773778
export { WorkersForPlatforms as WorkersForPlatforms };
774779

775780
export { ZeroTrust as ZeroTrust };

src/resources/email-security/email-security.ts

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,21 @@
22

33
import { APIResource } from '../../resource';
44
import * as SubmissionsAPI from './submissions';
5-
import { Submissions } from './submissions';
5+
import {
6+
SubmissionListParams,
7+
SubmissionListResponse,
8+
SubmissionListResponsesV4PagePaginationArray,
9+
Submissions,
10+
} from './submissions';
611
import * as InvestigateAPI from './investigate/investigate';
7-
import { Investigate } from './investigate/investigate';
12+
import {
13+
Investigate,
14+
InvestigateGetParams,
15+
InvestigateGetResponse,
16+
InvestigateListParams,
17+
InvestigateListResponse,
18+
InvestigateListResponsesV4PagePaginationArray,
19+
} from './investigate/investigate';
820
import * as SettingsAPI from './settings/settings';
921
import { Settings } from './settings/settings';
1022

@@ -15,13 +27,27 @@ export class EmailSecurity extends APIResource {
1527
}
1628

1729
EmailSecurity.Investigate = Investigate;
30+
EmailSecurity.InvestigateListResponsesV4PagePaginationArray = InvestigateListResponsesV4PagePaginationArray;
1831
EmailSecurity.Settings = Settings;
1932
EmailSecurity.Submissions = Submissions;
33+
EmailSecurity.SubmissionListResponsesV4PagePaginationArray = SubmissionListResponsesV4PagePaginationArray;
2034

2135
export declare namespace EmailSecurity {
22-
export { Investigate as Investigate };
36+
export {
37+
Investigate as Investigate,
38+
type InvestigateListResponse as InvestigateListResponse,
39+
type InvestigateGetResponse as InvestigateGetResponse,
40+
InvestigateListResponsesV4PagePaginationArray as InvestigateListResponsesV4PagePaginationArray,
41+
type InvestigateListParams as InvestigateListParams,
42+
type InvestigateGetParams as InvestigateGetParams,
43+
};
2344

2445
export { Settings as Settings };
2546

26-
export { Submissions as Submissions };
47+
export {
48+
Submissions as Submissions,
49+
type SubmissionListResponse as SubmissionListResponse,
50+
SubmissionListResponsesV4PagePaginationArray as SubmissionListResponsesV4PagePaginationArray,
51+
type SubmissionListParams as SubmissionListParams,
52+
};
2753
}
Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
export { EmailSecurity } from './email-security';
4-
export { Investigate } from './investigate/index';
4+
export {
5+
InvestigateListResponsesV4PagePaginationArray,
6+
Investigate,
7+
type InvestigateListResponse,
8+
type InvestigateGetResponse,
9+
type InvestigateListParams,
10+
type InvestigateGetParams,
11+
} from './investigate/index';
512
export { Settings } from './settings/index';
6-
export { Submissions } from './submissions';
13+
export {
14+
SubmissionListResponsesV4PagePaginationArray,
15+
Submissions,
16+
type SubmissionListResponse,
17+
type SubmissionListParams,
18+
} from './submissions';
Lines changed: 142 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,146 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
import { APIResource } from '../../../resource';
4+
import * as Core from '../../../core';
45

5-
export class Detections extends APIResource {}
6+
export class Detections extends APIResource {
7+
/**
8+
* Returns detection details such as threat categories and sender information for
9+
* non-benign messages.
10+
*
11+
* @example
12+
* ```ts
13+
* const detection =
14+
* await client.emailSecurity.investigate.detections.get(
15+
* '4Njp3P0STMz2c02Q',
16+
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
17+
* );
18+
* ```
19+
*/
20+
get(
21+
postfixId: string,
22+
params: DetectionGetParams,
23+
options?: Core.RequestOptions,
24+
): Core.APIPromise<DetectionGetResponse> {
25+
const { account_id } = params;
26+
return (
27+
this._client.get(
28+
`/accounts/${account_id}/email-security/investigate/${postfixId}/detections`,
29+
options,
30+
) as Core.APIPromise<{ result: DetectionGetResponse }>
31+
)._thenUnwrap((obj) => obj.result);
32+
}
33+
}
34+
35+
export interface DetectionGetResponse {
36+
action: string;
37+
38+
attachments: Array<DetectionGetResponse.Attachment>;
39+
40+
headers: Array<DetectionGetResponse.Header>;
41+
42+
links: Array<DetectionGetResponse.Link>;
43+
44+
sender_info: DetectionGetResponse.SenderInfo;
45+
46+
threat_categories: Array<DetectionGetResponse.ThreatCategory>;
47+
48+
validation: DetectionGetResponse.Validation;
49+
50+
final_disposition?:
51+
| 'MALICIOUS'
52+
| 'MALICIOUS-BEC'
53+
| 'SUSPICIOUS'
54+
| 'SPOOF'
55+
| 'SPAM'
56+
| 'BULK'
57+
| 'ENCRYPTED'
58+
| 'EXTERNAL'
59+
| 'UNKNOWN'
60+
| 'NONE'
61+
| null;
62+
}
63+
64+
export namespace DetectionGetResponse {
65+
export interface Attachment {
66+
size: number;
67+
68+
content_type?: string | null;
69+
70+
detection?:
71+
| 'MALICIOUS'
72+
| 'MALICIOUS-BEC'
73+
| 'SUSPICIOUS'
74+
| 'SPOOF'
75+
| 'SPAM'
76+
| 'BULK'
77+
| 'ENCRYPTED'
78+
| 'EXTERNAL'
79+
| 'UNKNOWN'
80+
| 'NONE'
81+
| null;
82+
83+
encrypted?: boolean | null;
84+
85+
name?: string | null;
86+
}
87+
88+
export interface Header {
89+
name: string;
90+
91+
value: string;
92+
}
93+
94+
export interface Link {
95+
href: string;
96+
97+
text?: string | null;
98+
}
99+
100+
export interface SenderInfo {
101+
/**
102+
* The name of the autonomous system.
103+
*/
104+
as_name?: string | null;
105+
106+
/**
107+
* The number of the autonomous system.
108+
*/
109+
as_number?: number | null;
110+
111+
geo?: string | null;
112+
113+
ip?: string | null;
114+
115+
pld?: string | null;
116+
}
117+
118+
export interface ThreatCategory {
119+
id: number;
120+
121+
description?: string | null;
122+
123+
name?: string | null;
124+
}
125+
126+
export interface Validation {
127+
comment?: string | null;
128+
129+
dkim?: 'pass' | 'neutral' | 'fail' | 'error' | 'none' | null;
130+
131+
dmarc?: 'pass' | 'neutral' | 'fail' | 'error' | 'none' | null;
132+
133+
spf?: 'pass' | 'neutral' | 'fail' | 'error' | 'none' | null;
134+
}
135+
}
136+
137+
export interface DetectionGetParams {
138+
/**
139+
* Account Identifier
140+
*/
141+
account_id: string;
142+
}
143+
144+
export declare namespace Detections {
145+
export { type DetectionGetResponse as DetectionGetResponse, type DetectionGetParams as DetectionGetParams };
146+
}
Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,36 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
export { Detections } from './detections';
4-
export { Investigate } from './investigate';
5-
export { Move } from './move';
6-
export { Preview } from './preview';
7-
export { Raw } from './raw';
8-
export { Reclassify } from './reclassify';
9-
export { Release } from './release';
10-
export { Trace } from './trace';
3+
export { Detections, type DetectionGetResponse, type DetectionGetParams } from './detections';
4+
export {
5+
InvestigateListResponsesV4PagePaginationArray,
6+
Investigate,
7+
type InvestigateListResponse,
8+
type InvestigateGetResponse,
9+
type InvestigateListParams,
10+
type InvestigateGetParams,
11+
} from './investigate';
12+
export {
13+
MoveCreateResponsesSinglePage,
14+
MoveBulkResponsesSinglePage,
15+
Move,
16+
type MoveCreateResponse,
17+
type MoveBulkResponse,
18+
type MoveCreateParams,
19+
type MoveBulkParams,
20+
} from './move';
21+
export {
22+
Preview,
23+
type PreviewCreateResponse,
24+
type PreviewGetResponse,
25+
type PreviewCreateParams,
26+
type PreviewGetParams,
27+
} from './preview';
28+
export { Raw, type RawGetResponse, type RawGetParams } from './raw';
29+
export { Reclassify, type ReclassifyCreateResponse, type ReclassifyCreateParams } from './reclassify';
30+
export {
31+
ReleaseBulkResponsesSinglePage,
32+
Release,
33+
type ReleaseBulkResponse,
34+
type ReleaseBulkParams,
35+
} from './release';
36+
export { Trace, type TraceGetResponse, type TraceGetParams } from './trace';

0 commit comments

Comments
 (0)