cv-contracts 0.0.5 → 0.0.6

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.
Files changed (2) hide show
  1. package/README.md +40 -0
  2. 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
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cv-contracts",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Carbon Voice Contracts",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",