@itentialopensource/adapter-sharepoint 0.1.1 → 0.2.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.
@@ -0,0 +1,447 @@
1
+ openapi: 3.0.0
2
+ info:
3
+ title: Sharepoint
4
+ contact: {}
5
+ version: '1.0'
6
+ servers:
7
+ - url: https://{site_url}/_api/web
8
+ variables:
9
+ site_url:
10
+ default: DefaultParameterValue
11
+ paths:
12
+ /lists/{title}:
13
+ get:
14
+ tags:
15
+ - Lists
16
+ summary: getListByTitle
17
+ description: ''
18
+ operationId: getListByTitle
19
+ parameters:
20
+ - name: title
21
+ in: path
22
+ description: ''
23
+ required: true
24
+ style: simple
25
+ schema:
26
+ type: string
27
+ example: 'null'
28
+ responses:
29
+ '200':
30
+ description: ''
31
+ headers: {}
32
+ content: {}
33
+ deprecated: false
34
+ /{guid}:
35
+ get:
36
+ tags:
37
+ - Lists
38
+ summary: getListByGuid
39
+ description: ''
40
+ operationId: getListByGuid
41
+ parameters:
42
+ - name: guid
43
+ in: path
44
+ description: ''
45
+ required: true
46
+ style: simple
47
+ schema:
48
+ type: string
49
+ example: 'null'
50
+ responses:
51
+ '200':
52
+ description: ''
53
+ headers: {}
54
+ content: {}
55
+ deprecated: false
56
+ post:
57
+ tags:
58
+ - Lists
59
+ summary: updateList
60
+ description: ''
61
+ operationId: updateList
62
+ parameters:
63
+ - name: guid
64
+ in: path
65
+ description: ''
66
+ required: true
67
+ style: simple
68
+ schema:
69
+ type: string
70
+ example: 'null'
71
+ requestBody:
72
+ description: ''
73
+ content:
74
+ application/json:
75
+ schema:
76
+ allOf:
77
+ - $ref: '#/components/schemas/updateListRequest'
78
+ - example:
79
+ __metadata:
80
+ type: SP.List
81
+ Title: New title
82
+ example:
83
+ __metadata:
84
+ type: SP.List
85
+ Title: New title
86
+ required: true
87
+ responses:
88
+ '200':
89
+ description: ''
90
+ headers: {}
91
+ content: {}
92
+ deprecated: false
93
+ /lists:
94
+ post:
95
+ tags:
96
+ - Lists
97
+ summary: createList
98
+ description: ''
99
+ operationId: createList
100
+ parameters: []
101
+ requestBody:
102
+ description: ''
103
+ content:
104
+ application/json:
105
+ schema:
106
+ allOf:
107
+ - $ref: '#/components/schemas/createListRequest'
108
+ - example:
109
+ __metadata:
110
+ type: SP.List
111
+ AllowContentTypes: true
112
+ BaseTemplate: 100
113
+ ContentTypesEnabled: true
114
+ Description: My list description
115
+ Title: Test
116
+ example:
117
+ __metadata:
118
+ type: SP.List
119
+ AllowContentTypes: true
120
+ BaseTemplate: 100
121
+ ContentTypesEnabled: true
122
+ Description: My list description
123
+ Title: Test
124
+ required: true
125
+ responses:
126
+ '200':
127
+ description: ''
128
+ headers: {}
129
+ content: {}
130
+ deprecated: false
131
+ /{relativeUrl}:
132
+ get:
133
+ tags:
134
+ - Folders
135
+ summary: getFolderByServerRelativeUrl
136
+ description: ''
137
+ operationId: getFolderByServerRelativeUrl
138
+ parameters:
139
+ - name: relativeUrl
140
+ in: path
141
+ description: ''
142
+ required: true
143
+ style: simple
144
+ schema:
145
+ type: string
146
+ example: 'null'
147
+ responses:
148
+ '200':
149
+ description: ''
150
+ headers: {}
151
+ content: {}
152
+ deprecated: false
153
+ post:
154
+ tags:
155
+ - Folders
156
+ summary: deleteFolder
157
+ description: ''
158
+ operationId: deleteFolder
159
+ parameters:
160
+ - name: relativeUrl
161
+ in: path
162
+ description: ''
163
+ required: true
164
+ style: simple
165
+ schema:
166
+ type: string
167
+ example: 'null'
168
+ responses:
169
+ '200':
170
+ description: ''
171
+ headers: {}
172
+ content: {}
173
+ deprecated: false
174
+ /folders:
175
+ post:
176
+ tags:
177
+ - Folders
178
+ summary: createFolder
179
+ description: ''
180
+ operationId: createFolder
181
+ parameters: []
182
+ requestBody:
183
+ description: ''
184
+ content:
185
+ application/json:
186
+ schema:
187
+ allOf:
188
+ - $ref: '#/components/schemas/createFolderRequest'
189
+ - example:
190
+ __metadata:
191
+ type: SP.Folder
192
+ ServerRelativeUrl: /document library relative url/folder name
193
+ example:
194
+ __metadata:
195
+ type: SP.Folder
196
+ ServerRelativeUrl: /document library relative url/folder name
197
+ required: true
198
+ responses:
199
+ '200':
200
+ description: ''
201
+ headers: {}
202
+ content: {}
203
+ deprecated: false
204
+ /{relativeUrl}/ListItemAllFields:
205
+ get:
206
+ tags:
207
+ - Folders
208
+ summary: getFolderODataType
209
+ description: ''
210
+ operationId: getFolderODataType
211
+ parameters:
212
+ - name: relativeUrl
213
+ in: path
214
+ description: ''
215
+ required: true
216
+ style: simple
217
+ schema:
218
+ type: string
219
+ example: 'null'
220
+ responses:
221
+ '200':
222
+ description: ''
223
+ headers: {}
224
+ content: {}
225
+ deprecated: false
226
+ post:
227
+ tags:
228
+ - Folders
229
+ summary: renameFolder
230
+ description: ''
231
+ operationId: renameFolder
232
+ parameters:
233
+ - name: relativeUrl
234
+ in: path
235
+ description: ''
236
+ required: true
237
+ style: simple
238
+ schema:
239
+ type: string
240
+ example: 'null'
241
+ requestBody:
242
+ description: ''
243
+ content:
244
+ application/json:
245
+ schema:
246
+ allOf:
247
+ - $ref: '#/components/schemas/renameFolderRequest'
248
+ - example:
249
+ __metadata:
250
+ type: '{odata.type from previous call}'
251
+ Title: New name
252
+ FileLeafRef: New name
253
+ example:
254
+ __metadata:
255
+ type: '{odata.type from previous call}'
256
+ Title: New name
257
+ FileLeafRef: New name
258
+ required: true
259
+ responses:
260
+ '200':
261
+ description: ''
262
+ headers: {}
263
+ content: {}
264
+ deprecated: false
265
+ /{relativeUrl}/Files:
266
+ get:
267
+ tags:
268
+ - Files
269
+ summary: getFilesByFolder
270
+ description: ''
271
+ operationId: getFilesByFolder
272
+ parameters:
273
+ - name: relativeUrl
274
+ in: path
275
+ description: ''
276
+ required: true
277
+ style: simple
278
+ schema:
279
+ type: string
280
+ example: 'null'
281
+ responses:
282
+ '200':
283
+ description: ''
284
+ headers: {}
285
+ content: {}
286
+ deprecated: false
287
+ /{relativeUrl}/{fileName}/$value:
288
+ get:
289
+ tags:
290
+ - Files
291
+ summary: getFile
292
+ description: ''
293
+ operationId: getFile
294
+ parameters:
295
+ - name: relativeUrl
296
+ in: path
297
+ description: ''
298
+ required: true
299
+ style: simple
300
+ schema:
301
+ type: string
302
+ example: 'null'
303
+ - name: fileName
304
+ in: path
305
+ description: ''
306
+ required: true
307
+ style: simple
308
+ schema:
309
+ type: string
310
+ example: 'null'
311
+ responses:
312
+ '200':
313
+ description: ''
314
+ headers: {}
315
+ content: {}
316
+ deprecated: false
317
+ /{relativeUrl}/$value:
318
+ get:
319
+ tags:
320
+ - Files
321
+ summary: getFileByFileUrl
322
+ description: ''
323
+ operationId: getFileByFileUrl
324
+ parameters:
325
+ - name: relativeUrl
326
+ in: path
327
+ description: ''
328
+ required: true
329
+ style: simple
330
+ schema:
331
+ type: string
332
+ example: 'null'
333
+ responses:
334
+ '200':
335
+ description: ''
336
+ headers: {}
337
+ content: {}
338
+ deprecated: false
339
+ components:
340
+ schemas:
341
+ createListRequest:
342
+ title: createListRequest
343
+ required:
344
+ - __metadata
345
+ - AllowContentTypes
346
+ - BaseTemplate
347
+ - ContentTypesEnabled
348
+ - Description
349
+ - Title
350
+ type: object
351
+ properties:
352
+ __metadata:
353
+ allOf:
354
+ - $ref: '#/components/schemas/Metadata'
355
+ - example:
356
+ type: SP.List
357
+ AllowContentTypes:
358
+ type: boolean
359
+ BaseTemplate:
360
+ type: integer
361
+ format: int32
362
+ ContentTypesEnabled:
363
+ type: boolean
364
+ Description:
365
+ type: string
366
+ Title:
367
+ type: string
368
+ example:
369
+ __metadata:
370
+ type: SP.List
371
+ AllowContentTypes: true
372
+ BaseTemplate: 100
373
+ ContentTypesEnabled: true
374
+ Description: My list description
375
+ Title: Test
376
+ Metadata:
377
+ title: Metadata
378
+ required:
379
+ - type
380
+ type: object
381
+ properties:
382
+ type:
383
+ type: string
384
+ example:
385
+ type: SP.List
386
+ updateListRequest:
387
+ title: updateListRequest
388
+ required:
389
+ - __metadata
390
+ - Title
391
+ type: object
392
+ properties:
393
+ __metadata:
394
+ allOf:
395
+ - $ref: '#/components/schemas/Metadata'
396
+ - example:
397
+ type: SP.List
398
+ Title:
399
+ type: string
400
+ example:
401
+ __metadata:
402
+ type: SP.List
403
+ Title: New title
404
+ createFolderRequest:
405
+ title: createFolderRequest
406
+ required:
407
+ - __metadata
408
+ - ServerRelativeUrl
409
+ type: object
410
+ properties:
411
+ __metadata:
412
+ allOf:
413
+ - $ref: '#/components/schemas/Metadata'
414
+ - example:
415
+ type: SP.List
416
+ ServerRelativeUrl:
417
+ type: string
418
+ example:
419
+ __metadata:
420
+ type: SP.Folder
421
+ ServerRelativeUrl: /document library relative url/folder name
422
+ renameFolderRequest:
423
+ title: renameFolderRequest
424
+ required:
425
+ - __metadata
426
+ - Title
427
+ - FileLeafRef
428
+ type: object
429
+ properties:
430
+ __metadata:
431
+ allOf:
432
+ - $ref: '#/components/schemas/Metadata'
433
+ - example:
434
+ type: SP.List
435
+ Title:
436
+ type: string
437
+ FileLeafRef:
438
+ type: string
439
+ example:
440
+ __metadata:
441
+ type: '{odata.type from previous call}'
442
+ Title: New name
443
+ FileLeafRef: New name
444
+ tags:
445
+ - name: Lists
446
+ - name: Folders
447
+ - name: Files
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "0.1.0",
3
- "configLines": 2592,
4
- "scriptLines": 1795,
5
- "codeLines": 3656,
6
- "testLines": 3521,
7
- "testCases": 157,
8
- "totalCodeLines": 8972,
9
- "wfTasks": 29
2
+ "version": "0.1.1",
3
+ "configLines": 3336,
4
+ "scriptLines": 1783,
5
+ "codeLines": 3150,
6
+ "testLines": 3970,
7
+ "testCases": 186,
8
+ "totalCodeLines": 8903,
9
+ "wfTasks": 37
10
10
  }
