cv-contracts 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -0
- package/dist/interfaces/WorkspaceUserAdded.d.ts +6 -0
- package/dist/interfaces/WorkspaceUserAdded.js +3 -0
- package/dist/interfaces/WorkspaceUserAdded.js.map +1 -0
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.js +1 -0
- package/dist/interfaces/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1 +1,41 @@
|
|
|
1
1
|
# cv-contracts
|
|
2
|
+
|
|
3
|
+
## Project Overview
|
|
4
|
+
This repository contains a collection of TypeScript interfaces and enums that are used to model various entities and events with [Carbon Voice API](https://api.carbonvoice.app/v2/docs/#/). These entities include users, channels, workspaces, and messages, among others.
|
|
5
|
+
|
|
6
|
+
The primary idea is to have a centralized place for webhook communication with [Carbon Voice API](https://api.carbonvoice.app/v2/docs/#/)
|
|
7
|
+
|
|
8
|
+
## Usage example:
|
|
9
|
+
## Install library
|
|
10
|
+
```bash
|
|
11
|
+
npm i cv-contracts
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Import respective contract
|
|
15
|
+
```ts
|
|
16
|
+
import { Message } from 'cv-contracts';
|
|
17
|
+
|
|
18
|
+
const msg: Message = {
|
|
19
|
+
message_guid: string;
|
|
20
|
+
creator_guid: string;
|
|
21
|
+
channel_guid?: string | null;
|
|
22
|
+
workspace_guid?: string | null;
|
|
23
|
+
creator_first_name: string;
|
|
24
|
+
creator_last_name: string;
|
|
25
|
+
created_at: number;
|
|
26
|
+
last_updated_at: number;
|
|
27
|
+
deleted_at?: number | null;
|
|
28
|
+
duration_ms: number;
|
|
29
|
+
message_url?: string | null;
|
|
30
|
+
audio_stream_url?: string | null;
|
|
31
|
+
transcript_txt?: string | null;
|
|
32
|
+
ai_summary_txt?: string | null;
|
|
33
|
+
has_ai_summary?: boolean;
|
|
34
|
+
waveform_url?: string | null;
|
|
35
|
+
reply_count: number;
|
|
36
|
+
parent_message_guid?: string | null;
|
|
37
|
+
language?: string | null;
|
|
38
|
+
status: MessageStatus;
|
|
39
|
+
type: MessageType;
|
|
40
|
+
}
|
|
41
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkspaceUserAdded.js","sourceRoot":"","sources":["../../src/interfaces/WorkspaceUserAdded.ts"],"names":[],"mappings":""}
|
|
@@ -10,6 +10,7 @@ export * from './SubscribedUserSettings';
|
|
|
10
10
|
export * from './WebhookPayload';
|
|
11
11
|
export * from './Workspace';
|
|
12
12
|
export * from './WorkspaceFindableChannelCreated';
|
|
13
|
+
export * from './WorkspaceUserAdded';
|
|
13
14
|
export * from './WorkspaceUserJoined';
|
|
14
15
|
export * from './WorkspaceUserLeft';
|
|
15
16
|
export * from './WorkspaceUserRemoved';
|
package/dist/interfaces/index.js
CHANGED
|
@@ -26,6 +26,7 @@ __exportStar(require("./SubscribedUserSettings"), exports);
|
|
|
26
26
|
__exportStar(require("./WebhookPayload"), exports);
|
|
27
27
|
__exportStar(require("./Workspace"), exports);
|
|
28
28
|
__exportStar(require("./WorkspaceFindableChannelCreated"), exports);
|
|
29
|
+
__exportStar(require("./WorkspaceUserAdded"), exports);
|
|
29
30
|
__exportStar(require("./WorkspaceUserJoined"), exports);
|
|
30
31
|
__exportStar(require("./WorkspaceUserLeft"), exports);
|
|
31
32
|
__exportStar(require("./WorkspaceUserRemoved"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,8CAA4B;AAC5B,4CAA0B;AAC1B,sDAAoC;AACpC,oDAAkC;AAClC,uDAAqC;AACrC,sDAAoC;AACpC,4CAA0B;AAC1B,2DAAyC;AACzC,mDAAiC;AACjC,8CAA4B;AAC5B,oEAAkD;AAClD,wDAAsC;AACtC,sDAAoC;AACpC,yDAAuC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,8CAA4B;AAC5B,4CAA0B;AAC1B,sDAAoC;AACpC,oDAAkC;AAClC,uDAAqC;AACrC,sDAAoC;AACpC,4CAA0B;AAC1B,2DAAyC;AACzC,mDAAiC;AACjC,8CAA4B;AAC5B,oEAAkD;AAClD,uDAAqC;AACrC,wDAAsC;AACtC,sDAAoC;AACpC,yDAAuC"}
|