From 5bf09b4269bd7bd563bdc64c756c4cf5b68b389c Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 10 Apr 2024 22:03:47 +0000
Subject: [PATCH] feat(api): update via SDK Studio (#300)
---
api.md | 10 ++---
src/resources/rules/index.ts | 4 +-
src/resources/rules/lists/index.ts | 4 +-
src/resources/rules/lists/lists.ts | 62 +++++++++++++++---------------
src/resources/rules/rules.ts | 4 +-
5 files changed, 42 insertions(+), 42 deletions(-)
diff --git a/api.md b/api.md
index 44e16592f9..9b419a7192 100644
--- a/api.md
+++ b/api.md
@@ -3619,17 +3619,17 @@ Methods:
Types:
- Hostname
+- ListsList
- Redirect
-- RuleList
- ListDeleteResponse
Methods:
-- client.rules.lists.create({ ...params }) -> RuleList | null
-- client.rules.lists.update(listId, { ...params }) -> RuleList | null
-- client.rules.lists.list({ ...params }) -> RuleListsSinglePage
+- client.rules.lists.create({ ...params }) -> ListsList | null
+- client.rules.lists.update(listId, { ...params }) -> ListsList | null
+- client.rules.lists.list({ ...params }) -> ListsListsSinglePage
- client.rules.lists.delete(listId, { ...params }) -> ListDeleteResponse | null
-- client.rules.lists.get(listId, { ...params }) -> RuleList | null
+- client.rules.lists.get(listId, { ...params }) -> ListsList | null
### BulkOperations
diff --git a/src/resources/rules/index.ts b/src/resources/rules/index.ts
index 40400cda14..6d4f2c3525 100644
--- a/src/resources/rules/index.ts
+++ b/src/resources/rules/index.ts
@@ -2,15 +2,15 @@
export {
Hostname,
+ ListsList,
Redirect,
- RuleList,
ListDeleteResponse,
ListCreateParams,
ListUpdateParams,
ListListParams,
ListDeleteParams,
ListGetParams,
- RuleListsSinglePage,
+ ListsListsSinglePage,
Lists,
} from './lists/index';
export { Rules } from './rules';
diff --git a/src/resources/rules/lists/index.ts b/src/resources/rules/lists/index.ts
index 323193ffcf..02e60d5a15 100644
--- a/src/resources/rules/lists/index.ts
+++ b/src/resources/rules/lists/index.ts
@@ -2,15 +2,15 @@
export {
Hostname,
+ ListsList,
Redirect,
- RuleList,
ListDeleteResponse,
ListCreateParams,
ListUpdateParams,
ListListParams,
ListDeleteParams,
ListGetParams,
- RuleListsSinglePage,
+ ListsListsSinglePage,
Lists,
} from './lists';
export {
diff --git a/src/resources/rules/lists/lists.ts b/src/resources/rules/lists/lists.ts
index 0737ce367f..030d5c2820 100644
--- a/src/resources/rules/lists/lists.ts
+++ b/src/resources/rules/lists/lists.ts
@@ -14,11 +14,11 @@ export class Lists extends APIResource {
/**
* Creates a new list of the specified type.
*/
- create(params: ListCreateParams, options?: Core.RequestOptions): Core.APIPromise {
+ create(params: ListCreateParams, options?: Core.RequestOptions): Core.APIPromise {
const { account_id, ...body } = params;
return (
this._client.post(`/accounts/${account_id}/rules/lists`, { body, ...options }) as Core.APIPromise<{
- result: RuleList | null;
+ result: ListsList | null;
}>
)._thenUnwrap((obj) => obj.result);
}
@@ -30,13 +30,13 @@ export class Lists extends APIResource {
listId: string,
params: ListUpdateParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
const { account_id, ...body } = params;
return (
this._client.put(`/accounts/${account_id}/rules/lists/${listId}`, {
body,
...options,
- }) as Core.APIPromise<{ result: RuleList | null }>
+ }) as Core.APIPromise<{ result: ListsList | null }>
)._thenUnwrap((obj) => obj.result);
}
@@ -46,9 +46,9 @@ export class Lists extends APIResource {
list(
params: ListListParams,
options?: Core.RequestOptions,
- ): Core.PagePromise {
+ ): Core.PagePromise {
const { account_id } = params;
- return this._client.getAPIList(`/accounts/${account_id}/rules/lists`, RuleListsSinglePage, options);
+ return this._client.getAPIList(`/accounts/${account_id}/rules/lists`, ListsListsSinglePage, options);
}
/**
@@ -75,17 +75,17 @@ export class Lists extends APIResource {
listId: string,
params: ListGetParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
const { account_id } = params;
return (
this._client.get(`/accounts/${account_id}/rules/lists/${listId}`, options) as Core.APIPromise<{
- result: RuleList | null;
+ result: ListsList | null;
}>
)._thenUnwrap((obj) => obj.result);
}
}
-export class RuleListsSinglePage extends SinglePage {}
+export class ListsListsSinglePage extends SinglePage {}
/**
* Valid characters for hostnames are ASCII(7) letters from a to z, the digits from
@@ -95,26 +95,7 @@ export interface Hostname {
url_hostname: string;
}
-/**
- * The definition of the redirect.
- */
-export interface Redirect {
- source_url: string;
-
- target_url: string;
-
- include_subdomains?: boolean;
-
- preserve_path_suffix?: boolean;
-
- preserve_query_string?: boolean;
-
- status_code?: 301 | 302 | 307 | 308;
-
- subpath_matching?: boolean;
-}
-
-export interface RuleList {
+export interface ListsList {
/**
* The unique ID of the list.
*/
@@ -157,6 +138,25 @@ export interface RuleList {
num_referencing_filters?: number;
}
+/**
+ * The definition of the redirect.
+ */
+export interface Redirect {
+ source_url: string;
+
+ target_url: string;
+
+ include_subdomains?: boolean;
+
+ preserve_path_suffix?: boolean;
+
+ preserve_query_string?: boolean;
+
+ status_code?: 301 | 302 | 307 | 308;
+
+ subpath_matching?: boolean;
+}
+
export interface ListDeleteResponse {
/**
* The unique ID of the item in the List.
@@ -228,10 +228,10 @@ export interface ListGetParams {
export namespace Lists {
export import Hostname = ListsAPI.Hostname;
+ export import ListsList = ListsAPI.ListsList;
export import Redirect = ListsAPI.Redirect;
- export import RuleList = ListsAPI.RuleList;
export import ListDeleteResponse = ListsAPI.ListDeleteResponse;
- export import RuleListsSinglePage = ListsAPI.RuleListsSinglePage;
+ export import ListsListsSinglePage = ListsAPI.ListsListsSinglePage;
export import ListCreateParams = ListsAPI.ListCreateParams;
export import ListUpdateParams = ListsAPI.ListUpdateParams;
export import ListListParams = ListsAPI.ListListParams;
diff --git a/src/resources/rules/rules.ts b/src/resources/rules/rules.ts
index a407ce0f03..9a21de7fcd 100644
--- a/src/resources/rules/rules.ts
+++ b/src/resources/rules/rules.ts
@@ -10,10 +10,10 @@ export class Rules extends APIResource {
export namespace Rules {
export import Lists = ListsAPI.Lists;
export import Hostname = ListsAPI.Hostname;
+ export import ListsList = ListsAPI.ListsList;
export import Redirect = ListsAPI.Redirect;
- export import RuleList = ListsAPI.RuleList;
export import ListDeleteResponse = ListsAPI.ListDeleteResponse;
- export import RuleListsSinglePage = ListsAPI.RuleListsSinglePage;
+ export import ListsListsSinglePage = ListsAPI.ListsListsSinglePage;
export import ListCreateParams = ListsAPI.ListCreateParams;
export import ListUpdateParams = ListsAPI.ListUpdateParams;
export import ListListParams = ListsAPI.ListListParams;