Skip to content

Commit 648c762

Browse files
stainless-app[bot]batuhan
authored andcommitted
feat(api): update via SDK Studio
1 parent c38b608 commit 648c762

File tree

7 files changed

+25
-28
lines changed

7 files changed

+25
-28
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 11
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/beeper%2Fbeeper-desktop-api-54f86eb1bfab2924ae119521878ce7d58611b34a545f90785012bbb8dc834a7e.yml
33
openapi_spec_hash: 4a5284590c2632f7064c855a51549069
4-
config_hash: 3726cecdc53236b3e581beed20bc8658
4+
config_hash: e45e475f892b09fc030dd0b592ad488a

api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Methods:
3737

3838
- <code title="post /v0/archive-chat">client.chats.<a href="./src/resources/chats.ts">archive</a>({ ...params }) -> BaseResponse</code>
3939
- <code title="get /v0/get-chat">client.chats.<a href="./src/resources/chats.ts">get</a>({ ...params }) -> ChatGetResponse | null</code>
40-
- <code title="get /v0/search-chats">client.chats.<a href="./src/resources/chats.ts">search</a>({ ...params }) -> ChatsBeeperCursor</code>
40+
- <code title="get /v0/search-chats">client.chats.<a href="./src/resources/chats.ts">search</a>({ ...params }) -> ChatsCursor</code>
4141

4242
# Messages
4343

@@ -49,7 +49,7 @@ Types:
4949
Methods:
5050

5151
- <code title="post /v0/get-attachment">client.messages.<a href="./src/resources/messages.ts">getAttachment</a>({ ...params }) -> MessageGetAttachmentResponse</code>
52-
- <code title="get /v0/search-messages">client.messages.<a href="./src/resources/messages.ts">search</a>({ ...params }) -> MessagesBeeperCursor</code>
52+
- <code title="get /v0/search-messages">client.messages.<a href="./src/resources/messages.ts">search</a>({ ...params }) -> MessagesCursor</code>
5353
- <code title="post /v0/send-message">client.messages.<a href="./src/resources/messages.ts">send</a>({ ...params }) -> MessageSendResponse</code>
5454

5555
# Reminders

src/client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import * as qs from './internal/qs';
1515
import { VERSION } from './version';
1616
import * as Errors from './core/error';
1717
import * as Pagination from './core/pagination';
18-
import { AbstractPage, type BeeperCursorParams, BeeperCursorResponse } from './core/pagination';
18+
import { AbstractPage, type CursorParams, CursorResponse } from './core/pagination';
1919
import * as Uploads from './core/uploads';
2020
import * as API from './resources/index';
2121
import { APIPromise } from './core/api-promise';
@@ -796,8 +796,8 @@ BeeperDesktop.Token = Token;
796796
export declare namespace BeeperDesktop {
797797
export type RequestOptions = Opts.RequestOptions;
798798

799-
export import BeeperCursor = Pagination.BeeperCursor;
800-
export { type BeeperCursorParams as BeeperCursorParams, type BeeperCursorResponse as BeeperCursorResponse };
799+
export import Cursor = Pagination.Cursor;
800+
export { type CursorParams as CursorParams, type CursorResponse as CursorResponse };
801801

802802
export { Accounts as Accounts };
803803

src/core/pagination.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export class PagePromise<
107107
}
108108
}
109109

