Skip to content

Commit 5abcfcb

Browse files
committed
chore(cloudforce-one): update codegen output
1 parent 028ccb8 commit 5abcfcb

5 files changed

Lines changed: 136 additions & 8 deletions

File tree

src/resources/cloudforce-one/threat-events/datasets/datasets.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ export class Datasets extends APIResource {
4141
* ```
4242
*/
4343
list(params: DatasetListParams, options?: Core.RequestOptions): Core.APIPromise<DatasetListResponse> {
44-
const { account_id } = params;
45-
return this._client.get(`/accounts/${account_id}/cloudforce-one/events/dataset`, options);
44+
const { account_id, ...query } = params;
45+
return this._client.get(`/accounts/${account_id}/cloudforce-one/events/dataset`, { query, ...options });
4646
}
4747

4848
/**
@@ -128,6 +128,8 @@ export interface DatasetCreateResponse {
128128
name: string;
129129

130130
uuid: string;
131+
132+
deletedAt?: string;
131133
}
132134

133135
export type DatasetListResponse = Array<DatasetListResponse.DatasetListResponseItem>;
@@ -139,6 +141,8 @@ export namespace DatasetListResponse {
139141
name: string;
140142

141143
uuid: string;
144+
145+
deletedAt?: string;
142146
}
143147
}
144148

@@ -148,6 +152,8 @@ export interface DatasetEditResponse {
148152
name: string;
149153

150154
uuid: string;
155+
156+
deletedAt?: string;
151157
}
152158

153159
export interface DatasetGetResponse {
@@ -156,6 +162,8 @@ export interface DatasetGetResponse {
156162
name: string;
157163

158164
uuid: string;
165+
166+
deletedAt?: string;
159167
}
160168

161169
export interface DatasetRawResponse {
@@ -192,9 +200,15 @@ export interface DatasetCreateParams {
192200

193201
export interface DatasetListParams {
194202
/**
195-
* Account ID.
203+
* Path param: Account ID.
196204
*/
197205
account_id: string;
206+
207+
/**
208+
* Query param: When true, include soft-deleted datasets in the response. Each item
209+
* includes a `deletedAt` field (ISO 8601 or null). Default: false.
210+
*/
211+
includeDeleted?: boolean;
198212
}
199213

200214
export interface DatasetEditParams {

src/resources/cloudforce-one/threat-events/tags.ts

Lines changed: 81 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ export interface TagCreateResponse {
3434

3535
actorCategory?: string;
3636

37+
/**
38+
* Structured aliases ({ value, confidence 1-10, tlp }). CFONE-only: stripped from
39+
* responses to non-CFONE accounts.
40+
*/
41+
aliases?: Array<TagCreateResponse.Alias>;
42+
3743
aliasGroupNames?: Array<string>;
3844

3945
aliasGroupNamesInternal?: Array<string>;
@@ -42,14 +48,24 @@ export interface TagCreateResponse {
4248

4349
attributionConfidence?: string;
4450

51+
attributionConfidenceScore?: number;
52+
4553
attributionOrganization?: string;
4654

4755
categoryName?: string;
4856

4957
categoryUuid?: string;
5058

59+
dateOfDiscovery?: string;
60+
5161
externalReferenceLinks?: Array<string>;
5262

63+
/**
64+
* Internal structured aliases ({ value, confidence 1-10, tlp }). CFONE-only: never
65+
* returned to non-CFONE accounts.
66+
*/
67+
internalAliases?: Array<TagCreateResponse.InternalAlias>;
68+
5369
internalDescription?: string;
5470

5571
motive?: string;
@@ -58,11 +74,31 @@ export interface TagCreateResponse {
5874

5975
originCountryISO?: string;
6076

77+
originCountryISOAlpha3?: string;
78+
6179
priority?: number;
6280

6381
sophisticationLevel?: string;
6482
}
6583

84+
export namespace TagCreateResponse {
85+
export interface Alias {
86+
value: string;
87+
88+
confidence?: number | null;
89+
90+
tlp?: 'red' | 'amber' | 'green' | 'white' | null;
91+
}
92+
93+
export interface InternalAlias {
94+
value: string;
95+
96+
confidence?: number | null;
97+
98+
tlp?: 'red' | 'amber' | 'green' | 'white' | null;
99+
}
100+
}
101+
66102
export interface TagCreateParams {
67103
/**
68104
* Path param: Account ID.
@@ -80,10 +116,18 @@ export interface TagCreateParams {
80116
activeDuration?: string;
81117

82118
/**
83-
* Body param
119+
* Body param: Actor variety. Allowed values: Activist, Competitor, Customer, Crime
120+
* Syndicate, Former Employee, Nation State, Organized Crime, Nation State
121+
* Affiliated, Terrorist, Unaffiliated.
84122
*/
85123
actorCategory?: string;
86124

125+
/**
126+
* Body param: Structured aliases ({ value, confidence 1-10, tlp }). CFONE-only:
127+
* stripped from responses to non-CFONE accounts.
128+
*/
129+
aliases?: Array<TagCreateParams.Alias>;
130+
87131
/**
88132
* Body param
89133
*/
@@ -104,6 +148,11 @@ export interface TagCreateParams {
104148
*/
105149
attributionConfidence?: string;
106150

151+
/**
152+
* Body param
153+
*/
154+
attributionConfidenceScore?: number;
155+
107156
/**
108157
* Body param
109158
*/
@@ -114,18 +163,30 @@ export interface TagCreateParams {
114163
*/
115164
categoryUuid?: string;
116165

166+
/**
167+
* Body param: Date the actor was discovered (ISO YYYY-MM-DD).
168+
*/
169+
dateOfDiscovery?: string;
170+
117171
/**
118172
* Body param
119173
*/
120174
externalReferenceLinks?: Array<string>;
121175

176+
/**
177+
* Body param: Internal structured aliases ({ value, confidence 1-10, tlp }).
178+
* CFONE-only: never returned to non-CFONE accounts.
179+
*/
180+
internalAliases?: Array<TagCreateParams.InternalAlias>;
181+
122182
/**
123183
* Body param
124184
*/
125185
internalDescription?: string;
126186

127187
/**
128-
* Body param
188+
* Body param: Actor motive. Allowed values: Convenience, Fear, Fun, Financial,
189+
* Grudge, Ideology, Espionage.
129190
*/
130191
motive?: string;
131192

@@ -150,6 +211,24 @@ export interface TagCreateParams {
150211
sophisticationLevel?: string;
151212
}
152213

214+
export namespace TagCreateParams {
215+
export interface Alias {
216+
value: string;
217+
218+
confidence?: number | null;
219+
220+
tlp?: 'red' | 'amber' | 'green' | 'white' | null;
221+
}
222+
223+
export interface InternalAlias {
224+
value: string;
225+
226+
confidence?: number | null;
227+
228+
tlp?: 'red' | 'amber' | 'green' | 'white' | null;
229+
}
230+
}
231+
153232
export declare namespace Tags {
154233
export { type TagCreateResponse as TagCreateResponse, type TagCreateParams as TagCreateParams };
155234
}

src/resources/cloudforce-one/threat-events/threat-events.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ export interface ThreatEventCreateResponse {
204204

205205
attackerCountry: string;
206206

207+
attackerCountryAlpha3: string;
208+
207209
category: string;
208210

209211
datasetId: string;
@@ -244,6 +246,8 @@ export interface ThreatEventCreateResponse {
244246

245247
targetCountry: string;
246248

249+
targetCountryAlpha3: string;
250+
247251
targetIndustry: string;
248252

249253
tlp: string;
@@ -263,6 +267,8 @@ export namespace ThreatEventListResponse {
263267

264268
attackerCountry: string;
265269

270+
attackerCountryAlpha3: string;
271+
266272
category: string;
267273

268274
datasetId: string;
@@ -303,6 +309,8 @@ export namespace ThreatEventListResponse {
303309

304310
targetCountry: string;
305311

312+
targetCountryAlpha3: string;
313+
306314
targetIndustry: string;
307315

308316
tlp: string;
@@ -392,6 +400,8 @@ export interface ThreatEventEditResponse {
392400

393401
attackerCountry: string;
394402

403+
attackerCountryAlpha3: string;
404+
395405
category: string;
396406

397407
datasetId: string;
@@ -432,6 +442,8 @@ export interface ThreatEventEditResponse {
432442

433443
targetCountry: string;
434444

445+
targetCountryAlpha3: string;
446+
435447
targetIndustry: string;
436448

437449
tlp: string;
@@ -448,6 +460,8 @@ export interface ThreatEventGetResponse {
448460

449461
attackerCountry: string;
450462

463+
attackerCountryAlpha3: string;
464+
451465
category: string;
452466

453467
datasetId: string;
@@ -488,6 +502,8 @@ export interface ThreatEventGetResponse {
488502

489503
targetCountry: string;
490504

505+
targetCountryAlpha3: string;
506+
491507
targetIndustry: string;
492508

493509
tlp: string;

tests/api-resources/cloudforce-one/threat-events/datasets/datasets.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ describe('resource datasets', () => {
4949

5050
// TODO: HTTP 401 from prism
5151
test.skip('list: required and optional params', async () => {
52-
const response = await client.cloudforceOne.threatEvents.datasets.list({ account_id: 'account_id' });
52+
const response = await client.cloudforceOne.threatEvents.datasets.list({
53+
account_id: 'account_id',
54+
includeDeleted: true,
55+
});
5356
});
5457

5558
// TODO: HTTP 401 from prism

tests/api-resources/cloudforce-one/threat-events/tags.test.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,32 @@ describe('resource tags', () => {
3131
account_id: 'account_id',
3232
value: 'APT28',
3333
activeDuration: 'activeDuration',
34-
actorCategory: 'actorCategory',
34+
actorCategory: 'Nation State',
35+
aliases: [
36+
{
37+
value: 'Fancy Bear',
38+
confidence: 8,
39+
tlp: 'amber',
40+
},
41+
],
3542
aliasGroupNames: ['string'],
3643
aliasGroupNamesInternal: ['string'],
3744
analyticPriority: 0,
3845
attributionConfidence: 'attributionConfidence',
46+
attributionConfidenceScore: 7,
3947
attributionOrganization: 'attributionOrganization',
4048
categoryUuid: '12345678-1234-1234-1234-1234567890ab',
49+
dateOfDiscovery: '2024-01-15',
4150
externalReferenceLinks: ['string'],
51+
internalAliases: [
52+
{
53+
value: 'Fancy Bear',
54+
confidence: 8,
55+
tlp: 'amber',
56+
},
57+
],
4258
internalDescription: 'internalDescription',
43-
motive: 'motive',
59+
motive: 'Espionage',
4460
opsecLevel: 'opsecLevel',
4561
originCountryISO: 'originCountryISO',
4662
priority: 0,

0 commit comments

Comments
 (0)