Skip to content

Commit

Permalink
feat: update via SDK Studio (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Mar 11, 2024
1 parent f06effd commit 89bab0a
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 70 deletions.
24 changes: 12 additions & 12 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4813,31 +4813,31 @@ Methods:
- <code title="get /accounts/{account_id}/dlp/profiles">client.zeroTrust.dlp.profiles.<a href="./src/resources/zero-trust/dlp/profiles/profiles.ts">list</a>({ ...params }) -> ProfileListResponse | null</code>
- <code title="get /accounts/{account_id}/dlp/profiles/{profile_id}">client.zeroTrust.dlp.profiles.<a href="./src/resources/zero-trust/dlp/profiles/profiles.ts">get</a>(profileId, { ...params }) -> ProfileGetResponse</code>

#### Customs
#### Custom

Types:

- <code><a href="./src/resources/zero-trust/dlp/profiles/customs.ts">DLPCustomProfile</a></code>
- <code><a href="./src/resources/zero-trust/dlp/profiles/customs.ts">CustomCreateResponse</a></code>
- <code><a href="./src/resources/zero-trust/dlp/profiles/customs.ts">CustomDeleteResponse</a></code>
- <code><a href="./src/resources/zero-trust/dlp/profiles/custom.ts">DLPCustomProfile</a></code>
- <code><a href="./src/resources/zero-trust/dlp/profiles/custom.ts">CustomCreateResponse</a></code>
- <code><a href="./src/resources/zero-trust/dlp/profiles/custom.ts">CustomDeleteResponse</a></code>

Methods:

- <code title="post /accounts/{account_id}/dlp/profiles/custom">client.zeroTrust.dlp.profiles.customs.<a href="./src/resources/zero-trust/dlp/profiles/customs.ts">create</a>({ ...params }) -> CustomCreateResponse | null</code>
- <code title="put /accounts/{account_id}/dlp/profiles/custom/{profile_id}">client.zeroTrust.dlp.profiles.customs.<a href="./src/resources/zero-trust/dlp/profiles/customs.ts">update</a>(profileId, { ...params }) -> DLPCustomProfile</code>
- <code title="delete /accounts/{account_id}/dlp/profiles/custom/{profile_id}">client.zeroTrust.dlp.profiles.customs.<a href="./src/resources/zero-trust/dlp/profiles/customs.ts">delete</a>(profileId, { ...params }) -> CustomDeleteResponse</code>
- <code title="get /accounts/{account_id}/dlp/profiles/custom/{profile_id}">client.zeroTrust.dlp.profiles.customs.<a href="./src/resources/zero-trust/dlp/profiles/customs.ts">get</a>(profileId, { ...params }) -> DLPCustomProfile</code>
- <code title="post /accounts/{account_id}/dlp/profiles/custom">client.zeroTrust.dlp.profiles.custom.<a href="./src/resources/zero-trust/dlp/profiles/custom.ts">create</a>({ ...params }) -> CustomCreateResponse | null</code>
- <code title="put /accounts/{account_id}/dlp/profiles/custom/{profile_id}">client.zeroTrust.dlp.profiles.custom.<a href="./src/resources/zero-trust/dlp/profiles/custom.ts">update</a>(profileId, { ...params }) -> DLPCustomProfile</code>
- <code title="delete /accounts/{account_id}/dlp/profiles/custom/{profile_id}">client.zeroTrust.dlp.profiles.custom.<a href="./src/resources/zero-trust/dlp/profiles/custom.ts">delete</a>(profileId, { ...params }) -> CustomDeleteResponse</code>
- <code title="get /accounts/{account_id}/dlp/profiles/custom/{profile_id}">client.zeroTrust.dlp.profiles.custom.<a href="./src/resources/zero-trust/dlp/profiles/custom.ts">get</a>(profileId, { ...params }) -> DLPCustomProfile</code>

#### Predefineds
#### Predefined

Types:

- <code><a href="./src/resources/zero-trust/dlp/profiles/predefineds.ts">DLPPredefinedProfile</a></code>
- <code><a href="./src/resources/zero-trust/dlp/profiles/predefined.ts">DLPPredefinedProfile</a></code>

Methods:

- <code title="put /accounts/{account_id}/dlp/profiles/predefined/{profile_id}">client.zeroTrust.dlp.profiles.predefineds.<a href="./src/resources/zero-trust/dlp/profiles/predefineds.ts">update</a>(profileId, { ...params }) -> DLPPredefinedProfile</code>
- <code title="get /accounts/{account_id}/dlp/profiles/predefined/{profile_id}">client.zeroTrust.dlp.profiles.predefineds.<a href="./src/resources/zero-trust/dlp/profiles/predefineds.ts">get</a>(profileId, { ...params }) -> DLPPredefinedProfile</code>
- <code title="put /accounts/{account_id}/dlp/profiles/predefined/{profile_id}">client.zeroTrust.dlp.profiles.predefined.<a href="./src/resources/zero-trust/dlp/profiles/predefined.ts">update</a>(profileId, { ...params }) -> DLPPredefinedProfile</code>
- <code title="get /accounts/{account_id}/dlp/profiles/predefined/{profile_id}">client.zeroTrust.dlp.profiles.predefined.<a href="./src/resources/zero-trust/dlp/profiles/predefined.ts">get</a>(profileId, { ...params }) -> DLPPredefinedProfile</code>

## Gateway

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as CustomsAPI from 'cloudflare/resources/zero-trust/dlp/profiles/customs';
import * as CustomAPI from 'cloudflare/resources/zero-trust/dlp/profiles/custom';

export class Customs extends APIResource {
export class Custom extends APIResource {
/**
* Creates a set of DLP custom profiles.
*/
Expand Down Expand Up @@ -460,12 +460,12 @@ export interface CustomGetParams {
account_id: string;
}

export namespace Customs {
export import DLPCustomProfile = CustomsAPI.DLPCustomProfile;
export import CustomCreateResponse = CustomsAPI.CustomCreateResponse;
export import CustomDeleteResponse = CustomsAPI.CustomDeleteResponse;
export import CustomCreateParams = CustomsAPI.CustomCreateParams;
export import CustomUpdateParams = CustomsAPI.CustomUpdateParams;
export import CustomDeleteParams = CustomsAPI.CustomDeleteParams;
export import CustomGetParams = CustomsAPI.CustomGetParams;
export namespace Custom {
export import DLPCustomProfile = CustomAPI.DLPCustomProfile;
export import CustomCreateResponse = CustomAPI.CustomCreateResponse;
export import CustomDeleteResponse = CustomAPI.CustomDeleteResponse;
export import CustomCreateParams = CustomAPI.CustomCreateParams;
export import CustomUpdateParams = CustomAPI.CustomUpdateParams;
export import CustomDeleteParams = CustomAPI.CustomDeleteParams;
export import CustomGetParams = CustomAPI.CustomGetParams;
}
11 changes: 3 additions & 8 deletions src/resources/zero-trust/dlp/profiles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,9 @@ export {
CustomUpdateParams,
CustomDeleteParams,
CustomGetParams,
Customs,
} from './customs';
export {
DLPPredefinedProfile,
PredefinedUpdateParams,
PredefinedGetParams,
Predefineds,
} from './predefineds';
Custom,
} from './custom';
export { DLPPredefinedProfile, PredefinedUpdateParams, PredefinedGetParams, Predefined } from './predefined';
export {
DLPProfiles,
ProfileListResponse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as PredefinedsAPI from 'cloudflare/resources/zero-trust/dlp/profiles/predefineds';
import * as PredefinedAPI from 'cloudflare/resources/zero-trust/dlp/profiles/predefined';

export class Predefineds extends APIResource {
export class Predefined extends APIResource {
/**
* Updates a DLP predefined profile. Only supports enabling/disabling entries.
*/
Expand Down Expand Up @@ -196,8 +196,8 @@ export interface PredefinedGetParams {
account_id: string;
}

export namespace Predefineds {
export import DLPPredefinedProfile = PredefinedsAPI.DLPPredefinedProfile;
export import PredefinedUpdateParams = PredefinedsAPI.PredefinedUpdateParams;
export import PredefinedGetParams = PredefinedsAPI.PredefinedGetParams;
export namespace Predefined {
export import DLPPredefinedProfile = PredefinedAPI.DLPPredefinedProfile;
export import PredefinedUpdateParams = PredefinedAPI.PredefinedUpdateParams;
export import PredefinedGetParams = PredefinedAPI.PredefinedGetParams;
}
40 changes: 20 additions & 20 deletions src/resources/zero-trust/dlp/profiles/profiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as ProfilesAPI from 'cloudflare/resources/zero-trust/dlp/profiles/profiles';
import * as CustomsAPI from 'cloudflare/resources/zero-trust/dlp/profiles/customs';
import * as PredefinedsAPI from 'cloudflare/resources/zero-trust/dlp/profiles/predefineds';
import * as CustomAPI from 'cloudflare/resources/zero-trust/dlp/profiles/custom';
import * as PredefinedAPI from 'cloudflare/resources/zero-trust/dlp/profiles/predefined';

export class Profiles extends APIResource {
customs: CustomsAPI.Customs = new CustomsAPI.Customs(this._client);
predefineds: PredefinedsAPI.Predefineds = new PredefinedsAPI.Predefineds(this._client);
custom: CustomAPI.Custom = new CustomAPI.Custom(this._client);
predefined: PredefinedAPI.Predefined = new PredefinedAPI.Predefined(this._client);

/**
* Lists all DLP profiles in an account.
Expand Down Expand Up @@ -43,8 +43,8 @@ export class Profiles extends APIResource {
}

export type DLPProfiles =
| PredefinedsAPI.DLPPredefinedProfile
| CustomsAPI.DLPCustomProfile
| PredefinedAPI.DLPPredefinedProfile
| CustomAPI.DLPCustomProfile
| DLPProfiles.DLPIntegrationProfile;

export namespace DLPProfiles {
Expand Down Expand Up @@ -114,8 +114,8 @@ export namespace DLPProfiles {
export type ProfileListResponse = Array<DLPProfiles>;

export type ProfileGetResponse =
| PredefinedsAPI.DLPPredefinedProfile
| CustomsAPI.DLPCustomProfile
| PredefinedAPI.DLPPredefinedProfile
| CustomAPI.DLPCustomProfile
| ProfileGetResponse.DLPIntegrationProfile;

export namespace ProfileGetResponse {
Expand Down Expand Up @@ -202,16 +202,16 @@ export namespace Profiles {
export import ProfileGetResponse = ProfilesAPI.ProfileGetResponse;
export import ProfileListParams = ProfilesAPI.ProfileListParams;
export import ProfileGetParams = ProfilesAPI.ProfileGetParams;
export import Customs = CustomsAPI.Customs;
export import DLPCustomProfile = CustomsAPI.DLPCustomProfile;
export import CustomCreateResponse = CustomsAPI.CustomCreateResponse;
export import CustomDeleteResponse = CustomsAPI.CustomDeleteResponse;
export import CustomCreateParams = CustomsAPI.CustomCreateParams;
export import CustomUpdateParams = CustomsAPI.CustomUpdateParams;
export import CustomDeleteParams = CustomsAPI.CustomDeleteParams;
export import CustomGetParams = CustomsAPI.CustomGetParams;
export import Predefineds = PredefinedsAPI.Predefineds;
export import DLPPredefinedProfile = PredefinedsAPI.DLPPredefinedProfile;
export import PredefinedUpdateParams = PredefinedsAPI.PredefinedUpdateParams;
export import PredefinedGetParams = PredefinedsAPI.PredefinedGetParams;
export import Custom = CustomAPI.Custom;
export import DLPCustomProfile = CustomAPI.DLPCustomProfile;
export import CustomCreateResponse = CustomAPI.CustomCreateResponse;
export import CustomDeleteResponse = CustomAPI.CustomDeleteResponse;
export import CustomCreateParams = CustomAPI.CustomCreateParams;
export import CustomUpdateParams = CustomAPI.CustomUpdateParams;
export import CustomDeleteParams = CustomAPI.CustomDeleteParams;
export import CustomGetParams = CustomAPI.CustomGetParams;
export import Predefined = PredefinedAPI.Predefined;
export import DLPPredefinedProfile = PredefinedAPI.DLPPredefinedProfile;
export import PredefinedUpdateParams = PredefinedAPI.PredefinedUpdateParams;
export import PredefinedGetParams = PredefinedAPI.PredefinedGetParams;
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ const cloudflare = new Cloudflare({
baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
});

describe('resource customs', () => {
describe('resource custom', () => {
// skipped: tests are disabled for the time being
test.skip('create: only required params', async () => {
const responsePromise = cloudflare.zeroTrust.dlp.profiles.customs.create({
const responsePromise = cloudflare.zeroTrust.dlp.profiles.custom.create({
account_id: '023e105f4ecef8ad9ca31a8372d0c353',
profiles: [{}, {}, {}],
});
Expand All @@ -27,7 +27,7 @@ describe('resource customs', () => {

// skipped: tests are disabled for the time being
test.skip('create: required and optional params', async () => {
const response = await cloudflare.zeroTrust.dlp.profiles.customs.create({
const response = await cloudflare.zeroTrust.dlp.profiles.custom.create({
account_id: '023e105f4ecef8ad9ca31a8372d0c353',
profiles: [
{
Expand Down Expand Up @@ -105,7 +105,7 @@ describe('resource customs', () => {

// skipped: tests are disabled for the time being
test.skip('update: only required params', async () => {
const responsePromise = cloudflare.zeroTrust.dlp.profiles.customs.update(
const responsePromise = cloudflare.zeroTrust.dlp.profiles.custom.update(
'384e129d-25bd-403c-8019-bc19eb7a8a5f',
{ account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
);
Expand All @@ -120,7 +120,7 @@ describe('resource customs', () => {

// skipped: tests are disabled for the time being
test.skip('update: required and optional params', async () => {
const response = await cloudflare.zeroTrust.dlp.profiles.customs.update(
const response = await cloudflare.zeroTrust.dlp.profiles.custom.update(
'384e129d-25bd-403c-8019-bc19eb7a8a5f',
{
account_id: '023e105f4ecef8ad9ca31a8372d0c353',
Expand Down Expand Up @@ -155,7 +155,7 @@ describe('resource customs', () => {

// skipped: tests are disabled for the time being
test.skip('delete: only required params', async () => {
const responsePromise = cloudflare.zeroTrust.dlp.profiles.customs.delete(
const responsePromise = cloudflare.zeroTrust.dlp.profiles.custom.delete(
'384e129d-25bd-403c-8019-bc19eb7a8a5f',
{ account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
);
Expand All @@ -170,15 +170,15 @@ describe('resource customs', () => {

// skipped: tests are disabled for the time being
test.skip('delete: required and optional params', async () => {
const response = await cloudflare.zeroTrust.dlp.profiles.customs.delete(
const response = await cloudflare.zeroTrust.dlp.profiles.custom.delete(
'384e129d-25bd-403c-8019-bc19eb7a8a5f',
{ account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
);
});

// skipped: tests are disabled for the time being
test.skip('get: only required params', async () => {
const responsePromise = cloudflare.zeroTrust.dlp.profiles.customs.get(
const responsePromise = cloudflare.zeroTrust.dlp.profiles.custom.get(
'384e129d-25bd-403c-8019-bc19eb7a8a5f',
{ account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
);
Expand All @@ -193,7 +193,7 @@ describe('resource customs', () => {

// skipped: tests are disabled for the time being
test.skip('get: required and optional params', async () => {
const response = await cloudflare.zeroTrust.dlp.profiles.customs.get(
const response = await cloudflare.zeroTrust.dlp.profiles.custom.get(
'384e129d-25bd-403c-8019-bc19eb7a8a5f',
{ account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ const cloudflare = new Cloudflare({
baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
});

describe('resource predefineds', () => {
describe('resource predefined', () => {
// skipped: tests are disabled for the time being
test.skip('update: only required params', async () => {
const responsePromise = cloudflare.zeroTrust.dlp.profiles.predefineds.update(
const responsePromise = cloudflare.zeroTrust.dlp.profiles.predefined.update(
'384e129d-25bd-403c-8019-bc19eb7a8a5f',
{ account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
);
Expand All @@ -27,7 +27,7 @@ describe('resource predefineds', () => {

// skipped: tests are disabled for the time being
test.skip('update: required and optional params', async () => {
const response = await cloudflare.zeroTrust.dlp.profiles.predefineds.update(
const response = await cloudflare.zeroTrust.dlp.profiles.predefined.update(
'384e129d-25bd-403c-8019-bc19eb7a8a5f',
{
account_id: '023e105f4ecef8ad9ca31a8372d0c353',
Expand All @@ -40,7 +40,7 @@ describe('resource predefineds', () => {

// skipped: tests are disabled for the time being
test.skip('get: only required params', async () => {
const responsePromise = cloudflare.zeroTrust.dlp.profiles.predefineds.get(
const responsePromise = cloudflare.zeroTrust.dlp.profiles.predefined.get(
'384e129d-25bd-403c-8019-bc19eb7a8a5f',
{ account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
);
Expand All @@ -55,7 +55,7 @@ describe('resource predefineds', () => {

// skipped: tests are disabled for the time being
test.skip('get: required and optional params', async () => {
const response = await cloudflare.zeroTrust.dlp.profiles.predefineds.get(
const response = await cloudflare.zeroTrust.dlp.profiles.predefined.get(
'384e129d-25bd-403c-8019-bc19eb7a8a5f',
{ account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
);
Expand Down

0 comments on commit 89bab0a

Please sign in to comment.