New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@deepgram/sdk

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@deepgram/sdk - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

dist/types/projectPatchResponse.d.ts

47

CHANGELOG.md

@@ -12,2 +12,46 @@ # Changelog

## [1.0.2]
### Added
- `deepgram.projects.update` will now update a project
- Prerecorded transcription responses now include utterances
### Updated
- The project type has been modified to the following:
```ts
{
project_id: string;
name?: string;
company?: string;
};
```
- The key type has been modified to the following:
```ts
{
api_key_id: string;
key?: string;
comment: string;
created: string;
scopes: Array<string>;
};
```
- The usage request type has been modified to the following:
```ts
{
request_id: string;
created: string;
path: string;
accessor: string;
response?: UsageRequestDetail | UsageRequestMessage;
callback?: UsageCallback;
};
```
## [1.0.0]

@@ -56,5 +100,6 @@

[unreleased]: https://github.com/deepgram/node-sdk/compare/1.0.0...HEAD
[unreleased]: https://github.com/deepgram/node-sdk/compare/1.0.2...HEAD
[1.0.2]: https://github.com/deepgram/node-sdk/compare/1.0.0...1.0.2
[1.0.0]: https://github.com/deepgram/node-sdk/compare/0.6.5...1.0.0
[0.6.5]: https://github.com/deepgram/node-sdk/compare/0.6.4...0.6.5
[0.6.4]: https://github.com/deepgram/node-sdk/compare/edc07b4...0.6.4

@@ -54,2 +54,3 @@ "use strict";

try {
console.log("content: " + dgResContent);
dgResponse = JSON.parse(dgResContent);

@@ -56,0 +57,0 @@ }

@@ -1,2 +0,2 @@

import { Project, ProjectResponse } from "./types";
import { Project, ProjectPatchResponse, ProjectResponse } from "./types";
export declare class Projects {

@@ -16,2 +16,7 @@ private _credentials;

get(projectId: string): Promise<Project>;
/**
* Update a specific project
* @param project project to update
*/
update(project: Project): Promise<ProjectPatchResponse>;
}

@@ -68,2 +68,13 @@ "use strict";

};
/**
* Update a specific project
* @param project project to update
*/
Projects.prototype.update = function (project) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, httpRequest_1._request("PATCH", this._credentials, this._apiUrl, this.apiPath + "/" + project.project_id)];
});
});
};
return Projects;

@@ -70,0 +81,0 @@ }());

@@ -12,2 +12,3 @@ export * from "./channel";

export * from "./project";
export * from "./projectPatchResponse";
export * from "./projectResponse";

@@ -26,2 +27,3 @@ export * from "./search";

export * from "./usageResponseDetail";
export * from "./utterance";
export * from "./wordBase";

@@ -24,2 +24,3 @@ "use strict";

__exportStar(require("./project"), exports);
__exportStar(require("./projectPatchResponse"), exports);
__exportStar(require("./projectResponse"), exports);

@@ -38,3 +39,4 @@ __exportStar(require("./search"), exports);

__exportStar(require("./usageResponseDetail"), exports);
__exportStar(require("./utterance"), exports);
__exportStar(require("./wordBase"), exports);
//# sourceMappingURL=index.js.map

4

dist/types/key.d.ts

@@ -8,3 +8,3 @@ /**

*/
id: string;
api_key_id: string;
/**

@@ -21,3 +21,3 @@ * API key to send in API requests (Only displayed when first created)

*/
created: Date;
created: string;
/**

@@ -24,0 +24,0 @@ * Array of scopes assigned to the key

import { Metadata } from "./metadata";
import { Channel } from "./channel";
import { Utterance } from "./utterance";
export declare type PrerecordedTranscriptionResponse = {

@@ -8,3 +9,4 @@ request_id?: string;

channels: Array<Channel>;
utterances?: Array<Utterance>;
};
};

@@ -8,7 +8,11 @@ /**

*/
id: string;
project_id: string;
/**
* User provided name of the project
*/
name: string;
name?: string;
/**
* Name of the company associated with the project. Optional.
*/
company?: string;
};

@@ -5,3 +5,3 @@ import { UsageCallback } from "./usageCallback";

export declare type UsageRequest = {
id: string;
request_id: string;
created: string;

@@ -8,0 +8,0 @@ path: string;

{
"name": "@deepgram/sdk",
"version": "1.0.1",
"version": "1.0.2",
"description": "An SDK for the Deepgram automated speech recognition platform",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -197,2 +197,58 @@ # Deepgram Node.js SDK

#### Prerecorded Transcription Response
```ts
{
request_id?: string;
metadata?: {
request_id: string;
transaction_key: string;
sha256: string;
created: string;
duration: number;
channels: number;
};
results?: {
channels: Array<{
search?: Array<{
query: string;
hits: Array<{
confidence: number;
start: number;
end: number;
snippet: string;
}>;
}>;
alternatives: Array<{
transcript: string;
confidence: number;
words: Array<{
word: string;
start: number;
end: number;
confidence: number;
punctuated_word?: string;
}>;
}>;
}>;
utterances?: Array<{
start: number;
end: number;
confidence: number;
channel: number;
transcript: string;
words: Array<{
word: string;
start: number;
end: number;
confidence: number;
punctuated_word?: string;
}>;
speaker?: number;
id: string;
}>;
};
};
```
### Live Transcription

@@ -382,48 +438,34 @@

### Transcription Response
#### Live Transcription Response
```js
```ts
{
"metadata": {
"request_id": "string",
"transaction_key": "string",
"sha256": "string",
"created": "string",
"duration": 0,
"channels": 0
},
"results": {
"channels": [
{
"search": [
{
"query": "string",
"hits": [
{
"confidence": 0,
"start": 0,
"end": 0,
"snippet": "string"
}
]
}
],
"alternatives": [
{
"transcript": "string",
"confidence": 0,
"words": [
{
"word": "string",
"start": 0,
"end": 0,
"confidence": 0
}
]
}
]
}
]
channel_index: Array<number>;
duration: number;
start: number;
is_final: boolean;
speech_final: boolean;
channel: {
search?: Array<{
query: string;
hits: Array<{
confidence: number;
start: number;
end: number;
snippet: string;
}>
}>,
alternatives: Array<{
transcript: string;
confidence: number;
words: Array<{
word: string;
start: number;
end: number;
confidence: number;
punctuated_word?: string;
}>
}>
}
}
};
```

@@ -471,2 +513,19 @@

### Update a Project
Updates a project based on a provided project object. This object must contain
`project_id` and `name` properties.
```js
const updateResponse = await deepgram.projects.update(project);
```
#### Update a Project Response
```ts
{
message: string;
}
```
## Key Management

@@ -486,7 +545,7 @@

{
keys: [
api_keys: [
{
id: string,
api_key_id: string,
comment: string,
created: Date,
created: string,
scopes: Array<string>

@@ -511,6 +570,6 @@ },

{
id: string,
api_key_id: string,
key: string,
comment: string,
created: Date,
created: string,
scopes: Array<string>

@@ -572,3 +631,3 @@ }

{
id: string;
request_id: string;
created: string;

@@ -632,3 +691,3 @@ path: string;

{
id: string;
request_id: string;
created: string;

@@ -635,0 +694,0 @@ path: string;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc