Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed May 7, 2024
1 parent 647a603 commit fca6253
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
10 changes: 5 additions & 5 deletions src/resources/accounts/members.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export interface MemberCreateParams {
/**
* Path param:
*/
account_id: unknown;
account_id: string;

/**
* Body param: The contact email address of the user.
Expand All @@ -244,7 +244,7 @@ export interface MemberUpdateParams {
/**
* Path param:
*/
account_id: unknown;
account_id: string;

/**
* Body param: Roles assigned to this member.
Expand All @@ -265,7 +265,7 @@ export interface MemberListParams extends V4PagePaginationArrayParams {
/**
* Path param:
*/
account_id: unknown;
account_id: string;

/**
* Query param: Direction to order results.
Expand All @@ -284,11 +284,11 @@ export interface MemberListParams extends V4PagePaginationArrayParams {
}

export interface MemberDeleteParams {
account_id: unknown;
account_id: string;
}

export interface MemberGetParams {
account_id: unknown;
account_id: string;
}

export namespace Members {
Expand Down
4 changes: 2 additions & 2 deletions src/resources/accounts/roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ export class Roles extends APIResource {
export type RoleGetResponse = unknown | string | null;

export interface RoleListParams {
account_id: unknown;
account_id: string;
}

export interface RoleGetParams {
account_id: unknown;
account_id: string;
}

export namespace Roles {
Expand Down
20 changes: 10 additions & 10 deletions tests/api-resources/accounts/members.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('resource members', () => {
// skipped: tests are disabled for the time being
test.skip('create: only required params', async () => {
const responsePromise = cloudflare.accounts.members.create({
account_id: {},
account_id: 'string',
email: '[email protected]',
roles: [
'3536bcfad5faccb999b47003c79917fb',
Expand All @@ -33,7 +33,7 @@ describe('resource members', () => {
// skipped: tests are disabled for the time being
test.skip('create: required and optional params', async () => {
const response = await cloudflare.accounts.members.create({
account_id: {},
account_id: 'string',
email: '[email protected]',
roles: [
'3536bcfad5faccb999b47003c79917fb',
Expand All @@ -47,7 +47,7 @@ describe('resource members', () => {
// skipped: tests are disabled for the time being
test.skip('update: only required params', async () => {
const responsePromise = cloudflare.accounts.members.update('4536bcfad5faccb111b47003c79917fa', {
account_id: {},
account_id: 'string',
roles: [
{ id: '3536bcfad5faccb999b47003c79917fb' },
{ id: '3536bcfad5faccb999b47003c79917fb' },
Expand All @@ -66,7 +66,7 @@ describe('resource members', () => {
// skipped: tests are disabled for the time being
test.skip('update: required and optional params', async () => {
const response = await cloudflare.accounts.members.update('4536bcfad5faccb111b47003c79917fa', {
account_id: {},
account_id: 'string',
roles: [
{ id: '3536bcfad5faccb999b47003c79917fb' },
{ id: '3536bcfad5faccb999b47003c79917fb' },
Expand All @@ -77,7 +77,7 @@ describe('resource members', () => {

// skipped: tests are disabled for the time being
test.skip('list: only required params', async () => {
const responsePromise = cloudflare.accounts.members.list({ account_id: {} });
const responsePromise = cloudflare.accounts.members.list({ account_id: 'string' });
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
Expand All @@ -90,7 +90,7 @@ describe('resource members', () => {
// skipped: tests are disabled for the time being
test.skip('list: required and optional params', async () => {
const response = await cloudflare.accounts.members.list({
account_id: {},
account_id: 'string',
direction: 'desc',
order: 'status',
page: 1,
Expand All @@ -102,7 +102,7 @@ describe('resource members', () => {
// skipped: tests are disabled for the time being
test.skip('delete: only required params', async () => {
const responsePromise = cloudflare.accounts.members.delete('4536bcfad5faccb111b47003c79917fa', {
account_id: {},
account_id: 'string',
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
Expand All @@ -116,14 +116,14 @@ describe('resource members', () => {
// skipped: tests are disabled for the time being
test.skip('delete: required and optional params', async () => {
const response = await cloudflare.accounts.members.delete('4536bcfad5faccb111b47003c79917fa', {
account_id: {},
account_id: 'string',
});
});

// skipped: tests are disabled for the time being
test.skip('get: only required params', async () => {
const responsePromise = cloudflare.accounts.members.get('4536bcfad5faccb111b47003c79917fa', {
account_id: {},
account_id: 'string',
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
Expand All @@ -137,7 +137,7 @@ describe('resource members', () => {
// skipped: tests are disabled for the time being
test.skip('get: required and optional params', async () => {
const response = await cloudflare.accounts.members.get('4536bcfad5faccb111b47003c79917fa', {
account_id: {},
account_id: 'string',
});
});
});
8 changes: 4 additions & 4 deletions tests/api-resources/accounts/roles.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const cloudflare = new Cloudflare({
describe('resource roles', () => {
// skipped: tests are disabled for the time being
test.skip('list: only required params', async () => {
const responsePromise = cloudflare.accounts.roles.list({ account_id: {} });
const responsePromise = cloudflare.accounts.roles.list({ account_id: 'string' });
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
Expand All @@ -24,12 +24,12 @@ describe('resource roles', () => {

// skipped: tests are disabled for the time being
test.skip('list: required and optional params', async () => {
const response = await cloudflare.accounts.roles.list({ account_id: {} });
const response = await cloudflare.accounts.roles.list({ account_id: 'string' });
});

// skipped: tests are disabled for the time being
test.skip('get: only required params', async () => {
const responsePromise = cloudflare.accounts.roles.get({}, { account_id: {} });
const responsePromise = cloudflare.accounts.roles.get({}, { account_id: 'string' });
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
Expand All @@ -41,6 +41,6 @@ describe('resource roles', () => {

// skipped: tests are disabled for the time being
test.skip('get: required and optional params', async () => {
const response = await cloudflare.accounts.roles.get({}, { account_id: {} });
const response = await cloudflare.accounts.roles.get({}, { account_id: 'string' });
});
});

0 comments on commit fca6253

Please sign in to comment.