Skip to content

Commit eb1a5fa

Browse files
committed
Replace all Buffer with Uint8Array
1 parent fb5785c commit eb1a5fa

File tree

9 files changed

+617
-590
lines changed

9 files changed

+617
-590
lines changed

packages/core/src/paths/Restapi/Account/Extension/Greeting/Content/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ class Index {
2929
public async get(
3030
queryParams?: ReadGreetingContentParameters,
3131
restRequestConfig?: RestRequestConfig,
32-
): Promise<Buffer> {
33-
const r = await this.rc.get<Buffer>(this.path(), queryParams, {
32+
): Promise<Uint8Array> {
33+
const r = await this.rc.get<Uint8Array>(this.path(), queryParams, {
3434
...restRequestConfig,
3535
responseType: "arraybuffer",
3636
});

packages/core/src/paths/Restapi/Account/Extension/MessageStore/Content/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ class Index {
3939
public async get(
4040
queryParams?: ReadMessageContentParameters,
4141
restRequestConfig?: RestRequestConfig,
42-
): Promise<Buffer> {
42+
): Promise<Uint8Array> {
4343
if (this.attachmentId === null) {
4444
throw new Error("attachmentId must be specified.");
4545
}
46-
const r = await this.rc.get<Buffer>(this.path(), queryParams, {
46+
const r = await this.rc.get<Uint8Array>(this.path(), queryParams, {
4747
...restRequestConfig,
4848
responseType: "arraybuffer",
4949
});

packages/core/src/paths/Restapi/Account/Extension/ProfileImage/index.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ class Index {
3636
* App Permission: ReadAccounts
3737
* User Permission: ReadExtensions
3838
*/
39-
public async list(restRequestConfig?: RestRequestConfig): Promise<Buffer> {
40-
const r = await this.rc.get<Buffer>(this.path(false), undefined, {
39+
public async list(
40+
restRequestConfig?: RestRequestConfig,
41+
): Promise<Uint8Array> {
42+
const r = await this.rc.get<Uint8Array>(this.path(false), undefined, {
4143
...restRequestConfig,
4244
responseType: "arraybuffer",
4345
});
@@ -122,11 +124,11 @@ class Index {
122124
public async get(
123125
queryParams?: ReadScaledProfileImageParameters,
124126
restRequestConfig?: RestRequestConfig,
125-
): Promise<Buffer> {
127+
): Promise<Uint8Array> {
126128
if (this.scaleSize === null) {
127129
throw new Error("scaleSize must be specified.");
128130
}
129-
const r = await this.rc.get<Buffer>(this.path(), queryParams, {
131+
const r = await this.rc.get<Uint8Array>(this.path(), queryParams, {
130132
...restRequestConfig,
131133
responseType: "arraybuffer",
132134
});

packages/core/src/paths/Restapi/Account/Greeting/Content/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ class Index {
2929
public async get(
3030
queryParams?: ReadAccountGreetingContentParameters,
3131
restRequestConfig?: RestRequestConfig,
32-
): Promise<Buffer> {
33-
const r = await this.rc.get<Buffer>(this.path(), queryParams, {
32+
): Promise<Uint8Array> {
33+
const r = await this.rc.get<Uint8Array>(this.path(), queryParams, {
3434
...restRequestConfig,
3535
responseType: "arraybuffer",
3636
});

packages/core/src/paths/Restapi/Account/IvrPrompts/Content/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ class Index {
2929
public async get(
3030
queryParams?: ReadIVRPromptContentParameters,
3131
restRequestConfig?: RestRequestConfig,
32-
): Promise<Buffer> {
33-
const r = await this.rc.get<Buffer>(this.path(), queryParams, {
32+
): Promise<Uint8Array> {
33+
const r = await this.rc.get<Uint8Array>(this.path(), queryParams, {
3434
...restRequestConfig,
3535
responseType: "arraybuffer",
3636
});

packages/core/src/paths/Restapi/Account/Recording/Content/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ class Index {
2929
public async get(
3030
queryParams?: ReadCallRecordingContentParameters,
3131
restRequestConfig?: RestRequestConfig,
32-
): Promise<Buffer> {
33-
const r = await this.rc.get<Buffer>(this.path(), queryParams, {
32+
): Promise<Uint8Array> {
33+
const r = await this.rc.get<Uint8Array>(this.path(), queryParams, {
3434
...restRequestConfig,
3535
responseType: "arraybuffer",
3636
});

0 commit comments

Comments
 (0)