seatsio 69.1.0 → 71.0.0
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/.github/workflows/build.yml +4 -4
- package/.github/workflows/publish.yml +3 -10
- package/README.md +0 -17
- package/package.json +10 -19
- package/src/Common/IDs.js +1 -1
- package/src/Common/Labels.js +2 -2
- package/src/Events/Channels.js +8 -8
- package/src/Events/Event.js +1 -1
- package/src/Events/Events.js +13 -6
- package/src/Events/ForSaleConfig.js +3 -1
- package/src/Events/StatusChangesParams.js +1 -1
- package/src/Reports/ChartReports.js +4 -4
- package/src/Reports/EventReports.js +16 -16
- package/src/Subaccounts/Subaccounts.js +4 -4
- package/src/Workspaces/Workspaces.js +12 -12
- package/tests/accounts/changeHoldPeriod.test.js +1 -1
- package/tests/accounts/changePassword.test.js +1 -1
- package/tests/accounts/disableDraftChartDrawings.test.js +1 -1
- package/tests/accounts/enableDraftChartDrawings.test.js +1 -1
- package/tests/accounts/updateSettingTest.test.js +1 -1
- package/tests/chartReports/chartReportSummary.test.js +1 -1
- package/tests/charts/addTag.test.js +2 -2
- package/tests/charts/copyChart.test.js +1 -1
- package/tests/charts/copyChartToSubaccount.test.js +1 -1
- package/tests/charts/copyDraftVersion.test.js +1 -1
- package/tests/charts/createChart.test.js +5 -5
- package/tests/charts/discardDraftVersion.test.js +1 -1
- package/tests/charts/listAllCharts.test.js +1 -1
- package/tests/charts/listAllTags.test.js +1 -1
- package/tests/charts/listChartsInArchive.test.js +8 -8
- package/tests/charts/listFirstPageOfCharts.test.js +5 -5
- package/tests/charts/listPageAfter.test.js +3 -3
- package/tests/charts/listPageBefore.test.js +3 -3
- package/tests/charts/moveChartOutOfArchive.test.js +1 -1
- package/tests/charts/moveChartToArchive.test.js +1 -1
- package/tests/charts/publishDraftVersion.test.js +1 -1
- package/tests/charts/removeTag.test.js +1 -1
- package/tests/charts/retrieveDraftVersion.test.js +1 -1
- package/tests/charts/retrievePublishedVersion.test.js +1 -1
- package/tests/charts/saveSocialDistancingRulesets.test.js +1 -1
- package/tests/charts/updateChart.test.js +2 -2
- package/tests/error.test.js +1 -1
- package/tests/eventReports/eventReportSummary.test.js +1 -1
- package/tests/events/channels/replaceChannels.test.js +15 -16
- package/tests/events/channels/setObjectsForChannelsTest.js +19 -19
- package/tests/events/deleteEvent.test.js +1 -1
- package/tests/events/listAllStatusChanges.test.js +0 -1
- package/tests/events/listFirstPage.test.js +2 -2
- package/tests/events/listPageAfter.test.js +2 -2
- package/tests/events/listPageBefore.test.js +2 -2
- package/tests/events/markEverythingAsForSale.test.js +2 -2
- package/tests/events/markObjectsAsForSale.test.js +11 -7
- package/tests/events/markObjectsAsNotForSale.test.js +11 -7
- package/tests/events/retrieveEvent.test.js +1 -1
- package/tests/holdTokens/createHoldTokens.test.js +2 -2
- package/tests/holdTokens/retrieveHoldToken.test.js +1 -1
- package/tests/holdTokens/updateHoldTokenExpirationDate.test.js +1 -1
- package/tests/invitations/listAllInvitations.test.js +1 -1
- package/tests/subaccounts/activateSubaccount.test.js +1 -1
- package/tests/subaccounts/copyChartToParent.test.js +1 -1
- package/tests/subaccounts/copyChartToSubaccount.test.js +1 -1
- package/tests/subaccounts/createSubAccount.test.js +2 -2
- package/tests/subaccounts/deactivateSubaccount.test.js +1 -1
- package/tests/subaccounts/filterSubaccounts.test.js +7 -7
- package/tests/subaccounts/listActiveSubaccounts.test.js +4 -4
- package/tests/subaccounts/listInactiveSubaccounts.test.js +7 -7
- package/tests/subaccounts/listPageAfter.test.js +2 -2
- package/tests/subaccounts/listPageBefore.test.js +2 -2
- package/tests/subaccounts/regenerateDesignerKey.test.js +1 -1
- package/tests/subaccounts/regenerateSecretKey.test.js +1 -1
- package/tests/subaccounts/retrieveSubaccount.test.js +1 -1
- package/tests/subaccounts/updateSubaccount.test.js +2 -2
- package/tests/testUtils.js +7 -7
- package/tests/users/inviteUser.test.js +2 -2
- package/tests/workspaces/listAllWorkspaces.test.js +1 -1
- package/tests/workspaces/listFirstPage.test.js +2 -2
- package/tests/workspaces/listInactiveWorkspaces.test.js +2 -2
- package/tests/workspaces/listPageAfter.test.js +2 -2
- package/tests/workspaces/listPageBefore.test.js +2 -2
- package/tests/workspaces/updateWorkspace.test.js +1 -1
- package/.github/workflows/release.yml +0 -39
- package/tests/users/activateUser.test.js +0 -6
- package/tests/users/deactivateUser.test.js +0 -6
|
@@ -15,11 +15,11 @@ jobs:
|
|
|
15
15
|
- uses: actions/checkout@v2
|
|
16
16
|
- uses: actions/setup-node@v1
|
|
17
17
|
with:
|
|
18
|
-
node-version:
|
|
18
|
+
node-version: 18
|
|
19
19
|
registry-url: https://registry.npmjs.org/
|
|
20
|
-
- run:
|
|
21
|
-
- run:
|
|
20
|
+
- run: yarn install
|
|
21
|
+
- run: yarn lint
|
|
22
22
|
- uses: zcong1993/setup-timezone@master
|
|
23
23
|
with:
|
|
24
24
|
timezone: Europe/Brussels
|
|
25
|
-
- run:
|
|
25
|
+
- run: yarn test
|
|
@@ -11,16 +11,9 @@ jobs:
|
|
|
11
11
|
- uses: actions/checkout@v2
|
|
12
12
|
- uses: actions/setup-node@v1
|
|
13
13
|
with:
|
|
14
|
-
node-version:
|
|
14
|
+
node-version: 18
|
|
15
15
|
registry-url: https://registry.npmjs.org/
|
|
16
|
-
- run:
|
|
17
|
-
- run:
|
|
18
|
-
- run: npm publish
|
|
16
|
+
- run: yarn install
|
|
17
|
+
- run: yarn publish
|
|
19
18
|
env:
|
|
20
19
|
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
21
|
-
- uses: svenstaro/upload-release-action@v2
|
|
22
|
-
with:
|
|
23
|
-
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
24
|
-
file: build/SeatsioClient.js
|
|
25
|
-
tag: ${{ github.ref }}
|
|
26
|
-
overwrite: true
|
package/README.md
CHANGED
|
@@ -20,23 +20,6 @@ For Node, you can install using npm:
|
|
|
20
20
|
```sh
|
|
21
21
|
npm install seatsio
|
|
22
22
|
```
|
|
23
|
-
Then you can use it with require:
|
|
24
|
-
```js
|
|
25
|
-
const { SeatsioClient } = require('seatsio')
|
|
26
|
-
```
|
|
27
|
-
For browser, you can directly include it from GitHub:
|
|
28
|
-
|
|
29
|
-
```html
|
|
30
|
-
<script src="https://github.com/seatsio/seatsio-js/releases/download/<RELEASE_TAG>/SeatsioClient.js"></script>
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
This library uses `async/await` introduced with ES2017 and `for await` loops which is part of the ES2018. `for await` loops gained native support from Node 10 onwards. As a result, the minimum required version for Node is 10.
|
|
34
|
-
|
|
35
|
-
## Versioning
|
|
36
|
-
|
|
37
|
-
seatsio-js follows semver since v54.4.0.
|
|
38
|
-
|
|
39
|
-
Please note that any version below v2 is not production ready.
|
|
40
23
|
|
|
41
24
|
## Usage
|
|
42
25
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "seatsio",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "71.0.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Official JavaScript and Node.JS client library for the Seats.io REST API",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"lint": "eslint ./src",
|
|
9
|
-
"test": "jest --maxWorkers=8 --verbose"
|
|
10
|
-
"bundle": "gulp bundle"
|
|
8
|
+
"lint": "eslint ./src ./tests",
|
|
9
|
+
"test": "jest --maxWorkers=8 --verbose"
|
|
11
10
|
},
|
|
12
11
|
"repository": {
|
|
13
12
|
"type": "git",
|
|
@@ -17,21 +16,13 @@
|
|
|
17
16
|
"axios": "0.27.2"
|
|
18
17
|
},
|
|
19
18
|
"devDependencies": {
|
|
20
|
-
"
|
|
21
|
-
"eslint": "
|
|
22
|
-
"eslint-config-standard": "16.0.3",
|
|
19
|
+
"eslint": "8.26.0",
|
|
20
|
+
"eslint-config-standard": "17.0.0",
|
|
23
21
|
"eslint-plugin-import": "2.26.0",
|
|
24
|
-
"eslint-plugin-
|
|
25
|
-
"eslint-plugin-promise": "6.
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"gulp-jest": "latest",
|
|
30
|
-
"gulp-tap": "latest",
|
|
31
|
-
"gulp-uglify": "latest",
|
|
32
|
-
"gulp-uglify-es": "latest",
|
|
33
|
-
"jest": "28.1.0",
|
|
34
|
-
"jest-cli": "28.1.0",
|
|
35
|
-
"uuid": "8.3.2"
|
|
22
|
+
"eslint-plugin-n": "15.5.0",
|
|
23
|
+
"eslint-plugin-promise": "6.1.1",
|
|
24
|
+
"jest": "29.2.2",
|
|
25
|
+
"jest-cli": "29.2.2",
|
|
26
|
+
"uuid": "9.0.0"
|
|
36
27
|
}
|
|
37
28
|
}
|
package/src/Common/IDs.js
CHANGED
package/src/Common/Labels.js
CHANGED
package/src/Events/Channels.js
CHANGED
|
@@ -9,10 +9,10 @@ class Channels {
|
|
|
9
9
|
add (eventKey, channelKey, name, color, index, objects) {
|
|
10
10
|
return this.client.post(`/events/${encodeURIComponent(eventKey)}/channels`, {
|
|
11
11
|
key: channelKey,
|
|
12
|
-
name
|
|
13
|
-
color
|
|
14
|
-
index
|
|
15
|
-
objects
|
|
12
|
+
name,
|
|
13
|
+
color,
|
|
14
|
+
index,
|
|
15
|
+
objects
|
|
16
16
|
})
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -30,22 +30,22 @@ class Channels {
|
|
|
30
30
|
|
|
31
31
|
addObjects (eventKey, channelKey, objects) {
|
|
32
32
|
return this.client.post(`/events/${encodeURIComponent(eventKey)}/channels/${encodeURIComponent(channelKey)}/objects`, {
|
|
33
|
-
objects
|
|
33
|
+
objects
|
|
34
34
|
})
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
removeObjects (eventKey, channelKey, objects) {
|
|
38
38
|
return this.client.delete(`/events/${encodeURIComponent(eventKey)}/channels/${encodeURIComponent(channelKey)}/objects`, {
|
|
39
|
-
data: { objects
|
|
39
|
+
data: { objects }
|
|
40
40
|
})
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
replace (eventKey, channels) {
|
|
44
|
-
return this.client.post(`/events/${encodeURIComponent(eventKey)}/channels/update`, { channels
|
|
44
|
+
return this.client.post(`/events/${encodeURIComponent(eventKey)}/channels/update`, { channels })
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
setObjects (eventKey, channelConfig) {
|
|
48
|
-
return this.client.post(`/events/${encodeURIComponent(eventKey)}/channels/assign-objects`, { channelConfig
|
|
48
|
+
return this.client.post(`/events/${encodeURIComponent(eventKey)}/channels/assign-objects`, { channelConfig })
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
package/src/Events/Event.js
CHANGED
|
@@ -11,7 +11,7 @@ class Event {
|
|
|
11
11
|
this.key = json.key
|
|
12
12
|
this.tableBookingConfig = json.tableBookingConfig
|
|
13
13
|
this.supportsBestAvailable = json.supportsBestAvailable
|
|
14
|
-
this.forSaleConfig = json.forSaleConfig ? new ForSaleConfig(json.forSaleConfig.forSale, json.forSaleConfig.objects, json.forSaleConfig.categories) : null
|
|
14
|
+
this.forSaleConfig = json.forSaleConfig ? new ForSaleConfig(json.forSaleConfig.forSale, json.forSaleConfig.objects, json.forSaleConfig.areaPlaces, json.forSaleConfig.categories) : null
|
|
15
15
|
this.chartKey = json.chartKey
|
|
16
16
|
this.createdOn = json.createdOn ? new Date(json.createdOn) : null
|
|
17
17
|
this.updatedOn = json.updatedOn ? new Date(json.updatedOn) : null
|
package/src/Events/Events.js
CHANGED
|
@@ -169,34 +169,41 @@ class Events {
|
|
|
169
169
|
|
|
170
170
|
/**
|
|
171
171
|
* @param {string} eventKey
|
|
172
|
-
* @param {?
|
|
172
|
+
* @param {?string[]} objects
|
|
173
|
+
* @param {?object} areaPlaces
|
|
173
174
|
* @param {?string[]} categories
|
|
174
175
|
* @returns {Promise}
|
|
175
176
|
*/
|
|
176
|
-
markAsForSale (eventKey, objects = null, categories = null) {
|
|
177
|
+
markAsForSale (eventKey, objects = null, areaPlaces = null, categories = null) {
|
|
177
178
|
const requestParameters = {}
|
|
178
179
|
if (objects !== null) {
|
|
179
180
|
requestParameters.objects = objects
|
|
180
181
|
}
|
|
182
|
+
if (areaPlaces !== null) {
|
|
183
|
+
requestParameters.areaPlaces = areaPlaces
|
|
184
|
+
}
|
|
181
185
|
if (categories !== null) {
|
|
182
186
|
requestParameters.categories = categories
|
|
183
187
|
}
|
|
188
|
+
|
|
184
189
|
return this.client.post(`events/${encodeURIComponent(eventKey)}/actions/mark-as-for-sale`, requestParameters)
|
|
185
190
|
}
|
|
186
191
|
|
|
187
192
|
/**
|
|
188
193
|
* @param {string} eventKey
|
|
189
|
-
* @param {?
|
|
194
|
+
* @param {?string[]} objects
|
|
195
|
+
* @param {?object} areaPlaces
|
|
190
196
|
* @param {?string[]} categories
|
|
191
197
|
* @returns {Promise}
|
|
192
198
|
*/
|
|
193
|
-
markAsNotForSale (eventKey, objects = null, categories = null) {
|
|
199
|
+
markAsNotForSale (eventKey, objects = null, areaPlaces = null, categories = null) {
|
|
194
200
|
const requestParameters = {}
|
|
195
|
-
|
|
196
201
|
if (objects !== null) {
|
|
197
202
|
requestParameters.objects = objects
|
|
198
203
|
}
|
|
199
|
-
|
|
204
|
+
if (areaPlaces !== null) {
|
|
205
|
+
requestParameters.areaPlaces = areaPlaces
|
|
206
|
+
}
|
|
200
207
|
if (categories !== null) {
|
|
201
208
|
requestParameters.categories = categories
|
|
202
209
|
}
|
|
@@ -2,10 +2,12 @@ class ForSaleConfig {
|
|
|
2
2
|
/**
|
|
3
3
|
* @param {boolean} forSale
|
|
4
4
|
* @param {string[]} objects
|
|
5
|
+
* @param {object} areaPlaces
|
|
5
6
|
* @param {string[]} categories
|
|
6
7
|
*/
|
|
7
|
-
constructor (forSale, objects, categories) {
|
|
8
|
+
constructor (forSale, objects, areaPlaces, categories) {
|
|
8
9
|
this.forSale = forSale
|
|
10
|
+
this.areaPlaces = areaPlaces
|
|
9
11
|
this.objects = objects
|
|
10
12
|
this.categories = categories
|
|
11
13
|
}
|
|
@@ -26,7 +26,7 @@ class ChartReports {
|
|
|
26
26
|
/**
|
|
27
27
|
* @param {string} chartKey
|
|
28
28
|
* @param {string} bookWholeTables
|
|
29
|
-
* @returns {
|
|
29
|
+
* @returns {object} JSON response from the server
|
|
30
30
|
*/
|
|
31
31
|
summaryByObjectType (chartKey, bookWholeTables = undefined) {
|
|
32
32
|
return this.fetchSummaryReport('byObjectType', chartKey, bookWholeTables)
|
|
@@ -44,7 +44,7 @@ class ChartReports {
|
|
|
44
44
|
/**
|
|
45
45
|
* @param {string} chartKey
|
|
46
46
|
* @param {string} bookWholeTables
|
|
47
|
-
* @returns {
|
|
47
|
+
* @returns {object} JSON response from the server
|
|
48
48
|
*/
|
|
49
49
|
summaryByCategoryLabel (chartKey, bookWholeTables = undefined) {
|
|
50
50
|
return this.fetchSummaryReport('byCategoryLabel', chartKey, bookWholeTables)
|
|
@@ -62,7 +62,7 @@ class ChartReports {
|
|
|
62
62
|
/**
|
|
63
63
|
* @param {string} chartKey
|
|
64
64
|
* @param {string} bookWholeTables
|
|
65
|
-
* @returns {
|
|
65
|
+
* @returns {object} JSON response from the server
|
|
66
66
|
*/
|
|
67
67
|
summaryByCategoryKey (chartKey, bookWholeTables = undefined) {
|
|
68
68
|
return this.fetchSummaryReport('byCategoryKey', chartKey, bookWholeTables)
|
|
@@ -80,7 +80,7 @@ class ChartReports {
|
|
|
80
80
|
/**
|
|
81
81
|
* @param {string} chartKey
|
|
82
82
|
* @param {string} bookWholeTables
|
|
83
|
-
* @returns {
|
|
83
|
+
* @returns {object} JSON response from the server
|
|
84
84
|
*/
|
|
85
85
|
summaryBySection (chartKey, bookWholeTables = undefined) {
|
|
86
86
|
return this.fetchSummaryReport('bySection', chartKey, bookWholeTables)
|
|
@@ -17,7 +17,7 @@ class EventReports {
|
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* @param {string} eventKey
|
|
20
|
-
* @returns {
|
|
20
|
+
* @returns {object} JSON response from the server
|
|
21
21
|
*/
|
|
22
22
|
summaryByStatus (eventKey) {
|
|
23
23
|
return this.client.get(EventReports.summaryReportUrl('byStatus', eventKey))
|
|
@@ -26,7 +26,7 @@ class EventReports {
|
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* @param {string} eventKey
|
|
29
|
-
* @returns {
|
|
29
|
+
* @returns {object} JSON response from the server
|
|
30
30
|
*/
|
|
31
31
|
deepSummaryByStatus (eventKey) {
|
|
32
32
|
return this.client.get(EventReports.deepSummaryReportUrl('byStatus', eventKey))
|
|
@@ -45,7 +45,7 @@ class EventReports {
|
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* @param {string} eventKey
|
|
48
|
-
* @returns {
|
|
48
|
+
* @returns {object} JSON response from the server
|
|
49
49
|
*/
|
|
50
50
|
summaryByObjectType (eventKey) {
|
|
51
51
|
return this.client.get(EventReports.summaryReportUrl('byObjectType', eventKey))
|
|
@@ -54,7 +54,7 @@ class EventReports {
|
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* @param {string} eventKey
|
|
57
|
-
* @returns {
|
|
57
|
+
* @returns {object} JSON response from the server
|
|
58
58
|
*/
|
|
59
59
|
deepSummaryByObjectType (eventKey) {
|
|
60
60
|
return this.client.get(EventReports.deepSummaryReportUrl('byObjectType', eventKey))
|
|
@@ -73,7 +73,7 @@ class EventReports {
|
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
* @param {string} eventKey
|
|
76
|
-
* @returns {
|
|
76
|
+
* @returns {object} JSON response from the server
|
|
77
77
|
*/
|
|
78
78
|
summaryByCategoryLabel (eventKey) {
|
|
79
79
|
return this.client.get(EventReports.summaryReportUrl('byCategoryLabel', eventKey))
|
|
@@ -82,7 +82,7 @@ class EventReports {
|
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
84
|
* @param {string} eventKey
|
|
85
|
-
* @returns {
|
|
85
|
+
* @returns {object} JSON response from the server
|
|
86
86
|
*/
|
|
87
87
|
deepSummaryByCategoryLabel (eventKey) {
|
|
88
88
|
return this.client.get(EventReports.deepSummaryReportUrl('byCategoryLabel', eventKey))
|
|
@@ -101,7 +101,7 @@ class EventReports {
|
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
103
|
* @param {string} eventKey
|
|
104
|
-
* @returns {
|
|
104
|
+
* @returns {object} JSON response from the server
|
|
105
105
|
*/
|
|
106
106
|
summaryByCategoryKey (eventKey) {
|
|
107
107
|
return this.client.get(EventReports.summaryReportUrl('byCategoryKey', eventKey))
|
|
@@ -110,7 +110,7 @@ class EventReports {
|
|
|
110
110
|
|
|
111
111
|
/**
|
|
112
112
|
* @param {string} eventKey
|
|
113
|
-
* @returns {
|
|
113
|
+
* @returns {object} JSON response from the server
|
|
114
114
|
*/
|
|
115
115
|
deepSummaryByCategoryKey (eventKey) {
|
|
116
116
|
return this.client.get(EventReports.deepSummaryReportUrl('byCategoryKey', eventKey))
|
|
@@ -149,7 +149,7 @@ class EventReports {
|
|
|
149
149
|
|
|
150
150
|
/**
|
|
151
151
|
* @param {string} eventKey
|
|
152
|
-
* @returns {
|
|
152
|
+
* @returns {object} JSON response from the server
|
|
153
153
|
*/
|
|
154
154
|
summaryBySection (eventKey) {
|
|
155
155
|
return this.client.get(EventReports.summaryReportUrl('bySection', eventKey))
|
|
@@ -158,7 +158,7 @@ class EventReports {
|
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
160
|
* @param {string} eventKey
|
|
161
|
-
* @returns {
|
|
161
|
+
* @returns {object} JSON response from the server
|
|
162
162
|
*/
|
|
163
163
|
deepSummaryBySection (eventKey) {
|
|
164
164
|
return this.client.get(EventReports.deepSummaryReportUrl('bySection', eventKey))
|
|
@@ -187,7 +187,7 @@ class EventReports {
|
|
|
187
187
|
|
|
188
188
|
/**
|
|
189
189
|
* @param {string} eventKey
|
|
190
|
-
* @returns {
|
|
190
|
+
* @returns {object} JSON response from the server
|
|
191
191
|
*/
|
|
192
192
|
summaryByAvailability (eventKey) {
|
|
193
193
|
return this.client.get(EventReports.summaryReportUrl('byAvailability', eventKey))
|
|
@@ -196,7 +196,7 @@ class EventReports {
|
|
|
196
196
|
|
|
197
197
|
/**
|
|
198
198
|
* @param {string} eventKey
|
|
199
|
-
* @returns {
|
|
199
|
+
* @returns {object} JSON response from the server
|
|
200
200
|
*/
|
|
201
201
|
summaryByAvailabilityReason (eventKey) {
|
|
202
202
|
return this.client.get(EventReports.summaryReportUrl('byAvailabilityReason', eventKey))
|
|
@@ -205,7 +205,7 @@ class EventReports {
|
|
|
205
205
|
|
|
206
206
|
/**
|
|
207
207
|
* @param {string} eventKey
|
|
208
|
-
* @returns {
|
|
208
|
+
* @returns {object} JSON response from the server
|
|
209
209
|
*/
|
|
210
210
|
deepSummaryByAvailability (eventKey) {
|
|
211
211
|
return this.client.get(EventReports.deepSummaryReportUrl('byAvailability', eventKey))
|
|
@@ -214,7 +214,7 @@ class EventReports {
|
|
|
214
214
|
|
|
215
215
|
/**
|
|
216
216
|
* @param {string} eventKey
|
|
217
|
-
* @returns {
|
|
217
|
+
* @returns {object} JSON response from the server
|
|
218
218
|
*/
|
|
219
219
|
deepSummaryByAvailabilityReason (eventKey) {
|
|
220
220
|
return this.client.get(EventReports.deepSummaryReportUrl('byAvailabilityReason', eventKey))
|
|
@@ -233,7 +233,7 @@ class EventReports {
|
|
|
233
233
|
|
|
234
234
|
/**
|
|
235
235
|
* @param {string} eventKey
|
|
236
|
-
* @returns {
|
|
236
|
+
* @returns {object} JSON response from the server
|
|
237
237
|
*/
|
|
238
238
|
summaryByChannel (eventKey) {
|
|
239
239
|
return this.client.get(EventReports.summaryReportUrl('byChannel', eventKey))
|
|
@@ -242,7 +242,7 @@ class EventReports {
|
|
|
242
242
|
|
|
243
243
|
/**
|
|
244
244
|
* @param {string} eventKey
|
|
245
|
-
* @returns {
|
|
245
|
+
* @returns {object} JSON response from the server
|
|
246
246
|
*/
|
|
247
247
|
deepSummaryByChannel (eventKey) {
|
|
248
248
|
return this.client.get(EventReports.deepSummaryReportUrl('byChannel', eventKey))
|
|
@@ -106,7 +106,7 @@ class Subaccounts {
|
|
|
106
106
|
* @returns {AsyncIterator}
|
|
107
107
|
*/
|
|
108
108
|
listAll (filter = null) {
|
|
109
|
-
const requestParameters = filter !== null ? { filter
|
|
109
|
+
const requestParameters = filter !== null ? { filter } : {}
|
|
110
110
|
return this.iterator().all(requestParameters)
|
|
111
111
|
}
|
|
112
112
|
|
|
@@ -114,7 +114,7 @@ class Subaccounts {
|
|
|
114
114
|
* @returns {Page}
|
|
115
115
|
*/
|
|
116
116
|
listFirstPage (filter = null, pageSize = null) {
|
|
117
|
-
const requestParameters = filter !== null ? { filter
|
|
117
|
+
const requestParameters = filter !== null ? { filter } : null
|
|
118
118
|
return this.iterator().firstPage(requestParameters, pageSize)
|
|
119
119
|
}
|
|
120
120
|
|
|
@@ -122,7 +122,7 @@ class Subaccounts {
|
|
|
122
122
|
* @returns {Page}
|
|
123
123
|
*/
|
|
124
124
|
listPageAfter (afterId, filter = null, pageSize = null) {
|
|
125
|
-
const requestParameters = filter !== null ? { filter
|
|
125
|
+
const requestParameters = filter !== null ? { filter } : null
|
|
126
126
|
return this.iterator().pageAfter(afterId, requestParameters, pageSize)
|
|
127
127
|
}
|
|
128
128
|
|
|
@@ -130,7 +130,7 @@ class Subaccounts {
|
|
|
130
130
|
* @returns {Page}
|
|
131
131
|
*/
|
|
132
132
|
listPageBefore (beforeId, filter = null, pageSize = null) {
|
|
133
|
-
const requestParameters = filter !== null ? { filter
|
|
133
|
+
const requestParameters = filter !== null ? { filter } : null
|
|
134
134
|
return this.iterator().pageBefore(beforeId, requestParameters, pageSize)
|
|
135
135
|
}
|
|
136
136
|
|
|
@@ -74,7 +74,7 @@ class Workspaces {
|
|
|
74
74
|
* @returns {AsyncIterator}
|
|
75
75
|
*/
|
|
76
76
|
listAll (filter = null) {
|
|
77
|
-
const requestParameters = filter !== null ? { filter
|
|
77
|
+
const requestParameters = filter !== null ? { filter } : {}
|
|
78
78
|
return this.iterator().all(requestParameters)
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -82,7 +82,7 @@ class Workspaces {
|
|
|
82
82
|
* @returns {Page}
|
|
83
83
|
*/
|
|
84
84
|
listFirstPage (filter = null, pageSize = null) {
|
|
85
|
-
const requestParameters = filter !== null ? { filter
|
|
85
|
+
const requestParameters = filter !== null ? { filter } : null
|
|
86
86
|
return this.iterator().firstPage(requestParameters, pageSize)
|
|
87
87
|
}
|
|
88
88
|
|
|
@@ -90,7 +90,7 @@ class Workspaces {
|
|
|
90
90
|
* @returns {Page}
|
|
91
91
|
*/
|
|
92
92
|
listPageAfter (afterId, filter = null, pageSize = null) {
|
|
93
|
-
const requestParameters = filter !== null ? { filter
|
|
93
|
+
const requestParameters = filter !== null ? { filter } : null
|
|
94
94
|
return this.iterator().pageAfter(afterId, requestParameters, pageSize)
|
|
95
95
|
}
|
|
96
96
|
|
|
@@ -98,7 +98,7 @@ class Workspaces {
|
|
|
98
98
|
* @returns {Page}
|
|
99
99
|
*/
|
|
100
100
|
listPageBefore (beforeId, filter = null, pageSize = null) {
|
|
101
|
-
const requestParameters = filter !== null ? { filter
|
|
101
|
+
const requestParameters = filter !== null ? { filter } : null
|
|
102
102
|
return this.iterator().pageBefore(beforeId, requestParameters, pageSize)
|
|
103
103
|
}
|
|
104
104
|
|
|
@@ -106,7 +106,7 @@ class Workspaces {
|
|
|
106
106
|
* @returns {AsyncIterator}
|
|
107
107
|
*/
|
|
108
108
|
listActive (filter = null) {
|
|
109
|
-
const requestParameters = filter !== null ? { filter
|
|
109
|
+
const requestParameters = filter !== null ? { filter } : {}
|
|
110
110
|
return this.activeWorkspacesIterator().all(requestParameters)
|
|
111
111
|
}
|
|
112
112
|
|
|
@@ -114,7 +114,7 @@ class Workspaces {
|
|
|
114
114
|
* @returns {Page}
|
|
115
115
|
*/
|
|
116
116
|
listActiveFirstPage (filter = null, pageSize = null) {
|
|
117
|
-
const requestParameters = filter !== null ? { filter
|
|
117
|
+
const requestParameters = filter !== null ? { filter } : null
|
|
118
118
|
return this.activeWorkspacesIterator().firstPage(requestParameters, pageSize)
|
|
119
119
|
}
|
|
120
120
|
|
|
@@ -122,7 +122,7 @@ class Workspaces {
|
|
|
122
122
|
* @returns {Page}
|
|
123
123
|
*/
|
|
124
124
|
listActivePageAfter (afterId, filter = null, pageSize = null) {
|
|
125
|
-
const requestParameters = filter !== null ? { filter
|
|
125
|
+
const requestParameters = filter !== null ? { filter } : null
|
|
126
126
|
return this.activeWorkspacesIterator().pageAfter(afterId, requestParameters, pageSize)
|
|
127
127
|
}
|
|
128
128
|
|
|
@@ -130,7 +130,7 @@ class Workspaces {
|
|
|
130
130
|
* @returns {Page}
|
|
131
131
|
*/
|
|
132
132
|
listActivePageBefore (beforeId, filter = null, pageSize = null) {
|
|
133
|
-
const requestParameters = filter !== null ? { filter
|
|
133
|
+
const requestParameters = filter !== null ? { filter } : null
|
|
134
134
|
return this.activeWorkspacesIterator().pageBefore(beforeId, requestParameters, pageSize)
|
|
135
135
|
}
|
|
136
136
|
|
|
@@ -138,7 +138,7 @@ class Workspaces {
|
|
|
138
138
|
* @returns {AsyncIterator}
|
|
139
139
|
*/
|
|
140
140
|
listInactive (filter = null) {
|
|
141
|
-
const requestParameters = filter !== null ? { filter
|
|
141
|
+
const requestParameters = filter !== null ? { filter } : {}
|
|
142
142
|
return this.inactiveWorkspacesIterator().all(requestParameters)
|
|
143
143
|
}
|
|
144
144
|
|
|
@@ -146,7 +146,7 @@ class Workspaces {
|
|
|
146
146
|
* @returns {Page}
|
|
147
147
|
*/
|
|
148
148
|
listInactiveFirstPage (filter = null, pageSize = null) {
|
|
149
|
-
const requestParameters = filter !== null ? { filter
|
|
149
|
+
const requestParameters = filter !== null ? { filter } : null
|
|
150
150
|
return this.inactiveWorkspacesIterator().firstPage(requestParameters, pageSize)
|
|
151
151
|
}
|
|
152
152
|
|
|
@@ -154,7 +154,7 @@ class Workspaces {
|
|
|
154
154
|
* @returns {Page}
|
|
155
155
|
*/
|
|
156
156
|
listInactivePageAfter (afterId, filter = null, pageSize = null) {
|
|
157
|
-
const requestParameters = filter !== null ? { filter
|
|
157
|
+
const requestParameters = filter !== null ? { filter } : null
|
|
158
158
|
return this.inactiveWorkspacesIterator().pageAfter(afterId, requestParameters, pageSize)
|
|
159
159
|
}
|
|
160
160
|
|
|
@@ -162,7 +162,7 @@ class Workspaces {
|
|
|
162
162
|
* @returns {Page}
|
|
163
163
|
*/
|
|
164
164
|
listInactivePageBefore (beforeId, filter = null, pageSize = null) {
|
|
165
|
-
const requestParameters = filter !== null ? { filter
|
|
165
|
+
const requestParameters = filter !== null ? { filter } : null
|
|
166
166
|
return this.inactiveWorkspacesIterator().pageBefore(beforeId, requestParameters, pageSize)
|
|
167
167
|
}
|
|
168
168
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const testUtils = require('../testUtils.js')
|
|
2
2
|
|
|
3
3
|
test('should change the holdPeriod', async () => {
|
|
4
|
-
const { client
|
|
4
|
+
const { client } = await testUtils.createTestUserAndClient()
|
|
5
5
|
await client.accounts.changeHoldPeriod(14)
|
|
6
6
|
|
|
7
7
|
const account = await client.accounts.retrieveMyAccount()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const testUtils = require('../testUtils.js')
|
|
2
2
|
|
|
3
3
|
test('should change the password', async () => {
|
|
4
|
-
const { client
|
|
4
|
+
const { client } = await testUtils.createTestUserAndClient()
|
|
5
5
|
await client.accounts.changePassword('someNewPassword')
|
|
6
6
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const testUtils = require('../testUtils.js')
|
|
2
2
|
|
|
3
3
|
test('should disable draft chart drawings', async () => {
|
|
4
|
-
const { client
|
|
4
|
+
const { client } = await testUtils.createTestUserAndClient()
|
|
5
5
|
await client.accounts.enableDraftChartDrawings()
|
|
6
6
|
|
|
7
7
|
await client.accounts.disableDraftChartDrawings()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const testUtils = require('../testUtils.js')
|
|
2
2
|
|
|
3
3
|
test('should enable draft chart drawings', async () => {
|
|
4
|
-
const { client
|
|
4
|
+
const { client } = await testUtils.createTestUserAndClient()
|
|
5
5
|
await client.accounts.disableDraftChartDrawings()
|
|
6
6
|
|
|
7
7
|
await client.accounts.enableDraftChartDrawings()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const testUtils = require('../testUtils.js')
|
|
2
2
|
|
|
3
3
|
test('updates a setting', async () => {
|
|
4
|
-
const { client
|
|
4
|
+
const { client } = await testUtils.createTestUserAndClient()
|
|
5
5
|
await client.accounts.updateSetting('VALIDATE_DUPLICATE_LABELS', 'OFF')
|
|
6
6
|
|
|
7
7
|
const account = await client.accounts.retrieveMyAccount()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const testUtils = require('../testUtils.js')
|
|
2
2
|
|
|
3
3
|
test('should add tag', async () => {
|
|
4
|
-
const { client
|
|
4
|
+
const { client } = await testUtils.createTestUserAndClient()
|
|
5
5
|
const chart = await client.charts.create()
|
|
6
6
|
|
|
7
7
|
await client.charts.addTag(chart.key, 'tag1')
|
|
@@ -12,7 +12,7 @@ test('should add tag', async () => {
|
|
|
12
12
|
})
|
|
13
13
|
|
|
14
14
|
test('should be able to add a tag with special characters', async () => {
|
|
15
|
-
const { client
|
|
15
|
+
const { client } = await testUtils.createTestUserAndClient()
|
|
16
16
|
const chart = await client.charts.create()
|
|
17
17
|
|
|
18
18
|
await client.charts.addTag(chart.key, 'tag1/:"-<>')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const testUtils = require('../testUtils.js')
|
|
2
2
|
|
|
3
3
|
test('should copy chart', async () => {
|
|
4
|
-
const { client
|
|
4
|
+
const { client } = await testUtils.createTestUserAndClient()
|
|
5
5
|
const chart = await client.charts.create('My Chart', 'BOOTHS')
|
|
6
6
|
|
|
7
7
|
const copiedChart = await client.charts.copy(chart.key)
|