@@ -0,0 +1,120 @@
1
+ {
2
+ "errors": [],
3
+ "statistics": [
4
+ {
5
+ "owner": "errorJson",
6
+ "description": "New adapter errors available for use",
7
+ "value": 0
8
+ },
9
+ {
10
+ "owner": "errorJson",
11
+ "description": "Adapter errors no longer available for use",
12
+ "value": 0
13
+ },
14
+ {
15
+ "owner": "errorJson",
16
+ "description": "Adapter errors that have been updated (e.g. recommendation changes)",
17
+ "value": 31
18
+ },
19
+ {
20
+ "owner": "packageJson",
21
+ "description": "Number of production dependencies",
22
+ "value": 17
23
+ },
24
+ {
25
+ "owner": "packageJson",
26
+ "description": "Number of development dependencies",
27
+ "value": 6
28
+ },
29
+ {
30
+ "owner": "packageJson",
31
+ "description": "Number of npm scripts",
32
+ "value": 22
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^5.3.0"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 77
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 347
48
+ },
49
+ {
50
+ "owner": "markdown",
51
+ "description": "Number of lines in the SUMMARY.md",
52
+ "value": 9
53
+ },
54
+ {
55
+ "owner": "markdown",
56
+ "description": "Number of lines in the PROPERTIES.md",
57
+ "value": 642
58
+ },
59
+ {
60
+ "owner": "markdown",
61
+ "description": "Number of lines in the TROUBLESHOOT.md",
62
+ "value": 48
63
+ },
64
+ {
65
+ "owner": "markdown",
66
+ "description": "Number of lines in the ENHANCE.md",
67
+ "value": 70
68
+ },
69
+ {
70
+ "owner": "markdown",
71
+ "description": "Number of lines in the BROKER.md",
72
+ "value": 70
73
+ },
74
+ {
75
+ "owner": "unitTestJS",
76
+ "description": "Number of lines of code in unit tests",
77
+ "value": 1908
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 95
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 810
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 21
93
+ },
94
+ {
95
+ "owner": "staticFile",
96
+ "description": "Number of lines of code in adapterBase.js",
97
+ "value": 1453
98
+ },
99
+ {
100
+ "owner": "staticFile",
101
+ "description": "Number of static files added",
102
+ "value": 36
103
+ },
104
+ {
105
+ "owner": "Overall",
106
+ "description": "Total lines of Code",
107
+ "value": 4171
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 116
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }
@@ -4,6 +4,7 @@
4
4
  "properties": {
5
5
  "host": "localhost",
6
6
  "port": 443,
7
+ "choosepath": "",
7
8
  "base_path": "/_api/web",
8
9
  "version": "",
9
10
  "cache_location": "none",
@@ -25,12 +26,27 @@
25
26
  "auth_logging": false,
26
27
  "client_id": "",
27
28
  "client_secret": "",
28
- "grant_type": ""
29
+ "grant_type": "",
30
+ "sensitive": [],
31
+ "sso": {
32
+ "protocol": "",
33
+ "host": "",
34
+ "port": 0
35
+ },
36
+ "multiStepAuthCalls": [
37
+ {
38
+ "name": "",
39
+ "requestFields": {},
40
+ "responseFields": {},
41
+ "successfullResponseCode": 200
42
+ }
43
+ ]
29
44
  },
30
45
  "healthcheck": {
31
46
  "type": "none",
32
47
  "frequency": 60000,
33
- "query_object": {}
48
+ "query_object": {},
49
+ "addlHeaders": {}
34
50
  },
35
51
  "throttle": {
36
52
  "throttle_enabled": false,
@@ -125,6 +141,12 @@
125
141
  {
126
142
  "path": "/get/devices",
127
143
  "method": "GET",
144
+ "pagination": {
145
+ "offsetVar": "",
146
+ "limitVar": "",
147
+ "incrementBy": "limit",
148
+ "requestLocation": "query"
149
+ },
128
150
  "query": {},
129
151
  "body": {},
130
152
  "headers": {},
@@ -186,6 +208,45 @@
186
208
  "responseFields": {}
187
209
  }
188
210
  ]
211
+ },
212
+ "cache": {
213
+ "enabled": false,
214
+ "entities": [
215
+ {
216
+ "entityType": "",
217
+ "frequency": 1440,
218
+ "flushOnFail": false,
219
+ "limit": 1000,
220
+ "retryAttempts": 5,
221
+ "sort": true,
222
+ "populate": [
223
+ {
224
+ "path": "",
225
+ "method": "GET",
226
+ "pagination": {
227
+ "offsetVar": "",
228
+ "limitVar": "",
229
+ "incrementBy": "limit",
230
+ "requestLocation": "query"
231
+ },
232
+ "query": {},
233
+ "body": {},
234
+ "headers": {},
235
+ "handleFailure": "ignore",
236
+ "requestFields": {},
237
+ "responseDatakey": "",
238
+ "responseFields": {}
239
+ }
240
+ ],
241
+ "cachedTasks": [
242
+ {
243
+ "name": "",
244
+ "filterField": "",
245
+ "filterLoc": ""
246
+ }
247
+ ]
248
+ }
249
+ ]
189
250
  }
190
251
  },
191
252
  "groups": [],
@@ -7,9 +7,9 @@
7
7
  /* eslint import/no-dynamic-require: warn */
8
8
  /* eslint import/no-unresolved: warn */
9
9
 
10
- const mocha = require('mocha');
11
10
  const path = require('path');
12
11
  const assert = require('assert');
12
+ const mocha = require('mocha');
13
13
  const itParam = require('mocha-param');
14
14
 
15
15
  const utils = require('../../utils/tbUtils');