@venturialstd/workflow 0.1.1 → 0.1.4
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/dist/constants/workflow.constant.d.ts +2 -1
- package/dist/constants/workflow.constant.d.ts.map +1 -1
- package/dist/constants/workflow.constant.js +1 -0
- package/dist/constants/workflow.constant.js.map +1 -1
- package/dist/controllers/workflow-node.controller.d.ts +22 -0
- package/dist/controllers/workflow-node.controller.d.ts.map +1 -0
- package/dist/controllers/workflow-node.controller.js +84 -0
- package/dist/controllers/workflow-node.controller.js.map +1 -0
- package/dist/dtos/create-workflow-webhook.dto.d.ts +9 -0
- package/dist/dtos/create-workflow-webhook.dto.d.ts.map +1 -0
- package/dist/dtos/create-workflow-webhook.dto.js +48 -0
- package/dist/dtos/create-workflow-webhook.dto.js.map +1 -0
- package/dist/dtos/index.d.ts +1 -0
- package/dist/dtos/index.d.ts.map +1 -1
- package/dist/dtos/index.js +1 -0
- package/dist/dtos/index.js.map +1 -1
- package/dist/entities/workflow-webhook.entity.d.ts +22 -0
- package/dist/entities/workflow-webhook.entity.d.ts.map +1 -0
- package/dist/entities/workflow-webhook.entity.js +103 -0
- package/dist/entities/workflow-webhook.entity.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/modules/conditional/services/evaluate-condition.service.d.ts.map +1 -1
- package/dist/modules/conditional/services/evaluate-condition.service.js +39 -23
- package/dist/modules/conditional/services/evaluate-condition.service.js.map +1 -1
- package/dist/modules/index.d.ts +1 -0
- package/dist/modules/index.d.ts.map +1 -1
- package/dist/modules/index.js +5 -1
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/twilio/actions/cancel-verification.action.d.ts +3 -0
- package/dist/modules/twilio/actions/cancel-verification.action.d.ts.map +1 -0
- package/dist/modules/twilio/actions/cancel-verification.action.js +56 -0
- package/dist/modules/twilio/actions/cancel-verification.action.js.map +1 -0
- package/dist/modules/twilio/actions/create-conversation.action.d.ts +3 -0
- package/dist/modules/twilio/actions/create-conversation.action.d.ts.map +1 -0
- package/dist/modules/twilio/actions/create-conversation.action.js +79 -0
- package/dist/modules/twilio/actions/create-conversation.action.js.map +1 -0
- package/dist/modules/twilio/actions/create-video-room.action.d.ts +3 -0
- package/dist/modules/twilio/actions/create-video-room.action.d.ts.map +1 -0
- package/dist/modules/twilio/actions/create-video-room.action.js +89 -0
- package/dist/modules/twilio/actions/create-video-room.action.js.map +1 -0
- package/dist/modules/twilio/actions/delete-call.action.d.ts +3 -0
- package/dist/modules/twilio/actions/delete-call.action.d.ts.map +1 -0
- package/dist/modules/twilio/actions/delete-call.action.js +40 -0
- package/dist/modules/twilio/actions/delete-call.action.js.map +1 -0
- package/dist/modules/twilio/actions/delete-message.action.d.ts +3 -0
- package/dist/modules/twilio/actions/delete-message.action.d.ts.map +1 -0
- package/dist/modules/twilio/actions/delete-message.action.js +40 -0
- package/dist/modules/twilio/actions/delete-message.action.js.map +1 -0
- package/dist/modules/twilio/actions/fetch-call-recordings.action.d.ts +3 -0
- package/dist/modules/twilio/actions/fetch-call-recordings.action.d.ts.map +1 -0
- package/dist/modules/twilio/actions/fetch-call-recordings.action.js +46 -0
- package/dist/modules/twilio/actions/fetch-call-recordings.action.js.map +1 -0
- package/dist/modules/twilio/actions/fetch-call.action.d.ts +3 -0
- package/dist/modules/twilio/actions/fetch-call.action.d.ts.map +1 -0
- package/dist/modules/twilio/actions/fetch-call.action.js +52 -0
- package/dist/modules/twilio/actions/fetch-call.action.js.map +1 -0
- package/dist/modules/twilio/actions/fetch-message.action.d.ts +3 -0
- package/dist/modules/twilio/actions/fetch-message.action.d.ts.map +1 -0
- package/dist/modules/twilio/actions/fetch-message.action.js +58 -0
- package/dist/modules/twilio/actions/fetch-message.action.js.map +1 -0
- package/dist/modules/twilio/actions/fetch-verification.action.d.ts +3 -0
- package/dist/modules/twilio/actions/fetch-verification.action.d.ts.map +1 -0
- package/dist/modules/twilio/actions/fetch-verification.action.js +62 -0
- package/dist/modules/twilio/actions/fetch-verification.action.js.map +1 -0
- package/dist/modules/twilio/actions/generate-twiml-dial.action.d.ts +3 -0
- package/dist/modules/twilio/actions/generate-twiml-dial.action.d.ts.map +1 -0
- package/dist/modules/twilio/actions/generate-twiml-dial.action.js +72 -0
- package/dist/modules/twilio/actions/generate-twiml-dial.action.js.map +1 -0
- package/dist/modules/twilio/actions/generate-twiml-say.action.d.ts +3 -0
- package/dist/modules/twilio/actions/generate-twiml-say.action.d.ts.map +1 -0
- package/dist/modules/twilio/actions/generate-twiml-say.action.js +68 -0
- package/dist/modules/twilio/actions/generate-twiml-say.action.js.map +1 -0
- package/dist/modules/twilio/actions/index.d.ts +20 -0
- package/dist/modules/twilio/actions/index.d.ts.map +1 -1
- package/dist/modules/twilio/actions/index.js +20 -0
- package/dist/modules/twilio/actions/index.js.map +1 -1
- package/dist/modules/twilio/actions/list-calls.action.d.ts +3 -0
- package/dist/modules/twilio/actions/list-calls.action.d.ts.map +1 -0
- package/dist/modules/twilio/actions/list-calls.action.js +89 -0
- package/dist/modules/twilio/actions/list-calls.action.js.map +1 -0
- package/dist/modules/twilio/actions/list-messages.action.d.ts +3 -0
- package/dist/modules/twilio/actions/list-messages.action.d.ts.map +1 -0
- package/dist/modules/twilio/actions/list-messages.action.js +89 -0
- package/dist/modules/twilio/actions/list-messages.action.js.map +1 -0
- package/dist/modules/twilio/actions/lookup-phone-number.action.d.ts +3 -0
- package/dist/modules/twilio/actions/lookup-phone-number.action.d.ts.map +1 -0
- package/dist/modules/twilio/actions/lookup-phone-number.action.js +79 -0
- package/dist/modules/twilio/actions/lookup-phone-number.action.js.map +1 -0
- package/dist/modules/twilio/actions/make-call.action.d.ts +3 -0
- package/dist/modules/twilio/actions/make-call.action.d.ts.map +1 -0
- package/dist/modules/twilio/actions/make-call.action.js +109 -0
- package/dist/modules/twilio/actions/make-call.action.js.map +1 -0
- package/dist/modules/twilio/actions/send-conversation-message.action.d.ts +3 -0
- package/dist/modules/twilio/actions/send-conversation-message.action.d.ts.map +1 -0
- package/dist/modules/twilio/actions/send-conversation-message.action.js +72 -0
- package/dist/modules/twilio/actions/send-conversation-message.action.js.map +1 -0
- package/dist/modules/twilio/actions/send-sms.action.d.ts.map +1 -1
- package/dist/modules/twilio/actions/send-sms.action.js.map +1 -1
- package/dist/modules/twilio/actions/send-verification.action.d.ts +3 -0
- package/dist/modules/twilio/actions/send-verification.action.d.ts.map +1 -0
- package/dist/modules/twilio/actions/send-verification.action.js +99 -0
- package/dist/modules/twilio/actions/send-verification.action.js.map +1 -0
- package/dist/modules/twilio/actions/update-call.action.d.ts +3 -0
- package/dist/modules/twilio/actions/update-call.action.d.ts.map +1 -0
- package/dist/modules/twilio/actions/update-call.action.js +72 -0
- package/dist/modules/twilio/actions/update-call.action.js.map +1 -0
- package/dist/modules/twilio/actions/update-message.action.d.ts +3 -0
- package/dist/modules/twilio/actions/update-message.action.d.ts.map +1 -0
- package/dist/modules/twilio/actions/update-message.action.js +57 -0
- package/dist/modules/twilio/actions/update-message.action.js.map +1 -0
- package/dist/modules/twilio/actions/verify-code.action.d.ts +3 -0
- package/dist/modules/twilio/actions/verify-code.action.d.ts.map +1 -0
- package/dist/modules/twilio/actions/verify-code.action.js +72 -0
- package/dist/modules/twilio/actions/verify-code.action.js.map +1 -0
- package/dist/modules/twilio/services/cancel-verification.service.d.ts +8 -0
- package/dist/modules/twilio/services/cancel-verification.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/cancel-verification.service.js +53 -0
- package/dist/modules/twilio/services/cancel-verification.service.js.map +1 -0
- package/dist/modules/twilio/services/create-conversation.service.d.ts +8 -0
- package/dist/modules/twilio/services/create-conversation.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/create-conversation.service.js +56 -0
- package/dist/modules/twilio/services/create-conversation.service.js.map +1 -0
- package/dist/modules/twilio/services/create-video-room.service.d.ts +8 -0
- package/dist/modules/twilio/services/create-video-room.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/create-video-room.service.js +57 -0
- package/dist/modules/twilio/services/create-video-room.service.js.map +1 -0
- package/dist/modules/twilio/services/delete-call.service.d.ts +8 -0
- package/dist/modules/twilio/services/delete-call.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/delete-call.service.js +48 -0
- package/dist/modules/twilio/services/delete-call.service.js.map +1 -0
- package/dist/modules/twilio/services/delete-message.service.d.ts +8 -0
- package/dist/modules/twilio/services/delete-message.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/delete-message.service.js +43 -0
- package/dist/modules/twilio/services/delete-message.service.js.map +1 -0
- package/dist/modules/twilio/services/fetch-call-recordings.service.d.ts +8 -0
- package/dist/modules/twilio/services/fetch-call-recordings.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/fetch-call-recordings.service.js +56 -0
- package/dist/modules/twilio/services/fetch-call-recordings.service.js.map +1 -0
- package/dist/modules/twilio/services/fetch-call.service.d.ts +8 -0
- package/dist/modules/twilio/services/fetch-call.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/fetch-call.service.js +52 -0
- package/dist/modules/twilio/services/fetch-call.service.js.map +1 -0
- package/dist/modules/twilio/services/fetch-message.service.d.ts +8 -0
- package/dist/modules/twilio/services/fetch-message.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/fetch-message.service.js +60 -0
- package/dist/modules/twilio/services/fetch-message.service.js.map +1 -0
- package/dist/modules/twilio/services/fetch-verification.service.d.ts +8 -0
- package/dist/modules/twilio/services/fetch-verification.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/fetch-verification.service.js +58 -0
- package/dist/modules/twilio/services/fetch-verification.service.js.map +1 -0
- package/dist/modules/twilio/services/generate-twiml-dial.service.d.ts +8 -0
- package/dist/modules/twilio/services/generate-twiml-dial.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/generate-twiml-dial.service.js +43 -0
- package/dist/modules/twilio/services/generate-twiml-dial.service.js.map +1 -0
- package/dist/modules/twilio/services/generate-twiml-say.service.d.ts +8 -0
- package/dist/modules/twilio/services/generate-twiml-say.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/generate-twiml-say.service.js +43 -0
- package/dist/modules/twilio/services/generate-twiml-say.service.js.map +1 -0
- package/dist/modules/twilio/services/index.d.ts +20 -0
- package/dist/modules/twilio/services/index.d.ts.map +1 -1
- package/dist/modules/twilio/services/index.js +20 -0
- package/dist/modules/twilio/services/index.js.map +1 -1
- package/dist/modules/twilio/services/list-calls.service.d.ts +8 -0
- package/dist/modules/twilio/services/list-calls.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/list-calls.service.js +62 -0
- package/dist/modules/twilio/services/list-calls.service.js.map +1 -0
- package/dist/modules/twilio/services/list-messages.service.d.ts +8 -0
- package/dist/modules/twilio/services/list-messages.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/list-messages.service.js +65 -0
- package/dist/modules/twilio/services/list-messages.service.js.map +1 -0
- package/dist/modules/twilio/services/lookup-phone-number.service.d.ts +8 -0
- package/dist/modules/twilio/services/lookup-phone-number.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/lookup-phone-number.service.js +61 -0
- package/dist/modules/twilio/services/lookup-phone-number.service.js.map +1 -0
- package/dist/modules/twilio/services/make-call.service.d.ts +8 -0
- package/dist/modules/twilio/services/make-call.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/make-call.service.js +80 -0
- package/dist/modules/twilio/services/make-call.service.js.map +1 -0
- package/dist/modules/twilio/services/send-conversation-message.service.d.ts +8 -0
- package/dist/modules/twilio/services/send-conversation-message.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/send-conversation-message.service.js +61 -0
- package/dist/modules/twilio/services/send-conversation-message.service.js.map +1 -0
- package/dist/modules/twilio/services/send-sms.service.d.ts.map +1 -1
- package/dist/modules/twilio/services/send-verification.service.d.ts +8 -0
- package/dist/modules/twilio/services/send-verification.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/send-verification.service.js +64 -0
- package/dist/modules/twilio/services/send-verification.service.js.map +1 -0
- package/dist/modules/twilio/services/update-call.service.d.ts +8 -0
- package/dist/modules/twilio/services/update-call.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/update-call.service.js +62 -0
- package/dist/modules/twilio/services/update-call.service.js.map +1 -0
- package/dist/modules/twilio/services/update-message.service.d.ts +8 -0
- package/dist/modules/twilio/services/update-message.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/update-message.service.js +54 -0
- package/dist/modules/twilio/services/update-message.service.js.map +1 -0
- package/dist/modules/twilio/services/verify-code.service.d.ts +8 -0
- package/dist/modules/twilio/services/verify-code.service.d.ts.map +1 -0
- package/dist/modules/twilio/services/verify-code.service.js +62 -0
- package/dist/modules/twilio/services/verify-code.service.js.map +1 -0
- package/dist/modules/twilio/twilio-nest.module.d.ts.map +1 -1
- package/dist/modules/twilio/twilio-nest.module.js +51 -3
- package/dist/modules/twilio/twilio-nest.module.js.map +1 -1
- package/dist/modules/twilio/twilio.module.d.ts.map +1 -1
- package/dist/modules/twilio/twilio.module.js +24 -2
- package/dist/modules/twilio/twilio.module.js.map +1 -1
- package/dist/modules/types.d.ts +3 -1
- package/dist/modules/types.d.ts.map +1 -1
- package/dist/modules/types.js.map +1 -1
- package/dist/modules/webhook/controllers/index.d.ts +2 -0
- package/dist/modules/webhook/controllers/index.d.ts.map +1 -0
- package/dist/modules/webhook/controllers/index.js +18 -0
- package/dist/modules/webhook/controllers/index.js.map +1 -0
- package/dist/modules/webhook/controllers/webhook-receiver.controller.d.ts +12 -0
- package/dist/modules/webhook/controllers/webhook-receiver.controller.d.ts.map +1 -0
- package/dist/modules/webhook/controllers/webhook-receiver.controller.js +122 -0
- package/dist/modules/webhook/controllers/webhook-receiver.controller.js.map +1 -0
- package/dist/modules/webhook/credentials.d.ts +3 -0
- package/dist/modules/webhook/credentials.d.ts.map +1 -0
- package/dist/modules/webhook/credentials.js +5 -0
- package/dist/modules/webhook/credentials.js.map +1 -0
- package/dist/modules/webhook/services/index.d.ts +2 -0
- package/dist/modules/webhook/services/index.d.ts.map +1 -0
- package/dist/modules/webhook/services/index.js +18 -0
- package/dist/modules/webhook/services/index.js.map +1 -0
- package/dist/modules/webhook/services/webhook-received.service.d.ts +10 -0
- package/dist/modules/webhook/services/webhook-received.service.d.ts.map +1 -0
- package/dist/modules/webhook/services/webhook-received.service.js +94 -0
- package/dist/modules/webhook/services/webhook-received.service.js.map +1 -0
- package/dist/modules/webhook/triggers/index.d.ts +2 -0
- package/dist/modules/webhook/triggers/index.d.ts.map +1 -0
- package/dist/modules/webhook/triggers/index.js +18 -0
- package/dist/modules/webhook/triggers/index.js.map +1 -0
- package/dist/modules/webhook/triggers/webhook-received.trigger.d.ts +3 -0
- package/dist/modules/webhook/triggers/webhook-received.trigger.d.ts.map +1 -0
- package/dist/modules/webhook/triggers/webhook-received.trigger.js +78 -0
- package/dist/modules/webhook/triggers/webhook-received.trigger.js.map +1 -0
- package/dist/modules/webhook/webhook-nest.module.d.ts +3 -0
- package/dist/modules/webhook/webhook-nest.module.d.ts.map +1 -0
- package/dist/modules/webhook/webhook-nest.module.js +32 -0
- package/dist/modules/webhook/webhook-nest.module.js.map +1 -0
- package/dist/modules/webhook/webhook.module.d.ts +3 -0
- package/dist/modules/webhook/webhook.module.d.ts.map +1 -0
- package/dist/modules/webhook/webhook.module.js +16 -0
- package/dist/modules/webhook/webhook.module.js.map +1 -0
- package/dist/services/workflow-execution.service.d.ts +14 -1
- package/dist/services/workflow-execution.service.d.ts.map +1 -1
- package/dist/services/workflow-execution.service.js +319 -2
- package/dist/services/workflow-execution.service.js.map +1 -1
- package/dist/services/workflow-module.service.d.ts +5 -1
- package/dist/services/workflow-module.service.d.ts.map +1 -1
- package/dist/services/workflow-module.service.js +126 -2
- package/dist/services/workflow-module.service.js.map +1 -1
- package/dist/services/workflow-webhook.service.d.ts +13 -0
- package/dist/services/workflow-webhook.service.d.ts.map +1 -0
- package/dist/services/workflow-webhook.service.js +72 -0
- package/dist/services/workflow-webhook.service.js.map +1 -0
- package/dist/workflow-core.module.d.ts.map +1 -1
- package/dist/workflow-core.module.js +7 -0
- package/dist/workflow-core.module.js.map +1 -1
- package/dist/workflow.module.d.ts.map +1 -1
- package/dist/workflow.module.js +3 -0
- package/dist/workflow.module.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CreateVideoRoomService = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const twilio_1 = require("@venturialstd/twilio");
|
|
15
|
+
let CreateVideoRoomService = class CreateVideoRoomService {
|
|
16
|
+
twilioVideoService;
|
|
17
|
+
constructor(twilioVideoService) {
|
|
18
|
+
this.twilioVideoService = twilioVideoService;
|
|
19
|
+
}
|
|
20
|
+
async perform(inputs, context) {
|
|
21
|
+
const accountSid = context.credentials?.accountSid;
|
|
22
|
+
const authToken = context.credentials?.authToken;
|
|
23
|
+
if (!accountSid || !authToken) {
|
|
24
|
+
throw new Error('Twilio credentials (accountSid and authToken) are required');
|
|
25
|
+
}
|
|
26
|
+
const config = {
|
|
27
|
+
auth: {
|
|
28
|
+
accountSid,
|
|
29
|
+
authToken,
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
const options = {};
|
|
33
|
+
if (inputs.uniqueName)
|
|
34
|
+
options.uniqueName = inputs.uniqueName;
|
|
35
|
+
if (inputs.type)
|
|
36
|
+
options.type = inputs.type;
|
|
37
|
+
if (inputs.maxParticipants)
|
|
38
|
+
options.maxParticipants = Number(inputs.maxParticipants);
|
|
39
|
+
if (inputs.recordParticipantsOnConnect !== undefined)
|
|
40
|
+
options.recordParticipantsOnConnect = inputs.recordParticipantsOnConnect;
|
|
41
|
+
const room = await this.twilioVideoService.createRoom(config, options);
|
|
42
|
+
return {
|
|
43
|
+
roomSid: room.sid,
|
|
44
|
+
uniqueName: room.uniqueName,
|
|
45
|
+
status: room.status,
|
|
46
|
+
type: room.type,
|
|
47
|
+
maxParticipants: room.maxParticipants,
|
|
48
|
+
dateCreated: room.dateCreated?.toISOString(),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
exports.CreateVideoRoomService = CreateVideoRoomService;
|
|
53
|
+
exports.CreateVideoRoomService = CreateVideoRoomService = __decorate([
|
|
54
|
+
(0, common_1.Injectable)(),
|
|
55
|
+
__metadata("design:paramtypes", [twilio_1.TwilioVideoService])
|
|
56
|
+
], CreateVideoRoomService);
|
|
57
|
+
//# sourceMappingURL=create-video-room.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-video-room.service.js","sourceRoot":"","sources":["../../../../src/modules/twilio/services/create-video-room.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iDAAwE;AAKjE,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACJ;IAA7B,YAA6B,kBAAsC;QAAtC,uBAAkB,GAAlB,kBAAkB,CAAoB;IAAG,CAAC;IAEvE,KAAK,CAAC,OAAO,CACX,MAA+B,EAC/B,OAA8B;QAG9B,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,EAAE,UAAoB,CAAC;QAC7D,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,EAAE,SAAmB,CAAC;QAE3D,IAAI,CAAC,UAAU,IAAI,CAAC,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;QAChF,CAAC;QAED,MAAM,MAAM,GAAwB;YAClC,IAAI,EAAE;gBACJ,UAAU;gBACV,SAAS;aACV;SACF,CAAC;QAEF,MAAM,OAAO,GAKT,EAAE,CAAC;QAEP,IAAI,MAAM,CAAC,UAAU;YAAE,OAAO,CAAC,UAAU,GAAG,MAAM,CAAC,UAAoB,CAAC;QACxE,IAAI,MAAM,CAAC,IAAI;YAAE,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,IAAuD,CAAC;QAC/F,IAAI,MAAM,CAAC,eAAe;YAAE,OAAO,CAAC,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;QACrF,IAAI,MAAM,CAAC,2BAA2B,KAAK,SAAS;YAClD,OAAO,CAAC,2BAA2B,GAAG,MAAM,CAAC,2BAAsC,CAAC;QAEtF,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAEvE,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,GAAG;YACjB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,WAAW,EAAE;SAC7C,CAAC;IACJ,CAAC;CACF,CAAA;AA9CY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;qCAEsC,2BAAkB;GADxD,sBAAsB,CA8ClC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TwilioVoiceService } from '@venturialstd/twilio';
|
|
2
|
+
import { IWorkflowActionService, WorkflowActionContext } from '../../types';
|
|
3
|
+
export declare class DeleteCallService implements IWorkflowActionService {
|
|
4
|
+
private readonly twilioVoiceService;
|
|
5
|
+
constructor(twilioVoiceService: TwilioVoiceService);
|
|
6
|
+
perform(inputs: Record<string, unknown>, context: WorkflowActionContext): Promise<Record<string, unknown>>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=delete-call.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-call.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/twilio/services/delete-call.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAExE,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE5E,qBACa,iBAAkB,YAAW,sBAAsB;IAClD,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,kBAAkB;IAE7D,OAAO,CACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CA6BpC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DeleteCallService = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const twilio_1 = require("@venturialstd/twilio");
|
|
15
|
+
let DeleteCallService = class DeleteCallService {
|
|
16
|
+
twilioVoiceService;
|
|
17
|
+
constructor(twilioVoiceService) {
|
|
18
|
+
this.twilioVoiceService = twilioVoiceService;
|
|
19
|
+
}
|
|
20
|
+
async perform(inputs, context) {
|
|
21
|
+
const callSid = inputs.callSid;
|
|
22
|
+
if (!callSid) {
|
|
23
|
+
throw new Error('Call SID is required');
|
|
24
|
+
}
|
|
25
|
+
const accountSid = context.credentials?.accountSid;
|
|
26
|
+
const authToken = context.credentials?.authToken;
|
|
27
|
+
if (!accountSid || !authToken) {
|
|
28
|
+
throw new Error('Twilio credentials (accountSid and authToken) are required');
|
|
29
|
+
}
|
|
30
|
+
const config = {
|
|
31
|
+
auth: {
|
|
32
|
+
accountSid,
|
|
33
|
+
authToken,
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
await this.twilioVoiceService.deleteCall(config, callSid);
|
|
37
|
+
return {
|
|
38
|
+
callSid,
|
|
39
|
+
deleted: true,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
exports.DeleteCallService = DeleteCallService;
|
|
44
|
+
exports.DeleteCallService = DeleteCallService = __decorate([
|
|
45
|
+
(0, common_1.Injectable)(),
|
|
46
|
+
__metadata("design:paramtypes", [twilio_1.TwilioVoiceService])
|
|
47
|
+
], DeleteCallService);
|
|
48
|
+
//# sourceMappingURL=delete-call.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-call.service.js","sourceRoot":"","sources":["../../../../src/modules/twilio/services/delete-call.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iDAAwE;AAKjE,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IACC;IAA7B,YAA6B,kBAAsC;QAAtC,uBAAkB,GAAlB,kBAAkB,CAAoB;IAAG,CAAC;IAEvE,KAAK,CAAC,OAAO,CACX,MAA+B,EAC/B,OAA8B;QAE9B,MAAM,OAAO,GAAG,MAAM,CAAC,OAAiB,CAAC;QAEzC,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC1C,CAAC;QAGD,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,EAAE,UAAoB,CAAC;QAC7D,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,EAAE,SAAmB,CAAC;QAE3D,IAAI,CAAC,UAAU,IAAI,CAAC,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;QAChF,CAAC;QAED,MAAM,MAAM,GAAwB;YAClC,IAAI,EAAE;gBACJ,UAAU;gBACV,SAAS;aACV;SACF,CAAC;QAEF,MAAM,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAE1D,OAAO;YACL,OAAO;YACP,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;CACF,CAAA;AAnCY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAEsC,2BAAkB;GADxD,iBAAiB,CAmC7B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TwilioMessageService } from '@venturialstd/twilio';
|
|
2
|
+
import { IWorkflowActionService, WorkflowActionContext } from '../../types';
|
|
3
|
+
export declare class DeleteMessageService implements IWorkflowActionService {
|
|
4
|
+
private readonly twilioMessageService;
|
|
5
|
+
constructor(twilioMessageService: TwilioMessageService);
|
|
6
|
+
perform(inputs: Record<string, unknown>, context: WorkflowActionContext): Promise<Record<string, unknown>>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=delete-message.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-message.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/twilio/services/delete-message.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE1E,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE5E,qBACa,oBAAqB,YAAW,sBAAsB;IACrD,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAApB,oBAAoB,EAAE,oBAAoB;IAEjE,OAAO,CACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAwBpC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DeleteMessageService = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const twilio_1 = require("@venturialstd/twilio");
|
|
15
|
+
let DeleteMessageService = class DeleteMessageService {
|
|
16
|
+
twilioMessageService;
|
|
17
|
+
constructor(twilioMessageService) {
|
|
18
|
+
this.twilioMessageService = twilioMessageService;
|
|
19
|
+
}
|
|
20
|
+
async perform(inputs, context) {
|
|
21
|
+
const messageSid = inputs.messageSid;
|
|
22
|
+
if (!messageSid) {
|
|
23
|
+
throw new Error('Message SID is required');
|
|
24
|
+
}
|
|
25
|
+
const accountSid = context.credentials?.accountSid;
|
|
26
|
+
const authToken = context.credentials?.authToken;
|
|
27
|
+
if (!accountSid || !authToken) {
|
|
28
|
+
throw new Error('Twilio credentials (accountSid and authToken) are required');
|
|
29
|
+
}
|
|
30
|
+
const config = null;
|
|
31
|
+
const deleted = await this.twilioMessageService.deleteMessage(config, messageSid);
|
|
32
|
+
return {
|
|
33
|
+
messageSid,
|
|
34
|
+
deleted,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
exports.DeleteMessageService = DeleteMessageService;
|
|
39
|
+
exports.DeleteMessageService = DeleteMessageService = __decorate([
|
|
40
|
+
(0, common_1.Injectable)(),
|
|
41
|
+
__metadata("design:paramtypes", [twilio_1.TwilioMessageService])
|
|
42
|
+
], DeleteMessageService);
|
|
43
|
+
//# sourceMappingURL=delete-message.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-message.service.js","sourceRoot":"","sources":["../../../../src/modules/twilio/services/delete-message.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iDAA0E;AAKnE,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IACF;IAA7B,YAA6B,oBAA0C;QAA1C,yBAAoB,GAApB,oBAAoB,CAAsB;IAAG,CAAC;IAE3E,KAAK,CAAC,OAAO,CACX,MAA+B,EAC/B,OAA8B;QAE9B,MAAM,UAAU,GAAG,MAAM,CAAC,UAAoB,CAAC;QAE/C,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC7C,CAAC;QAGD,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,EAAE,UAAoB,CAAC;QAC7D,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,EAAE,SAAmB,CAAC;QAE3D,IAAI,CAAC,UAAU,IAAI,CAAC,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;QAChF,CAAC;QAED,MAAM,MAAM,GAAwB,IAAI,CAAC;QAEzC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,aAAa,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QAElF,OAAO;YACL,UAAU;YACV,OAAO;SACR,CAAC;IACJ,CAAC;CACF,CAAA;AA9BY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAEwC,6BAAoB;GAD5D,oBAAoB,CA8BhC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TwilioVoiceService } from '@venturialstd/twilio';
|
|
2
|
+
import { IWorkflowActionService, WorkflowActionContext } from '../../types';
|
|
3
|
+
export declare class FetchCallRecordingsService implements IWorkflowActionService {
|
|
4
|
+
private readonly twilioVoiceService;
|
|
5
|
+
constructor(twilioVoiceService: TwilioVoiceService);
|
|
6
|
+
perform(inputs: Record<string, unknown>, context: WorkflowActionContext): Promise<Record<string, unknown>>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=fetch-call-recordings.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-call-recordings.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/twilio/services/fetch-call-recordings.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAExE,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE5E,qBACa,0BAA2B,YAAW,sBAAsB;IAC3D,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,kBAAkB;IAE7D,OAAO,CACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAqCpC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.FetchCallRecordingsService = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const twilio_1 = require("@venturialstd/twilio");
|
|
15
|
+
let FetchCallRecordingsService = class FetchCallRecordingsService {
|
|
16
|
+
twilioVoiceService;
|
|
17
|
+
constructor(twilioVoiceService) {
|
|
18
|
+
this.twilioVoiceService = twilioVoiceService;
|
|
19
|
+
}
|
|
20
|
+
async perform(inputs, context) {
|
|
21
|
+
const callSid = inputs.callSid;
|
|
22
|
+
if (!callSid) {
|
|
23
|
+
throw new Error('Call SID is required');
|
|
24
|
+
}
|
|
25
|
+
const accountSid = context.credentials?.accountSid;
|
|
26
|
+
const authToken = context.credentials?.authToken;
|
|
27
|
+
if (!accountSid || !authToken) {
|
|
28
|
+
throw new Error('Twilio credentials (accountSid and authToken) are required');
|
|
29
|
+
}
|
|
30
|
+
const config = {
|
|
31
|
+
auth: {
|
|
32
|
+
accountSid,
|
|
33
|
+
authToken,
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
const recordings = await this.twilioVoiceService.fetchRecordings(config, callSid);
|
|
37
|
+
return {
|
|
38
|
+
callSid,
|
|
39
|
+
recordings: recordings.map((recording) => ({
|
|
40
|
+
recordingSid: recording.sid,
|
|
41
|
+
status: recording.status,
|
|
42
|
+
duration: recording.duration,
|
|
43
|
+
channels: recording.channels,
|
|
44
|
+
dateCreated: recording.dateCreated?.toISOString(),
|
|
45
|
+
uri: recording.uri,
|
|
46
|
+
})),
|
|
47
|
+
count: recordings.length,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
exports.FetchCallRecordingsService = FetchCallRecordingsService;
|
|
52
|
+
exports.FetchCallRecordingsService = FetchCallRecordingsService = __decorate([
|
|
53
|
+
(0, common_1.Injectable)(),
|
|
54
|
+
__metadata("design:paramtypes", [twilio_1.TwilioVoiceService])
|
|
55
|
+
], FetchCallRecordingsService);
|
|
56
|
+
//# sourceMappingURL=fetch-call-recordings.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-call-recordings.service.js","sourceRoot":"","sources":["../../../../src/modules/twilio/services/fetch-call-recordings.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iDAAwE;AAKjE,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IACR;IAA7B,YAA6B,kBAAsC;QAAtC,uBAAkB,GAAlB,kBAAkB,CAAoB;IAAG,CAAC;IAEvE,KAAK,CAAC,OAAO,CACX,MAA+B,EAC/B,OAA8B;QAE9B,MAAM,OAAO,GAAG,MAAM,CAAC,OAAiB,CAAC;QAEzC,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC1C,CAAC;QAGD,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,EAAE,UAAoB,CAAC;QAC7D,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,EAAE,SAAmB,CAAC;QAE3D,IAAI,CAAC,UAAU,IAAI,CAAC,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;QAChF,CAAC;QAED,MAAM,MAAM,GAAwB;YAClC,IAAI,EAAE;gBACJ,UAAU;gBACV,SAAS;aACV;SACF,CAAC;QAEF,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAElF,OAAO;YACL,OAAO;YACP,UAAU,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;gBACzC,YAAY,EAAE,SAAS,CAAC,GAAG;gBAC3B,MAAM,EAAE,SAAS,CAAC,MAAM;gBACxB,QAAQ,EAAE,SAAS,CAAC,QAAQ;gBAC5B,QAAQ,EAAE,SAAS,CAAC,QAAQ;gBAC5B,WAAW,EAAE,SAAS,CAAC,WAAW,EAAE,WAAW,EAAE;gBACjD,GAAG,EAAE,SAAS,CAAC,GAAG;aACnB,CAAC,CAAC;YACH,KAAK,EAAE,UAAU,CAAC,MAAM;SACzB,CAAC;IACJ,CAAC;CACF,CAAA;AA3CY,gEAA0B;qCAA1B,0BAA0B;IADtC,IAAA,mBAAU,GAAE;qCAEsC,2BAAkB;GADxD,0BAA0B,CA2CtC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TwilioVoiceService } from '@venturialstd/twilio';
|
|
2
|
+
import { IWorkflowActionService, WorkflowActionContext } from '../../types';
|
|
3
|
+
export declare class FetchCallService implements IWorkflowActionService {
|
|
4
|
+
private readonly twilioVoiceService;
|
|
5
|
+
constructor(twilioVoiceService: TwilioVoiceService);
|
|
6
|
+
perform(inputs: Record<string, unknown>, context: WorkflowActionContext): Promise<Record<string, unknown>>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=fetch-call.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-call.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/twilio/services/fetch-call.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAExE,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE5E,qBACa,gBAAiB,YAAW,sBAAsB;IACjD,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,kBAAkB;IAE7D,OAAO,CACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAiCpC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.FetchCallService = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const twilio_1 = require("@venturialstd/twilio");
|
|
15
|
+
let FetchCallService = class FetchCallService {
|
|
16
|
+
twilioVoiceService;
|
|
17
|
+
constructor(twilioVoiceService) {
|
|
18
|
+
this.twilioVoiceService = twilioVoiceService;
|
|
19
|
+
}
|
|
20
|
+
async perform(inputs, context) {
|
|
21
|
+
const callSid = inputs.callSid;
|
|
22
|
+
if (!callSid) {
|
|
23
|
+
throw new Error('Call SID is required');
|
|
24
|
+
}
|
|
25
|
+
const accountSid = context.credentials?.accountSid;
|
|
26
|
+
const authToken = context.credentials?.authToken;
|
|
27
|
+
if (!accountSid || !authToken) {
|
|
28
|
+
throw new Error('Twilio credentials (accountSid and authToken) are required');
|
|
29
|
+
}
|
|
30
|
+
const config = null;
|
|
31
|
+
const call = await this.twilioVoiceService.fetchCall(config, { callSid });
|
|
32
|
+
return {
|
|
33
|
+
callSid: call.sid,
|
|
34
|
+
status: call.status,
|
|
35
|
+
to: call.to,
|
|
36
|
+
from: call.from,
|
|
37
|
+
direction: call.direction,
|
|
38
|
+
duration: call.duration,
|
|
39
|
+
price: call.price,
|
|
40
|
+
priceUnit: call.priceUnit,
|
|
41
|
+
dateCreated: call.dateCreated?.toISOString(),
|
|
42
|
+
startTime: call.startTime?.toISOString(),
|
|
43
|
+
endTime: call.endTime?.toISOString(),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
exports.FetchCallService = FetchCallService;
|
|
48
|
+
exports.FetchCallService = FetchCallService = __decorate([
|
|
49
|
+
(0, common_1.Injectable)(),
|
|
50
|
+
__metadata("design:paramtypes", [twilio_1.TwilioVoiceService])
|
|
51
|
+
], FetchCallService);
|
|
52
|
+
//# sourceMappingURL=fetch-call.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-call.service.js","sourceRoot":"","sources":["../../../../src/modules/twilio/services/fetch-call.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iDAAwE;AAKjE,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IACE;IAA7B,YAA6B,kBAAsC;QAAtC,uBAAkB,GAAlB,kBAAkB,CAAoB;IAAG,CAAC;IAEvE,KAAK,CAAC,OAAO,CACX,MAA+B,EAC/B,OAA8B;QAE9B,MAAM,OAAO,GAAG,MAAM,CAAC,OAAiB,CAAC;QAEzC,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC1C,CAAC;QAGD,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,EAAE,UAAoB,CAAC;QAC7D,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,EAAE,SAAmB,CAAC;QAE3D,IAAI,CAAC,UAAU,IAAI,CAAC,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;QAChF,CAAC;QAED,MAAM,MAAM,GAAwB,IAAI,CAAC;QAEzC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;QAE1E,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,GAAG;YACjB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,WAAW,EAAE;YAC5C,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,WAAW,EAAE;YACxC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE;SACrC,CAAC;IACJ,CAAC;CACF,CAAA;AAvCY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;qCAEsC,2BAAkB;GADxD,gBAAgB,CAuC5B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TwilioMessageService } from '@venturialstd/twilio';
|
|
2
|
+
import { IWorkflowActionService, WorkflowActionContext } from '../../types';
|
|
3
|
+
export declare class FetchMessageService implements IWorkflowActionService {
|
|
4
|
+
private readonly twilioMessageService;
|
|
5
|
+
constructor(twilioMessageService: TwilioMessageService);
|
|
6
|
+
perform(inputs: Record<string, unknown>, context: WorkflowActionContext): Promise<Record<string, unknown>>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=fetch-message.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-message.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/twilio/services/fetch-message.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE1E,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE5E,qBACa,mBAAoB,YAAW,sBAAsB;IACpD,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAApB,oBAAoB,EAAE,oBAAoB;IAEjE,OAAO,CACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAyCpC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.FetchMessageService = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const twilio_1 = require("@venturialstd/twilio");
|
|
15
|
+
let FetchMessageService = class FetchMessageService {
|
|
16
|
+
twilioMessageService;
|
|
17
|
+
constructor(twilioMessageService) {
|
|
18
|
+
this.twilioMessageService = twilioMessageService;
|
|
19
|
+
}
|
|
20
|
+
async perform(inputs, context) {
|
|
21
|
+
const messageSid = inputs.messageSid;
|
|
22
|
+
if (!messageSid) {
|
|
23
|
+
throw new Error('Message SID is required');
|
|
24
|
+
}
|
|
25
|
+
const accountSid = context.credentials?.accountSid;
|
|
26
|
+
const authToken = context.credentials?.authToken;
|
|
27
|
+
if (!accountSid || !authToken) {
|
|
28
|
+
throw new Error('Twilio credentials (accountSid and authToken) are required');
|
|
29
|
+
}
|
|
30
|
+
const config = {
|
|
31
|
+
auth: {
|
|
32
|
+
accountSid,
|
|
33
|
+
authToken,
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
const message = await this.twilioMessageService.fetchMessage(config, { messageSid });
|
|
37
|
+
return {
|
|
38
|
+
messageSid: message.sid,
|
|
39
|
+
status: message.status,
|
|
40
|
+
to: message.to,
|
|
41
|
+
from: message.from,
|
|
42
|
+
body: message.body,
|
|
43
|
+
dateCreated: message.dateCreated?.toISOString(),
|
|
44
|
+
dateSent: message.dateSent?.toISOString(),
|
|
45
|
+
dateUpdated: message.dateUpdated?.toISOString(),
|
|
46
|
+
direction: message.direction,
|
|
47
|
+
errorCode: message.errorCode,
|
|
48
|
+
errorMessage: message.errorMessage,
|
|
49
|
+
price: message.price,
|
|
50
|
+
priceUnit: message.priceUnit,
|
|
51
|
+
uri: message.uri,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
exports.FetchMessageService = FetchMessageService;
|
|
56
|
+
exports.FetchMessageService = FetchMessageService = __decorate([
|
|
57
|
+
(0, common_1.Injectable)(),
|
|
58
|
+
__metadata("design:paramtypes", [twilio_1.TwilioMessageService])
|
|
59
|
+
], FetchMessageService);
|
|
60
|
+
//# sourceMappingURL=fetch-message.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-message.service.js","sourceRoot":"","sources":["../../../../src/modules/twilio/services/fetch-message.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iDAA0E;AAKnE,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IACD;IAA7B,YAA6B,oBAA0C;QAA1C,yBAAoB,GAApB,oBAAoB,CAAsB;IAAG,CAAC;IAE3E,KAAK,CAAC,OAAO,CACX,MAA+B,EAC/B,OAA8B;QAE9B,MAAM,UAAU,GAAG,MAAM,CAAC,UAAoB,CAAC;QAE/C,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC7C,CAAC;QAGD,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,EAAE,UAAoB,CAAC;QAC7D,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,EAAE,SAAmB,CAAC;QAE3D,IAAI,CAAC,UAAU,IAAI,CAAC,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;QAChF,CAAC;QAED,MAAM,MAAM,GAAwB;YAClC,IAAI,EAAE;gBACJ,UAAU;gBACV,SAAS;aACV;SACF,CAAC;QAEF,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;QAErF,OAAO;YACL,UAAU,EAAE,OAAO,CAAC,GAAG;YACvB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,WAAW,EAAE;YAC/C,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,WAAW,EAAE;YACzC,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,WAAW,EAAE;YAC/C,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,GAAG,EAAE,OAAO,CAAC,GAAG;SACjB,CAAC;IACJ,CAAC;CACF,CAAA;AA/CY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;qCAEwC,6BAAoB;GAD5D,mBAAmB,CA+C/B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TwilioVerifyService } from '@venturialstd/twilio';
|
|
2
|
+
import { IWorkflowActionService, WorkflowActionContext } from '../../types';
|
|
3
|
+
export declare class FetchVerificationService implements IWorkflowActionService {
|
|
4
|
+
private readonly twilioVerifyService;
|
|
5
|
+
constructor(twilioVerifyService: TwilioVerifyService);
|
|
6
|
+
perform(inputs: Record<string, unknown>, context: WorkflowActionContext): Promise<Record<string, unknown>>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=fetch-verification.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-verification.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/twilio/services/fetch-verification.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEzE,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE5E,qBACa,wBAAyB,YAAW,sBAAsB;IACzD,OAAO,CAAC,QAAQ,CAAC,mBAAmB;gBAAnB,mBAAmB,EAAE,mBAAmB;IAE/D,OAAO,CACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAwCpC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.FetchVerificationService = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const twilio_1 = require("@venturialstd/twilio");
|
|
15
|
+
let FetchVerificationService = class FetchVerificationService {
|
|
16
|
+
twilioVerifyService;
|
|
17
|
+
constructor(twilioVerifyService) {
|
|
18
|
+
this.twilioVerifyService = twilioVerifyService;
|
|
19
|
+
}
|
|
20
|
+
async perform(inputs, context) {
|
|
21
|
+
const verificationSid = inputs.verificationSid;
|
|
22
|
+
const serviceSid = inputs.serviceSid;
|
|
23
|
+
if (!verificationSid) {
|
|
24
|
+
throw new Error('Verification SID is required');
|
|
25
|
+
}
|
|
26
|
+
if (!serviceSid) {
|
|
27
|
+
throw new Error('Verify Service SID is required');
|
|
28
|
+
}
|
|
29
|
+
const accountSid = context.credentials?.accountSid;
|
|
30
|
+
const authToken = context.credentials?.authToken;
|
|
31
|
+
if (!accountSid || !authToken) {
|
|
32
|
+
throw new Error('Twilio credentials (accountSid and authToken) are required');
|
|
33
|
+
}
|
|
34
|
+
const config = {
|
|
35
|
+
auth: {
|
|
36
|
+
accountSid,
|
|
37
|
+
authToken,
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
const verification = await this.twilioVerifyService.fetchVerification(config, serviceSid, {
|
|
41
|
+
sid: verificationSid,
|
|
42
|
+
});
|
|
43
|
+
return {
|
|
44
|
+
verificationSid: verification.sid,
|
|
45
|
+
status: verification.status,
|
|
46
|
+
to: verification.to,
|
|
47
|
+
channel: verification.channel,
|
|
48
|
+
dateCreated: verification.dateCreated?.toISOString(),
|
|
49
|
+
dateUpdated: verification.dateUpdated?.toISOString(),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
exports.FetchVerificationService = FetchVerificationService;
|
|
54
|
+
exports.FetchVerificationService = FetchVerificationService = __decorate([
|
|
55
|
+
(0, common_1.Injectable)(),
|
|
56
|
+
__metadata("design:paramtypes", [twilio_1.TwilioVerifyService])
|
|
57
|
+
], FetchVerificationService);
|
|
58
|
+
//# sourceMappingURL=fetch-verification.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-verification.service.js","sourceRoot":"","sources":["../../../../src/modules/twilio/services/fetch-verification.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iDAAyE;AAKlE,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACN;IAA7B,YAA6B,mBAAwC;QAAxC,wBAAmB,GAAnB,mBAAmB,CAAqB;IAAG,CAAC;IAEzE,KAAK,CAAC,OAAO,CACX,MAA+B,EAC/B,OAA8B;QAE9B,MAAM,eAAe,GAAG,MAAM,CAAC,eAAyB,CAAC;QACzD,MAAM,UAAU,GAAG,MAAM,CAAC,UAAoB,CAAC;QAE/C,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QAED,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACpD,CAAC;QAGD,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,EAAE,UAAoB,CAAC;QAC7D,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,EAAE,SAAmB,CAAC;QAE3D,IAAI,CAAC,UAAU,IAAI,CAAC,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;QAChF,CAAC;QAED,MAAM,MAAM,GAAwB;YAClC,IAAI,EAAE;gBACJ,UAAU;gBACV,SAAS;aACV;SACF,CAAC;QAEF,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,MAAM,EAAE,UAAU,EAAE;YACxF,GAAG,EAAE,eAAe;SACrB,CAAC,CAAC;QAEH,OAAO;YACL,eAAe,EAAE,YAAY,CAAC,GAAG;YACjC,MAAM,EAAE,YAAY,CAAC,MAAM;YAC3B,EAAE,EAAE,YAAY,CAAC,EAAE;YACnB,OAAO,EAAE,YAAY,CAAC,OAAO;YAC7B,WAAW,EAAE,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;YACpD,WAAW,EAAE,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;SACrD,CAAC;IACJ,CAAC;CACF,CAAA;AA9CY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;qCAEuC,4BAAmB;GAD1D,wBAAwB,CA8CpC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TwilioTwiMLService } from '@venturialstd/twilio';
|
|
2
|
+
import { IWorkflowActionService, WorkflowActionContext } from '../../types';
|
|
3
|
+
export declare class GenerateTwiMLDialService implements IWorkflowActionService {
|
|
4
|
+
private readonly twilioTwiMLService;
|
|
5
|
+
constructor(twilioTwiMLService: TwilioTwiMLService);
|
|
6
|
+
perform(inputs: Record<string, unknown>, _context: WorkflowActionContext): Promise<Record<string, unknown>>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=generate-twiml-dial.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-twiml-dial.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/twilio/services/generate-twiml-dial.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE5E,qBACa,wBAAyB,YAAW,sBAAsB;IACzD,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,kBAAkB;IAE7D,OAAO,CACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,QAAQ,EAAE,qBAAqB,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAoBpC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GenerateTwiMLDialService = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const twilio_1 = require("@venturialstd/twilio");
|
|
15
|
+
let GenerateTwiMLDialService = class GenerateTwiMLDialService {
|
|
16
|
+
twilioTwiMLService;
|
|
17
|
+
constructor(twilioTwiMLService) {
|
|
18
|
+
this.twilioTwiMLService = twilioTwiMLService;
|
|
19
|
+
}
|
|
20
|
+
async perform(inputs, _context) {
|
|
21
|
+
const number = inputs.number;
|
|
22
|
+
const callerId = inputs.callerId;
|
|
23
|
+
const timeout = inputs.timeout ? Number(inputs.timeout) : undefined;
|
|
24
|
+
const record = inputs.record;
|
|
25
|
+
if (!number) {
|
|
26
|
+
throw new Error('Phone number is required');
|
|
27
|
+
}
|
|
28
|
+
const twiml = this.twilioTwiMLService.dial(number, callerId, timeout, record);
|
|
29
|
+
return {
|
|
30
|
+
twiml,
|
|
31
|
+
number,
|
|
32
|
+
callerId,
|
|
33
|
+
timeout: timeout || 30,
|
|
34
|
+
record: record || false,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
exports.GenerateTwiMLDialService = GenerateTwiMLDialService;
|
|
39
|
+
exports.GenerateTwiMLDialService = GenerateTwiMLDialService = __decorate([
|
|
40
|
+
(0, common_1.Injectable)(),
|
|
41
|
+
__metadata("design:paramtypes", [twilio_1.TwilioTwiMLService])
|
|
42
|
+
], GenerateTwiMLDialService);
|
|
43
|
+
//# sourceMappingURL=generate-twiml-dial.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-twiml-dial.service.js","sourceRoot":"","sources":["../../../../src/modules/twilio/services/generate-twiml-dial.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iDAA0D;AAKnD,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACN;IAA7B,YAA6B,kBAAsC;QAAtC,uBAAkB,GAAlB,kBAAkB,CAAoB;IAAG,CAAC;IAEvE,KAAK,CAAC,OAAO,CACX,MAA+B,EAC/B,QAA+B;QAE/B,MAAM,MAAM,GAAG,MAAM,CAAC,MAAgB,CAAC;QACvC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAA8B,CAAC;QACvD,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACpE,MAAM,MAAM,GAAG,MAAM,CAAC,MAA6B,CAAC;QAEpD,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAC9C,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAE9E,OAAO;YACL,KAAK;YACL,MAAM;YACN,QAAQ;YACR,OAAO,EAAE,OAAO,IAAI,EAAE;YACtB,MAAM,EAAE,MAAM,IAAI,KAAK;SACxB,CAAC;IACJ,CAAC;CACF,CAAA;AA1BY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;qCAEsC,2BAAkB;GADxD,wBAAwB,CA0BpC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TwilioTwiMLService } from '@venturialstd/twilio';
|
|
2
|
+
import { IWorkflowActionService, WorkflowActionContext } from '../../types';
|
|
3
|
+
export declare class GenerateTwiMLSayService implements IWorkflowActionService {
|
|
4
|
+
private readonly twilioTwiMLService;
|
|
5
|
+
constructor(twilioTwiMLService: TwilioTwiMLService);
|
|
6
|
+
perform(inputs: Record<string, unknown>, _context: WorkflowActionContext): Promise<Record<string, unknown>>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=generate-twiml-say.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-twiml-say.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/twilio/services/generate-twiml-say.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE5E,qBACa,uBAAwB,YAAW,sBAAsB;IACxD,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,kBAAkB;IAE7D,OAAO,CACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,QAAQ,EAAE,qBAAqB,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAoBpC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GenerateTwiMLSayService = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const twilio_1 = require("@venturialstd/twilio");
|
|
15
|
+
let GenerateTwiMLSayService = class GenerateTwiMLSayService {
|
|
16
|
+
twilioTwiMLService;
|
|
17
|
+
constructor(twilioTwiMLService) {
|
|
18
|
+
this.twilioTwiMLService = twilioTwiMLService;
|
|
19
|
+
}
|
|
20
|
+
async perform(inputs, _context) {
|
|
21
|
+
const message = inputs.message;
|
|
22
|
+
const voice = inputs.voice || undefined;
|
|
23
|
+
const language = inputs.language
|
|
24
|
+
? inputs.language
|
|
25
|
+
: undefined;
|
|
26
|
+
if (!message) {
|
|
27
|
+
throw new Error('Message is required');
|
|
28
|
+
}
|
|
29
|
+
const twimlResult = this.twilioTwiMLService.say(message, voice, language);
|
|
30
|
+
return {
|
|
31
|
+
twiml: twimlResult,
|
|
32
|
+
message,
|
|
33
|
+
voice: voice || 'man',
|
|
34
|
+
language: language || 'en',
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
exports.GenerateTwiMLSayService = GenerateTwiMLSayService;
|
|
39
|
+
exports.GenerateTwiMLSayService = GenerateTwiMLSayService = __decorate([
|
|
40
|
+
(0, common_1.Injectable)(),
|
|
41
|
+
__metadata("design:paramtypes", [twilio_1.TwilioTwiMLService])
|
|
42
|
+
], GenerateTwiMLSayService);
|
|
43
|
+
//# sourceMappingURL=generate-twiml-say.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-twiml-say.service.js","sourceRoot":"","sources":["../../../../src/modules/twilio/services/generate-twiml-say.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iDAA0D;AAMnD,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IACL;IAA7B,YAA6B,kBAAsC;QAAtC,uBAAkB,GAAlB,kBAAkB,CAAoB;IAAG,CAAC;IAEvE,KAAK,CAAC,OAAO,CACX,MAA+B,EAC/B,QAA+B;QAE/B,MAAM,OAAO,GAAG,MAAM,CAAC,OAAiB,CAAC;QACzC,MAAM,KAAK,GAAI,MAAM,CAAC,KAAmC,IAAI,SAAS,CAAC;QACvE,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ;YAC9B,CAAC,CAAE,MAAM,CAAC,QAAkE;YAC5E,CAAC,CAAC,SAAS,CAAC;QAEd,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;QACzC,CAAC;QAED,MAAM,WAAW,GAAG,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;QAE1E,OAAO;YACL,KAAK,EAAE,WAAW;YAClB,OAAO;YACP,KAAK,EAAE,KAAK,IAAI,KAAK;YACrB,QAAQ,EAAE,QAAQ,IAAI,IAAI;SAC3B,CAAC;IACJ,CAAC;CACF,CAAA;AA1BY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,mBAAU,GAAE;qCAEsC,2BAAkB;GADxD,uBAAuB,CA0BnC"}
|