@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twilio-video.types.js","sourceRoot":"","sources":["../../src/types/twilio-video.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface MakeCallOptions {
|
|
2
|
+
to: string;
|
|
3
|
+
from?: string;
|
|
4
|
+
url?: string;
|
|
5
|
+
twiml?: string;
|
|
6
|
+
method?: 'GET' | 'POST';
|
|
7
|
+
statusCallback?: string;
|
|
8
|
+
statusCallbackEvent?: string[];
|
|
9
|
+
statusCallbackMethod?: 'GET' | 'POST';
|
|
10
|
+
record?: boolean;
|
|
11
|
+
recordingChannels?: 'mono' | 'dual';
|
|
12
|
+
recordingStatusCallback?: string;
|
|
13
|
+
recordingStatusCallbackMethod?: 'GET' | 'POST';
|
|
14
|
+
timeout?: number;
|
|
15
|
+
machineDetection?: 'Enable' | 'DetectMessageEnd';
|
|
16
|
+
machineDetectionTimeout?: number;
|
|
17
|
+
machineDetectionSpeechThreshold?: number;
|
|
18
|
+
machineDetectionSpeechEndThreshold?: number;
|
|
19
|
+
machineDetectionSilenceTimeout?: number;
|
|
20
|
+
sendDigits?: string;
|
|
21
|
+
sipAuthUsername?: string;
|
|
22
|
+
sipAuthPassword?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface FetchCallOptions {
|
|
25
|
+
callSid: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ListCallsOptions {
|
|
28
|
+
to?: string;
|
|
29
|
+
from?: string;
|
|
30
|
+
status?: 'queued' | 'ringing' | 'in-progress' | 'completed' | 'busy' | 'failed' | 'no-answer' | 'canceled';
|
|
31
|
+
startTime?: Date;
|
|
32
|
+
startTimeBefore?: Date;
|
|
33
|
+
startTimeAfter?: Date;
|
|
34
|
+
endTime?: Date;
|
|
35
|
+
endTimeBefore?: Date;
|
|
36
|
+
endTimeAfter?: Date;
|
|
37
|
+
limit?: number;
|
|
38
|
+
}
|
|
39
|
+
export interface UpdateCallOptions {
|
|
40
|
+
callSid: string;
|
|
41
|
+
status?: 'canceled' | 'completed';
|
|
42
|
+
url?: string;
|
|
43
|
+
method?: 'GET' | 'POST';
|
|
44
|
+
twiml?: string;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=twilio-voice.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twilio-voice.types.d.ts","sourceRoot":"","sources":["../../src/types/twilio-voice.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,oBAAoB,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACtC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,6BAA6B,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,QAAQ,GAAG,kBAAkB,CAAC;IACjD,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC,kCAAkC,CAAC,EAAE,MAAM,CAAC;IAC5C,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EACH,QAAQ,GACR,SAAS,GACT,aAAa,GACb,WAAW,GACX,MAAM,GACN,QAAQ,GACR,WAAW,GACX,UAAU,CAAC;IACf,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,eAAe,CAAC,EAAE,IAAI,CAAC;IACvB,cAAc,CAAC,EAAE,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,aAAa,CAAC,EAAE,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC;IAClC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twilio-voice.types.js","sourceRoot":"","sources":["../../src/types/twilio-voice.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twilio.config.type.d.ts","sourceRoot":"","sources":["../../src/types/twilio.config.type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,qBAAqB,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twilio.config.type.js","sourceRoot":"","sources":["../../src/types/twilio.config.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EVENT_EMITTER_TWILIO_EVENTS } from '../constants/twilio.event.constant';
|
|
2
|
+
import { TwilioIncomingMessageInput } from '../dtos/twilio-incoming-message-input.dto';
|
|
3
|
+
export type TwilioSendMessageInput = {
|
|
4
|
+
to: string;
|
|
5
|
+
body: string;
|
|
6
|
+
mediaUrl?: string;
|
|
7
|
+
contentType?: string;
|
|
8
|
+
messageType?: string;
|
|
9
|
+
};
|
|
10
|
+
export type TwilioEvent = {
|
|
11
|
+
[EVENT_EMITTER_TWILIO_EVENTS.WEBHOOK_INCOMING_MESSAGE]: {
|
|
12
|
+
data: TwilioIncomingMessageInput;
|
|
13
|
+
};
|
|
14
|
+
[EVENT_EMITTER_TWILIO_EVENTS.SEND_MESSAGE]: {
|
|
15
|
+
data: TwilioSendMessageInput;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=twilio.event.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twilio.event.type.d.ts","sourceRoot":"","sources":["../../src/types/twilio.event.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAEvF,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,CAAC,2BAA2B,CAAC,wBAAwB,CAAC,EAAE;QACtD,IAAI,EAAE,0BAA0B,CAAC;KAClC,CAAC;IACF,CAAC,2BAA2B,CAAC,YAAY,CAAC,EAAE;QAC1C,IAAI,EAAE,sBAAsB,CAAC;KAC9B,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twilio.event.type.js","sourceRoot":"","sources":["../../src/types/twilio.event.type.ts"],"names":[],"mappings":";;AAAA,8EAAiF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@venturialstd/twilio",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Twilio Module for Venturial",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"type": "commonjs",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc -p tsconfig.json",
|
|
16
|
+
"postbuild": "if [ -L ../../../../ommacash/ommacash/ommacash-core/node_modules/@venturialstd/twilio ]; then rm -rf node_modules/@nestjs/core node_modules/@nestjs/typeorm && ln -s ../../../../ommacash/ommacash/ommacash-core/node_modules/@nestjs/core node_modules/@nestjs/core && ln -s ../../../../ommacash/ommacash/ommacash-core/node_modules/@nestjs/typeorm node_modules/@nestjs/typeorm 2>/dev/null || true; fi",
|
|
17
|
+
"prepublishOnly": "npm run build",
|
|
18
|
+
"release:patch": "npm run build && npm version patch --no-git-tag-version && npm publish",
|
|
19
|
+
"test:dev": "ts-node -r tsconfig-paths/register test/main.ts",
|
|
20
|
+
"test:watch": "nodemon --watch src --watch test --ext ts --exec npm run test:dev",
|
|
21
|
+
"migration:generate": "ts-node node_modules/.bin/typeorm migration:generate -d test/data-source.ts test/migrations/$npm_config_name",
|
|
22
|
+
"migration:run": "ts-node node_modules/.bin/typeorm migration:run -d test/data-source.ts",
|
|
23
|
+
"migration:revert": "ts-node node_modules/.bin/typeorm migration:revert -d test/data-source.ts"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@dataui/crud": "^5.3.4",
|
|
27
|
+
"@dataui/crud-request": "^5.3.4",
|
|
28
|
+
"@dataui/crud-typeorm": "^5.3.4",
|
|
29
|
+
"@keyv/redis": "^4.2.0",
|
|
30
|
+
"@nestjs/cache-manager": "^3.0.0",
|
|
31
|
+
"@nestjs/common": "^11.0.11",
|
|
32
|
+
"@nestjs/config": "^4.0.0",
|
|
33
|
+
"@nestjs/core": "^11.0.5",
|
|
34
|
+
"@nestjs/event-emitter": "^3.0.1",
|
|
35
|
+
"@nestjs/jwt": "^11.0.0",
|
|
36
|
+
"@nestjs/passport": "^11.0.5",
|
|
37
|
+
"@nestjs/platform-express": "^11.0.5",
|
|
38
|
+
"@nestjs/swagger": "^11.0.3",
|
|
39
|
+
"@nestjs/typeorm": "^11.0.0",
|
|
40
|
+
"@types/node": "^20.0.0",
|
|
41
|
+
"@venturialstd/core": "^1.0.16",
|
|
42
|
+
"bcrypt": "^5.1.1",
|
|
43
|
+
"cache-manager": "^6.4.0",
|
|
44
|
+
"class-transformer": "^0.5.1",
|
|
45
|
+
"class-validator": "^0.14.1",
|
|
46
|
+
"dotenv": "^17.2.3",
|
|
47
|
+
"express": "^5.2.1",
|
|
48
|
+
"glob": "^13.0.0",
|
|
49
|
+
"joi": "^17.13.3",
|
|
50
|
+
"jwks-rsa": "^3.1.0",
|
|
51
|
+
"lodash": "^4.17.21",
|
|
52
|
+
"nodemon": "^3.0.0",
|
|
53
|
+
"passport": "^0.7.0",
|
|
54
|
+
"passport-auth0": "^1.4.4",
|
|
55
|
+
"passport-jwt": "^4.0.1",
|
|
56
|
+
"passport-local": "^1.0.0",
|
|
57
|
+
"rxjs": "^7.8.1",
|
|
58
|
+
"ts-node": "^10.9.0",
|
|
59
|
+
"tsconfig-paths": "^4.2.0",
|
|
60
|
+
"twilio": "^5.6.1",
|
|
61
|
+
"typeorm": "^0.3.20",
|
|
62
|
+
"typescript": "^5.9.3",
|
|
63
|
+
"uuid": "^11.0.5",
|
|
64
|
+
"winston": "^3.17.0"
|
|
65
|
+
},
|
|
66
|
+
"peerDependencies": {
|
|
67
|
+
"@dataui/crud": "^5.3.4",
|
|
68
|
+
"@dataui/crud-request": "^5.3.4",
|
|
69
|
+
"@dataui/crud-typeorm": "^5.3.4",
|
|
70
|
+
"@nestjs/cache-manager": "^3.0.0",
|
|
71
|
+
"@nestjs/common": "^11.0.11",
|
|
72
|
+
"@nestjs/config": "^4.0.0",
|
|
73
|
+
"@nestjs/core": "^11.0.5",
|
|
74
|
+
"@nestjs/event-emitter": "^3.0.1",
|
|
75
|
+
"@nestjs/jwt": "^11.0.0",
|
|
76
|
+
"@nestjs/passport": "^11.0.5",
|
|
77
|
+
"@nestjs/swagger": "^11.0.3",
|
|
78
|
+
"@nestjs/typeorm": "^11.0.0",
|
|
79
|
+
"@venturialstd/core": "^1.0.16",
|
|
80
|
+
"bcrypt": "^5.1.1",
|
|
81
|
+
"cache-manager": "^6.4.0",
|
|
82
|
+
"class-transformer": "^0.5.1",
|
|
83
|
+
"class-validator": "^0.14.1",
|
|
84
|
+
"jwks-rsa": "^3.1.0",
|
|
85
|
+
"passport": "^0.7.0",
|
|
86
|
+
"passport-auth0": "^1.4.0",
|
|
87
|
+
"passport-jwt": "^4.0.1",
|
|
88
|
+
"passport-local": "^1.0.0",
|
|
89
|
+
"rxjs": "^7.8.1",
|
|
90
|
+
"twilio": "^5.6.1",
|
|
91
|
+
"typeorm": "^0.3.20",
|
|
92
|
+
"uuid": "^11.0.5"
|
|
93
|
+
},
|
|
94
|
+
"dependencies": {
|
|
95
|
+
"pg": "^8.16.3"
|
|
96
|
+
}
|
|
97
|
+
}
|