@or-sdk/transcripts 1.2.0 → 1.2.1-beta.4013.0
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.
|
@@ -2,76 +2,16 @@ import { Base } from '@or-sdk/base';
|
|
|
2
2
|
import { CreateOptions, FindAllOptions, Transcription, TranscriptsConfig, ConvertResult, GenerateDataOptions, UpdateGptAnalyses } from './types';
|
|
3
3
|
export declare class Transcripts extends Base {
|
|
4
4
|
constructor(params: TranscriptsConfig);
|
|
5
|
-
/**
|
|
6
|
-
* Create transcript item, only for SERVICE TOKEN with SUPER ADMIN
|
|
7
|
-
* @param sessionId - uuid of transcription session id
|
|
8
|
-
* @param audioUrl - url string to audio file
|
|
9
|
-
* @param transcriptionUrl - url string to transcription file
|
|
10
|
-
* @param clientPhone - string which represents phone number '1234567890' without empty spaces or other symbols
|
|
11
|
-
* @param orPhone - string which represents phone number '1234567890' without empty spaces or other symbols
|
|
12
|
-
* @param createdAt - timestamp number when record was created
|
|
13
|
-
* @param metadata - optional object meta values
|
|
14
|
-
* @param processing - optional object with processing options
|
|
15
|
-
* @param processing.keywords - boolean, should chatGpt analyze keywords
|
|
16
|
-
* @param processing.sentiments - boolean, should chatGpt analyze sentiments
|
|
17
|
-
* @param processing.summary - boolean, should chatGpt analyze summary
|
|
18
|
-
*/
|
|
19
5
|
createTranscript({ sessionId, audioUrl, transcriptionUrl, clientPhone, orPhone, createdAt, processing, metadata, }: CreateOptions): Promise<void>;
|
|
20
|
-
/**
|
|
21
|
-
* Get one transcript
|
|
22
|
-
* @param sessionId - uuid of transcription session id
|
|
23
|
-
* @return Transcription item
|
|
24
|
-
*/
|
|
25
6
|
findOneTranscript(sessionId: string): Promise<Transcription>;
|
|
26
|
-
/**
|
|
27
|
-
* Get all transcripts
|
|
28
|
-
* @param take - number of how many items should be return (default 20)
|
|
29
|
-
* @param skip - number of how many items should be skipped (default 0)
|
|
30
|
-
* @param keywords - string of keywords to search without comas, example: 'toyota May Apple Paris balance'
|
|
31
|
-
* @param summary - string of summary words to search without comas, example: 'call help received'
|
|
32
|
-
* @param clientPhones - array of string of client`s phone numbers
|
|
33
|
-
* @param orPhones - array of string of or service phone numbers
|
|
34
|
-
* @param createdFrom - timestamp of the searching start range day
|
|
35
|
-
* @param createdTo - timestamp of the searching end range day
|
|
36
|
-
* @param search - string, will do search in sessionId, keywords and summary
|
|
37
|
-
* @param sentiments - array of numbers, will match overall sentiments of the talk
|
|
38
|
-
* @param minDuration - number in milliseconds, minimum duration of audio
|
|
39
|
-
* @param order - enum, order of sorting
|
|
40
|
-
* @param sorting - enum, props to sort
|
|
41
|
-
* @return Array of Transcription items
|
|
42
|
-
*/
|
|
43
7
|
findAllTranscripts({ take, skip, keywords, summary, clientPhones, orPhones, createdFrom, createdTo, search, sentiments, minDuration, order, sorting, }: FindAllOptions): Promise<{
|
|
44
8
|
items: Transcription[];
|
|
45
9
|
total: number;
|
|
46
10
|
}>;
|
|
47
|
-
/**
|
|
48
|
-
* Get transformed json transcription
|
|
49
|
-
* @param sessionId - uuid of transcription session id
|
|
50
|
-
* @return ConvertResult object
|
|
51
|
-
*/
|
|
52
11
|
getTranscription(sessionId: string): Promise<ConvertResult>;
|
|
53
|
-
/**
|
|
54
|
-
* update json transcription
|
|
55
|
-
* @param sessionId - uuid of transcription session id
|
|
56
|
-
* @param value - object to be saved
|
|
57
|
-
*/
|
|
58
12
|
updateTranscription(sessionId: string, value: ConvertResult): Promise<void>;
|
|
59
|
-
/**
|
|
60
|
-
* Get all clients phone numbers
|
|
61
|
-
* @return Array of phone numbers
|
|
62
|
-
*/
|
|
63
13
|
getClientPhones(): Promise<string[]>;
|
|
64
|
-
/**
|
|
65
|
-
* Get all service phone numbers
|
|
66
|
-
* @return Array of phone numbers
|
|
67
|
-
*/
|
|
68
14
|
getServicePhones(): Promise<string[]>;
|
|
69
|
-
/**
|
|
70
|
-
* Generate specific data for transcription using chatGPT
|
|
71
|
-
* @param sessionId - uuid of transcription session id
|
|
72
|
-
* @param processing - object with properties which should be updated
|
|
73
|
-
* @return UpdateGptAnalyses - object with updated data
|
|
74
|
-
*/
|
|
75
15
|
generateData({ sessionId, processing }: GenerateDataOptions): Promise<UpdateGptAnalyses>;
|
|
76
16
|
}
|
|
77
17
|
//# sourceMappingURL=Transcripts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transcripts.d.ts","sourceRoot":"","sources":["../../src/Transcripts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,EACL,aAAa,EACb,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EAAE,iBAAiB,EACvC,MAAM,SAAS,CAAC;AAEjB,qBAAa,WAAY,SAAQ,IAAI;gBACvB,MAAM,EAAE,iBAAiB;
|
|
1
|
+
{"version":3,"file":"Transcripts.d.ts","sourceRoot":"","sources":["../../src/Transcripts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,EACL,aAAa,EACb,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EAAE,iBAAiB,EACvC,MAAM,SAAS,CAAC;AAEjB,qBAAa,WAAY,SAAQ,IAAI;gBACvB,MAAM,EAAE,iBAAiB;IA2B/B,gBAAgB,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,WAAW,EACX,OAAO,EACP,SAAS,EACT,UAAU,EACV,QAAQ,GACT,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAsB1B,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAyB5D,kBAAkB,CAAC,EACvB,IAAS,EACT,IAAQ,EACR,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,SAAS,EACT,MAAM,EACN,UAAU,EACV,WAAW,EACX,KAAK,EACL,OAAO,GACR,EAAE,cAAc,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,aAAa,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;KAAE,CAAC;IA2BjE,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAe3D,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAe3E,eAAe,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAWpC,gBAAgB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAarC,YAAY,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,mBAAmB,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAU/F"}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
import { Token } from '@or-sdk/base';
|
|
2
2
|
export type TranscriptsConfig = {
|
|
3
|
-
/**
|
|
4
|
-
* token
|
|
5
|
-
*/
|
|
6
3
|
token: Token;
|
|
7
|
-
/**
|
|
8
|
-
* Direct service url, can be used to avoid discovery api call
|
|
9
|
-
*/
|
|
10
4
|
transcriptsApiUrl?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Account ID for cross-account requests (super admin only)
|
|
13
|
-
*/
|
|
14
5
|
accountId?: string;
|
|
15
|
-
/**
|
|
16
|
-
* function which return token
|
|
17
|
-
*/
|
|
18
6
|
discoveryUrl?: string;
|
|
19
7
|
};
|
|
20
8
|
export type Transcription = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,MAAM,MAAM,iBAAiB,GAAG;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[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OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,QAAQ,EAAE,WAAW,EAAE,CAAC;CACzB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@or-sdk/transcripts",
|
|
3
|
-
"version": "1.2.0",
|
|
3
|
+
"version": "1.2.1-beta.4013.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"dev": "pnpm build:watch:esm"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@or-sdk/base": "^0.
|
|
21
|
+
"@or-sdk/base": "^0.44.0-beta.4013.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"concurrently": "9.0.1",
|
|
@@ -26,6 +26,5 @@
|
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|
|
29
|
-
}
|
|
30
|
-
"gitHead": "ce62679c119c54ef41fd0d8f7084c563c3b21b24"
|
|
29
|
+
}
|
|
31
30
|
}
|