Skip to content

Commit 47946c5

Browse files
feat(api): api update
1 parent 6509244 commit 47946c5

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1775
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3642238a0fcdc091efbca5515455c92c73e4d66478c4dca432a6109fa97e130f.yml
3-
openapi_spec_hash: 24a2895c05baa9100b3cda54d3ab9e19
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6cb6b87f45c66e5a30eb913c34f701a5609b2761a5cc0c6ae3a9dd56632ab4cc.yml
3+
openapi_spec_hash: 805bdec318dc4e872b6bed9e2789a4f0
44
config_hash: 4a37da9893560914a7ac1a75cc01202a

src/resources/accounts/tokens/tokens.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class Tokens extends APIResource {
3838
* { id: 'c8fed203ed3043cba015a93ad1616f1f' },
3939
* { id: '82e64a83756745bbbb1c9c2701bf816b' },
4040
* ],
41-
* resources: { object: 'bar', string: 'bar' },
41+
* resources: { foo: 'string' },
4242
* },
4343
* ],
4444
* });
@@ -70,7 +70,7 @@ export class Tokens extends APIResource {
7070
* { id: 'c8fed203ed3043cba015a93ad1616f1f' },
7171
* { id: '82e64a83756745bbbb1c9c2701bf816b' },
7272
* ],
73-
* resources: { object: 'bar', string: 'bar' },
73+
* resources: { foo: 'string' },
7474
* },
7575
* ],
7676
* },

src/resources/shared.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ export interface TokenPolicy {
890890
/**
891891
* A list of resource names that the policy applies to.
892892
*/
893-
resources: { [key: string]: unknown };
893+
resources: { [key: string]: string } | { [key: string]: { [key: string]: string } };
894894
}
895895

896896
export namespace TokenPolicy {
@@ -941,7 +941,7 @@ export interface TokenPolicyParam {
941941
/**
942942
* A list of resource names that the policy applies to.
943943
*/
944-
resources: { [key: string]: unknown };
944+
resources: { [key: string]: string } | { [key: string]: { [key: string]: string } };
945945
}
946946

947947
export namespace TokenPolicyParam {

src/resources/user/tokens/tokens.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export class Tokens extends APIResource {
3636
* { id: 'c8fed203ed3043cba015a93ad1616f1f' },
3737
* { id: '82e64a83756745bbbb1c9c2701bf816b' },
3838
* ],
39-
* resources: { object: 'bar', string: 'bar' },
39+
* resources: { foo: 'string' },
4040
* },
4141
* ],
4242
* });
@@ -66,7 +66,7 @@ export class Tokens extends APIResource {
6666
* { id: 'c8fed203ed3043cba015a93ad1616f1f' },
6767
* { id: '82e64a83756745bbbb1c9c2701bf816b' },
6868
* ],
69-
* resources: { object: 'bar', string: 'bar' },
69+
* resources: { foo: 'string' },
7070
* },
7171
* ],
7272
* },

tests/api-resources/accounts/tokens/tokens.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('resource tokens', () => {
2222
{ id: 'c8fed203ed3043cba015a93ad1616f1f' },
2323
{ id: '82e64a83756745bbbb1c9c2701bf816b' },
2424
],
25-
resources: { object: 'bar', string: 'bar' },
25+
resources: { foo: 'string' },
2626
},
2727
],
2828
});
@@ -47,7 +47,7 @@ describe('resource tokens', () => {
4747
{ id: 'c8fed203ed3043cba015a93ad1616f1f', meta: { key: 'key', value: 'value' } },
4848
{ id: '82e64a83756745bbbb1c9c2701bf816b', meta: { key: 'key', value: 'value' } },
4949
],
50-
resources: { object: 'bar', string: 'bar' },
50+
resources: { foo: 'string' },
5151
},
5252
],
5353
condition: {
@@ -73,7 +73,7 @@ describe('resource tokens', () => {
7373
{ id: 'c8fed203ed3043cba015a93ad1616f1f' },
7474
{ id: '82e64a83756745bbbb1c9c2701bf816b' },
7575
],
76-
resources: { object: 'bar', string: 'bar' },
76+
resources: { foo: 'string' },
7777
},
7878
],
7979
});
@@ -98,7 +98,7 @@ describe('resource tokens', () => {
9898
{ id: 'c8fed203ed3043cba015a93ad1616f1f', meta: { key: 'key', value: 'value' } },
9999
{ id: '82e64a83756745bbbb1c9c2701bf816b', meta: { key: 'key', value: 'value' } },
100100
],
101-
resources: { object: 'bar', string: 'bar' },
101+
resources: { foo: 'string' },
102102
},
103103
],
104104
condition: {

tests/api-resources/user/tokens/tokens.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('resource tokens', () => {
2121
{ id: 'c8fed203ed3043cba015a93ad1616f1f' },
2222
{ id: '82e64a83756745bbbb1c9c2701bf816b' },
2323
],
24-
resources: { object: 'bar', string: 'bar' },
24+
resources: { foo: 'string' },
2525
},
2626
],
2727
});
@@ -45,7 +45,7 @@ describe('resource tokens', () => {
4545
{ id: 'c8fed203ed3043cba015a93ad1616f1f', meta: { key: 'key', value: 'value' } },
4646
{ id: '82e64a83756745bbbb1c9c2701bf816b', meta: { key: 'key', value: 'value' } },
4747
],
48-
resources: { object: 'bar', string: 'bar' },
48+
resources: { foo: 'string' },
4949
},
5050
],
5151
condition: {
@@ -70,7 +70,7 @@ describe('resource tokens', () => {
7070
{ id: 'c8fed203ed3043cba015a93ad1616f1f' },
7171
{ id: '82e64a83756745bbbb1c9c2701bf816b' },
7272
],
73-
resources: { object: 'bar', string: 'bar' },
73+
resources: { foo: 'string' },
7474
},
7575
],
7676
});
@@ -94,7 +94,7 @@ describe('resource tokens', () => {
9494
{ id: 'c8fed203ed3043cba015a93ad1616f1f', meta: { key: 'key', value: 'value' } },
9595
{ id: '82e64a83756745bbbb1c9c2701bf816b', meta: { key: 'key', value: 'value' } },
9696
],
97-
resources: { object: 'bar', string: 'bar' },
97+
resources: { foo: 'string' },
9898
},
9999
],
100100
condition: {

0 commit comments

Comments
 (0)