diff --git a/docs/dist/documentation.md b/docs/dist/documentation.md index 10baca458..f871d7316 100644 --- a/docs/dist/documentation.md +++ b/docs/dist/documentation.md @@ -242,6 +242,12 @@ helper for DataExtension.#fixShared_item
setupSDK(sessionKey, authObject)SDK

Returns an SDK instance to be used for API calls

+
getActualJson(customerKey, type, subtype, [buName])Promise.<string>
+

gets file from Retrieve folder

+
+
getActualFile(customerKey, type, subtype, ext)string
+

gets file from Retrieve folder

+
## Typedefs @@ -8461,6 +8467,36 @@ Returns an SDK instance to be used for API calls | sessionKey | string | key for specific BU | | authObject | TYPE.AuthObject | credentials for specific BU | + + +## getActualJson(customerKey, type, subtype, [buName]) ⇒ Promise.<string> +gets file from Retrieve folder + +**Kind**: global function +**Returns**: Promise.<string> - file in string form + +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| customerKey | string | | of metadata | +| type | string | | of metadata | +| subtype | string | | of metadata | +| [buName] | string | "testBU" | used when we need to test on ParentBU | + + + +## getActualFile(customerKey, type, subtype, ext) ⇒ string +gets file from Retrieve folder + +**Kind**: global function +**Returns**: string - file path + +| Param | Type | Description | +| --- | --- | --- | +| customerKey | string | of metadata | +| type | string | of metadata | +| subtype | string | of metadata | +| ext | string | file extension | + ## TypeKeyCombo : Object.<string, string> diff --git a/test/general.test.js b/test/general.test.js index 9497b7e22..cbea04e29 100644 --- a/test/general.test.js +++ b/test/general.test.js @@ -1,4 +1,7 @@ -import chai, { assert, expect } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; +const expect = chai.expect; + import chaiFiles from 'chai-files'; import * as testUtils from './utils.js'; import handler from '../lib/index.js'; diff --git a/test/type.asset.test.js b/test/type.asset.test.js index 959ce797e..5e2312c1c 100644 --- a/test/type.asset.test.js +++ b/test/type.asset.test.js @@ -1,6 +1,9 @@ import File from '../lib/util/file.js'; -import chai, { assert, expect } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; +const expect = chai.expect; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.attributeGroup.test.js b/test/type.attributeGroup.test.js index da3698f8c..8805fe36f 100644 --- a/test/type.attributeGroup.test.js +++ b/test/type.attributeGroup.test.js @@ -1,4 +1,6 @@ -import chai, { assert } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.attributeSet.test.js b/test/type.attributeSet.test.js index a4e44e3aa..d1b06114d 100644 --- a/test/type.attributeSet.test.js +++ b/test/type.attributeSet.test.js @@ -1,4 +1,6 @@ -import chai, { assert } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.automation.test.js b/test/type.automation.test.js index 543859e62..265f98c24 100644 --- a/test/type.automation.test.js +++ b/test/type.automation.test.js @@ -1,4 +1,7 @@ -import chai, { assert, expect } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; +const expect = chai.expect; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.dataExtension.test.js b/test/type.dataExtension.test.js index 55a116c07..c82911cba 100644 --- a/test/type.dataExtension.test.js +++ b/test/type.dataExtension.test.js @@ -1,4 +1,7 @@ -import chai, { assert, expect } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; +const expect = chai.expect; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.dataExtract.test.js b/test/type.dataExtract.test.js index a2beb9ffe..99842c358 100644 --- a/test/type.dataExtract.test.js +++ b/test/type.dataExtract.test.js @@ -1,4 +1,6 @@ -import chai, { assert } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.fileTransfer.test.js b/test/type.fileTransfer.test.js index b4c18386b..3c6e70bd8 100644 --- a/test/type.fileTransfer.test.js +++ b/test/type.fileTransfer.test.js @@ -1,4 +1,6 @@ -import chai, { assert } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.importFile.test.js b/test/type.importFile.test.js index 42e12a286..80f148304 100644 --- a/test/type.importFile.test.js +++ b/test/type.importFile.test.js @@ -1,4 +1,6 @@ -import chai, { assert } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.journey.test.js b/test/type.journey.test.js index aaf43e923..3e83a731e 100644 --- a/test/type.journey.test.js +++ b/test/type.journey.test.js @@ -1,4 +1,6 @@ -import chai, { assert } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.mobileKeyword.test.js b/test/type.mobileKeyword.test.js index 7ecb99b89..0bc57ec1b 100644 --- a/test/type.mobileKeyword.test.js +++ b/test/type.mobileKeyword.test.js @@ -1,4 +1,7 @@ -import chai, { assert, expect } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; +const expect = chai.expect; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.mobileMessage.test.js b/test/type.mobileMessage.test.js index 9e8cc1d16..d02cde0c3 100644 --- a/test/type.mobileMessage.test.js +++ b/test/type.mobileMessage.test.js @@ -1,4 +1,7 @@ -import chai, { assert, expect } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; +const expect = chai.expect; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.query.test.js b/test/type.query.test.js index dc2b183cd..2dbcd246a 100644 --- a/test/type.query.test.js +++ b/test/type.query.test.js @@ -1,4 +1,7 @@ -import chai, { assert, expect } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; +const expect = chai.expect; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.script.test.js b/test/type.script.test.js index 330553518..2503b3a48 100644 --- a/test/type.script.test.js +++ b/test/type.script.test.js @@ -1,4 +1,7 @@ -import chai, { assert, expect } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; +const expect = chai.expect; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.transactionalEmail.test.js b/test/type.transactionalEmail.test.js index 60dff65e8..87f15552b 100644 --- a/test/type.transactionalEmail.test.js +++ b/test/type.transactionalEmail.test.js @@ -1,4 +1,6 @@ -import chai, { assert } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.transactionalPush.test.js b/test/type.transactionalPush.test.js index dd6e6e9ec..ac6b4e0f1 100644 --- a/test/type.transactionalPush.test.js +++ b/test/type.transactionalPush.test.js @@ -1,4 +1,6 @@ -import chai, { assert } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.transactionalSMS.test.js b/test/type.transactionalSMS.test.js index 0917e7fae..137cc4404 100644 --- a/test/type.transactionalSMS.test.js +++ b/test/type.transactionalSMS.test.js @@ -1,4 +1,7 @@ -import chai, { assert, expect } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; +const expect = chai.expect; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.triggeredSend.test.js b/test/type.triggeredSend.test.js index 8d4e3a666..7ad9029d2 100644 --- a/test/type.triggeredSend.test.js +++ b/test/type.triggeredSend.test.js @@ -1,4 +1,6 @@ -import chai, { assert } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.user.test.js b/test/type.user.test.js index 7811b21f0..80b8740ef 100644 --- a/test/type.user.test.js +++ b/test/type.user.test.js @@ -1,4 +1,7 @@ -import chai, { assert, expect } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; +const expect = chai.expect; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.verification.test.js b/test/type.verification.test.js index c93a92f08..d0076e6dd 100644 --- a/test/type.verification.test.js +++ b/test/type.verification.test.js @@ -1,4 +1,6 @@ -import chai, { assert } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js';