@activepieces/piece-assemblyai 1.1.6 → 1.1.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/package.json +7 -23
- package/src/index.js +51 -35
- package/src/index.d.ts +0 -2
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/custom-api-call.d.ts +0 -13
- package/src/lib/actions/custom-api-call.d.ts.map +0 -1
- package/src/lib/actions/custom-api-call.js +0 -16
- package/src/lib/actions/custom-api-call.js.map +0 -1
- package/src/lib/actions/files/index.d.ts +0 -2
- package/src/lib/actions/files/index.d.ts.map +0 -1
- package/src/lib/actions/files/index.js +0 -6
- package/src/lib/actions/files/index.js.map +0 -1
- package/src/lib/actions/files/upload.d.ts +0 -4
- package/src/lib/actions/files/upload.d.ts.map +0 -1
- package/src/lib/actions/files/upload.js +0 -34
- package/src/lib/actions/files/upload.js.map +0 -1
- package/src/lib/actions/index.d.ts +0 -5
- package/src/lib/actions/index.d.ts.map +0 -1
- package/src/lib/actions/index.js +0 -22
- package/src/lib/actions/index.js.map +0 -1
- package/src/lib/actions/lemur/get-lemur-response.d.ts +0 -4
- package/src/lib/actions/lemur/get-lemur-response.d.ts.map +0 -1
- package/src/lib/actions/lemur/get-lemur-response.js +0 -31
- package/src/lib/actions/lemur/get-lemur-response.js.map +0 -1
- package/src/lib/actions/lemur/index.d.ts +0 -4
- package/src/lib/actions/lemur/index.d.ts.map +0 -1
- package/src/lib/actions/lemur/index.js +0 -10
- package/src/lib/actions/lemur/index.js.map +0 -1
- package/src/lib/actions/lemur/lemur-task.d.ts +0 -10
- package/src/lib/actions/lemur/lemur-task.d.ts.map +0 -1
- package/src/lib/actions/lemur/lemur-task.js +0 -32
- package/src/lib/actions/lemur/lemur-task.js.map +0 -1
- package/src/lib/actions/lemur/purge-lemur-request-data.d.ts +0 -4
- package/src/lib/actions/lemur/purge-lemur-request-data.d.ts.map +0 -1
- package/src/lib/actions/lemur/purge-lemur-request-data.js +0 -32
- package/src/lib/actions/lemur/purge-lemur-request-data.js.map +0 -1
- package/src/lib/actions/lemur/shared-props.d.ts +0 -2
- package/src/lib/actions/lemur/shared-props.d.ts.map +0 -1
- package/src/lib/actions/lemur/shared-props.js +0 -10
- package/src/lib/actions/lemur/shared-props.js.map +0 -1
- package/src/lib/actions/transcripts/delete-transcript.d.ts +0 -4
- package/src/lib/actions/transcripts/delete-transcript.d.ts.map +0 -1
- package/src/lib/actions/transcripts/delete-transcript.js +0 -31
- package/src/lib/actions/transcripts/delete-transcript.js.map +0 -1
- package/src/lib/actions/transcripts/get-paragraphs.d.ts +0 -4
- package/src/lib/actions/transcripts/get-paragraphs.d.ts.map +0 -1
- package/src/lib/actions/transcripts/get-paragraphs.js +0 -31
- package/src/lib/actions/transcripts/get-paragraphs.js.map +0 -1
- package/src/lib/actions/transcripts/get-redacted-audio.d.ts +0 -6
- package/src/lib/actions/transcripts/get-redacted-audio.d.ts.map +0 -1
- package/src/lib/actions/transcripts/get-redacted-audio.js +0 -53
- package/src/lib/actions/transcripts/get-redacted-audio.js.map +0 -1
- package/src/lib/actions/transcripts/get-sentences.d.ts +0 -4
- package/src/lib/actions/transcripts/get-sentences.d.ts.map +0 -1
- package/src/lib/actions/transcripts/get-sentences.js +0 -31
- package/src/lib/actions/transcripts/get-sentences.js.map +0 -1
- package/src/lib/actions/transcripts/get-subtitles.d.ts +0 -6
- package/src/lib/actions/transcripts/get-subtitles.d.ts.map +0 -1
- package/src/lib/actions/transcripts/get-subtitles.js +0 -55
- package/src/lib/actions/transcripts/get-subtitles.js.map +0 -1
- package/src/lib/actions/transcripts/get-transcript.d.ts +0 -4
- package/src/lib/actions/transcripts/get-transcript.d.ts.map +0 -1
- package/src/lib/actions/transcripts/get-transcript.js +0 -31
- package/src/lib/actions/transcripts/get-transcript.js.map +0 -1
- package/src/lib/actions/transcripts/index.d.ts +0 -10
- package/src/lib/actions/transcripts/index.d.ts.map +0 -1
- package/src/lib/actions/transcripts/index.js +0 -22
- package/src/lib/actions/transcripts/index.js.map +0 -1
- package/src/lib/actions/transcripts/list-transcripts.d.ts +0 -9
- package/src/lib/actions/transcripts/list-transcripts.d.ts.map +0 -1
- package/src/lib/actions/transcripts/list-transcripts.js +0 -30
- package/src/lib/actions/transcripts/list-transcripts.js.map +0 -1
- package/src/lib/actions/transcripts/shared-props.d.ts +0 -2
- package/src/lib/actions/transcripts/shared-props.d.ts.map +0 -1
- package/src/lib/actions/transcripts/shared-props.js +0 -9
- package/src/lib/actions/transcripts/shared-props.js.map +0 -1
- package/src/lib/actions/transcripts/transcribe.d.ts +0 -43
- package/src/lib/actions/transcripts/transcribe.d.ts.map +0 -1
- package/src/lib/actions/transcripts/transcribe.js +0 -105
- package/src/lib/actions/transcripts/transcribe.js.map +0 -1
- package/src/lib/actions/transcripts/word-search.d.ts +0 -5
- package/src/lib/actions/transcripts/word-search.d.ts.map +0 -1
- package/src/lib/actions/transcripts/word-search.js +0 -37
- package/src/lib/actions/transcripts/word-search.js.map +0 -1
- package/src/lib/auth.d.ts +0 -2
- package/src/lib/auth.d.ts.map +0 -1
- package/src/lib/auth.js +0 -43
- package/src/lib/auth.js.map +0 -1
- package/src/lib/client.d.ts +0 -5
- package/src/lib/client.d.ts.map +0 -1
- package/src/lib/client.js +0 -25
- package/src/lib/client.js.map +0 -1
- package/src/lib/generated/lemur-task/props.d.ts +0 -10
- package/src/lib/generated/lemur-task/props.d.ts.map +0 -1
- package/src/lib/generated/lemur-task/props.js +0 -86
- package/src/lib/generated/lemur-task/props.js.map +0 -1
- package/src/lib/generated/list-transcript/props.d.ts +0 -9
- package/src/lib/generated/list-transcript/props.d.ts.map +0 -1
- package/src/lib/generated/list-transcript/props.js +0 -58
- package/src/lib/generated/list-transcript/props.js.map +0 -1
- package/src/lib/generated/transcribe/props.d.ts +0 -41
- package/src/lib/generated/transcribe/props.d.ts.map +0 -1
- package/src/lib/generated/transcribe/props.js +0 -898
- package/src/lib/generated/transcribe/props.js.map +0 -1
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getSubtitles = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const auth_1 = require("../../auth");
|
|
7
|
-
const client_1 = require("../../client");
|
|
8
|
-
exports.getSubtitles = (0, pieces_framework_1.createAction)({
|
|
9
|
-
name: 'getSubtitles',
|
|
10
|
-
auth: auth_1.assemblyaiAuth,
|
|
11
|
-
requireAuth: true,
|
|
12
|
-
displayName: 'Get Transcript Subtitles',
|
|
13
|
-
description: 'Export the transcript as SRT or VTT subtitles.',
|
|
14
|
-
audience: 'both',
|
|
15
|
-
aiMetadata: {
|
|
16
|
-
description: 'Exports an existing transcript, identified by its ID, as a subtitle file in either SRT or VTT format (selectable). Use this to produce captions from a completed transcript, optionally capping characters per caption. Requires a valid transcript ID; read-only and idempotent.',
|
|
17
|
-
idempotent: true,
|
|
18
|
-
},
|
|
19
|
-
props: {
|
|
20
|
-
id: pieces_framework_1.Property.ShortText({
|
|
21
|
-
displayName: 'Transcript ID',
|
|
22
|
-
required: true,
|
|
23
|
-
}),
|
|
24
|
-
format: pieces_framework_1.Property.StaticDropdown({
|
|
25
|
-
displayName: 'Subtitles Format',
|
|
26
|
-
required: true,
|
|
27
|
-
defaultValue: 'srt',
|
|
28
|
-
options: {
|
|
29
|
-
options: [
|
|
30
|
-
{
|
|
31
|
-
label: 'SRT',
|
|
32
|
-
value: 'srt',
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
label: 'VTT',
|
|
36
|
-
value: 'vtt',
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
},
|
|
40
|
-
}),
|
|
41
|
-
chars_per_caption: pieces_framework_1.Property.Number({
|
|
42
|
-
displayName: 'Number of Characters per Caption',
|
|
43
|
-
description: 'The maximum number of characters per caption',
|
|
44
|
-
required: false,
|
|
45
|
-
}),
|
|
46
|
-
},
|
|
47
|
-
run(context) {
|
|
48
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
49
|
-
const client = (0, client_1.getAssemblyAIClient)(context);
|
|
50
|
-
const subtitles = yield client.transcripts.subtitles(context.propsValue.id, context.propsValue.format, context.propsValue.chars_per_caption);
|
|
51
|
-
return subtitles;
|
|
52
|
-
});
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
//# sourceMappingURL=get-subtitles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-subtitles.js","sourceRoot":"","sources":["../../../../../src/lib/actions/transcripts/get-subtitles.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AAExE,qCAA4C;AAC5C,yCAAmD;AAEtC,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,qBAAc;IACpB,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,0BAA0B;IACvC,WAAW,EAAE,gDAAgD;IAC7D,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,mRAAmR;QACrR,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,EAAE,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACrB,WAAW,EAAE,eAAe;YAC5B,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC9B,WAAW,EAAE,kBAAkB;YAC/B,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,KAAK;YACnB,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP;wBACE,KAAK,EAAE,KAAK;wBACZ,KAAK,EAAE,KAAK;qBACb;oBACD;wBACE,KAAK,EAAE,KAAK;wBACZ,KAAK,EAAE,KAAK;qBACb;iBACF;aACF;SACF,CAAC;QACF,iBAAiB,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACjC,WAAW,EAAE,kCAAkC;YAC/C,WAAW,EAAE,8CAA8C;YAC3D,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,MAAM,GAAG,IAAA,4BAAmB,EAAC,OAAO,CAAC,CAAC;YAC5C,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,SAAS,CAClD,OAAO,CAAC,UAAU,CAAC,EAAE,EACrB,OAAO,CAAC,UAAU,CAAC,MAAwB,EAC3C,OAAO,CAAC,UAAU,CAAC,iBAAiB,CACrC,CAAC;YACF,OAAO,SAAS,CAAC;QACnB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const getTranscript: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
}>;
|
|
4
|
-
//# sourceMappingURL=get-transcript.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-transcript.d.ts","sourceRoot":"","sources":["../../../../../src/lib/actions/transcripts/get-transcript.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa;;EAoBxB,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTranscript = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const auth_1 = require("../../auth");
|
|
7
|
-
const client_1 = require("../../client");
|
|
8
|
-
const shared_props_1 = require("./shared-props");
|
|
9
|
-
exports.getTranscript = (0, pieces_framework_1.createAction)({
|
|
10
|
-
name: 'getTranscript',
|
|
11
|
-
auth: auth_1.assemblyaiAuth,
|
|
12
|
-
requireAuth: true,
|
|
13
|
-
displayName: 'Get Transcript',
|
|
14
|
-
description: 'Retrieves a transcript by its ID.',
|
|
15
|
-
audience: 'both',
|
|
16
|
-
aiMetadata: {
|
|
17
|
-
description: 'Fetches a single existing transcript by its ID, including its status and transcribed text. Use this to poll or read back a transcript created by the Transcribe action. Requires a valid transcript ID; read-only and idempotent.',
|
|
18
|
-
idempotent: true,
|
|
19
|
-
},
|
|
20
|
-
props: {
|
|
21
|
-
id: shared_props_1.transcriptIdProp,
|
|
22
|
-
},
|
|
23
|
-
run(context) {
|
|
24
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
const client = (0, client_1.getAssemblyAIClient)(context);
|
|
26
|
-
const transcript = yield client.transcripts.get(context.propsValue.id);
|
|
27
|
-
return transcript;
|
|
28
|
-
});
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=get-transcript.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-transcript.js","sourceRoot":"","sources":["../../../../../src/lib/actions/transcripts/get-transcript.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,qCAA4C;AAC5C,yCAAmD;AACnD,iDAAkD;AAErC,QAAA,aAAa,GAAG,IAAA,+BAAY,EAAC;IACxC,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,qBAAc;IACpB,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,mCAAmC;IAChD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,mOAAmO;QACrO,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,EAAE,EAAE,+BAAgB;KACrB;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,MAAM,GAAG,IAAA,4BAAmB,EAAC,OAAO,CAAC,CAAC;YAC5C,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YACvE,OAAO,UAAU,CAAC;QACpB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { transcribe } from './transcribe';
|
|
2
|
-
export { getTranscript } from './get-transcript';
|
|
3
|
-
export { getSentences } from './get-sentences';
|
|
4
|
-
export { getParagraphs } from './get-paragraphs';
|
|
5
|
-
export { getSubtitles } from './get-subtitles';
|
|
6
|
-
export { getRedactedAudio } from './get-redacted-audio';
|
|
7
|
-
export { wordSearch } from './word-search';
|
|
8
|
-
export { listTranscripts } from './list-transcripts';
|
|
9
|
-
export { deleteTranscript } from './delete-transcript';
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/actions/transcripts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteTranscript = exports.listTranscripts = exports.wordSearch = exports.getRedactedAudio = exports.getSubtitles = exports.getParagraphs = exports.getSentences = exports.getTranscript = exports.transcribe = void 0;
|
|
4
|
-
var transcribe_1 = require("./transcribe");
|
|
5
|
-
Object.defineProperty(exports, "transcribe", { enumerable: true, get: function () { return transcribe_1.transcribe; } });
|
|
6
|
-
var get_transcript_1 = require("./get-transcript");
|
|
7
|
-
Object.defineProperty(exports, "getTranscript", { enumerable: true, get: function () { return get_transcript_1.getTranscript; } });
|
|
8
|
-
var get_sentences_1 = require("./get-sentences");
|
|
9
|
-
Object.defineProperty(exports, "getSentences", { enumerable: true, get: function () { return get_sentences_1.getSentences; } });
|
|
10
|
-
var get_paragraphs_1 = require("./get-paragraphs");
|
|
11
|
-
Object.defineProperty(exports, "getParagraphs", { enumerable: true, get: function () { return get_paragraphs_1.getParagraphs; } });
|
|
12
|
-
var get_subtitles_1 = require("./get-subtitles");
|
|
13
|
-
Object.defineProperty(exports, "getSubtitles", { enumerable: true, get: function () { return get_subtitles_1.getSubtitles; } });
|
|
14
|
-
var get_redacted_audio_1 = require("./get-redacted-audio");
|
|
15
|
-
Object.defineProperty(exports, "getRedactedAudio", { enumerable: true, get: function () { return get_redacted_audio_1.getRedactedAudio; } });
|
|
16
|
-
var word_search_1 = require("./word-search");
|
|
17
|
-
Object.defineProperty(exports, "wordSearch", { enumerable: true, get: function () { return word_search_1.wordSearch; } });
|
|
18
|
-
var list_transcripts_1 = require("./list-transcripts");
|
|
19
|
-
Object.defineProperty(exports, "listTranscripts", { enumerable: true, get: function () { return list_transcripts_1.listTranscripts; } });
|
|
20
|
-
var delete_transcript_1 = require("./delete-transcript");
|
|
21
|
-
Object.defineProperty(exports, "deleteTranscript", { enumerable: true, get: function () { return delete_transcript_1.deleteTranscript; } });
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/actions/transcripts/index.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,mDAAiD;AAAxC,+GAAA,aAAa,OAAA;AACtB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,mDAAiD;AAAxC,+GAAA,aAAa,OAAA;AACtB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,2DAAwD;AAA/C,sHAAA,gBAAgB,OAAA;AACzB,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,uDAAqD;AAA5C,mHAAA,eAAe,OAAA;AACxB,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const listTranscripts: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
limit: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
3
|
-
status: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
4
|
-
created_on: import("@activepieces/pieces-framework").DateTimeProperty<false>;
|
|
5
|
-
before_id: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
-
after_id: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
-
throttled_only: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
8
|
-
}>;
|
|
9
|
-
//# sourceMappingURL=list-transcripts.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-transcripts.d.ts","sourceRoot":"","sources":["../../../../../src/lib/actions/transcripts/list-transcripts.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe;;;;;;;EAqB1B,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.listTranscripts = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const auth_1 = require("../../auth");
|
|
7
|
-
const client_1 = require("../../client");
|
|
8
|
-
const props_1 = require("../../generated/list-transcript/props");
|
|
9
|
-
exports.listTranscripts = (0, pieces_framework_1.createAction)({
|
|
10
|
-
name: 'listTranscripts',
|
|
11
|
-
auth: auth_1.assemblyaiAuth,
|
|
12
|
-
requireAuth: true,
|
|
13
|
-
displayName: 'List transcripts',
|
|
14
|
-
description: `Retrieve a list of transcripts you created.
|
|
15
|
-
Transcripts are sorted from newest to oldest. The previous URL always points to a page with older transcripts.`,
|
|
16
|
-
audience: 'both',
|
|
17
|
-
aiMetadata: {
|
|
18
|
-
description: 'Lists transcripts you have created, newest first, with paging support. Use this to discover transcript IDs or browse past transcription jobs when you do not already have a specific ID. Read-only and idempotent.',
|
|
19
|
-
idempotent: true,
|
|
20
|
-
},
|
|
21
|
-
props: props_1.props,
|
|
22
|
-
run(context) {
|
|
23
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
const client = (0, client_1.getAssemblyAIClient)(context);
|
|
25
|
-
const transcriptListResponse = yield client.transcripts.list(context.propsValue);
|
|
26
|
-
return transcriptListResponse;
|
|
27
|
-
});
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
//# sourceMappingURL=list-transcripts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-transcripts.js","sourceRoot":"","sources":["../../../../../src/lib/actions/transcripts/list-transcripts.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAE9D,qCAA4C;AAC5C,yCAAmD;AACnD,iEAA8D;AAEjD,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,qBAAc;IACpB,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE;+GACgG;IAC7G,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,oNAAoN;QACtN,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAL,aAAK;IACC,GAAG,CAAC,OAAO;;YACf,MAAM,MAAM,GAAG,IAAA,4BAAmB,EAAC,OAAO,CAAC,CAAC;YAC5C,MAAM,sBAAsB,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,IAAI,CAC1D,OAAO,CAAC,UAAkC,CAC3C,CAAC;YACF,OAAO,sBAAsB,CAAC;QAChC,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shared-props.d.ts","sourceRoot":"","sources":["../../../../../src/lib/actions/transcripts/shared-props.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,kEAG3B,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transcriptIdProp = void 0;
|
|
4
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
5
|
-
exports.transcriptIdProp = pieces_framework_1.Property.ShortText({
|
|
6
|
-
displayName: 'Transcript ID',
|
|
7
|
-
required: true,
|
|
8
|
-
});
|
|
9
|
-
//# sourceMappingURL=shared-props.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shared-props.js","sourceRoot":"","sources":["../../../../../src/lib/actions/transcripts/shared-props.ts"],"names":[],"mappings":";;;AAAA,qEAA0D;AAE7C,QAAA,gBAAgB,GAAG,2BAAQ,CAAC,SAAS,CAAC;IACjD,WAAW,EAAE,eAAe;IAC5B,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
export declare const transcribe: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
readonly wait_until_ready: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
3
|
-
readonly throw_on_error: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
4
|
-
readonly audio_url: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
readonly language_code: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
6
|
-
readonly language_detection: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
7
|
-
readonly language_confidence_threshold: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
8
|
-
readonly speech_model: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
9
|
-
readonly punctuate: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
10
|
-
readonly format_text: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
11
|
-
readonly disfluencies: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
12
|
-
readonly dual_channel: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
13
|
-
readonly webhook_url: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
14
|
-
readonly webhook_auth_header_name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
15
|
-
readonly webhook_auth_header_value: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
16
|
-
readonly auto_highlights: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
17
|
-
readonly audio_start_from: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
18
|
-
readonly audio_end_at: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
19
|
-
readonly word_boost: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
20
|
-
readonly boost_param: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
21
|
-
readonly filter_profanity: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
22
|
-
readonly redact_pii: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
23
|
-
readonly redact_pii_audio: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
24
|
-
readonly redact_pii_audio_quality: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
25
|
-
readonly redact_pii_policies: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
26
|
-
readonly redact_pii_sub: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
27
|
-
readonly speaker_labels: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
28
|
-
readonly speakers_expected: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
29
|
-
readonly content_safety: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
30
|
-
readonly content_safety_confidence: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
31
|
-
readonly iab_categories: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
32
|
-
readonly custom_spelling: import("@activepieces/pieces-framework").JsonProperty<false>;
|
|
33
|
-
readonly sentiment_analysis: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
34
|
-
readonly auto_chapters: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
35
|
-
readonly entity_detection: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
36
|
-
readonly speech_threshold: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
37
|
-
readonly summarization: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
38
|
-
readonly summary_model: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
39
|
-
readonly summary_type: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
40
|
-
readonly custom_topics: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
41
|
-
readonly topics: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
42
|
-
}>;
|
|
43
|
-
//# sourceMappingURL=transcribe.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transcribe.d.ts","sourceRoot":"","sources":["../../../../../src/lib/actions/transcripts/transcribe.ts"],"names":[],"mappings":"AA+BA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCrB,CAAC"}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transcribe = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const shared_1 = require("@activepieces/shared");
|
|
7
|
-
const auth_1 = require("../../auth");
|
|
8
|
-
const client_1 = require("../../client");
|
|
9
|
-
const props_1 = require("../../generated/transcribe/props");
|
|
10
|
-
const transcribeProps = Object.assign(Object.assign({}, props_1.props), { wait_until_ready: pieces_framework_1.Property.Checkbox({
|
|
11
|
-
displayName: 'Wait until transcript is ready',
|
|
12
|
-
description: `Wait until the transcript status is "completed" or "error" before moving on to the next step.`,
|
|
13
|
-
required: true,
|
|
14
|
-
defaultValue: true,
|
|
15
|
-
}), throw_on_error: pieces_framework_1.Property.Checkbox({
|
|
16
|
-
displayName: 'Throw if transcript status is error',
|
|
17
|
-
description: `If the transcript status is "error", throw an error.`,
|
|
18
|
-
required: true,
|
|
19
|
-
defaultValue: true,
|
|
20
|
-
}) });
|
|
21
|
-
exports.transcribe = (0, pieces_framework_1.createAction)({
|
|
22
|
-
name: 'transcribe',
|
|
23
|
-
auth: auth_1.assemblyaiAuth,
|
|
24
|
-
requireAuth: true,
|
|
25
|
-
displayName: 'Transcribe',
|
|
26
|
-
description: 'Transcribe an audio or video file using AssemblyAI.',
|
|
27
|
-
audience: 'both',
|
|
28
|
-
aiMetadata: {
|
|
29
|
-
description: 'Submits an audio or video file (by URL or prior upload) to AssemblyAI for speech-to-text transcription, optionally with extra speech models like speaker diarization, PII redaction, and sentiment. Can either wait synchronously until the transcript is ready or return immediately and continue via webhook (the wait-until-ready and webhook-URL modes are mutually exclusive). Use this to start a new transcription job; each call creates a new transcript, so it is not idempotent.',
|
|
30
|
-
idempotent: false,
|
|
31
|
-
},
|
|
32
|
-
props: transcribeProps,
|
|
33
|
-
run(context) {
|
|
34
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
const client = (0, client_1.getAssemblyAIClient)(context);
|
|
36
|
-
if (context.executionType === shared_1.ExecutionType.BEGIN) {
|
|
37
|
-
const transcriptParams = createTranscriptParams(context);
|
|
38
|
-
const waitpoint = yield handleWebhookUrl(context, transcriptParams);
|
|
39
|
-
handlePiiAudio(context);
|
|
40
|
-
handleEmptyArrays(transcriptParams);
|
|
41
|
-
const transcript = yield client.transcripts.submit(transcriptParams);
|
|
42
|
-
if (waitpoint) {
|
|
43
|
-
context.run.waitForWaitpoint(waitpoint.id);
|
|
44
|
-
}
|
|
45
|
-
return transcript;
|
|
46
|
-
}
|
|
47
|
-
else if (context.executionType === shared_1.ExecutionType.RESUME) {
|
|
48
|
-
const webhookBody = context.resumePayload.body;
|
|
49
|
-
const transcript = yield client.transcripts.get(webhookBody.transcript_id);
|
|
50
|
-
if (context.propsValue.throw_on_error && transcript.status === 'error') {
|
|
51
|
-
throw new Error(transcript.error);
|
|
52
|
-
}
|
|
53
|
-
return transcript;
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
throw new Error('Invalid Execution Type');
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
function createTranscriptParams(context) {
|
|
62
|
-
const transcriptParams = Object.assign({}, context.propsValue);
|
|
63
|
-
if ('wait_until_ready' in transcriptParams)
|
|
64
|
-
delete transcriptParams['wait_until_ready'];
|
|
65
|
-
if ('throw_on_error' in transcriptParams)
|
|
66
|
-
delete transcriptParams['throw_on_error'];
|
|
67
|
-
if ('auth' in transcriptParams)
|
|
68
|
-
delete transcriptParams['auth'];
|
|
69
|
-
return transcriptParams;
|
|
70
|
-
}
|
|
71
|
-
function handleWebhookUrl(context, transcriptParams) {
|
|
72
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
73
|
-
var _a;
|
|
74
|
-
if (context.propsValue.wait_until_ready) {
|
|
75
|
-
const isWebhookUrlConfigured = (_a = transcriptParams.webhook_url) === null || _a === void 0 ? void 0 : _a.trim();
|
|
76
|
-
if (isWebhookUrlConfigured) {
|
|
77
|
-
throw new Error(`The "Wait until transcript is ready" and "Webhook URL" fields are mutually exclusive. Please remove the "Webhook URL" field to use the "Wait until transcript is ready" field.`);
|
|
78
|
-
}
|
|
79
|
-
const waitpoint = yield context.run.createWaitpoint({
|
|
80
|
-
type: 'WEBHOOK',
|
|
81
|
-
});
|
|
82
|
-
transcriptParams.webhook_url = waitpoint.buildResumeUrl({
|
|
83
|
-
queryParams: {},
|
|
84
|
-
});
|
|
85
|
-
return waitpoint;
|
|
86
|
-
}
|
|
87
|
-
return undefined;
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
function handlePiiAudio(context) {
|
|
91
|
-
if (context.propsValue.wait_until_ready === true &&
|
|
92
|
-
context.propsValue.redact_pii_audio === true) {
|
|
93
|
-
throw new Error(`The "Wait until transcript is ready" and "Redact PII audio" fields are mutually exclusive. Set the "Wait until transcript is ready" or "Redact PII audio" to false.`);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
function handleEmptyArrays(transcriptParams) {
|
|
97
|
-
const obj = transcriptParams;
|
|
98
|
-
for (const key in obj) {
|
|
99
|
-
const value = obj[key];
|
|
100
|
-
if (Array.isArray(value) && value.length === 0) {
|
|
101
|
-
delete obj[key];
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
//# sourceMappingURL=transcribe.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transcribe.js","sourceRoot":"","sources":["../../../../../src/lib/actions/transcripts/transcribe.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const wordSearch: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
words: import("@activepieces/pieces-framework").ArrayProperty<true>;
|
|
4
|
-
}>;
|
|
5
|
-
//# sourceMappingURL=word-search.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"word-search.d.ts","sourceRoot":"","sources":["../../../../../src/lib/actions/transcripts/word-search.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU;;;EA8BrB,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.wordSearch = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const auth_1 = require("../../auth");
|
|
7
|
-
const client_1 = require("../../client");
|
|
8
|
-
const shared_props_1 = require("./shared-props");
|
|
9
|
-
exports.wordSearch = (0, pieces_framework_1.createAction)({
|
|
10
|
-
name: 'wordSearch',
|
|
11
|
-
auth: auth_1.assemblyaiAuth,
|
|
12
|
-
requireAuth: true,
|
|
13
|
-
displayName: 'Search words in transcript',
|
|
14
|
-
description: 'Search through the transcript for keywords. ' +
|
|
15
|
-
'You can search for individual words, numbers, or phrases containing up to five words or numbers.',
|
|
16
|
-
audience: 'both',
|
|
17
|
-
aiMetadata: {
|
|
18
|
-
description: 'Searches an existing transcript, identified by its ID, for one or more keywords and returns where each match occurs (individual words, numbers, or short phrases of up to five tokens). Use this to locate specific terms within a completed transcript. Requires a valid transcript ID and a list of search terms; read-only and idempotent.',
|
|
19
|
-
idempotent: true,
|
|
20
|
-
},
|
|
21
|
-
props: {
|
|
22
|
-
id: shared_props_1.transcriptIdProp,
|
|
23
|
-
words: pieces_framework_1.Property.Array({
|
|
24
|
-
displayName: 'Words',
|
|
25
|
-
required: true,
|
|
26
|
-
description: 'Keywords to search for',
|
|
27
|
-
}),
|
|
28
|
-
},
|
|
29
|
-
run(context) {
|
|
30
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
const client = (0, client_1.getAssemblyAIClient)(context);
|
|
32
|
-
const wordSearchResponse = yield client.transcripts.wordSearch(context.propsValue.id, context.propsValue.words);
|
|
33
|
-
return wordSearchResponse;
|
|
34
|
-
});
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
//# sourceMappingURL=word-search.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"word-search.js","sourceRoot":"","sources":["../../../../../src/lib/actions/transcripts/word-search.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,qCAA4C;AAC5C,yCAAmD;AACnD,iDAAkD;AAErC,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACrC,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,qBAAc;IACpB,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,4BAA4B;IACzC,WAAW,EACT,8CAA8C;QAC9C,kGAAkG;IACpG,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,+UAA+U;QACjV,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,EAAE,EAAE,+BAAgB;QACpB,KAAK,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACpB,WAAW,EAAE,OAAO;YACpB,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,wBAAwB;SACtC,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,MAAM,GAAG,IAAA,4BAAmB,EAAC,OAAO,CAAC,CAAC;YAC5C,MAAM,kBAAkB,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,UAAU,CAC5D,OAAO,CAAC,UAAU,CAAC,EAAE,EACrB,OAAO,CAAC,UAAU,CAAC,KAAiB,CACrC,CAAC;YACF,OAAO,kBAAkB,CAAC;QAC5B,CAAC;KAAA;CACF,CAAC,CAAC"}
|
package/src/lib/auth.d.ts
DELETED
package/src/lib/auth.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,mEAkCzB,CAAC"}
|
package/src/lib/auth.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assemblyaiAuth = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
-
const client_1 = require("./client");
|
|
8
|
-
exports.assemblyaiAuth = pieces_framework_1.PieceAuth.SecretText({
|
|
9
|
-
displayName: 'API Key',
|
|
10
|
-
required: true,
|
|
11
|
-
description: 'You can retrieve your AssemblyAI API key within your AssemblyAI [Account Settings](https://www.assemblyai.com/app/account?utm_source=activepieces).',
|
|
12
|
-
validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
13
|
-
if (!auth)
|
|
14
|
-
return {
|
|
15
|
-
valid: false,
|
|
16
|
-
error: 'The AssemblyAI API key is required.',
|
|
17
|
-
};
|
|
18
|
-
try {
|
|
19
|
-
const res = yield pieces_common_1.httpClient.sendRequest({
|
|
20
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
21
|
-
url: `${client_1.baseUrl}/v2/account`,
|
|
22
|
-
headers: {
|
|
23
|
-
Authorization: auth,
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
if (res.status !== 200)
|
|
27
|
-
return {
|
|
28
|
-
valid: false,
|
|
29
|
-
error: 'The AssemblyAI API key is invalid.',
|
|
30
|
-
};
|
|
31
|
-
return {
|
|
32
|
-
valid: true,
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
catch (e) {
|
|
36
|
-
return {
|
|
37
|
-
valid: false,
|
|
38
|
-
error: 'The AssemblyAI API key is invalid.',
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
}),
|
|
42
|
-
});
|
|
43
|
-
//# sourceMappingURL=auth.js.map
|
package/src/lib/auth.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":";;;;AAAA,+DAAqE;AACrE,qEAA2D;AAC3D,qCAAmC;AAEtB,QAAA,cAAc,GAAG,4BAAS,CAAC,UAAU,CAAC;IACjD,WAAW,EAAE,SAAS;IACtB,QAAQ,EAAE,IAAI;IACd,WAAW,EACT,qJAAqJ;IACvJ,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACvB,IAAI,CAAC,IAAI;YACP,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,KAAK,EAAE,qCAAqC;aAC7C,CAAC;QACJ,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAW;gBACjD,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,GAAG,gBAAO,aAAa;gBAC5B,OAAO,EAAE;oBACP,aAAa,EAAE,IAAI;iBACpB;aACF,CAAC,CAAC;YACH,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG;gBACpB,OAAO;oBACL,KAAK,EAAE,KAAK;oBACZ,KAAK,EAAE,oCAAoC;iBAC5C,CAAC;YACJ,OAAO;gBACL,KAAK,EAAE,IAAI;aACZ,CAAC;QACJ,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,KAAK,EAAE,oCAAoC;aAC5C,CAAC;QACJ,CAAC;IACH,CAAC,CAAA;CACF,CAAC,CAAC"}
|
package/src/lib/client.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ActionContext, SecretTextProperty } from '@activepieces/pieces-framework';
|
|
2
|
-
import { AssemblyAI } from 'assemblyai';
|
|
3
|
-
export declare const baseUrl = "https://api.assemblyai.com";
|
|
4
|
-
export declare const getAssemblyAIClient: (context: ActionContext<SecretTextProperty<true>>) => AssemblyAI;
|
|
5
|
-
//# sourceMappingURL=client.d.ts.map
|
package/src/lib/client.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/lib/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,kBAAkB,EACnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGxC,eAAO,MAAM,OAAO,+BAA+B,CAAC;AAIpD,eAAO,MAAM,mBAAmB,GAC9B,SAAS,aAAa,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,KAC/C,UAYF,CAAC"}
|
package/src/lib/client.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAssemblyAIClient = exports.baseUrl = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const assemblyai_1 = require("assemblyai");
|
|
6
|
-
const package_json_1 = tslib_1.__importDefault(require("../../package.json"));
|
|
7
|
-
exports.baseUrl = 'https://api.assemblyai.com';
|
|
8
|
-
// Proxyman proxy
|
|
9
|
-
// export const baseUrl = 'http://localhost:10000';
|
|
10
|
-
const getAssemblyAIClient = (context) => {
|
|
11
|
-
if (!context.auth)
|
|
12
|
-
throw new Error('The AssemblyAI API key is required.');
|
|
13
|
-
return new assemblyai_1.AssemblyAI({
|
|
14
|
-
apiKey: context.auth.secret_text,
|
|
15
|
-
userAgent: {
|
|
16
|
-
integration: {
|
|
17
|
-
name: 'Activepieces',
|
|
18
|
-
version: package_json_1.default.version,
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
baseUrl: exports.baseUrl,
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
exports.getAssemblyAIClient = getAssemblyAIClient;
|
|
25
|
-
//# sourceMappingURL=client.js.map
|
package/src/lib/client.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/lib/client.ts"],"names":[],"mappings":";;;;AAIA,2CAAwC;AACxC,8EAA6C;AAEhC,QAAA,OAAO,GAAG,4BAA4B,CAAC;AACpD,iBAAiB;AACjB,mDAAmD;AAE5C,MAAM,mBAAmB,GAAG,CACjC,OAAgD,EACpC,EAAE;IACd,IAAI,CAAC,OAAO,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IAC1E,OAAO,IAAI,uBAAU,CAAC;QACpB,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW;QAChC,SAAS,EAAE;YACT,WAAW,EAAE;gBACX,IAAI,EAAE,cAAc;gBACpB,OAAO,EAAE,sBAAW,CAAC,OAAO;aAC7B;SACF;QACD,OAAO,EAAP,eAAO;KACR,CAAC,CAAC;AACL,CAAC,CAAC;AAdW,QAAA,mBAAmB,uBAc9B"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const props: {
|
|
2
|
-
prompt: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
transcript_ids: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
4
|
-
input_text: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
-
context: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
6
|
-
final_model: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
7
|
-
max_output_size: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
8
|
-
temperature: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../../../src/lib/generated/lemur-task/props.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,KAAK;;;;;;;;CAsFjB,CAAC"}
|