@itentialopensource/adapter-slack 2.6.1 → 2.6.2
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/CHANGELOG.md +8 -0
- package/adapter.js +3 -2
- package/entities/Channels/schema.json +1 -1
- package/entities/Chat/schema.json +1 -1
- package/entities/Files/schema.json +12 -1
- package/entities/Groups/schema.json +1 -1
- package/entities/Im/schema.json +1 -1
- package/entities/Mpim/schema.json +1 -1
- package/package.json +1 -1
- package/pronghorn.json +10 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +4 -4
- package/test/integration/adapterTestIntegration.js +2 -2
- package/test/unit/adapterTestUnit.js +1 -1
package/CHANGELOG.md
CHANGED
package/adapter.js
CHANGED
|
@@ -5283,10 +5283,11 @@ class Slacktest extends AdapterBaseCl {
|
|
|
5283
5283
|
* @param {string} content - File contents via a POST variable. If omitting this parameter, you must provide a `file`.
|
|
5284
5284
|
* @param {string} token - Authentication token. Requires scope: `files:write:user`
|
|
5285
5285
|
* @param {string} file - File contents via `multipart\/form-data`. If omitting this parameter, you must submit `content`.
|
|
5286
|
+
* @param {number} threadTs - Unique identifier of a thread's parent message
|
|
5286
5287
|
* @param {getCallback} callback - a callback function to return the result
|
|
5287
5288
|
*/
|
|
5288
5289
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
5289
|
-
postFilesupload(channels, title, initialComment, filetype, filename, content, token, file, callback) {
|
|
5290
|
+
postFilesupload(channels, title, initialComment, filetype, filename, content, token, file, threadTs, callback) {
|
|
5290
5291
|
const meth = 'adapter-postFilesupload';
|
|
5291
5292
|
const origin = `${this.id}-${meth}`;
|
|
5292
5293
|
log.trace(origin);
|
|
@@ -5303,7 +5304,7 @@ class Slacktest extends AdapterBaseCl {
|
|
|
5303
5304
|
const queryParamsAvailable = {};
|
|
5304
5305
|
const queryParams = {};
|
|
5305
5306
|
const pathVars = [];
|
|
5306
|
-
const bodyVars = {};
|
|
5307
|
+
const bodyVars = { channels, title, initialComment, filetype, filename, content, file, threadTs };
|
|
5307
5308
|
|
|
5308
5309
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
5309
5310
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$id": "schema.json",
|
|
3
3
|
"type": "object",
|
|
4
4
|
"schema": "http://json-schema.org/draft-07/schema#",
|
|
5
|
-
"translate":
|
|
5
|
+
"translate": true,
|
|
6
6
|
"dynamicfields": true,
|
|
7
7
|
"properties": {
|
|
8
8
|
"ph_request_type": {
|
|
@@ -18,6 +18,17 @@
|
|
|
18
18
|
"postFilesupload"
|
|
19
19
|
],
|
|
20
20
|
"external_name": "ph_request_type"
|
|
21
|
+
},
|
|
22
|
+
"threadTs": {
|
|
23
|
+
"type": ["string", "number"],
|
|
24
|
+
"description": "Unique identifier of a thread's parent message",
|
|
25
|
+
"parse": false,
|
|
26
|
+
"encode": false,
|
|
27
|
+
"encrypt": {
|
|
28
|
+
"type": "AES",
|
|
29
|
+
"key": ""
|
|
30
|
+
},
|
|
31
|
+
"external_name": "thread_ts"
|
|
21
32
|
}
|
|
22
33
|
},
|
|
23
34
|
"definitions": {}
|
package/entities/Im/schema.json
CHANGED
package/package.json
CHANGED
package/pronghorn.json
CHANGED
|
@@ -4332,6 +4332,16 @@
|
|
|
4332
4332
|
"title": "file",
|
|
4333
4333
|
"type": "string"
|
|
4334
4334
|
}
|
|
4335
|
+
},
|
|
4336
|
+
{
|
|
4337
|
+
"name": "threadTs",
|
|
4338
|
+
"type": "number",
|
|
4339
|
+
"info": "Unique identifier of a thread's parent message",
|
|
4340
|
+
"required": false,
|
|
4341
|
+
"schema": {
|
|
4342
|
+
"title": "threadTs",
|
|
4343
|
+
"type": "number"
|
|
4344
|
+
}
|
|
4335
4345
|
}
|
|
4336
4346
|
],
|
|
4337
4347
|
"output": {
|
|
Binary file
|
package/report/adapterInfo.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.
|
|
3
|
-
"configLines":
|
|
2
|
+
"version": "2.6.1",
|
|
3
|
+
"configLines": 10357,
|
|
4
4
|
"scriptLines": 1707,
|
|
5
|
-
"codeLines":
|
|
5
|
+
"codeLines": 12510,
|
|
6
6
|
"testLines": 9108,
|
|
7
7
|
"testCases": 394,
|
|
8
|
-
"totalCodeLines":
|
|
8
|
+
"totalCodeLines": 23325,
|
|
9
9
|
"wfTasks": 155
|
|
10
10
|
}
|
|
@@ -238,7 +238,7 @@ const Slacktest = require('../../adapter');
|
|
|
238
238
|
|
|
239
239
|
// begin the testing - these should be pretty well defined between the describe and the it!
|
|
240
240
|
describe('[integration] Slack Adapter Test', () => {
|
|
241
|
-
describe('
|
|
241
|
+
describe('Slack Class Tests', () => {
|
|
242
242
|
const a = new Slacktest(
|
|
243
243
|
pronghornProps.adapterProps.adapters[0].id,
|
|
244
244
|
pronghornProps.adapterProps.adapters[0].properties
|
|
@@ -2848,7 +2848,7 @@ describe('[integration] Slack Adapter Test', () => {
|
|
|
2848
2848
|
describe('#postFilesupload - errors', () => {
|
|
2849
2849
|
it('should work if integrated or standalone with mockdata', (done) => {
|
|
2850
2850
|
try {
|
|
2851
|
-
a.postFilesupload('fakedata', 'fakedata', 'fakedata', 'fakedata', 'fakedata', 'fakedata', 'fakedata', 'fakedata', (data, error) => {
|
|
2851
|
+
a.postFilesupload('fakedata', 'fakedata', 'fakedata', 'fakedata', 'fakedata', 'fakedata', 'fakedata', 'fakedata', 0, (data, error) => {
|
|
2852
2852
|
try {
|
|
2853
2853
|
if (stub) {
|
|
2854
2854
|
assert.equal(undefined, error);
|
|
@@ -131,7 +131,7 @@ if (fs.existsSync(dirPath)) {
|
|
|
131
131
|
|
|
132
132
|
// begin the testing - these should be pretty well defined between the describe and the it!
|
|
133
133
|
describe('[unit] Slack Adapter Test', () => {
|
|
134
|
-
describe('
|
|
134
|
+
describe('Slack Class Tests', () => {
|
|
135
135
|
const a = new Slacktest(
|
|
136
136
|
pronghornProps.adapterProps.adapters[0].id,
|
|
137
137
|
pronghornProps.adapterProps.adapters[0].properties
|