@quantcdn/quant-client 2.0.11 → 2.0.13

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.
@@ -143,7 +143,7 @@ class QuantClient {
143
143
  find_attachments: false
144
144
  };
145
145
  if (typeof payload.skipPurge !== 'undefined') {
146
- headers['Quant-Skip-Purge'] = true;
146
+ headers['Quant-Skip-Purge'] = 'true';
147
147
  }
148
148
  if (typeof payload.findAttachments !== 'undefined') {
149
149
  body.find_attachments = payload.findAttachments;
@@ -220,7 +220,17 @@ class QuantClient {
220
220
  * The repsonse object.
221
221
  */
222
222
  redirect: (payload) => __awaiter(this, void 0, void 0, function* () {
223
- return yield this._project.post('redirect', payload);
223
+ const headers = {};
224
+ const body = {
225
+ url: payload.url,
226
+ redirect_url: payload.redirect_url,
227
+ redirect_http_code: payload.redirect_http_code,
228
+ published: payload.published
229
+ };
230
+ if (typeof payload.skipPurge !== 'undefined') {
231
+ headers['Quant-Skip-Purge'] = 'true';
232
+ }
233
+ return yield this._project.post('redirect', body, headers);
224
234
  }),
225
235
  /**
226
236
  * Proxy a URL to a different origin.
@@ -244,7 +254,7 @@ class QuantClient {
244
254
  * The repsonse object.
245
255
  */
246
256
  delete: (payload) => __awaiter(this, void 0, void 0, function* () {
247
- const response = yield this._project.delete('delete/all', {}, {
257
+ const response = yield this._project.delete('delete/all?force_delete=true', {}, {
248
258
  'Quant-Url': payload.url
249
259
  });
250
260
  return response.first();
@@ -37,6 +37,7 @@ export interface RedirectPayload {
37
37
  redirect_url: string;
38
38
  redirect_http_code: RedirectStatus;
39
39
  published: boolean;
40
+ skipPurge?: boolean;
40
41
  }
41
42
  export interface URLPayload {
42
43
  url: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quantcdn/quant-client",
3
- "version": "2.0.11",
3
+ "version": "2.0.13",
4
4
  "description": "Client library for API connectivity",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "homepage": "https://github.com/quantcdn/quant-client#readme",
25
25
  "dependencies": {
26
- "@cypress/request": "3.0.1",
26
+ "@cypress/request": "3.0.9",
27
27
  "mime-types": "^2.1.27"
28
28
  },
29
29
  "devDependencies": {