@venturialstd/twilio 0.0.4 → 0.0.6

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 CHANGED
@@ -1,83 +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
- ```
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
+ ```
@@ -1,5 +1,6 @@
1
1
  import { TwilioClient } from '../clients/twilio.client';
2
2
  import { TwilioConfig } from '../types/twilio.config.type';
3
+ import { CreateContentTemplatePayload, UpdateContentTemplatePayload } from '../types/twilio-content-template.types';
3
4
  import { FetchMessageOptions, ListMessagesOptions, SendMessageOptions } from '../types/twilio-message.types';
4
5
  export declare class TwilioMessageService {
5
6
  private readonly twilioClient;
@@ -10,5 +11,9 @@ export declare class TwilioMessageService {
10
11
  deleteMessage(config: (TwilioConfig | null) | undefined, messageSid: string): Promise<boolean>;
11
12
  updateMessage(config: (TwilioConfig | null) | undefined, messageSid: string, body: string): Promise<import("twilio/lib/rest/api/v2010/account/message").MessageInstance>;
12
13
  getAllTemplates(config?: TwilioConfig | null): Promise<import("twilio/lib/rest/content/v1/contentAndApprovals").ContentAndApprovalsInstance[]>;
14
+ getTemplate(config: (TwilioConfig | null) | undefined, contentSid: string): Promise<import("twilio/lib/rest/content/v1/content").ContentInstance>;
15
+ createTemplate(config: (TwilioConfig | null) | undefined, payload: CreateContentTemplatePayload): Promise<import("twilio/lib/rest/content/v1/content").ContentInstance>;
16
+ updateTemplate(config: (TwilioConfig | null) | undefined, contentSid: string, payload: UpdateContentTemplatePayload): Promise<import("twilio/lib/rest/content/v1/content").ContentInstance>;
17
+ deleteTemplate(config: (TwilioConfig | null) | undefined, contentSid: string): Promise<boolean>;
13
18
  }
14
19
  //# sourceMappingURL=twilio-message.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"twilio-message.service.d.ts","sourceRoot":"","sources":["../../src/services/twilio-message.service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,+BAA+B,CAAC;AAEvC,qBACa,oBAAoB;IACnB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAAZ,YAAY,EAAE,YAAY;IAKjD,WAAW,CAAC,MAAM,GAAE,YAAY,GAAG,IAAI,aAAO,EAAE,OAAO,EAAE,kBAAkB;IA6B3E,YAAY,CAAC,MAAM,GAAE,YAAY,GAAG,IAAI,aAAO,EAAE,OAAO,EAAE,mBAAmB;IAQ7E,YAAY,CAAC,MAAM,GAAE,YAAY,GAAG,IAAW,EAAE,OAAO,GAAE,mBAAwB;IAkBlF,aAAa,CAAC,MAAM,GAAE,YAAY,GAAG,IAAI,aAAO,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQvF,aAAa,CAAC,MAAM,GAAE,YAAY,GAAG,IAAI,aAAO,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAQlF,eAAe,CAAC,MAAM,GAAE,YAAY,GAAG,IAAW;CAIzD"}
1
+ {"version":3,"file":"twilio-message.service.d.ts","sourceRoot":"","sources":["../../src/services/twilio-message.service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC7B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,+BAA+B,CAAC;AAEvC,qBACa,oBAAoB;IACnB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAAZ,YAAY,EAAE,YAAY;IAKjD,WAAW,CAAC,MAAM,GAAE,YAAY,GAAG,IAAI,aAAO,EAAE,OAAO,EAAE,kBAAkB;IA6B3E,YAAY,CAAC,MAAM,GAAE,YAAY,GAAG,IAAI,aAAO,EAAE,OAAO,EAAE,mBAAmB;IAQ7E,YAAY,CAAC,MAAM,GAAE,YAAY,GAAG,IAAW,EAAE,OAAO,GAAE,mBAAwB;IAkBlF,aAAa,CAAC,MAAM,GAAE,YAAY,GAAG,IAAI,aAAO,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQvF,aAAa,CAAC,MAAM,GAAE,YAAY,GAAG,IAAI,aAAO,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAQlF,eAAe,CAAC,MAAM,GAAE,YAAY,GAAG,IAAW;IAQlD,WAAW,CAAC,MAAM,GAAE,YAAY,GAAG,IAAI,aAAO,EAAE,UAAU,EAAE,MAAM;IAQlE,cAAc,CAClB,MAAM,GAAE,YAAY,GAAG,IAAI,aAAO,EAClC,OAAO,EAAE,4BAA4B;IASjC,cAAc,CAClB,MAAM,GAAE,YAAY,GAAG,IAAI,aAAO,EAClC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,4BAA4B;IASjC,cAAc,CAClB,MAAM,GAAE,YAAY,GAAG,IAAI,aAAO,EAClC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,OAAO,CAAC;CAIpB"}
@@ -79,6 +79,22 @@ let TwilioMessageService = class TwilioMessageService {
79
79
  const client = await this.twilioClient.getClient(config);
80
80
  return client.content.v1.contentAndApprovals.list();
81
81
  }
82
+ async getTemplate(config = null, contentSid) {
83
+ const client = await this.twilioClient.getClient(config);
84
+ return client.content.v1.contents(contentSid).fetch();
85
+ }
86
+ async createTemplate(config = null, payload) {
87
+ const client = await this.twilioClient.getClient(config);
88
+ return client.content.v1.contents.create(payload);
89
+ }
90
+ async updateTemplate(config = null, contentSid, payload) {
91
+ const client = await this.twilioClient.getClient(config);
92
+ return client.content.v1.contents(contentSid).update(payload);
93
+ }
94
+ async deleteTemplate(config = null, contentSid) {
95
+ const client = await this.twilioClient.getClient(config);
96
+ return client.content.v1.contents(contentSid).remove();
97
+ }
82
98
  };
83
99
  exports.TwilioMessageService = TwilioMessageService;
84
100
  exports.TwilioMessageService = TwilioMessageService = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"twilio-message.service.js","sourceRoot":"","sources":["../../src/services/twilio-message.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAG5C,4DAAwD;AASjD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IACF;IAA7B,YAA6B,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;IAK3D,KAAK,CAAC,WAAW,CAAC,SAA8B,IAAI,EAAE,OAA2B;QAC/E,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACzD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;QAE9E,MAAM,cAAc,GAAgD;YAClE,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,IAAI;SACL,CAAC;QAEF,IAAI,OAAO,CAAC,IAAI;YAAE,cAAc,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACrD,IAAI,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC;YAAE,cAAc,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QAChG,IAAI,OAAO,CAAC,cAAc;YAAE,cAAc,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;QAEnF,IAAI,OAA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KAAK,CAAC,cAAc,CAClB,SAA8B,IAAI,EAClC,OAAqC;QAErC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACzD,OAAO,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAc,CAAC,CAAC;IAC3D,CAAC;IAKD,KAAK,CAAC,cAAc,CAClB,SAA8B,IAAI,EAClC,UAAkB,EAClB,OAAqC;QAErC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACzD,OAAO,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,OAAc,CAAC,CAAC;IACvE,CAAC;IAKD,KAAK,CAAC,cAAc,CAClB,SAA8B,IAAI,EAClC,UAAkB;QAElB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACzD,OAAO,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,MAAM,EAAE,CAAC;IACzD,CAAC;CACF,CAAA;AA3HY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAEgC,4BAAY;GAD5C,oBAAoB,CA2HhC"}
@@ -7,4 +7,5 @@ export * from './twilio-phone-number.types';
7
7
  export * from './twilio-verify.types';
8
8
  export * from './twilio-video.types';
9
9
  export * from './twilio-voice.types';
10
+ export * from './twilio-content-template.types';
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC"}
@@ -23,4 +23,5 @@ __exportStar(require("./twilio-phone-number.types"), exports);
23
23
  __exportStar(require("./twilio-verify.types"), exports);
24
24
  __exportStar(require("./twilio-video.types"), exports);
25
25
  __exportStar(require("./twilio-voice.types"), exports);
26
+ __exportStar(require("./twilio-content-template.types"), exports);
26
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,sDAAoC;AACpC,8DAA4C;AAC5C,wDAAsC;AACtC,yDAAuC;AACvC,8DAA4C;AAC5C,wDAAsC;AACtC,uDAAqC;AACrC,uDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,sDAAoC;AACpC,8DAA4C;AAC5C,wDAAsC;AACtC,yDAAuC;AACvC,8DAA4C;AAC5C,wDAAsC;AACtC,uDAAqC;AACrC,uDAAqC;AACrC,kEAAgD"}
@@ -0,0 +1,13 @@
1
+ export interface CreateContentTemplatePayload {
2
+ friendlyName?: string;
3
+ language: string;
4
+ types: Record<string, unknown>;
5
+ variables?: Record<string, string>;
6
+ }
7
+ export interface UpdateContentTemplatePayload {
8
+ friendlyName?: string;
9
+ language?: string;
10
+ types?: Record<string, unknown>;
11
+ variables?: Record<string, string>;
12
+ }
13
+ //# sourceMappingURL=twilio-content-template.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"twilio-content-template.types.d.ts","sourceRoot":"","sources":["../../src/types/twilio-content-template.types.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,4BAA4B;IAE3C,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,QAAQ,EAAE,MAAM,CAAC;IAEjB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE/B,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAOD,MAAM,WAAW,4BAA4B;IAC3C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=twilio-content-template.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"twilio-content-template.types.js","sourceRoot":"","sources":["../../src/types/twilio-content-template.types.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,97 +1,97 @@
1
- {
2
- "name": "@venturialstd/twilio",
3
- "version": "0.0.4",
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
- }
1
+ {
2
+ "name": "@venturialstd/twilio",
3
+ "version": "0.0.6",
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": "node ../../scripts/postbuild-link-nest.js @venturialstd/twilio",
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
+ }