@contentstack/marketplace-sdk 1.1.1 → 1.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.
- package/CHANGELOG.md +6 -0
- package/dist/es-modules/marketplace/app/hosting/index.js +50 -0
- package/dist/es5/marketplace/app/hosting/index.js +50 -0
- package/dist/nativescript/contentstack-marketplace.js +1 -1
- package/dist/node/contentstack-marketplace.js +1 -1
- package/dist/react-native/contentstack-marketplace.js +1 -1
- package/dist/web/contentstack-marketplace.js +1 -1
- package/package.json +1 -1
- package/types/marketplace/app/hosting.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [v1.2.1](https://github.com/contentstack/contentstack-marketplace-sdk/tree/v1.1.1) (2024-07-08)
|
|
4
|
+
- added params in disconnect method in types support
|
|
5
|
+
|
|
6
|
+
## [v1.2.0](https://github.com/contentstack/contentstack-marketplace-sdk/tree/v1.1.1) (2024-06-21)
|
|
7
|
+
- Added disconnect hosting function
|
|
8
|
+
|
|
3
9
|
## [v1.1.1](https://github.com/contentstack/contentstack-marketplace-sdk/tree/v1.1.1) (2024-06-11)
|
|
4
10
|
- Added GCP Region support
|
|
5
11
|
|
|
@@ -281,4 +281,54 @@ export function Hosting(http, data, params) {
|
|
|
281
281
|
return new Deployment(http, content, _this.params);
|
|
282
282
|
};
|
|
283
283
|
}
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* @description this disconnects the hosting.
|
|
287
|
+
* @memberof Hosting
|
|
288
|
+
* @func disconnect
|
|
289
|
+
* @returns {disconnect}
|
|
290
|
+
*
|
|
291
|
+
* @example
|
|
292
|
+
* import * as contentstack from '@contentstack/marketplace'
|
|
293
|
+
* const client = contentstack.client({ authtoken: 'TOKEN'})
|
|
294
|
+
* client.marketplace('organization_uid').app('manifest_uid').hosting().disconnect({ 'provider': 'launch' })
|
|
295
|
+
*
|
|
296
|
+
*/
|
|
297
|
+
this.disconnect = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
|
|
298
|
+
var data,
|
|
299
|
+
headers,
|
|
300
|
+
response,
|
|
301
|
+
_args6 = arguments;
|
|
302
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
303
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
304
|
+
case 0:
|
|
305
|
+
data = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
|
306
|
+
_context6.prev = 1;
|
|
307
|
+
headers = {
|
|
308
|
+
headers: _objectSpread({}, cloneDeep(_this.params))
|
|
309
|
+
};
|
|
310
|
+
_context6.next = 5;
|
|
311
|
+
return http.patch("".concat(_this.urlPath, "/disconnect"), data, headers);
|
|
312
|
+
case 5:
|
|
313
|
+
response = _context6.sent;
|
|
314
|
+
if (!response.data) {
|
|
315
|
+
_context6.next = 10;
|
|
316
|
+
break;
|
|
317
|
+
}
|
|
318
|
+
return _context6.abrupt("return", response.data);
|
|
319
|
+
case 10:
|
|
320
|
+
throw error(response);
|
|
321
|
+
case 11:
|
|
322
|
+
_context6.next = 16;
|
|
323
|
+
break;
|
|
324
|
+
case 13:
|
|
325
|
+
_context6.prev = 13;
|
|
326
|
+
_context6.t0 = _context6["catch"](1);
|
|
327
|
+
throw error(_context6.t0);
|
|
328
|
+
case 16:
|
|
329
|
+
case "end":
|
|
330
|
+
return _context6.stop();
|
|
331
|
+
}
|
|
332
|
+
}, _callee6, null, [[1, 13]]);
|
|
333
|
+
}));
|
|
284
334
|
}
|
|
@@ -293,4 +293,54 @@ function Hosting(http, data, params) {
|
|
|
293
293
|
return new _deployment.Deployment(http, content, _this.params);
|
|
294
294
|
};
|
|
295
295
|
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* @description this disconnects the hosting.
|
|
299
|
+
* @memberof Hosting
|
|
300
|
+
* @func disconnect
|
|
301
|
+
* @returns {disconnect}
|
|
302
|
+
*
|
|
303
|
+
* @example
|
|
304
|
+
* import * as contentstack from '@contentstack/marketplace'
|
|
305
|
+
* const client = contentstack.client({ authtoken: 'TOKEN'})
|
|
306
|
+
* client.marketplace('organization_uid').app('manifest_uid').hosting().disconnect({ 'provider': 'launch' })
|
|
307
|
+
*
|
|
308
|
+
*/
|
|
309
|
+
this.disconnect = /*#__PURE__*/(0, _asyncToGenerator3["default"])( /*#__PURE__*/_regenerator2["default"].mark(function _callee6() {
|
|
310
|
+
var data,
|
|
311
|
+
headers,
|
|
312
|
+
response,
|
|
313
|
+
_args6 = arguments;
|
|
314
|
+
return _regenerator2["default"].wrap(function _callee6$(_context6) {
|
|
315
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
316
|
+
case 0:
|
|
317
|
+
data = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
|
318
|
+
_context6.prev = 1;
|
|
319
|
+
headers = {
|
|
320
|
+
headers: _objectSpread({}, (0, _cloneDeep2["default"])(_this.params))
|
|
321
|
+
};
|
|
322
|
+
_context6.next = 5;
|
|
323
|
+
return http.patch("".concat(_this.urlPath, "/disconnect"), data, headers);
|
|
324
|
+
case 5:
|
|
325
|
+
response = _context6.sent;
|
|
326
|
+
if (!response.data) {
|
|
327
|
+
_context6.next = 10;
|
|
328
|
+
break;
|
|
329
|
+
}
|
|
330
|
+
return _context6.abrupt("return", response.data);
|
|
331
|
+
case 10:
|
|
332
|
+
throw (0, _contentstackError2["default"])(response);
|
|
333
|
+
case 11:
|
|
334
|
+
_context6.next = 16;
|
|
335
|
+
break;
|
|
336
|
+
case 13:
|
|
337
|
+
_context6.prev = 13;
|
|
338
|
+
_context6.t0 = _context6["catch"](1);
|
|
339
|
+
throw (0, _contentstackError2["default"])(_context6.t0);
|
|
340
|
+
case 16:
|
|
341
|
+
case "end":
|
|
342
|
+
return _context6.stop();
|
|
343
|
+
}
|
|
344
|
+
}, _callee6, null, [[1, 13]]);
|
|
345
|
+
}));
|
|
296
346
|
}
|