From 13269c1bb6132c971261a88c55632822fec9016a Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 25 Apr 2024 04:48:05 +0000 Subject: [PATCH] feat(api): update via SDK Studio --- src/resources/accounts/members.ts | 10 +++++----- src/resources/accounts/roles.ts | 4 ++-- tests/api-resources/accounts/members.test.ts | 20 ++++++++++---------- tests/api-resources/accounts/roles.test.ts | 8 ++++---- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/resources/accounts/members.ts b/src/resources/accounts/members.ts index a40ca1e0fe..9cc2ba3c62 100644 --- a/src/resources/accounts/members.ts +++ b/src/resources/accounts/members.ts @@ -222,7 +222,7 @@ export interface MemberCreateParams { /** * Path param: */ - account_id: unknown; + account_id: string; /** * Body param: The contact email address of the user. @@ -244,7 +244,7 @@ export interface MemberUpdateParams { /** * Path param: */ - account_id: unknown; + account_id: string; /** * Body param: Roles assigned to this member. @@ -265,7 +265,7 @@ export interface MemberListParams extends V4PagePaginationArrayParams { /** * Path param: */ - account_id: unknown; + account_id: string; /** * Query param: Direction to order results. @@ -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 { diff --git a/src/resources/accounts/roles.ts b/src/resources/accounts/roles.ts index b50ef48d8a..b267b4b4e2 100644 --- a/src/resources/accounts/roles.ts +++ b/src/resources/accounts/roles.ts @@ -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 { diff --git a/tests/api-resources/accounts/members.test.ts b/tests/api-resources/accounts/members.test.ts index eacb67359d..0817555133 100644 --- a/tests/api-resources/accounts/members.test.ts +++ b/tests/api-resources/accounts/members.test.ts @@ -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: 'user@example.com', roles: [ '3536bcfad5faccb999b47003c79917fb', @@ -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: 'user@example.com', roles: [ '3536bcfad5faccb999b47003c79917fb', @@ -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' }, @@ -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' }, @@ -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; @@ -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, @@ -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); @@ -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); @@ -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', }); }); }); diff --git a/tests/api-resources/accounts/roles.test.ts b/tests/api-resources/accounts/roles.test.ts index fdbd34d61f..780bb96c68 100644 --- a/tests/api-resources/accounts/roles.test.ts +++ b/tests/api-resources/accounts/roles.test.ts @@ -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; @@ -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; @@ -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' }); }); });