@superoffice/webapi 11.7.727 → 11.9.1204
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/LICENSE.md +15 -15
- package/README.md +184 -184
- package/__tests__/Appointment63-notz.json +1925 -1925
- package/__tests__/Appointment63-utctz.json +1925 -1925
- package/__tests__/Appointment63.json +1925 -1925
- package/__tests__/AppointmentTzTest.ts +115 -115
- package/__tests__/AxiosNockTest.ts +28 -28
- package/__tests__/ContactDefault.json +699 -699
- package/__tests__/ContactEntity.json +272 -272
- package/__tests__/ContactRestTest.ts +144 -144
- package/__tests__/ContactTest.ts +395 -395
- package/__tests__/ConvertersTest.ts +97 -97
- package/__tests__/DocumentTest.ts +101 -101
- package/__tests__/Person210-notz.json +1932 -1932
- package/__tests__/Person210-utctz.json +1932 -1932
- package/__tests__/Person210.json +1932 -1932
- package/__tests__/PersonImageData.nock +22 -22
- package/__tests__/PersonTest.ts +41 -41
- package/__tests__/PersonTzTest.ts +113 -113
- package/__tests__/RecurrenceInfo.json +55 -55
- package/__tests__/ResponseCallbackTest.ts +23 -23
- package/__tests__/TableRights.json +441 -441
- package/__tests__/WebapiTest.ts +264 -264
- package/__tests__/Webhook.json +16 -16
- package/__tests__/WebhookTest.ts +209 -209
- package/dist/cjs/AIAgent.d.ts +62 -0
- package/dist/cjs/AIAgent.d.ts.map +1 -1
- package/dist/cjs/AIAgent.js +149 -0
- package/dist/cjs/AIAgent.js.map +1 -1
- package/dist/cjs/Carriers.d.ts +640 -14
- package/dist/cjs/Carriers.d.ts.map +1 -1
- package/dist/cjs/Converters.d.ts +24 -0
- package/dist/cjs/Converters.d.ts.map +1 -1
- package/dist/cjs/Converters.js +388 -17
- package/dist/cjs/Converters.js.map +1 -1
- package/dist/cjs/DiagnosticsAgent.d.ts +38 -0
- package/dist/cjs/DiagnosticsAgent.d.ts.map +1 -1
- package/dist/cjs/DiagnosticsAgent.js +91 -0
- package/dist/cjs/DiagnosticsAgent.js.map +1 -1
- package/dist/cjs/Enums.d.ts +77 -1
- package/dist/cjs/Enums.d.ts.map +1 -1
- package/dist/cjs/Enums.js +83 -4
- package/dist/cjs/Enums.js.map +1 -1
- package/dist/cjs/ListAgent.d.ts +71 -6
- package/dist/cjs/ListAgent.d.ts.map +1 -1
- package/dist/cjs/ListAgent.js +157 -0
- package/dist/cjs/ListAgent.js.map +1 -1
- package/dist/cjs/MarketingAgent.d.ts +68 -0
- package/dist/cjs/MarketingAgent.d.ts.map +1 -1
- package/dist/cjs/MarketingAgent.js +157 -0
- package/dist/cjs/MarketingAgent.js.map +1 -1
- package/dist/cjs/TicketAgent.d.ts +23 -0
- package/dist/cjs/TicketAgent.d.ts.map +1 -1
- package/dist/cjs/TicketAgent.js +65 -0
- package/dist/cjs/TicketAgent.js.map +1 -1
- package/dist/esm/AIAgent.d.ts +62 -0
- package/dist/esm/AIAgent.d.ts.map +1 -1
- package/dist/esm/AIAgent.js +150 -1
- package/dist/esm/AIAgent.js.map +1 -1
- package/dist/esm/Carriers.d.ts +640 -14
- package/dist/esm/Carriers.d.ts.map +1 -1
- package/dist/esm/Converters.d.ts +24 -0
- package/dist/esm/Converters.d.ts.map +1 -1
- package/dist/esm/Converters.js +346 -0
- package/dist/esm/Converters.js.map +1 -1
- package/dist/esm/DiagnosticsAgent.d.ts +38 -0
- package/dist/esm/DiagnosticsAgent.d.ts.map +1 -1
- package/dist/esm/DiagnosticsAgent.js +91 -0
- package/dist/esm/DiagnosticsAgent.js.map +1 -1
- package/dist/esm/Enums.d.ts +77 -1
- package/dist/esm/Enums.d.ts.map +1 -1
- package/dist/esm/Enums.js +79 -0
- package/dist/esm/Enums.js.map +1 -1
- package/dist/esm/ListAgent.d.ts +71 -6
- package/dist/esm/ListAgent.d.ts.map +1 -1
- package/dist/esm/ListAgent.js +157 -0
- package/dist/esm/ListAgent.js.map +1 -1
- package/dist/esm/MarketingAgent.d.ts +68 -0
- package/dist/esm/MarketingAgent.d.ts.map +1 -1
- package/dist/esm/MarketingAgent.js +157 -0
- package/dist/esm/MarketingAgent.js.map +1 -1
- package/dist/esm/TicketAgent.d.ts +23 -0
- package/dist/esm/TicketAgent.d.ts.map +1 -1
- package/dist/esm/TicketAgent.js +65 -0
- package/dist/esm/TicketAgent.js.map +1 -1
- package/examples-js/hello.js +12 -12
- package/examples-ts/hello.ts +8 -8
- package/package.json +93 -93
- package/scripts/postbuild.js +22 -22
- package/scripts/setVersion.js +44 -44
- package/src/AIAgent.ts +2239 -1992
- package/src/AppointmentAgent.ts +6263 -6263
- package/src/AppointmentRestApi.ts +225 -225
- package/src/ArchiveAgent.ts +1950 -1950
- package/src/AssociateAgent.ts +422 -422
- package/src/AxiosCacheHandler.ts +74 -74
- package/src/BLOBAgent.ts +2100 -2100
- package/src/Base64.ts +285 -285
- package/src/BatchAgent.ts +910 -910
- package/src/BulkUpdateAgent.ts +504 -504
- package/src/CRMScriptAgent.ts +1390 -1390
- package/src/Carriers.ts +53121 -52274
- package/src/ChatAgent.ts +1422 -1422
- package/src/ConfigurationAgent.ts +2228 -2228
- package/src/ContactAgent.ts +1756 -1756
- package/src/ContactRestApi.ts +237 -237
- package/src/Converters.ts +23496 -23090
- package/src/CustomerServiceAgent.ts +1799 -1799
- package/src/DashAgent.ts +1674 -1674
- package/src/DatabaseAgent.ts +120 -120
- package/src/DatabaseTableAgent.ts +534 -534
- package/src/Day_js.ts +41 -41
- package/src/DiagnosticsAgent.ts +1384 -1240
- package/src/DocumentAgent.ts +5079 -5079
- package/src/DocumentMigrationAgent.ts +524 -524
- package/src/DocumentRestApi.ts +259 -259
- package/src/EMailAgent.ts +5328 -5328
- package/src/Enums.ts +6998 -6916
- package/src/ErpSyncAgent.ts +2658 -2658
- package/src/FavouriteAgent.ts +720 -720
- package/src/FindAgent.ts +2330 -2330
- package/src/ForeignSystemAgent.ts +1710 -1710
- package/src/FreeTextAgent.ts +372 -372
- package/src/ImportAgent.ts +304 -304
- package/src/LicenseAgent.ts +1230 -1230
- package/src/ListAgent.ts +11451 -11237
- package/src/MDOAgent.ts +748 -748
- package/src/MarketingAgent.ts +1146 -890
- package/src/MessagingAgent.ts +384 -384
- package/src/NavigatorAgent.ts +140 -140
- package/src/NumberAllocationAgent.ts +296 -296
- package/src/PersonAgent.ts +3287 -3287
- package/src/PersonRestApi.ts +241 -241
- package/src/PhoneListAgent.ts +458 -458
- package/src/PocketAgent.ts +780 -780
- package/src/PreferenceAgent.ts +1900 -1900
- package/src/PreviewsAgent.ts +116 -116
- package/src/ProjectAgent.ts +2391 -2391
- package/src/ProjectRestApi.ts +239 -239
- package/src/QuoteAgent.ts +5159 -5159
- package/src/RelationAgent.ts +220 -220
- package/src/ReportAgent.ts +154 -154
- package/src/ResourceAgent.ts +358 -358
- package/src/SaintAgent.ts +601 -601
- package/src/SaleAgent.ts +2034 -2034
- package/src/SaleRestApi.ts +233 -233
- package/src/SelectionAgent.ts +3195 -3195
- package/src/SentryAgent.ts +462 -462
- package/src/SoApiConstants.ts +8 -8
- package/src/TargetsAgent.ts +1104 -1104
- package/src/TicketAgent.ts +3708 -3638
- package/src/TimeZoneAgent.ts +528 -528
- package/src/TooltipsAgent.ts +116 -116
- package/src/UserAgent.ts +4856 -4856
- package/src/UserDefinedFieldInfoAgent.ts +1764 -1764
- package/src/ViewStateAgent.ts +858 -858
- package/src/WebApi.ts +872 -872
- package/src/WebApiBase.ts +565 -565
- package/src/WebhookAgent.ts +388 -388
- package/src/WorkflowAgent.ts +1338 -1338
- package/tsconfig.esm.json +8 -8
- package/tsconfig.jest.json +8 -8
- package/tsconfig.json +34 -34
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
[{
|
|
2
|
-
"scope": "http://localhost:80",
|
|
3
|
-
"method": "post",
|
|
4
|
-
"path": "/api/v1/Agents/Person/GetPersonImage",
|
|
5
|
-
"body": {
|
|
6
|
-
"personId": 147
|
|
7
|
-
},
|
|
8
|
-
"status": 200,
|
|
9
|
-
"response": "ffd8ffe000104a46494600010101004800480000ffdb004300140e0f120f0d14121012171514181e32211e1c1c1e3d2c2e243249404c4b47404645505a736250556d5645466488656d777b8182814e608d978c7d96737e817cffdb0043011517171e1a1e3b21213b7c5346537c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7cffc00011080046004d03012200021101031101ffc4001f0000010501010101010100000000000000000102030405060708090a0bffc400b5100002010303020403050504040000017d01020300041105122131410613516107227114328191a1082342b1c11552d1f02433627282090a161718191a25262728292a3435363738393a434445464748494a535455565758595a636465666768696a737475767778797a838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae1e2e3e4e5e6e7e8e9eaf1f2f3f4f5f6f7f8f9faffc4001f0100030101010101010101010000000000000102030405060708090a0bffc400b51100020102040403040705040400010277000102031104052131061241510761711322328108144291a1b1c109233352f0156272d10a162434e125f11718191a262728292a35363738393a434445464748494a535455565758595a636465666768696a737475767778797a82838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae2e3e4e5e6e7e8e9eaf2f3f4f5f6f7f8f9faffda000c03010002110311003f00eb7bd2d277aa9a9de0b2b42f901db85a43dc2ef5182d0ed76dcffdd5edf5ac5baf1348188b6850e32373126b22e66791d94f7f98e4fe35674cd3229943c80be7b13d2a398d144af16bb7e495baba720f70001fa5596bc9ad5c4ab2cc09e4156dc0fb62a5bed1e245cc28149e719e0d65448d6eaca5498c8c8534ae3e5b1d768dad43a98319fdddc28e508c6e1ea2b52bcf2c6e552759a13e5c8a7d6bb6b0d4e2bbda8c424c47ddecdf4ab4c868bd451453246e6b91f10dff0099a8b479f9613b71fa935d5b481159cf21416fcabcdaea792eaf9c29f9e6948271ea6a594896490925b39673b8807f4ae9f4b80c16c9e602188ddcf6cd61cf60b02a9670aab8dcec29cf770b9db6f35f79aaa58e4e463d71e951b9b2d0e9e6dac00241c735897d6a6424c4ac57be38c54a1667d19e42cc65048040ac82f1870b72b7923baee5c360639edf85095c6d915ddaa901e5063603ef6319ab9a2cc1a78e166665debf37be72307b53d50dc69f222bb48a1494320e47b1acad29cc33abe59a3661b954e3bd3466cf4d0770ce3145436d711dcc2b2c67e53c7d3daa5cd6864404af3bc80b8f9b3d877af3ab7c1d410a81febc60faaf635dc6a0a64b674deaa08c7cc7e5fa9ae5ad2d019c4aa418e393191d0e2a5b2e2ae7430c6922fceaa73ea2a4b88e18a32cc493d81354d27d8719e951bcf14be61b96545c630c7a0accdd036a369145343248a483ce0f19abb6ab04c80a91b875d8dc1f7ac22ba30ceddcc07a2139f7ab76d3db2c68b6522b053c2e79a617352e153cb200c76ae1e126399f03f8b803eb5d649333b01d31cd67e9da415d443b90d186f30e7bf3c0a6889f73a3d1607b6b1c48486772f83d871815a20d5646cd4a0d6860529b0c0ab0041ec457217d773dbea6464a441c071c608e3fa575b21ae7bc416ea2da598292ec464e7381498d326326d7209e41fcea796d6daf23dcf6eae4f7e4106b243bc31425f249404e6a78b523183838279fa5676364cbeb6aa155041940303e63c5491d8410a9616f1c6c7f880e6ab0d6e30bf7067d8d579755331c28c53b14e4ac4af2112124f00e79a9744b8f3124dc58b13bb9f43dab2ae9e575896320195f6f3e95b969188630a001df8aa48c64ee6aa3d4c0f155233d2ac02715641564ef552750ff00238041ec7a1a28a40663c41a1c1eaa700d674917520d14567d4dba10e08e01e2a6897a514530346d80f336e3ee2eec9f5ad38bb514552d8ca5b9722e956074a28aa11fffd9",
|
|
10
|
-
"rawHeaders": [
|
|
11
|
-
"Content-Type",
|
|
12
|
-
"application/octet-stream",
|
|
13
|
-
"Content-Length",
|
|
14
|
-
"1520"
|
|
15
|
-
],
|
|
16
|
-
"reqheaders": {
|
|
17
|
-
"accept": "application/octet-stream",
|
|
18
|
-
"content-type": "application/json",
|
|
19
|
-
"content-length": 16
|
|
20
|
-
},
|
|
21
|
-
"responseIsBinary": true
|
|
22
|
-
}
|
|
1
|
+
[{
|
|
2
|
+
"scope": "http://localhost:80",
|
|
3
|
+
"method": "post",
|
|
4
|
+
"path": "/api/v1/Agents/Person/GetPersonImage",
|
|
5
|
+
"body": {
|
|
6
|
+
"personId": 147
|
|
7
|
+
},
|
|
8
|
+
"status": 200,
|
|
9
|
+
"response": "ffd8ffe000104a46494600010101004800480000ffdb004300140e0f120f0d14121012171514181e32211e1c1c1e3d2c2e243249404c4b47404645505a736250556d5645466488656d777b8182814e608d978c7d96737e817cffdb0043011517171e1a1e3b21213b7c5346537c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7cffc00011080046004d03012200021101031101ffc4001f0000010501010101010100000000000000000102030405060708090a0bffc400b5100002010303020403050504040000017d01020300041105122131410613516107227114328191a1082342b1c11552d1f02433627282090a161718191a25262728292a3435363738393a434445464748494a535455565758595a636465666768696a737475767778797a838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae1e2e3e4e5e6e7e8e9eaf1f2f3f4f5f6f7f8f9faffc4001f0100030101010101010101010000000000000102030405060708090a0bffc400b51100020102040403040705040400010277000102031104052131061241510761711322328108144291a1b1c109233352f0156272d10a162434e125f11718191a262728292a35363738393a434445464748494a535455565758595a636465666768696a737475767778797a82838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae2e3e4e5e6e7e8e9eaf2f3f4f5f6f7f8f9faffda000c03010002110311003f00eb7bd2d277aa9a9de0b2b42f901db85a43dc2ef5182d0ed76dcffdd5edf5ac5baf1348188b6850e32373126b22e66791d94f7f98e4fe35674cd3229943c80be7b13d2a398d144af16bb7e495baba720f70001fa5596bc9ad5c4ab2cc09e4156dc0fb62a5bed1e245cc28149e719e0d65448d6eaca5498c8c8534ae3e5b1d768dad43a98319fdddc28e508c6e1ea2b52bcf2c6e552759a13e5c8a7d6bb6b0d4e2bbda8c424c47ddecdf4ab4c868bd451453246e6b91f10dff0099a8b479f9613b71fa935d5b481159cf21416fcabcdaea792eaf9c29f9e6948271ea6a594896490925b39673b8807f4ae9f4b80c16c9e602188ddcf6cd61cf60b02a9670aab8dcec29cf770b9db6f35f79aaa58e4e463d71e951b9b2d0e9e6dac00241c735897d6a6424c4ac57be38c54a1667d19e42cc65048040ac82f1870b72b7923baee5c360639edf85095c6d915ddaa901e5063603ef6319ab9a2cc1a78e166665debf37be72307b53d50dc69f222bb48a1494320e47b1acad29cc33abe59a3661b954e3bd3466cf4d0770ce3145436d711dcc2b2c67e53c7d3daa5cd6864404af3bc80b8f9b3d877af3ab7c1d410a81febc60faaf635dc6a0a64b674deaa08c7cc7e5fa9ae5ad2d019c4aa418e393191d0e2a5b2e2ae7430c6922fceaa73ea2a4b88e18a32cc493d81354d27d8719e951bcf14be61b96545c630c7a0accdd036a369145343248a483ce0f19abb6ab04c80a91b875d8dc1f7ac22ba30ceddcc07a2139f7ab76d3db2c68b6522b053c2e79a617352e153cb200c76ae1e126399f03f8b803eb5d649333b01d31cd67e9da415d443b90d186f30e7bf3c0a6889f73a3d1607b6b1c48486772f83d871815a20d5646cd4a0d6860529b0c0ab0041ec457217d773dbea6464a441c071c608e3fa575b21ae7bc416ea2da598292ec464e7381498d326326d7209e41fcea796d6daf23dcf6eae4f7e4106b243bc31425f249404e6a78b523183838279fa5676364cbeb6aa155041940303e63c5491d8410a9616f1c6c7f880e6ab0d6e30bf7067d8d579755331c28c53b14e4ac4af2112124f00e79a9744b8f3124dc58b13bb9f43dab2ae9e575896320195f6f3e95b969188630a001df8aa48c64ee6aa3d4c0f155233d2ac02715641564ef552750ff00238041ec7a1a28a40663c41a1c1eaa700d674917520d14567d4dba10e08e01e2a6897a514530346d80f336e3ee2eec9f5ad38bb514552d8ca5b9722e956074a28aa11fffd9",
|
|
10
|
+
"rawHeaders": [
|
|
11
|
+
"Content-Type",
|
|
12
|
+
"application/octet-stream",
|
|
13
|
+
"Content-Length",
|
|
14
|
+
"1520"
|
|
15
|
+
],
|
|
16
|
+
"reqheaders": {
|
|
17
|
+
"accept": "application/octet-stream",
|
|
18
|
+
"content-type": "application/json",
|
|
19
|
+
"content-length": 16
|
|
20
|
+
},
|
|
21
|
+
"responseIsBinary": true
|
|
22
|
+
}
|
|
23
23
|
]
|
package/__tests__/PersonTest.ts
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
// import {expect} from 'chai'
|
|
2
|
-
import * as assert from "assert";
|
|
3
|
-
import axios from "axios";
|
|
4
|
-
import nock from 'nock'
|
|
5
|
-
import { PersonAgent } from "../src/PersonAgent";
|
|
6
|
-
|
|
7
|
-
const host = "http://localhost/";
|
|
8
|
-
|
|
9
|
-
axios.defaults.baseURL = host;
|
|
10
|
-
|
|
11
|
-
describe("WebAPI Person tests", () => {
|
|
12
|
-
it("Can get a person image using a request object", done => {
|
|
13
|
-
let scopes = nock.load(__dirname + "/PersonImageData.nock");
|
|
14
|
-
// let scope = nock(host)
|
|
15
|
-
// .post('/api/v1/Agents/Person/GetPersonImage')
|
|
16
|
-
// .reply(200, "0xbadbeef");
|
|
17
|
-
|
|
18
|
-
let agent = new PersonAgent(host);
|
|
19
|
-
agent.getPersonImageAsync({ personId: 147 }).then(response => {
|
|
20
|
-
assert.notEqual(null, response);
|
|
21
|
-
response = response as ArrayBuffer;
|
|
22
|
-
assert.equal(response.byteLength, 1520);
|
|
23
|
-
done();
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it("Can get a person image using a parameter", done => {
|
|
28
|
-
let scopes = nock.load(__dirname + "/PersonImageData.nock");
|
|
29
|
-
// let scope = nock(host)
|
|
30
|
-
// .post('/api/v1/Agents/Person/GetPersonImage')
|
|
31
|
-
// .reply(200, "0xbadbeef");
|
|
32
|
-
|
|
33
|
-
let agent = new PersonAgent(host);
|
|
34
|
-
agent.getPersonImageAsync(147).then(response => {
|
|
35
|
-
assert.notEqual(null, response);
|
|
36
|
-
response = response as ArrayBuffer;
|
|
37
|
-
assert.equal(response.byteLength, 1520);
|
|
38
|
-
done();
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
});
|
|
1
|
+
// import {expect} from 'chai'
|
|
2
|
+
import * as assert from "assert";
|
|
3
|
+
import axios from "axios";
|
|
4
|
+
import nock from 'nock'
|
|
5
|
+
import { PersonAgent } from "../src/PersonAgent";
|
|
6
|
+
|
|
7
|
+
const host = "http://localhost/";
|
|
8
|
+
|
|
9
|
+
axios.defaults.baseURL = host;
|
|
10
|
+
|
|
11
|
+
describe("WebAPI Person tests", () => {
|
|
12
|
+
it("Can get a person image using a request object", done => {
|
|
13
|
+
let scopes = nock.load(__dirname + "/PersonImageData.nock");
|
|
14
|
+
// let scope = nock(host)
|
|
15
|
+
// .post('/api/v1/Agents/Person/GetPersonImage')
|
|
16
|
+
// .reply(200, "0xbadbeef");
|
|
17
|
+
|
|
18
|
+
let agent = new PersonAgent(host);
|
|
19
|
+
agent.getPersonImageAsync({ personId: 147 }).then(response => {
|
|
20
|
+
assert.notEqual(null, response);
|
|
21
|
+
response = response as ArrayBuffer;
|
|
22
|
+
assert.equal(response.byteLength, 1520);
|
|
23
|
+
done();
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it("Can get a person image using a parameter", done => {
|
|
28
|
+
let scopes = nock.load(__dirname + "/PersonImageData.nock");
|
|
29
|
+
// let scope = nock(host)
|
|
30
|
+
// .post('/api/v1/Agents/Person/GetPersonImage')
|
|
31
|
+
// .reply(200, "0xbadbeef");
|
|
32
|
+
|
|
33
|
+
let agent = new PersonAgent(host);
|
|
34
|
+
agent.getPersonImageAsync(147).then(response => {
|
|
35
|
+
assert.notEqual(null, response);
|
|
36
|
+
response = response as ArrayBuffer;
|
|
37
|
+
assert.equal(response.byteLength, 1520);
|
|
38
|
+
done();
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
});
|
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
import * as assert from "assert";
|
|
2
|
-
import axios, { AxiosRequestConfig } from "axios";
|
|
3
|
-
import nock from "nock";
|
|
4
|
-
import { WebApiStatus } from "../src/WebApiBase";
|
|
5
|
-
import { PersonEntity } from "../src/Carriers";
|
|
6
|
-
import { PersonAgent } from "../src/PersonAgent";
|
|
7
|
-
import { WebApiRequestOptions } from "../src/WebApi";
|
|
8
|
-
import { HEADER_NAME_TIMEZONE } from "../src/SoApiConstants";
|
|
9
|
-
|
|
10
|
-
const host: string = "http://localhost/";
|
|
11
|
-
const defaultPerson = require("./Person210.json");
|
|
12
|
-
const utcPerson = require("./Person210-utctz.json");
|
|
13
|
-
const noPerson = require("./Person210-notz.json");
|
|
14
|
-
|
|
15
|
-
axios.defaults.baseURL = host;
|
|
16
|
-
|
|
17
|
-
describe("WebAPI Person timezone tests", () => {
|
|
18
|
-
it("Get person 210 without timezone header", done => {
|
|
19
|
-
let scope = nock(host)
|
|
20
|
-
.post("/api/v1/Agents/Person/GetPersonEntity?personEntityId=210")
|
|
21
|
-
.reply(200, defaultPerson)
|
|
22
|
-
// \"UpdatedDate\":\"2019-12-19T10:55:14.000Z\",\"CreatedDate\":\"2019-12-19T09:44:12.000Z\",\"BirthDate\":\"1999-05-13T00:00:00.000Z\",
|
|
23
|
-
.post("/api/v1/Agents/Person/SavePersonEntity", /1999-05-13T00:00:00.000Z/)
|
|
24
|
-
.reply(200, defaultPerson);
|
|
25
|
-
|
|
26
|
-
let agent = new PersonAgent(host);
|
|
27
|
-
agent.getPersonEntityAsync(210).then(response => {
|
|
28
|
-
assert.equal(response.personId, 210);
|
|
29
|
-
assert.equal(response.firstname, "Steve");
|
|
30
|
-
assert.equal(response.lastname, "Fishmann");
|
|
31
|
-
assert.equal(response.description, "This is awsome guy that will sell you fish in London");
|
|
32
|
-
assert.equal(response.contact?.contactId, 124);
|
|
33
|
-
assert.equal(response.birthDate?.getFullYear(), 1999)
|
|
34
|
-
assert.equal(response.birthDate?.getMonth(), 5-1) // 0-11
|
|
35
|
-
assert.equal(response.birthDate?.getDate(), 13)
|
|
36
|
-
assert.equal(response.createdDate?.getFullYear(), 2019)
|
|
37
|
-
assert.equal(response.createdDate?.getMonth(), 12-1) // 0-11
|
|
38
|
-
assert.equal(response.createdDate?.getDate(), 19)
|
|
39
|
-
assert.equal(response.createdDate?.getHours(), 10)
|
|
40
|
-
assert.equal(response.createdDate?.getMinutes(), 44)
|
|
41
|
-
|
|
42
|
-
agent.savePersonEntityAsync(response, {}).then( response => {
|
|
43
|
-
assert.equal(response.description, "This is awsome guy that will sell you fish in London");
|
|
44
|
-
assert.equal(response.contact?.contactId, 124);
|
|
45
|
-
assert.equal(response.createdDate?.getDate(), 19)
|
|
46
|
-
done();
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
it("Get person 210 with utc timezone header", done => {
|
|
52
|
-
let scope = nock(host)
|
|
53
|
-
.post("/api/v1/Agents/Person/GetPersonEntity?personEntityId=210")
|
|
54
|
-
.reply(200, utcPerson)
|
|
55
|
-
// \"UpdatedDate\":\"2019-12-19T10:55:14.000Z\",\"CreatedDate\":\"2019-12-19T09:44:12.000Z\",\"BirthDate\":\"1999-05-13T00:00:00.000Z\",
|
|
56
|
-
.post("/api/v1/Agents/Person/SavePersonEntity", /1999-05-13T00:00:00.000Z/)
|
|
57
|
-
.reply(200, defaultPerson);
|
|
58
|
-
|
|
59
|
-
let agent = new PersonAgent(host);
|
|
60
|
-
agent.getPersonEntityAsync(210, {timezone: 'utc', timezoneInclude: true }).then(response => {
|
|
61
|
-
assert.equal(response.personId, 210);
|
|
62
|
-
assert.equal(response.firstname, "Steve");
|
|
63
|
-
assert.equal(response.lastname, "Fishmann");
|
|
64
|
-
assert.equal(response.description, "This is awsome guy that will sell you fish in London");
|
|
65
|
-
assert.equal(response.contact?.contactId, 124);
|
|
66
|
-
assert.equal(response.birthDate?.getFullYear(), 1999)
|
|
67
|
-
assert.equal(response.birthDate?.getMonth(), 5-1); // zero-based 0-11
|
|
68
|
-
assert.equal(response.birthDate?.getDate(), 13)
|
|
69
|
-
assert.equal(response.createdDate?.getFullYear(), 2019)
|
|
70
|
-
assert.equal(response.createdDate?.getMonth(), 12-1); // zero-based 0-11
|
|
71
|
-
assert.equal(response.createdDate?.getDate(), 19)
|
|
72
|
-
assert.equal(response.createdDate?.getHours(), 10)
|
|
73
|
-
assert.equal(response.createdDate?.getMinutes(), 44)
|
|
74
|
-
agent.savePersonEntityAsync(response, {timezone: 'utc', timezoneInclude: true}).then( response => {
|
|
75
|
-
assert.equal(response.contact?.contactId, 124);
|
|
76
|
-
assert.equal(response.createdDate?.getDate(), 19)
|
|
77
|
-
done();
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
it("Get person 210 with NOR timezone header", done => {
|
|
83
|
-
let scope = nock(host)
|
|
84
|
-
.post("/api/v1/Agents/Person/GetPersonEntity?personEntityId=210")
|
|
85
|
-
.reply(200, noPerson)
|
|
86
|
-
// \"UpdatedDate\":\"2019-12-19T10:55:14.000Z\",\"CreatedDate\":\"2019-12-19T09:44:12.000Z\",\"BirthDate\":\"1999-05-13T00:00:00.000Z\",
|
|
87
|
-
.post("/api/v1/Agents/Person/SavePersonEntity", /1999-05-13T00:00:00.000Z/)
|
|
88
|
-
.reply(200, defaultPerson);
|
|
89
|
-
|
|
90
|
-
let agent = new PersonAgent(host);
|
|
91
|
-
agent.getPersonEntityAsync(210, { timezone: 'no', timezoneInclude: true }).then(response => {
|
|
92
|
-
assert.equal(response.personId, 210);
|
|
93
|
-
assert.equal(response.firstname, "Steve");
|
|
94
|
-
assert.equal(response.lastname, "Fishmann");
|
|
95
|
-
assert.equal(response.description, "This is awsome guy that will sell you fish in London");
|
|
96
|
-
assert.equal(response.contact?.contactId, 124);
|
|
97
|
-
assert.equal(response.birthDate?.getFullYear(), 1999)
|
|
98
|
-
assert.equal(response.birthDate?.getMonth(), 5-1)
|
|
99
|
-
assert.equal(response.birthDate?.getDate(), 13)
|
|
100
|
-
assert.equal(response.createdDate?.getFullYear(), 2019)
|
|
101
|
-
assert.equal(response.createdDate?.getMonth(), 12-1)
|
|
102
|
-
assert.equal(response.createdDate?.getDate(), 19)
|
|
103
|
-
assert.equal(response.createdDate?.getHours(), 10)
|
|
104
|
-
assert.equal(response.createdDate?.getMinutes(), 44)
|
|
105
|
-
agent.savePersonEntityAsync(response, {timezone: 'no', timezoneInclude: true}).then( response => {
|
|
106
|
-
assert.equal(response.contact?.contactId, 124);
|
|
107
|
-
assert.equal(response.createdDate?.getDate(), 19)
|
|
108
|
-
done();
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
});
|
|
1
|
+
import * as assert from "assert";
|
|
2
|
+
import axios, { AxiosRequestConfig } from "axios";
|
|
3
|
+
import nock from "nock";
|
|
4
|
+
import { WebApiStatus } from "../src/WebApiBase";
|
|
5
|
+
import { PersonEntity } from "../src/Carriers";
|
|
6
|
+
import { PersonAgent } from "../src/PersonAgent";
|
|
7
|
+
import { WebApiRequestOptions } from "../src/WebApi";
|
|
8
|
+
import { HEADER_NAME_TIMEZONE } from "../src/SoApiConstants";
|
|
9
|
+
|
|
10
|
+
const host: string = "http://localhost/";
|
|
11
|
+
const defaultPerson = require("./Person210.json");
|
|
12
|
+
const utcPerson = require("./Person210-utctz.json");
|
|
13
|
+
const noPerson = require("./Person210-notz.json");
|
|
14
|
+
|
|
15
|
+
axios.defaults.baseURL = host;
|
|
16
|
+
|
|
17
|
+
describe("WebAPI Person timezone tests", () => {
|
|
18
|
+
it("Get person 210 without timezone header", done => {
|
|
19
|
+
let scope = nock(host)
|
|
20
|
+
.post("/api/v1/Agents/Person/GetPersonEntity?personEntityId=210")
|
|
21
|
+
.reply(200, defaultPerson)
|
|
22
|
+
// \"UpdatedDate\":\"2019-12-19T10:55:14.000Z\",\"CreatedDate\":\"2019-12-19T09:44:12.000Z\",\"BirthDate\":\"1999-05-13T00:00:00.000Z\",
|
|
23
|
+
.post("/api/v1/Agents/Person/SavePersonEntity", /1999-05-13T00:00:00.000Z/)
|
|
24
|
+
.reply(200, defaultPerson);
|
|
25
|
+
|
|
26
|
+
let agent = new PersonAgent(host);
|
|
27
|
+
agent.getPersonEntityAsync(210).then(response => {
|
|
28
|
+
assert.equal(response.personId, 210);
|
|
29
|
+
assert.equal(response.firstname, "Steve");
|
|
30
|
+
assert.equal(response.lastname, "Fishmann");
|
|
31
|
+
assert.equal(response.description, "This is awsome guy that will sell you fish in London");
|
|
32
|
+
assert.equal(response.contact?.contactId, 124);
|
|
33
|
+
assert.equal(response.birthDate?.getFullYear(), 1999)
|
|
34
|
+
assert.equal(response.birthDate?.getMonth(), 5-1) // 0-11
|
|
35
|
+
assert.equal(response.birthDate?.getDate(), 13)
|
|
36
|
+
assert.equal(response.createdDate?.getFullYear(), 2019)
|
|
37
|
+
assert.equal(response.createdDate?.getMonth(), 12-1) // 0-11
|
|
38
|
+
assert.equal(response.createdDate?.getDate(), 19)
|
|
39
|
+
assert.equal(response.createdDate?.getHours(), 10)
|
|
40
|
+
assert.equal(response.createdDate?.getMinutes(), 44)
|
|
41
|
+
|
|
42
|
+
agent.savePersonEntityAsync(response, {}).then( response => {
|
|
43
|
+
assert.equal(response.description, "This is awsome guy that will sell you fish in London");
|
|
44
|
+
assert.equal(response.contact?.contactId, 124);
|
|
45
|
+
assert.equal(response.createdDate?.getDate(), 19)
|
|
46
|
+
done();
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
it("Get person 210 with utc timezone header", done => {
|
|
52
|
+
let scope = nock(host)
|
|
53
|
+
.post("/api/v1/Agents/Person/GetPersonEntity?personEntityId=210")
|
|
54
|
+
.reply(200, utcPerson)
|
|
55
|
+
// \"UpdatedDate\":\"2019-12-19T10:55:14.000Z\",\"CreatedDate\":\"2019-12-19T09:44:12.000Z\",\"BirthDate\":\"1999-05-13T00:00:00.000Z\",
|
|
56
|
+
.post("/api/v1/Agents/Person/SavePersonEntity", /1999-05-13T00:00:00.000Z/)
|
|
57
|
+
.reply(200, defaultPerson);
|
|
58
|
+
|
|
59
|
+
let agent = new PersonAgent(host);
|
|
60
|
+
agent.getPersonEntityAsync(210, {timezone: 'utc', timezoneInclude: true }).then(response => {
|
|
61
|
+
assert.equal(response.personId, 210);
|
|
62
|
+
assert.equal(response.firstname, "Steve");
|
|
63
|
+
assert.equal(response.lastname, "Fishmann");
|
|
64
|
+
assert.equal(response.description, "This is awsome guy that will sell you fish in London");
|
|
65
|
+
assert.equal(response.contact?.contactId, 124);
|
|
66
|
+
assert.equal(response.birthDate?.getFullYear(), 1999)
|
|
67
|
+
assert.equal(response.birthDate?.getMonth(), 5-1); // zero-based 0-11
|
|
68
|
+
assert.equal(response.birthDate?.getDate(), 13)
|
|
69
|
+
assert.equal(response.createdDate?.getFullYear(), 2019)
|
|
70
|
+
assert.equal(response.createdDate?.getMonth(), 12-1); // zero-based 0-11
|
|
71
|
+
assert.equal(response.createdDate?.getDate(), 19)
|
|
72
|
+
assert.equal(response.createdDate?.getHours(), 10)
|
|
73
|
+
assert.equal(response.createdDate?.getMinutes(), 44)
|
|
74
|
+
agent.savePersonEntityAsync(response, {timezone: 'utc', timezoneInclude: true}).then( response => {
|
|
75
|
+
assert.equal(response.contact?.contactId, 124);
|
|
76
|
+
assert.equal(response.createdDate?.getDate(), 19)
|
|
77
|
+
done();
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it("Get person 210 with NOR timezone header", done => {
|
|
83
|
+
let scope = nock(host)
|
|
84
|
+
.post("/api/v1/Agents/Person/GetPersonEntity?personEntityId=210")
|
|
85
|
+
.reply(200, noPerson)
|
|
86
|
+
// \"UpdatedDate\":\"2019-12-19T10:55:14.000Z\",\"CreatedDate\":\"2019-12-19T09:44:12.000Z\",\"BirthDate\":\"1999-05-13T00:00:00.000Z\",
|
|
87
|
+
.post("/api/v1/Agents/Person/SavePersonEntity", /1999-05-13T00:00:00.000Z/)
|
|
88
|
+
.reply(200, defaultPerson);
|
|
89
|
+
|
|
90
|
+
let agent = new PersonAgent(host);
|
|
91
|
+
agent.getPersonEntityAsync(210, { timezone: 'no', timezoneInclude: true }).then(response => {
|
|
92
|
+
assert.equal(response.personId, 210);
|
|
93
|
+
assert.equal(response.firstname, "Steve");
|
|
94
|
+
assert.equal(response.lastname, "Fishmann");
|
|
95
|
+
assert.equal(response.description, "This is awsome guy that will sell you fish in London");
|
|
96
|
+
assert.equal(response.contact?.contactId, 124);
|
|
97
|
+
assert.equal(response.birthDate?.getFullYear(), 1999)
|
|
98
|
+
assert.equal(response.birthDate?.getMonth(), 5-1)
|
|
99
|
+
assert.equal(response.birthDate?.getDate(), 13)
|
|
100
|
+
assert.equal(response.createdDate?.getFullYear(), 2019)
|
|
101
|
+
assert.equal(response.createdDate?.getMonth(), 12-1)
|
|
102
|
+
assert.equal(response.createdDate?.getDate(), 19)
|
|
103
|
+
assert.equal(response.createdDate?.getHours(), 10)
|
|
104
|
+
assert.equal(response.createdDate?.getMinutes(), 44)
|
|
105
|
+
agent.savePersonEntityAsync(response, {timezone: 'no', timezoneInclude: true}).then( response => {
|
|
106
|
+
assert.equal(response.contact?.contactId, 124);
|
|
107
|
+
assert.equal(response.createdDate?.getDate(), 19)
|
|
108
|
+
done();
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
});
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
{
|
|
2
|
-
"RecurrenceId": 3,
|
|
3
|
-
"StartDate": "2019-02-15T00:00:00",
|
|
4
|
-
"EndDate": "2019-02-22T00:00:00",
|
|
5
|
-
"RecurrenceEndType": "EndDate",
|
|
6
|
-
"Pattern": "Weekly",
|
|
7
|
-
"DayPattern": { "Cycle": 1, "Pattern": "EveryCyclicDay" },
|
|
8
|
-
"WeekPattern": { "Cycle": 1, "Weekdays": "Monday, Wednesday, Friday" },
|
|
9
|
-
"MonthPattern": {
|
|
10
|
-
"Cycle": 1,
|
|
11
|
-
"Day": 15,
|
|
12
|
-
"Weekday": "Monday, Friday",
|
|
13
|
-
"WeekOfMonth": "Third",
|
|
14
|
-
"Pattern": "DayOfMonth"
|
|
15
|
-
},
|
|
16
|
-
"YearPattern": {
|
|
17
|
-
"Cycle": 2,
|
|
18
|
-
"Day": 15,
|
|
19
|
-
"Weekday": "Friday",
|
|
20
|
-
"WeekOfMonth": "Third",
|
|
21
|
-
"Pattern": "DayOfMonth"
|
|
22
|
-
},
|
|
23
|
-
"Dates": [
|
|
24
|
-
{
|
|
25
|
-
"Date": "2019-02-15T00:00:00",
|
|
26
|
-
"IsConflict": true,
|
|
27
|
-
"Description": null,
|
|
28
|
-
"DescriptionStyleHint": "conflict",
|
|
29
|
-
"Tooltip": "{conflict_id=116&conflict_id=121&conflict_id=124}"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"Date": "2019-02-18T00:00:00",
|
|
33
|
-
"IsConflict": false,
|
|
34
|
-
"Description": null,
|
|
35
|
-
"DescriptionStyleHint": "",
|
|
36
|
-
"Tooltip": null
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"Date": "2019-02-20T00:00:00",
|
|
40
|
-
"IsConflict": false,
|
|
41
|
-
"Description": null,
|
|
42
|
-
"DescriptionStyleHint": "",
|
|
43
|
-
"Tooltip": null
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"Date": "2019-02-22T00:00:00",
|
|
47
|
-
"IsConflict": false,
|
|
48
|
-
"Description": null,
|
|
49
|
-
"DescriptionStyleHint": "",
|
|
50
|
-
"Tooltip": null
|
|
51
|
-
}
|
|
52
|
-
],
|
|
53
|
-
"RecurrenceCounter": 1,
|
|
54
|
-
"IsRecurrence": true
|
|
55
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"RecurrenceId": 3,
|
|
3
|
+
"StartDate": "2019-02-15T00:00:00",
|
|
4
|
+
"EndDate": "2019-02-22T00:00:00",
|
|
5
|
+
"RecurrenceEndType": "EndDate",
|
|
6
|
+
"Pattern": "Weekly",
|
|
7
|
+
"DayPattern": { "Cycle": 1, "Pattern": "EveryCyclicDay" },
|
|
8
|
+
"WeekPattern": { "Cycle": 1, "Weekdays": "Monday, Wednesday, Friday" },
|
|
9
|
+
"MonthPattern": {
|
|
10
|
+
"Cycle": 1,
|
|
11
|
+
"Day": 15,
|
|
12
|
+
"Weekday": "Monday, Friday",
|
|
13
|
+
"WeekOfMonth": "Third",
|
|
14
|
+
"Pattern": "DayOfMonth"
|
|
15
|
+
},
|
|
16
|
+
"YearPattern": {
|
|
17
|
+
"Cycle": 2,
|
|
18
|
+
"Day": 15,
|
|
19
|
+
"Weekday": "Friday",
|
|
20
|
+
"WeekOfMonth": "Third",
|
|
21
|
+
"Pattern": "DayOfMonth"
|
|
22
|
+
},
|
|
23
|
+
"Dates": [
|
|
24
|
+
{
|
|
25
|
+
"Date": "2019-02-15T00:00:00",
|
|
26
|
+
"IsConflict": true,
|
|
27
|
+
"Description": null,
|
|
28
|
+
"DescriptionStyleHint": "conflict",
|
|
29
|
+
"Tooltip": "{conflict_id=116&conflict_id=121&conflict_id=124}"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"Date": "2019-02-18T00:00:00",
|
|
33
|
+
"IsConflict": false,
|
|
34
|
+
"Description": null,
|
|
35
|
+
"DescriptionStyleHint": "",
|
|
36
|
+
"Tooltip": null
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"Date": "2019-02-20T00:00:00",
|
|
40
|
+
"IsConflict": false,
|
|
41
|
+
"Description": null,
|
|
42
|
+
"DescriptionStyleHint": "",
|
|
43
|
+
"Tooltip": null
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"Date": "2019-02-22T00:00:00",
|
|
47
|
+
"IsConflict": false,
|
|
48
|
+
"Description": null,
|
|
49
|
+
"DescriptionStyleHint": "",
|
|
50
|
+
"Tooltip": null
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"RecurrenceCounter": 1,
|
|
54
|
+
"IsRecurrence": true
|
|
55
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import nock from "nock";
|
|
2
|
-
import axios from "axios";
|
|
3
|
-
import { DashAgent } from "../src/DashAgent";
|
|
4
|
-
|
|
5
|
-
const host: string = "http://localhost/";
|
|
6
|
-
|
|
7
|
-
axios.defaults.baseURL = host;
|
|
8
|
-
|
|
9
|
-
describe("ResponseCallback tests", () => {
|
|
10
|
-
it("Calls responseCallback when specified", done => {
|
|
11
|
-
const dbStats = "implementationMS=512&Calls=7&Read=123";
|
|
12
|
-
const scope = nock(host)
|
|
13
|
-
.post("/api/v1/Agents/Dash/CreateDefaultDash")
|
|
14
|
-
.reply(200, { Dashboard: null }, { "x-db-stats": dbStats });
|
|
15
|
-
|
|
16
|
-
new DashAgent(host).createDefaultDashAsync({
|
|
17
|
-
responseCallback: response => {
|
|
18
|
-
expect(response.headers["x-db-stats"]).toBe(dbStats);
|
|
19
|
-
done();
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
});
|
|
1
|
+
import nock from "nock";
|
|
2
|
+
import axios from "axios";
|
|
3
|
+
import { DashAgent } from "../src/DashAgent";
|
|
4
|
+
|
|
5
|
+
const host: string = "http://localhost/";
|
|
6
|
+
|
|
7
|
+
axios.defaults.baseURL = host;
|
|
8
|
+
|
|
9
|
+
describe("ResponseCallback tests", () => {
|
|
10
|
+
it("Calls responseCallback when specified", done => {
|
|
11
|
+
const dbStats = "implementationMS=512&Calls=7&Read=123";
|
|
12
|
+
const scope = nock(host)
|
|
13
|
+
.post("/api/v1/Agents/Dash/CreateDefaultDash")
|
|
14
|
+
.reply(200, { Dashboard: null }, { "x-db-stats": dbStats });
|
|
15
|
+
|
|
16
|
+
new DashAgent(host).createDefaultDashAsync({
|
|
17
|
+
responseCallback: response => {
|
|
18
|
+
expect(response.headers["x-db-stats"]).toBe(dbStats);
|
|
19
|
+
done();
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
});
|