Skip to content

Commit

Permalink
Release 0.0.46
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Apr 19, 2024
1 parent 21bef4f commit 12c5d9f
Show file tree
Hide file tree
Showing 49 changed files with 385 additions and 45 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vocode/vocode-api",
"version": "0.0.45",
"version": "0.0.46",
"private": false,
"repository": "https://github.com/vocodedev/vocode-api-node",
"main": "./index.js",
Expand Down
74 changes: 69 additions & 5 deletions src/api/resources/accountConnections/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class AccountConnections {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -122,7 +122,7 @@ export class AccountConnections {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -187,7 +187,7 @@ export class AccountConnections {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
body: await serializers.AccountConnectionParamsRequest.jsonOrThrow(request, {
Expand Down Expand Up @@ -257,7 +257,7 @@ export class AccountConnections {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -326,7 +326,7 @@ export class AccountConnections {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -371,6 +371,70 @@ export class AccountConnections {
}
}

/**
* @throws {@link Vocode.UnprocessableEntityError}
*/
public async removeFromSteeringPool(request: Vocode.RemoveFromSteeringPoolRequest): Promise<unknown> {
const { id, ..._body } = request;
const _queryParams = new URLSearchParams();
_queryParams.append("id", id);
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.VocodeEnvironment.Production,
"v1/account_connections/remove_from_steering_pool"
),
method: "POST",
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
body: await serializers.RemoveFromSteeringPoolRequest.jsonOrThrow(_body, {
unrecognizedObjectKeys: "strip",
}),
timeoutMs: 60000,
});
if (_response.ok) {
return _response.body;
}

if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 422:
throw new Vocode.UnprocessableEntityError(
await serializers.HttpValidationError.parseOrThrow(_response.error.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
breadcrumbsPrefix: ["response"],
})
);
default:
throw new errors.VocodeError({
statusCode: _response.error.statusCode,
body: _response.error.body,
});
}
}

switch (_response.error.reason) {
case "non-json":
throw new errors.VocodeError({
statusCode: _response.error.statusCode,
body: _response.error.rawBody,
});
case "timeout":
throw new errors.VocodeTimeoutError();
case "unknown":
throw new errors.VocodeError({
message: _response.error.errorMessage,
});
}
}

protected async _getAuthorizationHeader() {
return `Bearer ${await core.Supplier.get(this._options.token)}`;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

export interface AddToSteeringPoolRequest {
id: string;
phoneNumber?: string;
phoneNumber: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

export interface RemoveFromSteeringPoolRequest {
id: string;
phoneNumber: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export { GetAccountConnectionRequest } from "./GetAccountConnectionRequest";
export { ListAccountConnectionsRequest } from "./ListAccountConnectionsRequest";
export { UpdateAccountConnectionRequest } from "./UpdateAccountConnectionRequest";
export { AddToSteeringPoolRequest } from "./AddToSteeringPoolRequest";
export { RemoveFromSteeringPoolRequest } from "./RemoveFromSteeringPoolRequest";
8 changes: 4 additions & 4 deletions src/api/resources/actions/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class Actions {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -118,7 +118,7 @@ export class Actions {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -181,7 +181,7 @@ export class Actions {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
body: await serializers.ActionParamsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -247,7 +247,7 @@ export class Actions {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down
8 changes: 4 additions & 4 deletions src/api/resources/agents/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class Agents {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -118,7 +118,7 @@ export class Agents {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -181,7 +181,7 @@ export class Agents {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
body: await serializers.AgentParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -247,7 +247,7 @@ export class Agents {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down
10 changes: 5 additions & 5 deletions src/api/resources/calls/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class Calls {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -122,7 +122,7 @@ export class Calls {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -188,7 +188,7 @@ export class Calls {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -251,7 +251,7 @@ export class Calls {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
body: await serializers.CreateCallRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -314,7 +314,7 @@ export class Calls {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
queryParameters: _queryParams,
timeoutMs: 60000,
Expand Down
12 changes: 6 additions & 6 deletions src/api/resources/numbers/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class Numbers {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -121,7 +121,7 @@ export class Numbers {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -184,7 +184,7 @@ export class Numbers {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
body: await serializers.BuyPhoneNumberRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -250,7 +250,7 @@ export class Numbers {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -317,7 +317,7 @@ export class Numbers {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -380,7 +380,7 @@ export class Numbers {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
body: await serializers.LinkPhoneNumberRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down
8 changes: 4 additions & 4 deletions src/api/resources/prompts/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class Prompts {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -118,7 +118,7 @@ export class Prompts {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -181,7 +181,7 @@ export class Prompts {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
body: await serializers.PromptParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -247,7 +247,7 @@ export class Prompts {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down
2 changes: 1 addition & 1 deletion src/api/resources/usage/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class Usage {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
timeoutMs: 60000,
Expand Down
8 changes: 4 additions & 4 deletions src/api/resources/vectorDatabases/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class VectorDatabases {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -120,7 +120,7 @@ export class VectorDatabases {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -185,7 +185,7 @@ export class VectorDatabases {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
body: await serializers.PineconeVectorDatabaseParams.jsonOrThrow(request, {
Expand Down Expand Up @@ -255,7 +255,7 @@ export class VectorDatabases {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@vocode/vocode-api",
"X-Fern-SDK-Version": "0.0.45",
"X-Fern-SDK-Version": "0.0.46",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down
Loading

0 comments on commit 12c5d9f

Please sign in to comment.