Skip to content

Commit 511359b

Browse files
feat(api): api update
1 parent 9b21bde commit 511359b

File tree

3 files changed

+15
-18
lines changed

3 files changed

+15
-18
lines changed

.stats.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1692
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fd163487e976a58ac8b6f86053e92bb14b5283b89481fa2a10357425dc40515b.yml
3-
openapi_spec_hash: ff394241e840b5fe4503239c06a14125
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2d2329bb0e03362bf3f7ecbbb8b4765f4fc71e9c13e261fde06ce442398cbabb.yml
3+
openapi_spec_hash: 093f41d1494f005d0f6a85786cc72b06
44
config_hash: be55f8a46c1d39367277ece7fd55ef1e

src/resources/iam/resource-groups.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -343,15 +343,15 @@ export interface ResourceGroupCreateParams {
343343
account_id: string;
344344

345345
/**
346-
* Body param: A scope is a combination of scope objects which provides additional
347-
* context.
346+
* Body param: Name of the resource group
348347
*/
349-
scope: ResourceGroupCreateParams.Scope;
348+
name: string;
350349

351350
/**
352-
* Body param: Attributes associated to the resource group.
351+
* Body param: A scope is a combination of scope objects which provides additional
352+
* context.
353353
*/
354-
meta?: unknown;
354+
scope: ResourceGroupCreateParams.Scope;
355355
}
356356

357357
export namespace ResourceGroupCreateParams {
@@ -394,15 +394,15 @@ export interface ResourceGroupUpdateParams {
394394
account_id: string;
395395

396396
/**
397-
* Body param: A scope is a combination of scope objects which provides additional
398-
* context.
397+
* Body param: Name of the resource group
399398
*/
400-
scope: ResourceGroupUpdateParams.Scope;
399+
name?: string;
401400

402401
/**
403-
* Body param: Attributes associated to the resource group.
402+
* Body param: A scope is a combination of scope objects which provides additional
403+
* context.
404404
*/
405-
meta?: unknown;
405+
scope?: ResourceGroupUpdateParams.Scope;
406406
}
407407

408408
export namespace ResourceGroupUpdateParams {

tests/api-resources/iam/resource-groups.test.ts

+3-6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ describe('resource resourceGroups', () => {
1313
test('create: only required params', async () => {
1414
const responsePromise = client.iam.resourceGroups.create({
1515
account_id: 'eb78d65290b24279ba6f44721b3ea3c4',
16+
name: 'NewResourceGroup',
1617
scope: {
1718
key: 'com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4',
1819
objects: [{ key: 'com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5' }],
@@ -30,21 +31,17 @@ describe('resource resourceGroups', () => {
3031
test('create: required and optional params', async () => {
3132
const response = await client.iam.resourceGroups.create({
3233
account_id: 'eb78d65290b24279ba6f44721b3ea3c4',
34+
name: 'NewResourceGroup',
3335
scope: {
3436
key: 'com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4',
3537
objects: [{ key: 'com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5' }],
3638
},
37-
meta: { editable: 'false' },
3839
});
3940
});
4041

4142
test('update: only required params', async () => {
4243
const responsePromise = client.iam.resourceGroups.update('6d7f2f5f5b1d4a0e9081fdc98d432fd1', {
4344
account_id: 'eb78d65290b24279ba6f44721b3ea3c4',
44-
scope: {
45-
key: 'com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4',
46-
objects: [{ key: 'com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5' }],
47-
},
4845
});
4946
const rawResponse = await responsePromise.asResponse();
5047
expect(rawResponse).toBeInstanceOf(Response);
@@ -58,11 +55,11 @@ describe('resource resourceGroups', () => {
5855
test('update: required and optional params', async () => {
5956
const response = await client.iam.resourceGroups.update('6d7f2f5f5b1d4a0e9081fdc98d432fd1', {
6057
account_id: 'eb78d65290b24279ba6f44721b3ea3c4',
58+
name: 'UpdatedResourceGroup',
6159
scope: {
6260
key: 'com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4',
6361
objects: [{ key: 'com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5' }],
6462
},
65-
meta: { editable: 'false' },
6663
});
6764
});
6865

0 commit comments

Comments
 (0)