Skip to content

Commit

Permalink
Release 0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Jul 18, 2023
1 parent de34843 commit f8fd8e9
Show file tree
Hide file tree
Showing 297 changed files with 6,796 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: ci

on: [push]

jobs:
compile:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Set up node
uses: actions/setup-node@v3

- name: Compile
run: yarn && yarn build

publish:
needs: [ compile ]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Set up node
uses: actions/setup-node@v3

- name: Install dependencies
run: yarn install

- name: Build
run: yarn build

- name: Publish to npm
run: |
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
npm publish --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
node_modules
.DS_Store
/dist
/Client.d.ts
/Client.js
/index.d.ts
/index.js
/api
/core
/errors
/serialization
8 changes: 8 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
src
.gitignore
.github
.fernignore
.prettierrc.yml
tsconfig.json
yarn.lock
2 changes: 2 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tabWidth: 4
printWidth: 120
25 changes: 25 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "@fern-api/vocode",
"version": "0.0.3",
"private": false,
"repository": "https://github.com/fern-vocode/vocode-node",
"main": "./index.js",
"types": "./index.d.ts",
"scripts": {
"format": "prettier --write 'src/**/*.ts'",
"build": "tsc",
"prepack": "cp -rv dist/. ."
},
"dependencies": {
"url-join": "4.0.1",
"@types/url-join": "4.0.1",
"@ungap/url-search-params": "0.2.2",
"axios": "1.4.0",
"js-base64": "3.7.2"
},
"devDependencies": {
"@types/node": "17.0.33",
"prettier": "2.7.1",
"typescript": "4.6.4"
}
}
65 changes: 65 additions & 0 deletions src/Client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

import * as core from "./core";
import { Numbers } from "./api/resources/numbers/client/Client";
import { Calls } from "./api/resources/calls/client/Client";
import { Usage } from "./api/resources/usage/client/Client";
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";

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

export class VocodeClient {
constructor(protected readonly _options: VocodeClient.Options) {}

protected _numbers: Numbers | undefined;

public get numbers(): Numbers {
return (this._numbers ??= new Numbers(this._options));
}

protected _calls: Calls | undefined;

public get calls(): Calls {
return (this._calls ??= new Calls(this._options));
}

protected _usage: Usage | undefined;

public get usage(): Usage {
return (this._usage ??= new Usage(this._options));
}

protected _actions: Actions | undefined;

public get actions(): Actions {
return (this._actions ??= new Actions(this._options));
}

protected _agents: Agents | undefined;

public get agents(): Agents {
return (this._agents ??= new Agents(this._options));
}

protected _voices: Voices | undefined;

public get voices(): Voices {
return (this._voices ??= new Voices(this._options));
}

protected _webhooks: Webhooks | undefined;

public get webhooks(): Webhooks {
return (this._webhooks ??= new Webhooks(this._options));
}
}
16 changes: 16 additions & 0 deletions src/api/errors/UnprocessableEntityError.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

import * as errors from "../../errors";
import * as Vocode from "..";

export class UnprocessableEntityError extends errors.VocodeError {
constructor(body: Vocode.HttpValidationError) {
super({
statusCode: 422,
body: body,
});
Object.setPrototypeOf(this, UnprocessableEntityError.prototype);
}
}
1 change: 1 addition & 0 deletions src/api/errors/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./UnprocessableEntityError";
3 changes: 3 additions & 0 deletions src/api/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from "./types";
export * from "./errors";
export * from "./resources";
Loading

0 comments on commit f8fd8e9

Please sign in to comment.