Skip to content

Commit

Permalink
Release 0.0.5-alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Aug 10, 2023
1 parent fa3ac35 commit ed14564
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 193 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.5-alpha.6",
"version": "0.0.5-alpha.7",
"private": false,
"repository": "https://github.com/vocodedev/vocode-api-node",
"main": "./index.js",
Expand Down
9 changes: 1 addition & 8 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ import { Actions } from "./api/resources/actions/client/Client";
import { Agents } from "./api/resources/agents/client/Client";
import { Voices } from "./api/resources/voices/client/Client";
import { Webhooks } from "./api/resources/webhooks/client/Client";
import { Payment } from "./api/resources/payment/client/Client";

export declare namespace VocodeClient {
interface Options {
environment: core.Supplier<string>;
token?: core.Supplier<core.BearerToken | undefined>;
token: core.Supplier<core.BearerToken>;
}
}

Expand Down Expand Up @@ -63,10 +62,4 @@ export class VocodeClient {
public get webhooks(): Webhooks {
return (this._webhooks ??= new Webhooks(this._options));
}

protected _payment: Payment | undefined;

public get payment(): Payment {
return (this._payment ??= new Payment(this._options));
}
}
17 changes: 6 additions & 11 deletions src/api/resources/actions/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import * as errors from "../../../../errors";
export declare namespace Actions {
interface Options {
environment: core.Supplier<string>;
token?: core.Supplier<core.BearerToken | undefined>;
token: core.Supplier<core.BearerToken>;
}
}

Expand All @@ -33,7 +33,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.5-alpha.6",
"X-Fern-SDK-Version": "0.0.5-alpha.7",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -103,7 +103,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.5-alpha.6",
"X-Fern-SDK-Version": "0.0.5-alpha.7",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -163,7 +163,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.5-alpha.6",
"X-Fern-SDK-Version": "0.0.5-alpha.7",
},
contentType: "application/json",
body: await serializers.CreateActionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -226,7 +226,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.5-alpha.6",
"X-Fern-SDK-Version": "0.0.5-alpha.7",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -277,11 +277,6 @@ export class Actions {
}

protected async _getAuthorizationHeader() {
const bearer = await core.Supplier.get(this._options.token);
if (bearer != null) {
return `Bearer ${bearer}`;
}

return undefined;
return `Bearer ${await core.Supplier.get(this._options.token)}`;
}
}
17 changes: 6 additions & 11 deletions src/api/resources/agents/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import * as errors from "../../../../errors";
export declare namespace Agents {
interface Options {
environment: core.Supplier<string>;
token?: core.Supplier<core.BearerToken | undefined>;
token: core.Supplier<core.BearerToken>;
}
}

Expand All @@ -33,7 +33,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.5-alpha.6",
"X-Fern-SDK-Version": "0.0.5-alpha.7",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -103,7 +103,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.5-alpha.6",
"X-Fern-SDK-Version": "0.0.5-alpha.7",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -163,7 +163,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.5-alpha.6",
"X-Fern-SDK-Version": "0.0.5-alpha.7",
},
contentType: "application/json",
body: await serializers.AgentParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -226,7 +226,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.5-alpha.6",
"X-Fern-SDK-Version": "0.0.5-alpha.7",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -277,11 +277,6 @@ export class Agents {
}

protected async _getAuthorizationHeader() {
const bearer = await core.Supplier.get(this._options.token);
if (bearer != null) {
return `Bearer ${bearer}`;
}

return undefined;
return `Bearer ${await core.Supplier.get(this._options.token)}`;
}
}
19 changes: 7 additions & 12 deletions src/api/resources/calls/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import * as errors from "../../../../errors";
export declare namespace Calls {
interface Options {
environment: core.Supplier<string>;
token?: core.Supplier<core.BearerToken | undefined>;
token: core.Supplier<core.BearerToken>;
}
}

Expand Down Expand Up @@ -43,7 +43,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.5-alpha.6",
"X-Fern-SDK-Version": "0.0.5-alpha.7",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -106,7 +106,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.5-alpha.6",
"X-Fern-SDK-Version": "0.0.5-alpha.7",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -169,7 +169,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.5-alpha.6",
"X-Fern-SDK-Version": "0.0.5-alpha.7",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -229,7 +229,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.5-alpha.6",
"X-Fern-SDK-Version": "0.0.5-alpha.7",
},
contentType: "application/json",
body: await serializers.CreateCallRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -292,7 +292,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.5-alpha.6",
"X-Fern-SDK-Version": "0.0.5-alpha.7",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -337,11 +337,6 @@ export class Calls {
}

protected async _getAuthorizationHeader() {
const bearer = await core.Supplier.get(this._options.token);
if (bearer != null) {
return `Bearer ${bearer}`;
}

return undefined;
return `Bearer ${await core.Supplier.get(this._options.token)}`;
}
}
1 change: 0 additions & 1 deletion src/api/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export * as actions from "./actions";
export * as agents from "./agents";
export * as voices from "./voices";
export * as webhooks from "./webhooks";
export * as payment from "./payment";
export * from "./numbers/client/requests";
export * from "./calls/client/requests";
export * from "./actions/client/requests";
Expand Down
19 changes: 7 additions & 12 deletions src/api/resources/numbers/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import * as errors from "../../../../errors";
export declare namespace Numbers {
interface Options {
environment: core.Supplier<string>;
token?: core.Supplier<core.BearerToken | undefined>;
token: core.Supplier<core.BearerToken>;
}
}

Expand Down Expand Up @@ -43,7 +43,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.5-alpha.6",
"X-Fern-SDK-Version": "0.0.5-alpha.7",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -106,7 +106,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.5-alpha.6",
"X-Fern-SDK-Version": "0.0.5-alpha.7",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -163,7 +163,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.5-alpha.6",
"X-Fern-SDK-Version": "0.0.5-alpha.7",
},
contentType: "application/json",
timeoutMs: 60000,
Expand Down Expand Up @@ -213,7 +213,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.5-alpha.6",
"X-Fern-SDK-Version": "0.0.5-alpha.7",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -277,7 +277,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.5-alpha.6",
"X-Fern-SDK-Version": "0.0.5-alpha.7",
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -327,11 +327,6 @@ export class Numbers {
}

protected async _getAuthorizationHeader() {
const bearer = await core.Supplier.get(this._options.token);
if (bearer != null) {
return `Bearer ${bearer}`;
}

return undefined;
return `Bearer ${await core.Supplier.get(this._options.token)}`;
}
}
105 changes: 0 additions & 105 deletions src/api/resources/payment/client/Client.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/api/resources/payment/client/index.ts

This file was deleted.

Loading

0 comments on commit ed14564

Please sign in to comment.