@awell-health/awell-extensions 1.0.194 → 1.0.196
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/extensions/markdown.json +1 -1
- package/dist/extensions/textline/actions/getMessages/config/fields.js +1 -1
- package/dist/extensions/textline/actions/getMessages/config/fields.js.map +1 -1
- package/dist/extensions/textline/actions/getMessages/getMessages.js +2 -2
- package/dist/extensions/textline/actions/getMessages/getMessages.js.map +1 -1
- package/dist/extensions/textline/actions/getMessages/getMessages.test.js +3 -9
- package/dist/extensions/textline/actions/getMessages/getMessages.test.js.map +1 -1
- package/dist/extensions/textline/actions/index.d.ts +2 -30
- package/dist/extensions/textline/actions/sendSms/sendSms.js +2 -2
- package/dist/extensions/textline/actions/sendSms/sendSms.js.map +1 -1
- package/dist/extensions/textline/actions/sendSms/sendSms.test.js +3 -9
- package/dist/extensions/textline/actions/sendSms/sendSms.test.js.map +1 -1
- package/dist/extensions/textline/client/textLineApi.d.ts +2 -5
- package/dist/extensions/textline/client/textLineApi.js +4 -36
- package/dist/extensions/textline/client/textLineApi.js.map +1 -1
- package/dist/extensions/textline/settings.d.ts +4 -24
- package/dist/extensions/textline/settings.js +5 -21
- package/dist/extensions/textline/settings.js.map +1 -1
- package/package.json +1 -1
@@ -108,7 +108,7 @@
|
|
108
108
|
"changelog": "# Sendgrid changelog\n\n## July 7, 2023\n\nAdded \"Add Email to Suppression Lists\" and \"Remove Email from Suppression Lists\" actions.\n\n## July 15, 2023\n\nUpdated \"Add or Update Contact\" acction to create a datapoint of the Job ID.\n\nAdded \"Check Import Status\" action.\n\n## July 27, 2023\n\nAdds \"Finished At\" data point to the importStatus action."
|
109
109
|
},
|
110
110
|
"textline": {
|
111
|
-
"readme": "---\ntitle: TextLine\ndescription: Textline's business texting software offers solutions for sales, marketing, customer service and beyond. Utilize the power of SMS to grow quickly.\n---\n\n# TextLine\n\nTextLine is a customer engagement platform used by hundreds of thousands of businesses and more than ten million developers worldwide to build unique, personalized experiences for their customers.\n\nThey are known for democratizing channels like voice, text, chat, video, and email through APIs, making it easy for every organization to build meaningful interactions with customers on the channels they prefer.\n\n## Extension settings\n\nIn order to set up this extension, you will need:\n\n1. A TextLine API key or auth token which can be found in the TextLine console.\n2. Your account SID which can be found in the TextLine console.\n3. A phone number to send the message from. This must be a TextLine phone number that you own.\n\n## Custom Actions\n\n### Send SMS\n\nSend an SMS with TextLine to a recipient of your liking.\n\n### Get messages\n\
|
111
|
+
"readme": "---\ntitle: TextLine\ndescription: Textline's business texting software offers solutions for sales, marketing, customer service and beyond. Utilize the power of SMS to grow quickly.\n---\n\n# TextLine\n\nTextLine is a customer engagement platform used by hundreds of thousands of businesses and more than ten million developers worldwide to build unique, personalized experiences for their customers.\n\nThey are known for democratizing channels like voice, text, chat, video, and email through APIs, making it easy for every organization to build meaningful interactions with customers on the channels they prefer.\n\n## Extension settings\n\nIn order to set up this extension, you will need:\n\n1. A TextLine API key or auth token which can be found in the TextLine console.\n2. Your account SID which can be found in the TextLine console.\n3. A phone number to send the message from. This must be a TextLine phone number that you own.\n\n## Custom Actions\n\n### Send SMS\n\nSend an SMS with TextLine to a recipient of your liking.\n\n### Get messages\n\nThis action retrieves received messages. One can apply the `phoneNumber` filter to this action to display only received messages from that `phoneNumber`.\nOnly the last 30 messages are returned.\n\n#### Simple Use Case\n\n**Initiating a Conversation**: A user sends a message to \"Number A\", initiating a conversation.\n\n**Receiving a Response**: \"Number A\" responds to the message, contributing to the ongoing conversation.\n\n**Searching Messages & Applying Filters**: To focus on the responses from \"Number A\", `phoneNumber`` filter can be applied to only show received messages from \"Number A\" within the conversation. This allows users to easily review and manage responses from \"Number A\", without the clutter of other received messages.\n\n",
|
112
112
|
"changelog": "# TextLine changelog\n\n## 2024-02-26\n\n1. Add capability to search for messages using all the allowed filters provided by TextLine API.\n2. Add \"Send SMS\" action\n"
|
113
113
|
},
|
114
114
|
"transform": {
|
@@ -10,7 +10,7 @@ exports.fields = {
|
|
10
10
|
label: 'Phone number to filter',
|
11
11
|
type: extensions_core_2.FieldType.STRING,
|
12
12
|
stringType: extensions_core_2.StringType.PHONE,
|
13
|
-
description: 'Search for text messages
|
13
|
+
description: 'Search for text messages received from this phone number',
|
14
14
|
required: false,
|
15
15
|
},
|
16
16
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/textline/actions/getMessages/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAwC;AACxC,mEAAiF;AACjF,mEAIsC;AAEzB,QAAA,MAAM,GAAG;IACpB,WAAW,EAAE;QACX,EAAE,EAAE,aAAa;QACjB,KAAK,EAAE,wBAAwB;QAC/B,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,UAAU,EAAE,4BAAU,CAAC,KAAK;QAC5B,WAAW,EAAE,
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/textline/actions/getMessages/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAwC;AACxC,mEAAiF;AACjF,mEAIsC;AAEzB,QAAA,MAAM,GAAG;IACpB,WAAW,EAAE;QACX,EAAE,EAAE,aAAa;QACjB,KAAK,EAAE,wBAAwB;QAC/B,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,UAAU,EAAE,4BAAU,CAAC,KAAK;QAC5B,WAAW,EAAE,0DAA0D;QACvE,QAAQ,EAAE,KAAK;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,WAAW,EAAE,mDAAiC;CACG,CAAC,CAAA"}
|
@@ -24,14 +24,14 @@ exports.getMessages = {
|
|
24
24
|
previewable: true,
|
25
25
|
onActivityCreated: async (payload, onComplete, onError) => {
|
26
26
|
try {
|
27
|
-
const { settings: {
|
27
|
+
const { settings: { accessToken }, fields: { phoneNumber }, } = (0, extensions_core_1.validate)({
|
28
28
|
schema: zod_1.z.object({
|
29
29
|
settings: settings_1.SettingsValidationSchema,
|
30
30
|
fields: config_1.FieldsValidationSchema,
|
31
31
|
}),
|
32
32
|
payload,
|
33
33
|
});
|
34
|
-
const textLineApi = new textLineApi_1.default(
|
34
|
+
const textLineApi = new textLineApi_1.default(accessToken);
|
35
35
|
const messages = await textLineApi.getMessages(phoneNumber, 1, 30);
|
36
36
|
if ((0, lodash_1.isNil)(messages.posts)) {
|
37
37
|
await onComplete({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getMessages.js","sourceRoot":"","sources":["../../../../../extensions/textline/actions/getMessages/getMessages.ts"],"names":[],"mappings":";;;;;;AAAA,6BAAiC;AACjC,+DAAmD;AAEnD,6CAAwE;AACxE,mEAAkE;AAClE,qCAAqE;AACrE,2EAAkD;AAClD,mCAA8B;AAGjB,QAAA,WAAW,GAA2C;IACjE,GAAG,EAAE,aAAa;IAClB,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE;;;KAGV;IACH,QAAQ,EAAE,0BAAQ,CAAC,aAAa;IAChC,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,WAAW,EAAE,IAAI;IACjB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;QACxD,IAAI;YACF,MAAM,EACJ,QAAQ,EAAE,EAAE,
|
1
|
+
{"version":3,"file":"getMessages.js","sourceRoot":"","sources":["../../../../../extensions/textline/actions/getMessages/getMessages.ts"],"names":[],"mappings":";;;;;;AAAA,6BAAiC;AACjC,+DAAmD;AAEnD,6CAAwE;AACxE,mEAAkE;AAClE,qCAAqE;AACrE,2EAAkD;AAClD,mCAA8B;AAGjB,QAAA,WAAW,GAA2C;IACjE,GAAG,EAAE,aAAa;IAClB,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE;;;KAGV;IACH,QAAQ,EAAE,0BAAQ,CAAC,aAAa;IAChC,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,WAAW,EAAE,IAAI;IACjB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EA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C,WAAW,CAAC;wBACxC,gBAAgB,EAAE,MAAM,CAAC,gBAAgB,CAAC;wBAC1C,aAAa;qBACd;iBACF,CAAC,CAAA;aACH;SACF;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,GAAG,YAAY,cAAQ,EAAE;gBAC3B,MAAM,KAAK,GAAG,IAAA,mCAAY,EAAC,GAAG,CAAC,CAAA;gBAC/B,MAAM,OAAO,CAAC;oBACZ,MAAM,EAAE;wBACN;4BACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;4BAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE;4BAC3B,KAAK,EAAE;gCACL,QAAQ,EAAE,aAAa;gCACvB,OAAO,EAAE,KAAK,CAAC,OAAO;6BACvB;yBACF;qBACF;iBACF,CAAC,CAAA;aACH;iBAAM;gBACL,MAAM,OAAO,GAAI,GAAa,CAAC,OAAO,CAAA;gBACtC,MAAM,OAAO,CAAC;oBACZ,MAAM,EAAE;wBACN;4BACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;4BAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE;4BACrB,KAAK,EAAE;gCACL,QAAQ,EAAE,cAAc;gCACxB,OAAO;6BACR;yBACF;qBACF;iBACF,CAAC,CAAA;aACH;SACF;IACH,CAAC;CACF,CAAA"}
|
@@ -17,9 +17,7 @@ describe('Get messages action', () => {
|
|
17
17
|
phoneNumber: '+18999999999',
|
18
18
|
},
|
19
19
|
settings: {
|
20
|
-
|
21
|
-
password: 'password',
|
22
|
-
apiKey: 'apikey',
|
20
|
+
accessToken: 'accessToken',
|
23
21
|
},
|
24
22
|
}), onComplete, onError);
|
25
23
|
expect(onComplete).toHaveBeenCalledWith({
|
@@ -37,9 +35,7 @@ describe('Get messages action', () => {
|
|
37
35
|
phoneNumber: '+19144542596',
|
38
36
|
},
|
39
37
|
settings: {
|
40
|
-
|
41
|
-
password: 'password',
|
42
|
-
apiKey: 'apikey',
|
38
|
+
accessToken: 'accessToken',
|
43
39
|
},
|
44
40
|
}), onComplete, onError);
|
45
41
|
expect(onComplete).toHaveBeenCalledWith({
|
@@ -57,9 +53,7 @@ describe('Get messages action', () => {
|
|
57
53
|
phoneNumber: undefined,
|
58
54
|
},
|
59
55
|
settings: {
|
60
|
-
|
61
|
-
password: 'password',
|
62
|
-
apiKey: 'apikey',
|
56
|
+
accessToken: 'accessToken',
|
63
57
|
},
|
64
58
|
}), onComplete, onError);
|
65
59
|
expect(onComplete).toHaveBeenCalledWith({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getMessages.test.js","sourceRoot":"","sources":["../../../../../extensions/textline/actions/getMessages/getMessages.test.ts"],"names":[],"mappings":";;AAAA,+CAA2C;AAC3C,iDAA2D;AAC3D,oEAAoE;AAEpE,IAAI,CAAC,IAAI,CAAC,0BAA0B,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,6BAAe,CAAC,CAAC,CAAA;AAE3E,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAEzB,UAAU,CAAC,GAAG,EAAE;QACd,UAAU,CAAC,SAAS,EAAE,CAAA;QACtB,OAAO,CAAC,SAAS,EAAE,CAAA;IACrB,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,qDAAqD,EAAE,KAAK,IAAI,EAAE;QACrE,MAAM,yBAAW,CAAC,iBAAiB,CACjC,IAAA,2BAAmB,EAAC;YAClB,MAAM,EAAE;gBACN,WAAW,EAAE,cAAc;aAC5B;YACD,QAAQ,EAAE;gBACR,
|
1
|
+
{"version":3,"file":"getMessages.test.js","sourceRoot":"","sources":["../../../../../extensions/textline/actions/getMessages/getMessages.test.ts"],"names":[],"mappings":";;AAAA,+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AC,UAAU,CAAC,CAAC,oBAAoB,CAAC;YACtC,WAAW,EAAE;gBACX,WAAW,EAAE,EAAE;gBACf,gBAAgB,EAAE,GAAG;gBACrB,aAAa,EAAE,SAAS;aACzB;SACF,CAAC,CAAA;QACF,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAA;IACxC,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,gDAAgD,EAAE,KAAK,IAAI,EAAE;QAChE,MAAM,yBAAW,CAAC,iBAAiB,CACjC,IAAA,2BAAmB,EAAC;YAClB,MAAM,EAAE;gBACN,WAAW,EAAE,SAAS;aACvB;YACD,QAAQ,EAAE;gBACR,WAAW,EAAE,aAAa;aAC3B;SACF,CAAC,EACF,UAAU,EACV,OAAO,CACR,CAAA;QACD,MAAM,CAAC,UAAU,CAAC,CAAC,oBAAoB,CAAC;YACtC,WAAW,EAAE;gBACX,WAAW,EAAE,EAAE;gBACf,gBAAgB,EAAE,GAAG;gBACrB,aAAa,EAAE,SAAS;aACzB;SACF,CAAC,CAAA;QACF,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAA;IACxC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
@@ -16,27 +16,13 @@ export declare const actions: {
|
|
16
16
|
required: true;
|
17
17
|
};
|
18
18
|
}, {
|
19
|
-
|
19
|
+
accessToken: {
|
20
20
|
label: string;
|
21
21
|
key: string;
|
22
22
|
obfuscated: false;
|
23
23
|
required: true;
|
24
24
|
description: string;
|
25
25
|
};
|
26
|
-
password: {
|
27
|
-
label: string;
|
28
|
-
key: string;
|
29
|
-
obfuscated: true;
|
30
|
-
required: true;
|
31
|
-
description: string;
|
32
|
-
};
|
33
|
-
apiKey: {
|
34
|
-
label: string;
|
35
|
-
key: string;
|
36
|
-
obfuscated: true;
|
37
|
-
required: true;
|
38
|
-
description: string;
|
39
|
-
};
|
40
26
|
}, string, never>;
|
41
27
|
getMessages: import("@awell-health/extensions-core").Action<{
|
42
28
|
phoneNumber: {
|
@@ -48,26 +34,12 @@ export declare const actions: {
|
|
48
34
|
required: false;
|
49
35
|
};
|
50
36
|
}, {
|
51
|
-
|
37
|
+
accessToken: {
|
52
38
|
label: string;
|
53
39
|
key: string;
|
54
40
|
obfuscated: false;
|
55
41
|
required: true;
|
56
42
|
description: string;
|
57
43
|
};
|
58
|
-
password: {
|
59
|
-
label: string;
|
60
|
-
key: string;
|
61
|
-
obfuscated: true;
|
62
|
-
required: true;
|
63
|
-
description: string;
|
64
|
-
};
|
65
|
-
apiKey: {
|
66
|
-
label: string;
|
67
|
-
key: string;
|
68
|
-
obfuscated: true;
|
69
|
-
required: true;
|
70
|
-
description: string;
|
71
|
-
};
|
72
44
|
}, string, never>;
|
73
45
|
};
|
@@ -20,14 +20,14 @@ exports.sendSms = {
|
|
20
20
|
dataPoints: config_1.dataPoints,
|
21
21
|
onActivityCreated: async (payload, onComplete, onError) => {
|
22
22
|
try {
|
23
|
-
const { settings: {
|
23
|
+
const { settings: { accessToken }, fields: { recipient, message }, } = (0, extensions_core_1.validate)({
|
24
24
|
schema: zod_1.z.object({
|
25
25
|
settings: settings_1.SettingsValidationSchema,
|
26
26
|
fields: config_1.FieldsValidationSchema,
|
27
27
|
}),
|
28
28
|
payload,
|
29
29
|
});
|
30
|
-
const textLineApi = new textLineApi_1.default(
|
30
|
+
const textLineApi = new textLineApi_1.default(accessToken);
|
31
31
|
const response = await textLineApi.sendMessage(recipient, message);
|
32
32
|
await onComplete({
|
33
33
|
data_points: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sendSms.js","sourceRoot":"","sources":["../../../../../extensions/textline/actions/sendSms/sendSms.ts"],"names":[],"mappings":";;;;;;AAAA,6BAAiC;AACjC,+DAAmD;AAEnD,6CAAwE;AACxE,mEAAkE;AAClE,qCAAqE;AACrE,2EAAkD;AAGrC,QAAA,OAAO,GAA2C;IAC7D,GAAG,EAAE,SAAS;IACd,KAAK,EAAE,6BAA6B;IACpC,WAAW,EACT,kFAAkF;IACpF,QAAQ,EAAE,0BAAQ,CAAC,aAAa;IAChC,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,IAAI;IACjB,UAAU,EAAV,mBAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;QACxD,IAAI;YACF,MAAM,EACJ,QAAQ,EAAE,EAAE,
|
1
|
+
{"version":3,"file":"sendSms.js","sourceRoot":"","sources":["../../../../../extensions/textline/actions/sendSms/sendSms.ts"],"names":[],"mappings":";;;;;;AAAA,6BAAiC;AACjC,+DAAmD;AAEnD,6CAAwE;AACxE,mEAAkE;AAClE,qCAAqE;AACrE,2EAAkD;AAGrC,QAAA,OAAO,GAA2C;IAC7D,GAAG,EAAE,SAAS;IACd,KAAK,EAAE,6BAA6B;IACpC,WAAW,EACT,kFAAkF;IACpF,QAAQ,EAAE,0BAAQ,CAAC,aAAa;IAChC,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,IAAI;IACjB,UAAU,EAAV,mBAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;QACxD,IAAI;YACF,MAAM,EACJ,QAAQ,EAAE,EAAE,WAAW,EAAE,EACzB,MAAM,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,GAC/B,GAAG,IAAA,0BAAQ,EAAC;gBACX,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;oBACf,QAAQ,EAAE,mCAAwB;oBAClC,MAAM,EAAE,+BAAsB;iBAC/B,CAAC;gBACF,OAAO;aACR,CAAC,CAAA;YAEF,MAAM,WAAW,GAAG,IAAI,qBAAW,CAAC,WAAW,CAAC,CAAA;YAChD,MAAM,QAAQ,GAAwB,MAAM,WAAW,CAAC,WAAW,CACjE,SAAS,EACT,OAAO,CACR,CAAA;YACD,MAAM,UAAU,CAAC;gBACf,WAAW,EAAE;oBACX,cAAc,EAAE,QAAQ,CAAC,IAAI,CAAC,iBAAiB;iBAChD;aACF,CAAC,CAAA;SACH;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,GAAG,YAAY,cAAQ,EAAE;gBAC3B,MAAM,KAAK,GAAG,IAAA,mCAAY,EAAC,GAAG,CAAC,CAAA;gBAC/B,MAAM,OAAO,CAAC;oBACZ,MAAM,EAAE;wBACN;4BACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;4BAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE;4BAC3B,KAAK,EAAE;gCACL,QAAQ,EAAE,aAAa;gCACvB,OAAO,EAAE,KAAK,CAAC,OAAO;6BACvB;yBACF;qBACF;iBACF,CAAC,CAAA;aACH;iBAAM;gBACL,MAAM,OAAO,GAAI,GAAa,CAAC,OAAO,CAAA;gBACtC,MAAM,OAAO,CAAC;oBACZ,MAAM,EAAE;wBACN;4BACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;4BAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE;4BACrB,KAAK,EAAE;gCACL,QAAQ,EAAE,cAAc;gCACxB,OAAO;6BACR;yBACF;qBACF;iBACF,CAAC,CAAA;aACH;SACF;IACH,CAAC;CACF,CAAA"}
|
@@ -18,9 +18,7 @@ describe('Send SMS action', () => {
|
|
18
18
|
recipient: '+13108820245',
|
19
19
|
},
|
20
20
|
settings: {
|
21
|
-
|
22
|
-
password: 'password',
|
23
|
-
apiKey: 'apikey',
|
21
|
+
accessToken: 'accessToken',
|
24
22
|
},
|
25
23
|
}), onComplete, onError);
|
26
24
|
expect(onComplete).toHaveBeenCalledWith({
|
@@ -37,9 +35,7 @@ describe('Send SMS action', () => {
|
|
37
35
|
recipient: undefined,
|
38
36
|
},
|
39
37
|
settings: {
|
40
|
-
|
41
|
-
password: 'password',
|
42
|
-
apiKey: 'apikey',
|
38
|
+
accessToken: 'accessToken',
|
43
39
|
},
|
44
40
|
}), onComplete, onError);
|
45
41
|
expect(onComplete).not.toHaveBeenCalled();
|
@@ -52,9 +48,7 @@ describe('Send SMS action', () => {
|
|
52
48
|
recipient: '+13108820245',
|
53
49
|
},
|
54
50
|
settings: {
|
55
|
-
|
56
|
-
password: 'password',
|
57
|
-
apiKey: 'apikey',
|
51
|
+
accessToken: 'accessToken',
|
58
52
|
},
|
59
53
|
}), onComplete, onError);
|
60
54
|
expect(onComplete).not.toHaveBeenCalled();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sendSms.test.js","sourceRoot":"","sources":["../../../../../extensions/textline/actions/sendSms/sendSms.test.ts"],"names":[],"mappings":";;AAAA,uCAAmC;AACnC,iDAA2D;AAC3D,oEAAoE;AAEpE,IAAI,CAAC,IAAI,CAAC,0BAA0B,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,6BAAe,CAAC,CAAC,CAAA;AAE3E,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAEzB,UAAU,CAAC,GAAG,EAAE;QACd,UAAU,CAAC,SAAS,EAAE,CAAA;QACtB,OAAO,CAAC,SAAS,EAAE,CAAA;IACrB,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,qCAAqC,EAAE,KAAK,IAAI,EAAE;QACrD,MAAM,iBAAO,CAAC,iBAAiB,CAC7B,IAAA,2BAAmB,EAAC;YAClB,MAAM,EAAE;gBACN,OAAO,EAAE,iBAAiB;gBAC1B,SAAS,EAAE,cAAc;aAC1B;YACD,QAAQ,EAAE;gBACR,
|
1
|
+
{"version":3,"file":"sendSms.test.js","sourceRoot":"","sources":["../../../../../extensions/textline/actions/sendSms/sendSms.test.ts"],"names":[],"mappings":";;AAAA,uCAAmC;AACnC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AM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAA;QACzC,MAAM,CAAC,OAAO,CAAC,CAAC,gBAAgB,EAAE,CAAA;IACpC,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,2DAA2D,EAAE,KAAK,IAAI,EAAE;QAC3E,MAAM,iBAAO,CAAC,iBAAiB,CAC7B,IAAA,2BAAmB,EAAC;YAClB,MAAM,EAAE;gBACN,OAAO,EAAE,SAAS;gBAClB,SAAS,EAAE,cAAc;aAC1B;YACD,QAAQ,EAAE;gBACR,WAAW,EAAE,aAAa;aAC3B;SACF,CAAC,EACF,UAAU,EACV,OAAO,CACR,CAAA;QACD,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAA;QACzC,MAAM,CAAC,OAAO,CAAC,CAAC,gBAAgB,EAAE,CAAA;IACpC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
@@ -1,13 +1,10 @@
|
|
1
1
|
import { type SendMessageResponse, type GetMessagesResponse } from './schema';
|
2
2
|
declare class TextLineApi {
|
3
|
-
private readonly
|
4
|
-
private readonly password;
|
5
|
-
private readonly apiKey;
|
3
|
+
private readonly accessToken;
|
6
4
|
private readonly baseUrl;
|
7
|
-
constructor(
|
5
|
+
constructor(accessToken: string);
|
8
6
|
private constructUrl;
|
9
7
|
getMessages(phoneNumber?: string, page?: number, pageSize?: number): Promise<GetMessagesResponse>;
|
10
|
-
authenticate(): Promise<string>;
|
11
8
|
sendMessage(content: string, recipient: string): Promise<SendMessageResponse>;
|
12
9
|
}
|
13
10
|
export default TextLineApi;
|
@@ -8,11 +8,9 @@ const lodash_1 = require("lodash");
|
|
8
8
|
const node_fetch_1 = __importDefault(require("node-fetch"));
|
9
9
|
const schema_1 = require("./schema");
|
10
10
|
class TextLineApi {
|
11
|
-
constructor(
|
11
|
+
constructor(accessToken) {
|
12
12
|
this.baseUrl = 'https://application.textline.com';
|
13
|
-
this.
|
14
|
-
this.password = password;
|
15
|
-
this.apiKey = apiKey;
|
13
|
+
this.accessToken = accessToken;
|
16
14
|
}
|
17
15
|
constructUrl(url, params) {
|
18
16
|
const nonEmptyParams = (0, lodash_1.omitBy)(params, lodash_1.isNil);
|
@@ -21,7 +19,6 @@ class TextLineApi {
|
|
21
19
|
return `${this.baseUrl}${url}?${queryParams.toString()}`;
|
22
20
|
}
|
23
21
|
async getMessages(phoneNumber, page, pageSize) {
|
24
|
-
const accessToken = await this.authenticate();
|
25
22
|
const url = this.constructUrl(`/api/conversations.json`, {
|
26
23
|
phone_number: phoneNumber,
|
27
24
|
page_size: pageSize,
|
@@ -31,49 +28,20 @@ class TextLineApi {
|
|
31
28
|
headers: {
|
32
29
|
Accept: 'application/json',
|
33
30
|
'Content-Type': 'application/json',
|
34
|
-
'X-TGP-ACCESS-TOKEN': accessToken,
|
31
|
+
'X-TGP-ACCESS-TOKEN': this.accessToken,
|
35
32
|
},
|
36
33
|
});
|
37
34
|
return response;
|
38
35
|
}
|
39
|
-
async authenticate() {
|
40
|
-
var _a, _b;
|
41
|
-
const url = this.constructUrl(`/auth/sign_in.json`);
|
42
|
-
const response = await (0, node_fetch_1.default)(url, {
|
43
|
-
method: 'POST',
|
44
|
-
headers: {
|
45
|
-
Accept: 'application/json',
|
46
|
-
'Content-Type': 'application/json',
|
47
|
-
},
|
48
|
-
body: JSON.stringify({
|
49
|
-
user: {
|
50
|
-
email: this.email,
|
51
|
-
password: this.password,
|
52
|
-
},
|
53
|
-
api_key: this.apiKey,
|
54
|
-
}),
|
55
|
-
});
|
56
|
-
const result = await response.json();
|
57
|
-
if (response.status >= 400) {
|
58
|
-
throw new Error((0, lodash_1.isNil)(result === null || result === void 0 ? void 0 : result.error)
|
59
|
-
? 'Unable to authenticate'
|
60
|
-
: `Authentication failed with error: ${JSON.stringify(result.error)}`);
|
61
|
-
}
|
62
|
-
if ((0, lodash_1.isNil)((_a = result === null || result === void 0 ? void 0 : result.access_token) === null || _a === void 0 ? void 0 : _a.token)) {
|
63
|
-
throw new Error(`Can't get access token from authentication response ${JSON.stringify(result)}`);
|
64
|
-
}
|
65
|
-
return (_b = result === null || result === void 0 ? void 0 : result.access_token) === null || _b === void 0 ? void 0 : _b.token;
|
66
|
-
}
|
67
36
|
async sendMessage(content, recipient) {
|
68
37
|
var _a;
|
69
|
-
const accessToken = await this.authenticate();
|
70
38
|
const url = this.constructUrl(`/api/conversations.json`);
|
71
39
|
const response = await (0, node_fetch_1.default)(url, {
|
72
40
|
method: 'POST',
|
73
41
|
headers: {
|
74
42
|
Accept: 'application/json',
|
75
43
|
'Content-Type': 'application/json',
|
76
|
-
'X-TGP-ACCESS-TOKEN': accessToken,
|
44
|
+
'X-TGP-ACCESS-TOKEN': this.accessToken,
|
77
45
|
},
|
78
46
|
body: JSON.stringify({
|
79
47
|
phone_number: recipient,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"textLineApi.js","sourceRoot":"","sources":["../../../../extensions/textline/client/textLineApi.ts"],"names":[],"mappings":";;;;;AAAA,mEAA0D;AAC1D,mCAAsC;AACtC,4DAA8B;AAC9B,qCAIiB;AAEjB,MAAM,WAAW;
|
1
|
+
{"version":3,"file":"textLineApi.js","sourceRoot":"","sources":["../../../../extensions/textline/client/textLineApi.ts"],"names":[],"mappings":";;;;;AAAA,mEAA0D;AAC1D,mCAAsC;AACtC,4DAA8B;AAC9B,qCAIiB;AAEjB,MAAM,WAAW;IAKf,YAAY,WAAmB;QAFd,YAAO,GAAG,kCAAkC,CAAA;QAG3D,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;IAChC,CAAC;IAEO,YAAY,CAClB,GAAW,EACX,MAA8D;QAE9D,MAAM,cAAc,GAAG,IAAA,eAAM,EAAC,MAAM,EAAE,cAAK,CAAC,CAAA;QAE5C,MAAM,YAAY,GAA2B,MAAM,CAAC,WAAW,CAC7D,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,G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,EAAE,CAAA;QAEpC,IAAI,QAAQ,CAAC,MAAM,IAAI,GAAG,EAAE;YAC1B,MAAM,IAAI,KAAK,CACb,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,mCAAI,4CAA4C,CAChE,CAAA;SACF;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAED,kBAAe,WAAW,CAAA"}
|
@@ -1,37 +1,17 @@
|
|
1
1
|
import { z } from 'zod';
|
2
2
|
export declare const settings: {
|
3
|
-
|
3
|
+
accessToken: {
|
4
4
|
label: string;
|
5
5
|
key: string;
|
6
6
|
obfuscated: false;
|
7
7
|
required: true;
|
8
8
|
description: string;
|
9
9
|
};
|
10
|
-
password: {
|
11
|
-
label: string;
|
12
|
-
key: string;
|
13
|
-
obfuscated: true;
|
14
|
-
required: true;
|
15
|
-
description: string;
|
16
|
-
};
|
17
|
-
apiKey: {
|
18
|
-
label: string;
|
19
|
-
key: string;
|
20
|
-
obfuscated: true;
|
21
|
-
required: true;
|
22
|
-
description: string;
|
23
|
-
};
|
24
10
|
};
|
25
11
|
export declare const SettingsValidationSchema: z.ZodObject<{
|
26
|
-
|
27
|
-
email: z.ZodString;
|
28
|
-
apiKey: z.ZodString;
|
12
|
+
accessToken: z.ZodString;
|
29
13
|
}, "strip", z.ZodTypeAny, {
|
30
|
-
|
31
|
-
email: string;
|
32
|
-
apiKey: string;
|
14
|
+
accessToken: string;
|
33
15
|
}, {
|
34
|
-
|
35
|
-
email: string;
|
36
|
-
apiKey: string;
|
16
|
+
accessToken: string;
|
37
17
|
}>;
|
@@ -3,31 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SettingsValidationSchema = exports.settings = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
exports.settings = {
|
6
|
-
|
7
|
-
label: '
|
8
|
-
key: '
|
6
|
+
accessToken: {
|
7
|
+
label: 'accessToken',
|
8
|
+
key: 'accessToken',
|
9
9
|
obfuscated: false,
|
10
10
|
required: true,
|
11
|
-
description: '
|
12
|
-
},
|
13
|
-
password: {
|
14
|
-
label: 'Password',
|
15
|
-
key: 'password',
|
16
|
-
obfuscated: true,
|
17
|
-
required: true,
|
18
|
-
description: 'Your TextLine agent password',
|
19
|
-
},
|
20
|
-
apiKey: {
|
21
|
-
label: 'Api Key',
|
22
|
-
key: 'apiKey',
|
23
|
-
obfuscated: true,
|
24
|
-
required: true,
|
25
|
-
description: 'Find your API key at https://application.textline.com/organization/api_settings.',
|
11
|
+
description: 'Find your Access Token at https://application.textline.com/organization/api_settings.',
|
26
12
|
},
|
27
13
|
};
|
28
14
|
exports.SettingsValidationSchema = zod_1.z.object({
|
29
|
-
|
30
|
-
email: zod_1.z.string().min(1, { message: 'Missing TextLine email' }),
|
31
|
-
apiKey: zod_1.z.string().min(1, { message: 'Missing TextLine access token' }),
|
15
|
+
accessToken: zod_1.z.string().min(1, { message: 'Missing TextLine password' }),
|
32
16
|
});
|
33
17
|
//# sourceMappingURL=settings.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/textline/settings.ts"],"names":[],"mappings":";;;AACA,6BAAwC;AAE3B,QAAA,QAAQ,GAAG;IACtB,
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/textline/settings.ts"],"names":[],"mappings":";;;AACA,6BAAwC;AAE3B,QAAA,QAAQ,GAAG;IACtB,WAAW,EAAE;QACX,KAAK,EAAE,aAAa;QACpB,GAAG,EAAE,aAAa;QAClB,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,uFAAuF;KACrG;CACgC,CAAA;AAEtB,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE,CAAC;CACrB,CAAC,CAAA"}
|