110-
export interface BeeperCursorResponse<Item> {
110+
export interface CursorResponse<Item> {
111111
items: Array<Item>;
112112

113113
hasMore: boolean;
@@ -117,15 +117,15 @@ export interface BeeperCursorResponse<Item> {
117117
newestCursor: string | null;
118118
}
119119

120-
export interface BeeperCursorParams {
120+
export interface CursorParams {
121121
cursor?: string | null;
122122

123123
direction?: string | null;
124124

125125
limit?: number | null;
126126
}
127127

128-
export class BeeperCursor<Item> extends AbstractPage<Item> implements BeeperCursorResponse<Item> {
128+
export class Cursor<Item> extends AbstractPage<Item> implements CursorResponse<Item> {
129129
items: Array<Item>;
130130

131131
hasMore: boolean;
@@ -137,7 +137,7 @@ export class BeeperCursor<Item> extends AbstractPage<Item> implements BeeperCurs
137137
constructor(
138138
client: BeeperDesktop,
139139
response: Response,
140-
body: BeeperCursorResponse<Item>,
140+
body: CursorResponse<Item>,
141141
options: FinalRequestOptions,
142142
) {
143143
super(client, response, body, options);

src/resources/chats.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
import { APIResource } from '../core/resource';
44
import * as Shared from './shared';
5-
import { ChatsBeeperCursor } from './shared';
5+
import { ChatsCursor } from './shared';
66
import { APIPromise } from '../core/api-promise';
7-
import { BeeperCursor, type BeeperCursorParams, PagePromise } from '../core/pagination';
7+
import { Cursor, type CursorParams, PagePromise } from '../core/pagination';
88
import { RequestOptions } from '../internal/request-options';
99

1010
/**
@@ -56,8 +56,8 @@ export class Chats extends APIResource {
5656
search(
5757
query: ChatSearchParams | null | undefined = {},
5858
options?: RequestOptions,
59-
): PagePromise<ChatsBeeperCursor, Shared.Chat> {
60-
return this._client.getAPIList('/v0/search-chats', BeeperCursor<Shared.Chat>, { query, ...options });
59+
): PagePromise<ChatsCursor, Shared.Chat> {
60+
return this._client.getAPIList('/v0/search-chats', Cursor<Shared.Chat>, { query, ...options });
6161
}
6262
}
6363

@@ -180,7 +180,7 @@ export interface ChatGetParams {
180180
maxParticipantCount?: number | null;
181181
}
182182

183-
export interface ChatSearchParams extends BeeperCursorParams {
183+
export interface ChatSearchParams extends CursorParams {
184184
/**
185185
* Provide an array of account IDs to filter chats from specific messaging accounts
186186
* only
@@ -245,4 +245,4 @@ export declare namespace Chats {
245245
};
246246
}
247247

248-
export { type ChatsBeeperCursor };
248+
export { type ChatsCursor };

src/resources/messages.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
import { APIResource } from '../core/resource';
44
import * as Shared from './shared';
5-
import { MessagesBeeperCursor } from './shared';
5+
import { MessagesCursor } from './shared';
66
import { APIPromise } from '../core/api-promise';
7-
import { BeeperCursor, type BeeperCursorParams, PagePromise } from '../core/pagination';
7+
import { Cursor, type CursorParams, PagePromise } from '../core/pagination';
88
import { RequestOptions } from '../internal/request-options';
99

1010
/**
@@ -44,11 +44,8 @@ export class Messages extends APIResource {
4444
search(
4545
query: MessageSearchParams | null | undefined = {},
4646
options?: RequestOptions,
47-
): PagePromise<MessagesBeeperCursor, Shared.Message> {
48-
return this._client.getAPIList('/v0/search-messages', BeeperCursor<Shared.Message>, {
49-
query,
50-
...options,
51-
});
47+
): PagePromise<MessagesCursor, Shared.Message> {
48+
return this._client.getAPIList('/v0/search-messages', Cursor<Shared.Message>, { query, ...options });
5249
}
5350

5451
/**
@@ -110,7 +107,7 @@ export interface MessageGetAttachmentParams {
110107
messageID: string;
111108
}
112109

113-
export interface MessageSearchParams extends BeeperCursorParams {
110+
export interface MessageSearchParams extends CursorParams {
114111
/**
115112
* Limit search to specific Beeper account IDs (bridge instances).
116113
*/
@@ -217,4 +214,4 @@ export declare namespace Messages {
217214
};
218215
}
219216

220-
export { type MessagesBeeperCursor };
217+
export { type MessagesCursor };

src/resources/shared.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
import * as Shared from './shared';
4-
import { BeeperCursor } from '../core/pagination';
4+
import { Cursor } from '../core/pagination';
55

66
/**
77
* A chat account added to Beeper
@@ -358,6 +358,6 @@ export interface User {
358358
username?: string;
359359
}
360360

361-
export type ChatsBeeperCursor = BeeperCursor<Chat>;
361+
export type ChatsCursor = Cursor<Chat>;
362362

363-
export type MessagesBeeperCursor = BeeperCursor<Message>;
363+
export type MessagesCursor = Cursor<Message>;

0 commit comments

Comments
 (0)