@venturialstd/twilio 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -0
- package/dist/clients/twilio.client.d.ts +10 -0
- package/dist/clients/twilio.client.d.ts.map +1 -0
- package/dist/clients/twilio.client.js +47 -0
- package/dist/clients/twilio.client.js.map +1 -0
- package/dist/constants/twilio.constant.d.ts +27 -0
- package/dist/constants/twilio.constant.d.ts.map +1 -0
- package/dist/constants/twilio.constant.js +33 -0
- package/dist/constants/twilio.constant.js.map +1 -0
- package/dist/constants/twilio.event.constant.d.ts +5 -0
- package/dist/constants/twilio.event.constant.d.ts.map +1 -0
- package/dist/constants/twilio.event.constant.js +9 -0
- package/dist/constants/twilio.event.constant.js.map +1 -0
- package/dist/constants/twilio.settings.constant.d.ts +7 -0
- package/dist/constants/twilio.settings.constant.d.ts.map +1 -0
- package/dist/constants/twilio.settings.constant.js +10 -0
- package/dist/constants/twilio.settings.constant.js.map +1 -0
- package/dist/controllers/webhook/twilio.webhook.controller.d.ts +8 -0
- package/dist/controllers/webhook/twilio.webhook.controller.d.ts.map +1 -0
- package/dist/controllers/webhook/twilio.webhook.controller.js +47 -0
- package/dist/controllers/webhook/twilio.webhook.controller.js.map +1 -0
- package/dist/dtos/index.d.ts +2 -0
- package/dist/dtos/index.d.ts.map +1 -0
- package/dist/dtos/index.js +18 -0
- package/dist/dtos/index.js.map +1 -0
- package/dist/dtos/twilio-incoming-message-input.dto.d.ts +39 -0
- package/dist/dtos/twilio-incoming-message-input.dto.d.ts.map +1 -0
- package/dist/dtos/twilio-incoming-message-input.dto.js +241 -0
- package/dist/dtos/twilio-incoming-message-input.dto.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/listeners/twilio-message.listener.d.ts +9 -0
- package/dist/listeners/twilio-message.listener.d.ts.map +1 -0
- package/dist/listeners/twilio-message.listener.js +37 -0
- package/dist/listeners/twilio-message.listener.js.map +1 -0
- package/dist/services/twilio-conversation.service.d.ts +34 -0
- package/dist/services/twilio-conversation.service.d.ts.map +1 -0
- package/dist/services/twilio-conversation.service.js +199 -0
- package/dist/services/twilio-conversation.service.js.map +1 -0
- package/dist/services/twilio-lookup.service.d.ts +9 -0
- package/dist/services/twilio-lookup.service.d.ts.map +1 -0
- package/dist/services/twilio-lookup.service.js +41 -0
- package/dist/services/twilio-lookup.service.js.map +1 -0
- package/dist/services/twilio-message.service.d.ts +13 -0
- package/dist/services/twilio-message.service.d.ts.map +1 -0
- package/dist/services/twilio-message.service.js +84 -0
- package/dist/services/twilio-message.service.js.map +1 -0
- package/dist/services/twilio-phone-number.service.d.ts +14 -0
- package/dist/services/twilio-phone-number.service.d.ts.map +1 -0
- package/dist/services/twilio-phone-number.service.js +171 -0
- package/dist/services/twilio-phone-number.service.js.map +1 -0
- package/dist/services/twilio-twiml.service.d.ts +13 -0
- package/dist/services/twilio-twiml.service.d.ts.map +1 -0
- package/dist/services/twilio-twiml.service.js +74 -0
- package/dist/services/twilio-twiml.service.js.map +1 -0
- package/dist/services/twilio-verify.service.d.ts +13 -0
- package/dist/services/twilio-verify.service.d.ts.map +1 -0
- package/dist/services/twilio-verify.service.js +73 -0
- package/dist/services/twilio-verify.service.js.map +1 -0
- package/dist/services/twilio-video.service.d.ts +20 -0
- package/dist/services/twilio-video.service.d.ts.map +1 -0
- package/dist/services/twilio-video.service.js +111 -0
- package/dist/services/twilio-video.service.js.map +1 -0
- package/dist/services/twilio-voice.service.d.ts +14 -0
- package/dist/services/twilio-voice.service.d.ts.map +1 -0
- package/dist/services/twilio-voice.service.js +129 -0
- package/dist/services/twilio-voice.service.js.map +1 -0
- package/dist/settings/twilio.settings.d.ts +3 -0
- package/dist/settings/twilio.settings.d.ts.map +1 -0
- package/dist/settings/twilio.settings.js +55 -0
- package/dist/settings/twilio.settings.js.map +1 -0
- package/dist/twilio.module.d.ts +3 -0
- package/dist/twilio.module.d.ts.map +1 -0
- package/dist/twilio.module.js +62 -0
- package/dist/twilio.module.js.map +1 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +26 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/twilio-conversation.types.d.ts +60 -0
- package/dist/types/twilio-conversation.types.d.ts.map +1 -0
- package/dist/types/twilio-conversation.types.js +3 -0
- package/dist/types/twilio-conversation.types.js.map +1 -0
- package/dist/types/twilio-lookup.types.d.ts +8 -0
- package/dist/types/twilio-lookup.types.d.ts.map +1 -0
- package/dist/types/twilio-lookup.types.js +3 -0
- package/dist/types/twilio-lookup.types.js.map +1 -0
- package/dist/types/twilio-message.types.d.ts +27 -0
- package/dist/types/twilio-message.types.d.ts.map +1 -0
- package/dist/types/twilio-message.types.js +3 -0
- package/dist/types/twilio-message.types.js.map +1 -0
- package/dist/types/twilio-phone-number.types.d.ts +68 -0
- package/dist/types/twilio-phone-number.types.d.ts.map +1 -0
- package/dist/types/twilio-phone-number.types.js +3 -0
- package/dist/types/twilio-phone-number.types.js.map +1 -0
- package/dist/types/twilio-verify.types.d.ts +29 -0
- package/dist/types/twilio-verify.types.d.ts.map +1 -0
- package/dist/types/twilio-verify.types.js +3 -0
- package/dist/types/twilio-verify.types.js.map +1 -0
- package/dist/types/twilio-video.types.d.ts +35 -0
- package/dist/types/twilio-video.types.d.ts.map +1 -0
- package/dist/types/twilio-video.types.js +3 -0
- package/dist/types/twilio-video.types.js.map +1 -0
- package/dist/types/twilio-voice.types.d.ts +46 -0
- package/dist/types/twilio-voice.types.d.ts.map +1 -0
- package/dist/types/twilio-voice.types.js +3 -0
- package/dist/types/twilio-voice.types.js.map +1 -0
- package/dist/types/twilio.config.type.d.ts +9 -0
- package/dist/types/twilio.config.type.d.ts.map +1 -0
- package/dist/types/twilio.config.type.js +3 -0
- package/dist/types/twilio.config.type.js.map +1 -0
- package/dist/types/twilio.event.type.d.ts +18 -0
- package/dist/types/twilio.event.type.d.ts.map +1 -0
- package/dist/types/twilio.event.type.js +4 -0
- package/dist/types/twilio.event.type.js.map +1 -0
- package/package.json +97 -0
package/README.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# @venturialstd/twilio
|
|
2
|
+
|
|
3
|
+
A NestJS module for integrating Twilio messaging services (SMS, WhatsApp) into Venturial applications.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Twilio Client**: Wrapper for Twilio SDK with dynamic configuration
|
|
8
|
+
- **Message Service**: Send SMS and WhatsApp messages
|
|
9
|
+
- **Webhook Support**: Handle incoming messages via webhooks
|
|
10
|
+
- **Event-Driven**: Event emitter integration for message handling
|
|
11
|
+
- **Settings Integration**: Dynamic configuration via Venturial's SettingsService
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @venturialstd/twilio
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
### Import the Module
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { Module } from '@nestjs/common';
|
|
25
|
+
import { TwilioModule } from '@venturialstd/twilio';
|
|
26
|
+
|
|
27
|
+
@Module({
|
|
28
|
+
imports: [TwilioModule],
|
|
29
|
+
})
|
|
30
|
+
export class AppModule {}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Send Messages
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import { TwilioMessageService } from '@venturialstd/twilio';
|
|
37
|
+
|
|
38
|
+
@Injectable()
|
|
39
|
+
export class MyService {
|
|
40
|
+
constructor(private readonly twilioService: TwilioMessageService) {}
|
|
41
|
+
|
|
42
|
+
async sendSMS(to: string, message: string) {
|
|
43
|
+
await this.twilioService.sendMessage(null, to, message);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Webhook Controller
|
|
49
|
+
|
|
50
|
+
The module includes a webhook controller at `/general/twilio/webhook` that handles incoming Twilio messages and emits events.
|
|
51
|
+
|
|
52
|
+
### Settings
|
|
53
|
+
|
|
54
|
+
The module uses Venturial's SettingsService for configuration. Configure the following settings:
|
|
55
|
+
|
|
56
|
+
- `GLOBAL:TWILIO:GENERAL:ENABLED` - Enable/disable the module
|
|
57
|
+
- `GLOBAL:TWILIO:GENERAL:ACCOUNT_SID` - Twilio Account SID
|
|
58
|
+
- `GLOBAL:TWILIO:GENERAL:AUTH_TOKEN` - Twilio Auth Token
|
|
59
|
+
- `GLOBAL:TWILIO:GENERAL:PHONE_NUMBER` - Twilio Phone Number
|
|
60
|
+
|
|
61
|
+
## Events
|
|
62
|
+
|
|
63
|
+
The module emits the following events:
|
|
64
|
+
|
|
65
|
+
- `webhook_incoming_message` - When a message is received via webhook
|
|
66
|
+
- `send_message` - Trigger to send a message (handled by TwilioMessageListener)
|
|
67
|
+
|
|
68
|
+
## Development
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Build
|
|
72
|
+
npm run build
|
|
73
|
+
|
|
74
|
+
# Test
|
|
75
|
+
npm run test:dev
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Publishing
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# Build and publish patch version
|
|
82
|
+
npm run release:patch
|
|
83
|
+
```
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SettingsService } from '@venturialstd/core';
|
|
2
|
+
import { Twilio } from 'twilio';
|
|
3
|
+
import { TwilioConfig } from '../types/twilio.config.type';
|
|
4
|
+
export declare class TwilioClient {
|
|
5
|
+
private readonly settingsService;
|
|
6
|
+
constructor(settingsService: SettingsService);
|
|
7
|
+
getClient(config?: TwilioConfig | null): Promise<Twilio>;
|
|
8
|
+
getPhoneNumber(config?: TwilioConfig | null, channel?: string): Promise<string>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=twilio.client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twilio.client.d.ts","sourceRoot":"","sources":["../../src/clients/twilio.client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,qBACa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAAf,eAAe,EAAE,eAAe;IAEvD,SAAS,CAAC,MAAM,GAAE,YAAY,GAAG,IAAW,GAAG,OAAO,CAAC,MAAM,CAAC;IAgB9D,cAAc,CAClB,MAAM,GAAE,YAAY,GAAG,IAAW,EAClC,OAAO,GAAE,MAAmB,GAC3B,OAAO,CAAC,MAAM,CAAC;CAWnB"}
|
|
@@ -0,0 +1,47 @@
|
|
|
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.TwilioClient = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const core_1 = require("@venturialstd/core");
|
|
15
|
+
const twilio_1 = require("twilio");
|
|
16
|
+
const twilio_settings_constant_1 = require("../constants/twilio.settings.constant");
|
|
17
|
+
let TwilioClient = class TwilioClient {
|
|
18
|
+
settingsService;
|
|
19
|
+
constructor(settingsService) {
|
|
20
|
+
this.settingsService = settingsService;
|
|
21
|
+
}
|
|
22
|
+
async getClient(config = null) {
|
|
23
|
+
if (config && config.auth) {
|
|
24
|
+
return new twilio_1.Twilio(config.auth.accountSid, config.auth.authToken);
|
|
25
|
+
}
|
|
26
|
+
const twilioSettings = await this.settingsService.getManyWithDefaults([
|
|
27
|
+
twilio_settings_constant_1.TWILIO_SETTING_KEYS.GENERAL_ACCOUNT_SID,
|
|
28
|
+
twilio_settings_constant_1.TWILIO_SETTING_KEYS.GENERAL_AUTH_TOKEN,
|
|
29
|
+
]);
|
|
30
|
+
return new twilio_1.Twilio(twilioSettings[twilio_settings_constant_1.TWILIO_SETTING_KEYS.GENERAL_ACCOUNT_SID], twilioSettings[twilio_settings_constant_1.TWILIO_SETTING_KEYS.GENERAL_AUTH_TOKEN]);
|
|
31
|
+
}
|
|
32
|
+
async getPhoneNumber(config = null, channel = 'whatsapp') {
|
|
33
|
+
if (config && config.phoneNumber) {
|
|
34
|
+
return `${channel}:${config.phoneNumber}`;
|
|
35
|
+
}
|
|
36
|
+
const twilioSettings = await this.settingsService.getManyWithDefaults([
|
|
37
|
+
twilio_settings_constant_1.TWILIO_SETTING_KEYS.GENERAL_PHONE_NUMBER,
|
|
38
|
+
]);
|
|
39
|
+
return `${channel}:${twilioSettings[twilio_settings_constant_1.TWILIO_SETTING_KEYS.GENERAL_PHONE_NUMBER]}`;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
exports.TwilioClient = TwilioClient;
|
|
43
|
+
exports.TwilioClient = TwilioClient = __decorate([
|
|
44
|
+
(0, common_1.Injectable)(),
|
|
45
|
+
__metadata("design:paramtypes", [core_1.SettingsService])
|
|
46
|
+
], TwilioClient);
|
|
47
|
+
//# sourceMappingURL=twilio.client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twilio.client.js","sourceRoot":"","sources":["../../src/clients/twilio.client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAqD;AACrD,mCAAgC;AAEhC,oFAA4E;AAIrE,IAAM,YAAY,GAAlB,MAAM,YAAY;IACM;IAA7B,YAA6B,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IAAG,CAAC;IAEjE,KAAK,CAAC,SAAS,CAAC,SAA8B,IAAI;QAChD,IAAI,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;YAC1B,OAAO,IAAI,eAAM,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACnE,CAAC;QAED,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,mBAAmB,CAAC;YACpE,8CAAmB,CAAC,mBAAmB;YACvC,8CAAmB,CAAC,kBAAkB;SACvC,CAAC,CAAC;QAEH,OAAO,IAAI,eAAM,CACf,cAAc,CAAC,8CAAmB,CAAC,mBAAmB,CAAC,EACvD,cAAc,CAAC,8CAAmB,CAAC,kBAAkB,CAAC,CACvD,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,cAAc,CAClB,SAA8B,IAAI,EAClC,UAAkB,UAAU;QAE5B,IAAI,MAAM,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;YACjC,OAAO,GAAG,OAAO,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QAC5C,CAAC;QAED,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,mBAAmB,CAAC;YACpE,8CAAmB,CAAC,oBAAoB;SACzC,CAAC,CAAC;QAEH,OAAO,GAAG,OAAO,IAAI,cAAc,CAAC,8CAAmB,CAAC,oBAAoB,CAAC,EAAE,CAAC;IAClF,CAAC;CACF,CAAA;AAjCY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAEmC,sBAAe;GADlD,YAAY,CAiCxB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare enum TWILIO_MEDIA_CONTENT_TYPE {
|
|
2
|
+
TEXT = "text",
|
|
3
|
+
VCARD = "text/vcard",
|
|
4
|
+
IMAGE_JPEG = "image/jpeg",
|
|
5
|
+
IMAGE_WEBP = "image/webp"
|
|
6
|
+
}
|
|
7
|
+
export declare enum TWILIO_MESSAGE_TYPE {
|
|
8
|
+
TEXT = "text",
|
|
9
|
+
INTERACTIVE = "interactive",
|
|
10
|
+
CONTACTS = "contacts",
|
|
11
|
+
BUTTON = "button"
|
|
12
|
+
}
|
|
13
|
+
export declare enum TWILIO_CALLBACK_STATUS {
|
|
14
|
+
QUEUED = "queued",
|
|
15
|
+
SENDING = "sending",
|
|
16
|
+
SENT = "sent",
|
|
17
|
+
FAILED = "failed",
|
|
18
|
+
DELIVERED = "delivered",
|
|
19
|
+
UNDELIVERED = "undelivered",
|
|
20
|
+
RECEIVING = "receiving",
|
|
21
|
+
RECEIVED = "received",
|
|
22
|
+
ACCEPTED = "accepted",
|
|
23
|
+
SCHEDULED = "scheduled",
|
|
24
|
+
READ = "read",
|
|
25
|
+
CANCELED = "canceled"
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=twilio.constant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twilio.constant.d.ts","sourceRoot":"","sources":["../../src/constants/twilio.constant.ts"],"names":[],"mappings":"AAAA,oBAAY,yBAAyB;IACnC,IAAI,SAAS;IACb,KAAK,eAAe;IACpB,UAAU,eAAe;IACzB,UAAU,eAAe;CAC1B;AAED,oBAAY,mBAAmB;IAC7B,IAAI,SAAS;IACb,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB;AAED,oBAAY,sBAAsB;IAChC,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TWILIO_CALLBACK_STATUS = exports.TWILIO_MESSAGE_TYPE = exports.TWILIO_MEDIA_CONTENT_TYPE = void 0;
|
|
4
|
+
var TWILIO_MEDIA_CONTENT_TYPE;
|
|
5
|
+
(function (TWILIO_MEDIA_CONTENT_TYPE) {
|
|
6
|
+
TWILIO_MEDIA_CONTENT_TYPE["TEXT"] = "text";
|
|
7
|
+
TWILIO_MEDIA_CONTENT_TYPE["VCARD"] = "text/vcard";
|
|
8
|
+
TWILIO_MEDIA_CONTENT_TYPE["IMAGE_JPEG"] = "image/jpeg";
|
|
9
|
+
TWILIO_MEDIA_CONTENT_TYPE["IMAGE_WEBP"] = "image/webp";
|
|
10
|
+
})(TWILIO_MEDIA_CONTENT_TYPE || (exports.TWILIO_MEDIA_CONTENT_TYPE = TWILIO_MEDIA_CONTENT_TYPE = {}));
|
|
11
|
+
var TWILIO_MESSAGE_TYPE;
|
|
12
|
+
(function (TWILIO_MESSAGE_TYPE) {
|
|
13
|
+
TWILIO_MESSAGE_TYPE["TEXT"] = "text";
|
|
14
|
+
TWILIO_MESSAGE_TYPE["INTERACTIVE"] = "interactive";
|
|
15
|
+
TWILIO_MESSAGE_TYPE["CONTACTS"] = "contacts";
|
|
16
|
+
TWILIO_MESSAGE_TYPE["BUTTON"] = "button";
|
|
17
|
+
})(TWILIO_MESSAGE_TYPE || (exports.TWILIO_MESSAGE_TYPE = TWILIO_MESSAGE_TYPE = {}));
|
|
18
|
+
var TWILIO_CALLBACK_STATUS;
|
|
19
|
+
(function (TWILIO_CALLBACK_STATUS) {
|
|
20
|
+
TWILIO_CALLBACK_STATUS["QUEUED"] = "queued";
|
|
21
|
+
TWILIO_CALLBACK_STATUS["SENDING"] = "sending";
|
|
22
|
+
TWILIO_CALLBACK_STATUS["SENT"] = "sent";
|
|
23
|
+
TWILIO_CALLBACK_STATUS["FAILED"] = "failed";
|
|
24
|
+
TWILIO_CALLBACK_STATUS["DELIVERED"] = "delivered";
|
|
25
|
+
TWILIO_CALLBACK_STATUS["UNDELIVERED"] = "undelivered";
|
|
26
|
+
TWILIO_CALLBACK_STATUS["RECEIVING"] = "receiving";
|
|
27
|
+
TWILIO_CALLBACK_STATUS["RECEIVED"] = "received";
|
|
28
|
+
TWILIO_CALLBACK_STATUS["ACCEPTED"] = "accepted";
|
|
29
|
+
TWILIO_CALLBACK_STATUS["SCHEDULED"] = "scheduled";
|
|
30
|
+
TWILIO_CALLBACK_STATUS["READ"] = "read";
|
|
31
|
+
TWILIO_CALLBACK_STATUS["CANCELED"] = "canceled";
|
|
32
|
+
})(TWILIO_CALLBACK_STATUS || (exports.TWILIO_CALLBACK_STATUS = TWILIO_CALLBACK_STATUS = {}));
|
|
33
|
+
//# sourceMappingURL=twilio.constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twilio.constant.js","sourceRoot":"","sources":["../../src/constants/twilio.constant.ts"],"names":[],"mappings":";;;AAAA,IAAY,yBAKX;AALD,WAAY,yBAAyB;IACnC,0CAAa,CAAA;IACb,iDAAoB,CAAA;IACpB,sDAAyB,CAAA;IACzB,sDAAyB,CAAA;AAC3B,CAAC,EALW,yBAAyB,yCAAzB,yBAAyB,QAKpC;AAED,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,oCAAa,CAAA;IACb,kDAA2B,CAAA;IAC3B,4CAAqB,CAAA;IACrB,wCAAiB,CAAA;AACnB,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B;AAED,IAAY,sBAaX;AAbD,WAAY,sBAAsB;IAChC,2CAAiB,CAAA;IACjB,6CAAmB,CAAA;IACnB,uCAAa,CAAA;IACb,2CAAiB,CAAA;IACjB,iDAAuB,CAAA;IACvB,qDAA2B,CAAA;IAC3B,iDAAuB,CAAA;IACvB,+CAAqB,CAAA;IACrB,+CAAqB,CAAA;IACrB,iDAAuB,CAAA;IACvB,uCAAa,CAAA;IACb,+CAAqB,CAAA;AACvB,CAAC,EAbW,sBAAsB,sCAAtB,sBAAsB,QAajC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twilio.event.constant.d.ts","sourceRoot":"","sources":["../../src/constants/twilio.event.constant.ts"],"names":[],"mappings":"AAAA,oBAAY,2BAA2B;IACrC,wBAAwB,6BAA6B;IACrD,YAAY,iBAAiB;CAC9B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EVENT_EMITTER_TWILIO_EVENTS = void 0;
|
|
4
|
+
var EVENT_EMITTER_TWILIO_EVENTS;
|
|
5
|
+
(function (EVENT_EMITTER_TWILIO_EVENTS) {
|
|
6
|
+
EVENT_EMITTER_TWILIO_EVENTS["WEBHOOK_INCOMING_MESSAGE"] = "webhook_incoming_message";
|
|
7
|
+
EVENT_EMITTER_TWILIO_EVENTS["SEND_MESSAGE"] = "send_message";
|
|
8
|
+
})(EVENT_EMITTER_TWILIO_EVENTS || (exports.EVENT_EMITTER_TWILIO_EVENTS = EVENT_EMITTER_TWILIO_EVENTS = {}));
|
|
9
|
+
//# sourceMappingURL=twilio.event.constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twilio.event.constant.js","sourceRoot":"","sources":["../../src/constants/twilio.event.constant.ts"],"names":[],"mappings":";;;AAAA,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,oFAAqD,CAAA;IACrD,4DAA6B,CAAA;AAC/B,CAAC,EAHW,2BAA2B,2CAA3B,2BAA2B,QAGtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twilio.settings.constant.d.ts","sourceRoot":"","sources":["../../src/constants/twilio.settings.constant.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB;;;;;CAK/B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TWILIO_SETTING_KEYS = void 0;
|
|
4
|
+
exports.TWILIO_SETTING_KEYS = {
|
|
5
|
+
GENERAL_ENABLED: 'GLOBAL:TWILIO:GENERAL:ENABLED',
|
|
6
|
+
GENERAL_ACCOUNT_SID: 'GLOBAL:TWILIO:GENERAL:ACCOUNT_SID',
|
|
7
|
+
GENERAL_AUTH_TOKEN: 'GLOBAL:TWILIO:GENERAL:AUTH_TOKEN',
|
|
8
|
+
GENERAL_PHONE_NUMBER: 'GLOBAL:TWILIO:GENERAL:PHONE_NUMBER',
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=twilio.settings.constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twilio.settings.constant.js","sourceRoot":"","sources":["../../src/constants/twilio.settings.constant.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG;IACjC,eAAe,EAAE,+BAA+B;IAChD,mBAAmB,EAAE,mCAAmC;IACxD,kBAAkB,EAAE,kCAAkC;IACtD,oBAAoB,EAAE,oCAAoC;CAC3D,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EventEmitter2 } from '@nestjs/event-emitter';
|
|
2
|
+
import { TwilioIncomingMessageInput } from '../../dtos/twilio-incoming-message-input.dto';
|
|
3
|
+
export declare class TwilioGeneralWebhookController {
|
|
4
|
+
private readonly eventEmitter;
|
|
5
|
+
constructor(eventEmitter: EventEmitter2);
|
|
6
|
+
getWebhook(data: TwilioIncomingMessageInput): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=twilio.webhook.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twilio.webhook.controller.d.ts","sourceRoot":"","sources":["../../../src/controllers/webhook/twilio.webhook.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAItD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAE1F,qBAEa,8BAA8B;IAC7B,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAAZ,YAAY,EAAE,aAAa;IAGlD,UAAU,CAAS,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC;CAW1E"}
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.TwilioGeneralWebhookController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const event_emitter_1 = require("@nestjs/event-emitter");
|
|
18
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
19
|
+
const twilio_event_constant_1 = require("../../constants/twilio.event.constant");
|
|
20
|
+
const twilio_incoming_message_input_dto_1 = require("../../dtos/twilio-incoming-message-input.dto");
|
|
21
|
+
let TwilioGeneralWebhookController = class TwilioGeneralWebhookController {
|
|
22
|
+
eventEmitter;
|
|
23
|
+
constructor(eventEmitter) {
|
|
24
|
+
this.eventEmitter = eventEmitter;
|
|
25
|
+
}
|
|
26
|
+
async getWebhook(data) {
|
|
27
|
+
this.eventEmitter.emit(twilio_event_constant_1.EVENT_EMITTER_TWILIO_EVENTS.WEBHOOK_INCOMING_MESSAGE, {
|
|
28
|
+
data,
|
|
29
|
+
}, {
|
|
30
|
+
async: true,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
exports.TwilioGeneralWebhookController = TwilioGeneralWebhookController;
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, common_1.Post)(),
|
|
37
|
+
__param(0, (0, common_1.Body)()),
|
|
38
|
+
__metadata("design:type", Function),
|
|
39
|
+
__metadata("design:paramtypes", [twilio_incoming_message_input_dto_1.TwilioIncomingMessageInput]),
|
|
40
|
+
__metadata("design:returntype", Promise)
|
|
41
|
+
], TwilioGeneralWebhookController.prototype, "getWebhook", null);
|
|
42
|
+
exports.TwilioGeneralWebhookController = TwilioGeneralWebhookController = __decorate([
|
|
43
|
+
(0, swagger_1.ApiTags)('general/twilio/webhook'),
|
|
44
|
+
(0, common_1.Controller)('general/twilio/webhook'),
|
|
45
|
+
__metadata("design:paramtypes", [event_emitter_1.EventEmitter2])
|
|
46
|
+
], TwilioGeneralWebhookController);
|
|
47
|
+
//# sourceMappingURL=twilio.webhook.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twilio.webhook.controller.js","sourceRoot":"","sources":["../../../src/controllers/webhook/twilio.webhook.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwD;AACxD,yDAAsD;AACtD,6CAA0C;AAE1C,iFAAoF;AACpF,oGAA0F;AAInF,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IACZ;IAA7B,YAA6B,YAA2B;QAA3B,iBAAY,GAAZ,YAAY,CAAe;IAAG,CAAC;IAGtD,AAAN,KAAK,CAAC,UAAU,CAAS,IAAgC;QACvD,IAAI,CAAC,YAAY,CAAC,IAAI,CACpB,mDAA2B,CAAC,wBAAwB,EACpD;YACE,IAAI;SACL,EACD;YACE,KAAK,EAAE,IAAI;SACZ,CACF,CAAC;IACJ,CAAC;CACF,CAAA;AAfY,wEAA8B;AAInC;IADL,IAAA,aAAI,GAAE;IACW,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,8DAA0B;;gEAUxD;yCAdU,8BAA8B;IAF1C,IAAA,iBAAO,EAAC,wBAAwB,CAAC;IACjC,IAAA,mBAAU,EAAC,wBAAwB,CAAC;qCAEQ,6BAAa;GAD7C,8BAA8B,CAe1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dtos/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./twilio-incoming-message-input.dto"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sEAAoD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { TWILIO_MEDIA_CONTENT_TYPE, TWILIO_MESSAGE_TYPE } from '../constants/twilio.constant';
|
|
2
|
+
export declare class TwilioIncomingMessageInput {
|
|
3
|
+
SmsMessageSid: string;
|
|
4
|
+
NumMedia: string;
|
|
5
|
+
ProfileName: string;
|
|
6
|
+
MessageType: TWILIO_MESSAGE_TYPE;
|
|
7
|
+
SmsSid: string;
|
|
8
|
+
WaId: string;
|
|
9
|
+
SmsStatus: string;
|
|
10
|
+
Body?: string;
|
|
11
|
+
To: string;
|
|
12
|
+
MessagingServiceSid: string;
|
|
13
|
+
NumSegments: string;
|
|
14
|
+
ReferralNumMedia: string;
|
|
15
|
+
MessageSid: string;
|
|
16
|
+
AccountSid: string;
|
|
17
|
+
From: string;
|
|
18
|
+
ApiVersion: string;
|
|
19
|
+
MediaContentType0: TWILIO_MEDIA_CONTENT_TYPE;
|
|
20
|
+
MediaUrl0: string;
|
|
21
|
+
Latitude: string;
|
|
22
|
+
Longitude: string;
|
|
23
|
+
}
|
|
24
|
+
export declare class TwilioIncomingBarcodeInput {
|
|
25
|
+
wireAresId: string;
|
|
26
|
+
}
|
|
27
|
+
export declare class TwilioStatusCallbackInput {
|
|
28
|
+
ChannelPrefix: string;
|
|
29
|
+
ApiVersion: string;
|
|
30
|
+
MessageStatus: string;
|
|
31
|
+
SmsSid: string;
|
|
32
|
+
SmsStatus: string;
|
|
33
|
+
To: string;
|
|
34
|
+
From: string;
|
|
35
|
+
MessageSid: string;
|
|
36
|
+
AccountSid: string;
|
|
37
|
+
ChannelToAddress?: string;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=twilio-incoming-message-input.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twilio-incoming-message-input.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/twilio-incoming-message-input.dto.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAE9F,qBAAa,0BAA0B;IAIrC,aAAa,EAAE,MAAM,CAAC;IAKtB,QAAQ,EAAE,MAAM,CAAC;IAKjB,WAAW,EAAE,MAAM,CAAC;IAKpB,WAAW,EAAE,mBAAmB,CAAC;IAKjC,MAAM,EAAE,MAAM,CAAC;IAKf,IAAI,EAAE,MAAM,CAAC;IAKb,SAAS,EAAE,MAAM,CAAC;IAIlB,IAAI,CAAC,EAAE,MAAM,CAAC;IAKd,EAAE,EAAE,MAAM,CAAC;IAKX,mBAAmB,EAAE,MAAM,CAAC;IAK5B,WAAW,EAAE,MAAM,CAAC;IAKpB,gBAAgB,EAAE,MAAM,CAAC;IAKzB,UAAU,EAAE,MAAM,CAAC;IAKnB,UAAU,EAAE,MAAM,CAAC;IAKnB,IAAI,EAAE,MAAM,CAAC;IAKb,UAAU,EAAE,MAAM,CAAC;IAKnB,iBAAiB,EAAE,yBAAyB,CAAC;IAK7C,SAAS,EAAE,MAAM,CAAC;IAKlB,QAAQ,EAAE,MAAM,CAAC;IAKjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,qBAAa,0BAA0B;IAIrC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,yBAAyB;IAIpC,aAAa,EAAE,MAAM,CAAC;IAKtB,UAAU,EAAE,MAAM,CAAC;IAKnB,aAAa,EAAE,MAAM,CAAC;IAKtB,MAAM,EAAE,MAAM,CAAC;IAKf,SAAS,EAAE,MAAM,CAAC;IAKlB,EAAE,EAAE,MAAM,CAAC;IAKX,IAAI,EAAE,MAAM,CAAC;IAKb,UAAU,EAAE,MAAM,CAAC;IAKnB,UAAU,EAAE,MAAM,CAAC;IAKnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B"}
|
|
@@ -0,0 +1,241 @@
|
|
|
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.TwilioStatusCallbackInput = exports.TwilioIncomingBarcodeInput = exports.TwilioIncomingMessageInput = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const twilio_constant_1 = require("../constants/twilio.constant");
|
|
16
|
+
class TwilioIncomingMessageInput {
|
|
17
|
+
SmsMessageSid;
|
|
18
|
+
NumMedia;
|
|
19
|
+
ProfileName;
|
|
20
|
+
MessageType;
|
|
21
|
+
SmsSid;
|
|
22
|
+
WaId;
|
|
23
|
+
SmsStatus;
|
|
24
|
+
Body;
|
|
25
|
+
To;
|
|
26
|
+
MessagingServiceSid;
|
|
27
|
+
NumSegments;
|
|
28
|
+
ReferralNumMedia;
|
|
29
|
+
MessageSid;
|
|
30
|
+
AccountSid;
|
|
31
|
+
From;
|
|
32
|
+
ApiVersion;
|
|
33
|
+
MediaContentType0;
|
|
34
|
+
MediaUrl0;
|
|
35
|
+
Latitude;
|
|
36
|
+
Longitude;
|
|
37
|
+
}
|
|
38
|
+
exports.TwilioIncomingMessageInput = TwilioIncomingMessageInput;
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
(0, swagger_1.ApiProperty)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], TwilioIncomingMessageInput.prototype, "SmsMessageSid", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
47
|
+
(0, class_validator_1.IsString)(),
|
|
48
|
+
(0, swagger_1.ApiProperty)(),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], TwilioIncomingMessageInput.prototype, "NumMedia", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
53
|
+
(0, class_validator_1.IsString)(),
|
|
54
|
+
(0, swagger_1.ApiProperty)(),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], TwilioIncomingMessageInput.prototype, "ProfileName", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
59
|
+
(0, class_validator_1.IsString)(),
|
|
60
|
+
(0, swagger_1.ApiProperty)(),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], TwilioIncomingMessageInput.prototype, "MessageType", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
65
|
+
(0, class_validator_1.IsString)(),
|
|
66
|
+
(0, swagger_1.ApiProperty)(),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], TwilioIncomingMessageInput.prototype, "SmsSid", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
71
|
+
(0, class_validator_1.IsString)(),
|
|
72
|
+
(0, swagger_1.ApiProperty)(),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], TwilioIncomingMessageInput.prototype, "WaId", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
77
|
+
(0, class_validator_1.IsString)(),
|
|
78
|
+
(0, swagger_1.ApiProperty)(),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], TwilioIncomingMessageInput.prototype, "SmsStatus", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, class_validator_1.IsString)(),
|
|
83
|
+
(0, swagger_1.ApiProperty)(),
|
|
84
|
+
__metadata("design:type", String)
|
|
85
|
+
], TwilioIncomingMessageInput.prototype, "Body", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
88
|
+
(0, class_validator_1.IsString)(),
|
|
89
|
+
(0, swagger_1.ApiProperty)(),
|
|
90
|
+
__metadata("design:type", String)
|
|
91
|
+
], TwilioIncomingMessageInput.prototype, "To", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
94
|
+
(0, class_validator_1.IsString)(),
|
|
95
|
+
(0, swagger_1.ApiProperty)(),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], TwilioIncomingMessageInput.prototype, "MessagingServiceSid", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
100
|
+
(0, class_validator_1.IsString)(),
|
|
101
|
+
(0, swagger_1.ApiProperty)(),
|
|
102
|
+
__metadata("design:type", String)
|
|
103
|
+
], TwilioIncomingMessageInput.prototype, "NumSegments", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
106
|
+
(0, class_validator_1.IsString)(),
|
|
107
|
+
(0, swagger_1.ApiProperty)(),
|
|
108
|
+
__metadata("design:type", String)
|
|
109
|
+
], TwilioIncomingMessageInput.prototype, "ReferralNumMedia", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
112
|
+
(0, class_validator_1.IsString)(),
|
|
113
|
+
(0, swagger_1.ApiProperty)(),
|
|
114
|
+
__metadata("design:type", String)
|
|
115
|
+
], TwilioIncomingMessageInput.prototype, "MessageSid", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
118
|
+
(0, class_validator_1.IsString)(),
|
|
119
|
+
(0, swagger_1.ApiProperty)(),
|
|
120
|
+
__metadata("design:type", String)
|
|
121
|
+
], TwilioIncomingMessageInput.prototype, "AccountSid", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
124
|
+
(0, class_validator_1.IsString)(),
|
|
125
|
+
(0, swagger_1.ApiProperty)(),
|
|
126
|
+
__metadata("design:type", String)
|
|
127
|
+
], TwilioIncomingMessageInput.prototype, "From", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
130
|
+
(0, class_validator_1.IsString)(),
|
|
131
|
+
(0, swagger_1.ApiProperty)(),
|
|
132
|
+
__metadata("design:type", String)
|
|
133
|
+
], TwilioIncomingMessageInput.prototype, "ApiVersion", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, swagger_1.ApiProperty)(),
|
|
136
|
+
(0, class_validator_1.IsOptional)(),
|
|
137
|
+
(0, class_validator_1.IsEnum)(twilio_constant_1.TWILIO_MEDIA_CONTENT_TYPE),
|
|
138
|
+
__metadata("design:type", String)
|
|
139
|
+
], TwilioIncomingMessageInput.prototype, "MediaContentType0", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
(0, swagger_1.ApiProperty)(),
|
|
142
|
+
(0, class_validator_1.IsOptional)(),
|
|
143
|
+
(0, class_validator_1.IsString)(),
|
|
144
|
+
__metadata("design:type", String)
|
|
145
|
+
], TwilioIncomingMessageInput.prototype, "MediaUrl0", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, swagger_1.ApiProperty)(),
|
|
148
|
+
(0, class_validator_1.IsOptional)(),
|
|
149
|
+
(0, class_validator_1.IsString)(),
|
|
150
|
+
__metadata("design:type", String)
|
|
151
|
+
], TwilioIncomingMessageInput.prototype, "Latitude", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
(0, swagger_1.ApiProperty)(),
|
|
154
|
+
(0, class_validator_1.IsOptional)(),
|
|
155
|
+
(0, class_validator_1.IsString)(),
|
|
156
|
+
__metadata("design:type", String)
|
|
157
|
+
], TwilioIncomingMessageInput.prototype, "Longitude", void 0);
|
|
158
|
+
class TwilioIncomingBarcodeInput {
|
|
159
|
+
wireAresId;
|
|
160
|
+
}
|
|
161
|
+
exports.TwilioIncomingBarcodeInput = TwilioIncomingBarcodeInput;
|
|
162
|
+
__decorate([
|
|
163
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
164
|
+
(0, class_validator_1.IsString)(),
|
|
165
|
+
(0, swagger_1.ApiProperty)(),
|
|
166
|
+
__metadata("design:type", String)
|
|
167
|
+
], TwilioIncomingBarcodeInput.prototype, "wireAresId", void 0);
|
|
168
|
+
class TwilioStatusCallbackInput {
|
|
169
|
+
ChannelPrefix;
|
|
170
|
+
ApiVersion;
|
|
171
|
+
MessageStatus;
|
|
172
|
+
SmsSid;
|
|
173
|
+
SmsStatus;
|
|
174
|
+
To;
|
|
175
|
+
From;
|
|
176
|
+
MessageSid;
|
|
177
|
+
AccountSid;
|
|
178
|
+
ChannelToAddress;
|
|
179
|
+
}
|
|
180
|
+
exports.TwilioStatusCallbackInput = TwilioStatusCallbackInput;
|
|
181
|
+
__decorate([
|
|
182
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
183
|
+
(0, class_validator_1.IsString)(),
|
|
184
|
+
(0, swagger_1.ApiProperty)(),
|
|
185
|
+
__metadata("design:type", String)
|
|
186
|
+
], TwilioStatusCallbackInput.prototype, "ChannelPrefix", void 0);
|
|
187
|
+
__decorate([
|
|
188
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
189
|
+
(0, class_validator_1.IsString)(),
|
|
190
|
+
(0, swagger_1.ApiProperty)(),
|
|
191
|
+
__metadata("design:type", String)
|
|
192
|
+
], TwilioStatusCallbackInput.prototype, "ApiVersion", void 0);
|
|
193
|
+
__decorate([
|
|
194
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
195
|
+
(0, class_validator_1.IsString)(),
|
|
196
|
+
(0, swagger_1.ApiProperty)(),
|
|
197
|
+
__metadata("design:type", String)
|
|
198
|
+
], TwilioStatusCallbackInput.prototype, "MessageStatus", void 0);
|
|
199
|
+
__decorate([
|
|
200
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
201
|
+
(0, class_validator_1.IsString)(),
|
|
202
|
+
(0, swagger_1.ApiProperty)(),
|
|
203
|
+
__metadata("design:type", String)
|
|
204
|
+
], TwilioStatusCallbackInput.prototype, "SmsSid", void 0);
|
|
205
|
+
__decorate([
|
|
206
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
207
|
+
(0, class_validator_1.IsString)(),
|
|
208
|
+
(0, swagger_1.ApiProperty)(),
|
|
209
|
+
__metadata("design:type", String)
|
|
210
|
+
], TwilioStatusCallbackInput.prototype, "SmsStatus", void 0);
|
|
211
|
+
__decorate([
|
|
212
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
213
|
+
(0, class_validator_1.IsString)(),
|
|
214
|
+
(0, swagger_1.ApiProperty)(),
|
|
215
|
+
__metadata("design:type", String)
|
|
216
|
+
], TwilioStatusCallbackInput.prototype, "To", void 0);
|
|
217
|
+
__decorate([
|
|
218
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
219
|
+
(0, class_validator_1.IsString)(),
|
|
220
|
+
(0, swagger_1.ApiProperty)(),
|
|
221
|
+
__metadata("design:type", String)
|
|
222
|
+
], TwilioStatusCallbackInput.prototype, "From", void 0);
|
|
223
|
+
__decorate([
|
|
224
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
225
|
+
(0, class_validator_1.IsString)(),
|
|
226
|
+
(0, swagger_1.ApiProperty)(),
|
|
227
|
+
__metadata("design:type", String)
|
|
228
|
+
], TwilioStatusCallbackInput.prototype, "MessageSid", void 0);
|
|
229
|
+
__decorate([
|
|
230
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
231
|
+
(0, class_validator_1.IsString)(),
|
|
232
|
+
(0, swagger_1.ApiProperty)(),
|
|
233
|
+
__metadata("design:type", String)
|
|
234
|
+
], TwilioStatusCallbackInput.prototype, "AccountSid", void 0);
|
|
235
|
+
__decorate([
|
|
236
|
+
(0, class_validator_1.IsOptional)(),
|
|
237
|
+
(0, class_validator_1.IsString)(),
|
|
238
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
239
|
+
__metadata("design:type", String)
|
|
240
|
+
], TwilioStatusCallbackInput.prototype, "ChannelToAddress", void 0);
|
|
241
|
+
//# sourceMappingURL=twilio-incoming-message-input.dto.js.map
|